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/@Albert/aepp-sdk/dist/aepp-sdk.js:1:130220)
at Object. (/Users/ulfangermann/projects/aeternity/isaqb-ui/node_modules/@Albert/aepp-sdk/dist/aepp-sdk.js:1:130618)
at x (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@Albert/aepp-sdk/dist/aepp-sdk.js:1:317336)
at Generator._invoke (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@Albert/aepp-sdk/dist/aepp-sdk.js:1:317124)
at Generator.e.(anonymous function) [as next] (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@Albert/aepp-sdk/dist/aepp-sdk.js:1:317515)
at r (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@Albert/aepp-sdk/dist/aepp-sdk.js:1:1637)
at s (/Users/sss/projects/aeternity/isaqb-ui/node_modules/@Albert/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(claim.id, contract_address);
console.log(update);
// })
}

This is the result of the preclaim and claim

preclaim: { blockHash: ‘mh_mv5Etda6AshH456awT1Ne84a1awxF18gnnno3Xc69zkVHoi7h’,
blockHeight: 727,
hash: ‘th_2iJAxpkNMxbFQn9Efum3dzfiicKCFthWbA6GiDpYDNXGoxRr5S’,
signatures:
[ ‘sg_TeSaAvpM4xvDbqWEdqswH81cqHwH3twrpTBQoHFnDMfVfjDqizFMWm6abczJEaPG4JFY2pD8F2Bcc8WpY1HVEbFJjtykn’ ],
tx:
{ accountId: ‘ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU’,
commitmentId: ‘cm_2Lywkui3K5WyzeSu6F9VKk9RjbpNtomvkfNd5ZXWBRKkBKQnD6’,
fee: 16640000000000,
nonce: 40,
type: ‘NamePreclaimTx’,
version: 1 },
rawTx:
‘tx_+JkLAfhCuEDLqu3CzkF439jnSJuxvedoN+WMT88CUVR49W4PhwRkAzgAb3OPAsXmLahY4FNdzdsU3R3jfGBVzizYPwLwB/MEuFH4TyEBoQHpu/YE5hG1Rgo7OZnpdxtvYEF9c858VRnhL34SehIlyiihA7ERNE6zuSaoOkwwiInCv96Ni+yxwcaEwiKb2JWui3Nohg8iTUoAAAB2Iy5y’,
height: 727,
claim: [Function: claim],
salt: 2412960464931419,
commitmentId: ‘cm_2Lywkui3K5WyzeSu6F9VKk9RjbpNtomvkfNd5ZXWBRKkBKQnD6’ }
claim : { blockHash: ‘mh_day2eFmnVBU5ZtuFQ1yjbJT7KTAeAR7Q3MdAS7qp2r94SAK46’,
blockHeight: 728,
hash: ‘th_mBGtqZDsqJGidCppDY49jHGseTCTQYdk8ho27XSBCykJwhwJk’,
signatures:
[ ‘sg_U3RzRREDHJ6C95ke1vBgJRYkUDmmkG6pA5ZgzQU8iHGMsvDqNjk7kwRfJa91MyY3cRZM91DZphSXbHhgYDwrYYP62c1Kj’ ],
tx:
{ accountId: ‘ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU’,
fee: 16540000000000,
name: ‘kkkkkkkkkkkkkkk.test’,
nameSalt: ‘2412960464931419’,
nonce: 41,
type: ‘NameClaimTx’,
version: 1 },
rawTx:
‘tx_+JQLAfhCuEDOsowMwibzwm8ojQm7qx4sx3D3UEpbMScomKmlbk7U3Mae93wnM8tPj/1viLnCBKw4Q/9bQaizvl9+cSWg22sAuEz4SiABoQHpu/YE5hG1Rgo7OZnpdxtvYEF9c858VRnhL34SehIlyimUa2tra2tra2tra2tra2trLnRlc3SHCJKTI16KW4YPCwTTGAAAufZyBg==’,
id: ‘nm_i7QWYRyXZbnnScVu5T841hoWMXJZJL1uVDffzbMq5gVuGCkzw’,
pointers: ,
ttl: 50728,
update: [Function],
transfer: [Function],
revoke: [Function] }

Best Regards,
Ulf

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

the ct_ pointer can be used by api directly:

http://35.178.61.73:3013/v2/names/foobar.test

Perhaps, it ist an useful information. I use “@Albert/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:
http://35.178.61.73:3013/v2/names/foobar.test

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…

1 Like

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

1 Like

We will forward the question to the devs :slight_smile: