Open bizk opened 3 hours ago
Btw here is some sample code to try it out:
// Connect to the Polkadot network
const provider = new WsProvider('wss://rpc.polkadot.io'); // You can use other endpoints if needed
const api = await ApiPromise.create({ provider });
// Fetch the identity information for the validator
const { identity } = await api.query.identity.identityOf(validatorAddress);
// Check if the identity exists
if (identity && identity.display && identity.display.asRaw) {
console.log(`Validator ${validatorAddress} has an identity: ${identity.display.asRaw.toString()}`);
} else {
console.log(`Validator ${validatorAddress} does not have an identity.`);
}
// Disconnect from the API
await api.disconnect();
This is because the identity pallet doesnt exist on Polkadot anymore.
All identity functionality has been moved to the People System Parachain
When using
query.identity.identityof
on typescript. Identity object will be undefined. I tried using older versions of the library 11.x and 12.x and also tried different rpc providers with no luck. Weird because before september this was working just fine.I expect query.identity not being undefined.
Version: 13.x 12.x 11.x
Environment: Ubuntu 20.24
Language: