removeUndernameRecord
removeUndernameRecord
is a method on the ANT
class that removes a specified undername record from the ANT process. Once removed, the undername will no longer resolve.
removeUndernameRecord
requires authentication.
Parameters
← Swipe to see more →
Parameter | Type | Description | Optional |
---|---|---|---|
undername | string | The undername to remove (e.g., 'dapp') | false |
tags | array | An array of GQL tag objects to attach to the transfer AO message | true |
← Swipe to see more →
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()