AENS Error: Unknown class ct


I am running some tests with aens and when i try to update the claim with a contract address the system
throws the exeption :

(node:73253) UnhandledPromiseRejectionWarning: Error: Unknown class ct
at p (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:130220)
at Object. (/Users/ulfangermann/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:130618)
at x (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:317336)
at Generator._invoke (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:317124)
at Generator.e.(anonymous function) [as next] (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:317515)
at r (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:1637)
at s (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:1847)
at processTicksAndRejections (internal/process/next_tick.js:81:5)

Note: If a update with my public Key as the target, it works well.

Here is the code, which i run:

async function add_name(name, contract_address) {
console.log(“map : " + name + " to :” + contract_address);
//await handleApiError(async () => {
client = await getClient();
const preclaim = await client.aensPreclaim(name);
console.log(“preclaim:” , preclaim);
const claim = await client.aensClaim(name, preclaim.salt, preclaim.height);
console.log("claim : ", claim);
const update = await client.aensUpdate(, contract_address);
// })

This is the result of the preclaim and claim

preclaim: { blockHash: ‘mh_mv5Etda6AshH456awT1Ne84a1awxF18gnnno3Xc69zkVHoi7h’,
blockHeight: 727,
hash: ‘th_2iJAxpkNMxbFQn9Efum3dzfiicKCFthWbA6GiDpYDNXGoxRr5S’,
[ ‘sg_TeSaAvpM4xvDbqWEdqswH81cqHwH3twrpTBQoHFnDMfVfjDqizFMWm6abczJEaPG4JFY2pD8F2Bcc8WpY1HVEbFJjtykn’ ],
{ accountId: ‘ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU’,
commitmentId: ‘cm_2Lywkui3K5WyzeSu6F9VKk9RjbpNtomvkfNd5ZXWBRKkBKQnD6’,
fee: 16640000000000,
nonce: 40,
type: ‘NamePreclaimTx’,
version: 1 },
height: 727,
claim: [Function: claim],
salt: 2412960464931419,
commitmentId: ‘cm_2Lywkui3K5WyzeSu6F9VKk9RjbpNtomvkfNd5ZXWBRKkBKQnD6’ }
claim : { blockHash: ‘mh_day2eFmnVBU5ZtuFQ1yjbJT7KTAeAR7Q3MdAS7qp2r94SAK46’,
blockHeight: 728,
hash: ‘th_mBGtqZDsqJGidCppDY49jHGseTCTQYdk8ho27XSBCykJwhwJk’,
[ ‘sg_U3RzRREDHJ6C95ke1vBgJRYkUDmmkG6pA5ZgzQU8iHGMsvDqNjk7kwRfJa91MyY3cRZM91DZphSXbHhgYDwrYYP62c1Kj’ ],
{ accountId: ‘ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU’,
fee: 16540000000000,
name: ‘kkkkkkkkkkkkkkk.test’,
nameSalt: ‘2412960464931419’,
nonce: 41,
type: ‘NameClaimTx’,
version: 1 },
id: ‘nm_i7QWYRyXZbnnScVu5T841hoWMXJZJL1uVDffzbMq5gVuGCkzw’,
pointers: [],
ttl: 50728,
update: [Function],
transfer: [Function],
revoke: [Function] }

Best Regards,


It seems that the SDK does not handle contract pointer properly?

the ct_ pointer can be used by api directly:


Perhaps, it ist an useful information. I use “@aeternity/aepp-sdk”: “^2.3.2”,


Hi, what does it mean for me? Is it possible to map a name to a contract or isn’t it allowed?


Mapping a name to a contract surely can be done, and the link I posted above is the successful mapping to contract ,foobar.test was pointed to ct_25q7fs9c5mZ2boUbqjuhnKpBUeFyYM3626F2Q2Mi5uNvm6cTkj, you can check the json content on chain:

I used the API directly, not sdk.

The issue you mentioned at the beginning may be caused by js sdk.


Thanks for your answer, but whom can I ask from the sdk team?


Sorry that I don’t know either…


Thank you for help, hopefully there will be another one who can help me.


We will forward the question to the devs :slight_smile: