leaveNetwork

leaveNetwork is a method on the ARIO class that sets a gateway's status to leaving on the ar.io network. The gateway's operator and delegate stakes are vaulted and will be returned after the leave period. The gateway will be removed from the network once the leave period ends.

leaveNetwork requires authentication.

Parameters

← Swipe to see more →
ParameterTypeDescriptionRequired
tagsarrayAn array of GQL tag objects to attach to the AO messageNo
← Swipe to see more →

Example

leaveNetwork

 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.leaveNetwork(
         // optional additional tags
         { tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
     );
 }

 main();