Transactions are a formal action on a blockchain. They can be initiated in Sender with a call to NEAR's RPC node. They can be a simple sending of $NEAR, may result in sending fungible tokens, creating a new account, or changing state on the blockchain in any number of ways. They are always initiated by a signature from an NEAR account, usually with a function call key or full access key.
Sign and Send a Single Transaction
With Sender, you could sign and send a single transaction with one or multiple actions.
// Call wNEAR contract method // Register the 'xxx.testnet' account to wNEAR on testnet (wrap.testnet)consttx= { receiverId:'wrap.testnet', actions: [ { methodName:'storage_deposit', args: { account_id:'alice.testnet', registration_only:true, }, gas:parseNearAmount('0.003'), deposit:parseNearAmount('0.00125'), }, ],}constres=awaitwindow.near.signAndSendTransaction(tx);
// Call multiple methods from wNEAR contract// Swap NEAR to wNEAR, then transfer wNEAR to othersconsttx= { receiverId:'wrap.testnet', actions: [ { methodName:'near_deposit', args: {}, deposit:parseNearAmount('1'), }, { methodName:'storage_deposit', args: { account_id:'bob.testnet', registration_only:true, }, gas:parseNearAmount('0.003'), deposit:parseNearAmount('0.00125'), }, { methodName:'ft_transfer', args: { received_id:'bob.testnet', amount:'1000000000000000000', }, gas:parseNearAmount('0.003') } ]}constres=awaitwindow.near.signAndSendTransaction(tx);
Sign and Send Multiple Transactions
Sender also supports sign and send multiple transactions when needed.