STACKS_MAINNET
Pre-configured StacksNetwork object for Stacks mainnet. Uses the Hiro mainnet API (https://api.mainnet.hiro.so) as the default base URL.
Usage
import { STACKS_MAINNET } from '@stacks/network';
console.log(STACKS_MAINNET.client.baseUrl);
// 'https://api.mainnet.hiro.so'Most @stacks/transactions functions accept a network string directly, making the constant optional:
import { makeSTXTokenTransfer } from '@stacks/transactions';
const tx = await makeSTXTokenTransfer({
// ...
network: 'mainnet', // equivalent to passing STACKS_MAINNET
});Notes
Addresses on mainnet start with
SP(single-sig) orSM(multi-sig).The
bootAddressisSP000000000000000000002Q6VF78.Magic bytes:
X2.
Definition
Last updated
Was this helpful?