Transactions
Send transactions on Algorand using OneKey
Learn how to sign and send transactions on Algorand.
Sign Transactions (ARC-0001)
Sign one or more transactions:
// Create transaction
const suggestedParams = await algodClient.getTransactionParams().do()
const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
from: senderAddress,
to: recipientAddress,
amount: 1000000, // 1 ALGO (microAlgos)
suggestedParams,
})
// Prepare for signing
const walletTxns = [{
txn: Buffer.from(algosdk.encodeUnsignedTransaction(txn)).toString('base64'),
}]
// Sign
const signedTxns = await provider.signTxns(walletTxns)
console.log('Signed transactions:', signedTxns)Sign Multiple Transactions
Partial Signing (Multi-sig)
Post Transactions
Broadcast signed transactions:
Sign and Post
Sign and broadcast in one step:
Legacy Transaction API
Sign Transaction (Legacy)
Sign and Send (Legacy)
Complete Example
Last updated
Was this helpful?