STACKS_TESTNET

Pre-configured StacksNetwork object for Stacks testnet. Uses the Hiro testnet API (https://api.testnet.hiro.so) as the default base URL.


Usage

import { STACKS_TESTNET } from '@stacks/network';

console.log(STACKS_TESTNET.client.baseUrl);
// 'https://api.testnet.hiro.so'

Most @stacks/transactions functions accept a network string directly:

import { makeSTXTokenTransfer } from '@stacks/transactions';

const tx = await makeSTXTokenTransfer({
  // ...
  network: 'testnet', // equivalent to passing STACKS_TESTNET
});

Notes

  • Addresses on testnet start with ST (single-sig) or SN (multi-sig).

  • The bootAddress is ST000000000000000000002AMW42H.

  • Magic bytes: T2.

Reference Linkarrow-up-right


Definition

Last updated

Was this helpful?