removePrimaryNames

removePrimaryNames is a method on the ANT class that removes specified primary names from the ANT process. This affects any primary names associated with base names controlled by this ANT.

removePrimaryNames requires authentication.

Parameters

← Swipe to see more →
ParameterTypeDescriptionOptional
namesarrayAn array of primary names to be removedfalse
ioProcessIdstringThe Process ID of the ARIO contractfalse
tagsarrayAn array of GQL tag objects to attach to the transfer AO messagetrue
← Swipe to see more →

Examples

removePrimaryNames

 const fs = require("fs");
 const { ANT, ArweaveSigner } = require("@ar.io/sdk");

 async function main() {
 const jwk = JSON.parse(fs.readFileSync("KeyFile.json"));
 const ant = ANT.init({
     signer: new ArweaveSigner(jwk),
     processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM"
 });

 const { id: txId } = await ant.removePrimaryNames({
         names: ['arns', 'test_arns'], // any primary names associated with a base name controlled by this ANT will be removed
         ioProcessId: ARIO_PROCESS_ID,
     });
 }

 main();