Transactions
Send transactions on Sui using OneKey
Learn how to sign and execute transactions on Sui.
Sign and Execute Transaction Block
// Create transaction block
const txb = new TransactionBlock()
// Add a transfer
txb.transferObjects(
[txb.object('0xobject_id')],
txb.pure('0xrecipient_address')
)
// Or send SUI
const [coin] = txb.splitCoins(txb.gas, [txb.pure(1000000000)]) // 1 SUI
txb.transferObjects([coin], txb.pure('0xrecipient_address'))
// Sign and execute
const result = await provider.signAndExecuteTransactionBlock({
transactionBlock: txb,
options: {
showEffects: true,
showEvents: true,
showObjectChanges: true,
},
})
console.log({
digest: result.digest,
effects: result.effects,
events: result.events,
})Sign Transaction Block (Without Executing)
Sign and Execute Transaction (New API)
Sign Transaction (New API)
Smart Contract Interaction
Move Call
Publish Package
Using with Sui SDK
Last updated
Was this helpful?