AENS (æternity naming system)
Introduction
1. Claim a name
Pre-claim
import { AeSdk, Name } from '@aeternity/aepp-sdk'
const aeSdk = new AeSdk({ ... }) // init the SDK instance with AeSdk class
// `getContext` is used to bind AeSdk to Name instance
// e.g. if you change the node in AeSdk it also would be changed in Name.
// Alternatively, you need to provide `onAccount`, `onNode` options.
const name = new Name('testNameForTheGuide.chain', aeSdk.getContext())
const preClaimTx = await name.preclaim()
console.log(preClaimTx)
/*
{
blockHash: 'mh_2UsggiUaQQmEPjxLnXkXHpm1WawTWqZb1jBx6UzsQNHgirWAwd',
blockHeight: 449499,
hash: 'th_48RktjEutZC8TCubaq9YhjaF1cKLV9D3VRCJyzJLs7oSp4Ry6',
signatures: [
'sg_Da98k2EKMun1TkE7ytonRypvJwaKg9iBjp8rNcYuodFXqzRqwjQyuFQP5DhxWUpTYRzSTurrNtDmUft8eyTStjCyNqFf8'
],
tx: {
accountId: 'ak_2519mBsgjJEVEFoRgno1ryDsn3BEaCZGRbXPEjThWYLX9MTpmk',
commitmentId: 'cm_2igvW9egddKh77gDdE8mjotmL8PzE7Tf2Q639Q5stUqWQoEfap',
fee: 16620000000000n,
nonce: 18,
type: 'NamePreclaimTx',
version: 1
},
rawTx: 'tx_+JkLAfhCuEBgFzAL0bPDufmzDq0558vaKtrIyRpNxCYVtkgnJjBrxDpQZHkfbwG+oRuBUAfgfrAKF0lO9mRI1zq0H6bXIq8KuFH4TyEBoQGMyNToF1flcYDSVsPl5DZ9ZY3FJWRpDRQYD32quWBEAhKhA+Jawe/spFaw823K+U59CWx+xD1i34gngUPiAAKJqv/fhg8dpTI4AAAGc20E',
height: 449499
}
*/Claim
Bid during an auction
2. Update a name
Set pointers & update TTL
Extend TTL while keeping pointers
3. Transfer ownership of a name
4. Revoke a name
Delegate signature to contract (AENS interface)
Last updated
Was this helpful?