decreaseDelegateStake

decreaseDelegateStake is a method on the ARIO class that decreases the caller's delegated stake on the target gateway.

decreaseDelegateStake requires authentication.

Parameters

ParameterTypeDescriptionRequired
qtynumberAmount in mARIO to remove from delegated stakeYes
targetstringThe gateway's public wallet addressYes
instantbooleanIf true, pays a fee to make the withdrawn stake available instantlyNo
tagsarrayAn array of GQL tag objects to attach to the transactionNo

Example

decreaseDelegateStake

 const fs = require("fs");
 const { ARIO, ArweaveSigner, ARIOToken } = 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.decreaseDelegateStake(
         {
             target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
             qty: new ARIOToken(100).toMARIO(),
         },
         {
             tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
         },
     );
 }

 main();