HashKey DID
  • Introduction
  • FAQ
  • Terminology
  • Developers
    • Guides
      • Register
      • Query
      • Libraries
      • Credential API Rule
    • API Reference
      • OpenAPI
      • OpenAPI For Dfinity
  • Protocol
    • Resolver
    • KYC
    • Multi-Chain
    • Credential
    • DID as NFT
    • Deployment
    • Contract API Reference
      • Registry
      • BasicInfo
      • PublicResolver
      • KYC
      • LayerZero
      • Credential
  • How to
    • Become an issuer
    • Edit issuer info
    • Issue a credential
      • Step 1: Deploy a contract
      • Step 2: Create a credential and submit
        • Claim rules
      • Step 3: Issue a credential
    • Manage your credentials
  • Support
    • Brand Kit
Powered by GitBook
On this page
  1. Protocol
  2. Contract API Reference

BasicInfo

Check DID Name

Check whether a DID name has been claimed or not.

function didClaimed(string memory did) public view returns (bool);
  • did: DID name

Verify DID Format

To verify the DID format, ensure that the DID name has a length between 5 and 54 characters, and only contains the characters 0-9 and lowercase letters a-z.

function verifyDIDFormat(string memory did) public pure returns (bool);
  • did: DID name

Check address

Check whether an address has been claimed or not.

function addrClaimed(address addr) public view returns(bool);
  • addr: user address

Get DID

Retrieve the DID name by token id.

function tokenId2Did(uint256 tokenId) public view returns (string memory);
  • tokenId: token id

Get DID tokenId

Retrieve the token id by DID name.

function did2TokenId(string memory did) public view returns (uint256);
  • did: DID name

Get issuer address

Retrieve the issuer address by DeedGrain contract address.

function deedGrainAddrToIssur(address dgAddr) public view returns(address);
  • dgAddr: DeedGrain contract address

Get all authorization addresses

Retrieve all authorization addresses for specific DID.

function getAuthorizedAddrs(uint256 tokenId) public view returns (address[] memory);
  • tokenId: DID token id

Check if address authorized

Check whether a DID has been authorized to the address or not.

function isAddrAuthorized(uint256 tokenId, address addr) public view returns (bool);
  • tokenId: DID token id

  • addr: authorization address

PreviousRegistryNextPublicResolver

Last updated 2 years ago