Build Transactions
Objectives
Transaction types
// STX Transfer - Send native tokens
const stxTransfer = await makeSTXTokenTransfer(options);
// Contract Deployment - Deploy Clarity contracts
const deployment = await makeContractDeploy(options);
// Contract Call - Execute contract functions
const contractCall = await makeContractCall(options);
// Each transaction type accepts similar base options:
interface TransactionOptions {
senderKey: string; // Private key for signing
network: string; // 'mainnet' or 'testnet'
fee?: bigint; // Manual fee in microSTX
nonce?: bigint; // Manual nonce
anchorMode?: AnchorMode; // Block anchoring strategy
}Building signed transactions
1
2
3
Unsigned transactions
Sponsored transactions
Multi-signature transactions
Working with Clarity values
Post-conditions
Fee estimation
Last updated
Was this helpful?