Deprecated

This method is deprecated. Please use removeUndernameRecord instead. See the removeUndernameRecord documentation for more details.

removeRecord

removeRecord is a method on the ANT class that removes a record from the ANT process.

removeRecord requires authentication.

Parameters

← Swipe to see more →
ParameterTypeDescriptionOptional
undernamestringThe undername name of the record to removefalse
tagsarray

An array of GQL tag objects to attach to the AO message

true
← Swipe to see more →

Examples

removeRecord

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

 console.log(txId);
 }

 main();