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://api.mainnet.hiro.so" });const network = new StacksMainnet({ fetch: createFetchFn() }); Copy
const network = new StacksMainnet();const network = new StacksMainnet({ url: "https://api.mainnet.hiro.so" });const network = new StacksMainnet({ 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 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