TransactionVersion
Last updated
Was this helpful?
Enum representing the transaction version byte. Used internally for serializing and deserializing transactions, ensuring transactions can't be replayed on other networks. Similar in purpose to ChainId.
import { TransactionVersion } from '@stacks/network';
if (network.transactionVersion === TransactionVersion.Mainnet) {
console.log('Mainnet transaction version');
}enum TransactionVersion {
Mainnet = 0x00,
Testnet = 0x80,
}Mainnet
0x00
Transaction version byte for mainnet
Testnet
0x80
Transaction version byte for testnet (also used by devnet and mocknet)
Last updated
Was this helpful?
Was this helpful?