Sign a transaction
1. Construct the Transaction data type and serialize it.
Transaction data type and serialize it.const Address = { FastSet: recipientPublicKey };const Nonce = bcs.u64();const ClaimType = bcs.enum("ClaimType", {
TokenTransfer: TokenTransfer,
});const Transaction = bcs.struct("Transaction", {
sender: senderPublicKey,
recipient: {FastSet: recipientPublicKey},
nonce: Nonce,
timestamp_nanos: bcs.u128(),
claim: ClaimType,
});2. Sign the transaction
Last updated
Was this helpful?