@stacks/network
Installation
npm install @stacks/networkNetwork constants
STACKS_MAINNET
import { STACKS_MAINNET } from '@stacks/network';
console.log(STACKS_MAINNET);
// {
// chainId: 1,
// transactionVersion: 0,
// peerNetworkId: 385875968,
// magicBytes: "X2",
// bootAddress: "SP000000000000000000002Q6VF78",
// addressVersion: {
// singleSig: 22,
// multiSig: 20,
// },
// client: {
// baseUrl: "https://api.mainnet.hiro.so",
// },
// }STACKS_TESTNET
STACKS_DEVNET / STACKS_MOCKNET
networkFromName
Signature
Parameters
Name
Type
Required
Description
Examples
Using with transactions
clientFromNetwork
Signature
Parameters
Name
Type
Required
Description
Example
Network configuration properties
Property
Type
Description
Default values
Was this helpful?