decreaseDelegateStake
decreaseDelegateStake
is a method on the ARIO
class that increases the caller's stake on the target gateway.
decreaseDelegateStake
requires authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
qty | number | Number of tokens, in `mARIO` to remove from delegate stake. | false |
target | string - WalletAddress | Public Wallet address of gateway. | false |
instant | boolean | If true, pays a fee to make the withdrawn stake available instantly. | true |
tags | array | An array of GQL tag objects to attach to the joinNetwork AO message. | true |
Example
increaseDelegateStake
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();