A StacksNetwork with the parameters for the Stacks mainnet. 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 StacksMainnet();const network = new StacksMainnet({ url: "https://stacks-node-api.mainnet.stacks.co" });const network = new StacksMainnet({ fetch: createFetchFn() }); Copy
const network = new StacksMainnet();const network = new StacksMainnet({ url: "https://stacks-node-api.mainnet.stacks.co" });const network = new StacksMainnet({ fetch: createFetchFn() });
createFetchFn, createApiKeyMiddleware
Optional
Readonly
Static
Generated using TypeDoc
A StacksNetwork with the parameters for the Stacks mainnet. 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