decreaseOperatorStake

decreaseOperatorStake is a method on the ARIO class that decreases the callers operator stake. Must be executed with a wallet registered as a gateway operator.

decreaseOperatorStake requires authentication.

Parameters

ParameterTypeDescriptionOptional
qtynumberThe number of `mARIO` tokens to remove from operator stake. Cannot decrease stake under the network minimum operator stake.false
tagsarrayAn array of GQL tag objects to attach to the transfer AO message.true

Examples

decreaseOperatorStake

 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.decreaseOperatorStake(
         {
             qty: new ARIOToken(100).toMARIO(),
         },
         {
             tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
         },
     );
 }

 main();