Inviting and accepting human avatars
Inviting a human to Circles
// Inviter side: send invite (escrows 100 CRC + trusts the invitee)
const inviter = await sdk.getAvatar('0xInviterAvatar'); // HumanAvatar
await inviter.invite.send('0xInviteeEOAAddress');//Invitee side: accept Invitation
const inviteeAvatar = await inviteeSdk.register.asHuman('0xInviterAddress', {
name: 'Alice',
description: 'New Circles member',
});
// (Optional) If multiple inviters, redeem a specific one
await inviteeAvatar.invite.redeem('0xSpecificInviter');Get an existing avatar
const profile = await inviteeAvatar.profile.get();
if (profile) {
console.log(profile.name, profile.description);
}Last updated
Was this helpful?