cancelWithdrawal
cancelWithdrawal
is a method on the ARIO
class that cancels a pending withdrawal for a gateway, returning the stake back to the delegated amount.
cancelWithdrawal
requires authentication.
Parameters
← Swipe to see more →
Parameter | Type | Description | Optional |
---|---|---|---|
gatewayAddress | string - WalletAddress | The wallet address of the gateway | false |
vaultId | string | The ID of the vault containing the withdrawal to cancel | false |
tags | array | An array of GQL tag objects to attach to the transfer AO message | true |
← Swipe to see more →
Examples
cancelWithdrawal
const fs = require('fs');
const { ARIO, ArweaveSigner } = require('@ar.io/sdk');
async function main() {
const jwk = JSON.parse(fs.readFileSync('KeyFile.json'));
const ario = ARIO.init({
signer: new ArweaveSigner(jwk),
});
const { id: txId } = await ario.cancelWithdrawal({
gatewayAddress: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
vaultId: 'vault_123'
});
console.log(txId);
}
main();