StacksNetworkName
Usage
import { StacksNetworkName } from '@stacks/network';
function getExplorerUrl(network: StacksNetworkName): string {
switch (network) {
case 'mainnet':
return 'https://explorer.hiro.so';
case 'testnet':
return 'https://explorer.hiro.so/?chain=testnet';
default:
return 'http://localhost:3999';
}
}import { makeSTXTokenTransfer } from '@stacks/transactions';
const tx = await makeSTXTokenTransfer({
// ...
network: 'testnet', // StacksNetworkName
});Definition
Values
Value
Description
Last updated
Was this helpful?