removeUndernameRecord
removeUndernameRecord
is a method on the ANT
class that removes an undername record from the ANT process.
removeUndernameRecord
requires authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
undername | String | Undername to remove (e.g. 'dapp') | false |
tags | array | An array of GQL tag objects to attach to the transfer AO message. | true |
Examples
removeUndernameRecord
const fs = require("fs");
const { ANT, ArweaveSigner } = require("@ar.io/sdk");
async function main() {
const jwk = JSON.parse(fs.readFileSync("KeyFile.json"));
// get the ant for the base name
const arnsRecord = await ario.getArNSRecord({ name: 'ardrive' });
const ant = ANT.init({
signer: new ArweaveSigner(jwk),
processId: arnsRecord.processId
});
const { id: txId } = await ant.removeUndernameRecord(
{ undername: 'dapp' },
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] }
);
// dapp_ardrive.ar.io will no longer resolve
}
main();