A StacksNetwork with the parameters for the Stacks testnet. Pass a url option to override the default Hiro hosted Stacks node API. Pass a fetchFn option to customize the default networking functions.
url
fetchFn
const network = new StacksTestnet();const network = new StacksTestnet({ url: "https://stacks-node-api.testnet.stacks.co" });const network = new StacksTestnet({ fetch: createFetchFn() }); Copy
const network = new StacksTestnet();const network = new StacksTestnet({ url: "https://stacks-node-api.testnet.stacks.co" });const network = new StacksTestnet({ fetch: createFetchFn() });
createFetchFn, createApiKeyMiddleware
Optional
Readonly
Returns true if the network is configured to 'mainnet', based on the TransactionVersion
true
Static
A static network constructor from a network name
Generated using TypeDoc
A StacksNetwork with the parameters for the Stacks testnet. Pass a
url
option to override the default Hiro hosted Stacks node API. Pass afetchFn
option to customize the default networking functions.Example
Related
createFetchFn, createApiKeyMiddleware