Links
Comment on page

Identity

  1. 1.
    Register a domain name
register(address owner, string calldata name, bool reverseRecord) external returns (uint);
Register a domain for a specific address. You can set the resolve record upon registration or only register the domain name. The return value is a tokenId relating to the domain name.
Parameters:
  • owner: The address of the user owning the domain name
  • name: The domain name
  • reverseRecord: whether to set a resolve record at this point
Return value:
  • The tokenId related to the domain name.
  1. 2.
    Set a resolve record
function setNameForAddr(address addr, string calldata name) external;
A user sets a resolve record for a domain name:
Parameters:
  • addr: The owner of the domain name. If the owner is zero address(0x0000000000000000000000000000000000000000) , then this is an operation unbinding a name with an address.
  1. 3.
    Set a profileURI
function setProfileURI(string memory profileURI) external;
Store the caller's profileURI on the blockchain. The profileURI is a transaction hash on Arweave which can be used to access the user's identity data via an Arweave gateway.
Parameters:
  • profileURI: A resource address pointing to a user's identity data. It is a transaction hash on Arweave, with the data stored on Arweave.
The content uploaded to Arweave is structured as follows:
{
"avatar": "${The avatar of Soul}"
}
  1. 4.
    Lookup a domain name
function addr(string calldata name) virtual external view returns (address addr);
Lookup the user address linked to a given domain name
Parameters:
  • name: the domain name
Return value:
  • addr: the resolved address
  1. 5.
    Reverse resolving
function nameOf(address addr) external view returns (string memory name);
With an address, you can reversely resolve the domain name it binded with.
Parameters:
  • addr: the address
Return value:
  • name: the domain name
  1. 6.
    Check an address's profileUIR
function profileURI(address addr) external view returns (string memory profileURI);
With an address, you can query the resource address storing a user's identity data.
Parameters:
  • addr: the address
Return value: profileURI, a resource address pointing to a user's identity data.
Last modified 8mo ago