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

LayerZero

PreviousKYCNextCredential

Last updated 2 years ago

Sync

Synchronize DID information to the destination chain through LayerZero protocol, including DID, avatar, and KYC information.

struct Payload {
    uint256 tokenId;        // did tokenid
    address user;           // did owner
    string did;             // did name
    string avatar;          // avatar url
    address[] KYCProvider;  // kyc provider address
    uint256[] KYCId;        // kyc id (kyc level)
    IDid.KYCInfo[] KYCInfo; // kyc info
    bytes[] evidence;       // kyc evidence signed by provider
    bytes evidenceLZ;       // evidence signed by HashKey DID
}
function sync(Payload memory _payload, uint16 _dstChainId) public;
  • _payload: DID infomation

  • _dstChainId: destination chain id defined by

Mint DID LayerZero

Minting a DID using information obtained from a sync event can only be invoked by the LayerZero endpoint or the HashKey DID endpoint (when the chain is not yet supported by LayerZero).

function mintDidLZ(uint256 tokenId, address user, string memory did, string memory avatar, address[] memory KYCProvider, uint256[] memory KYCId, KYCInfo[] memory kycInfo, bytes[] memory evidence)
  • did infos args: Refer to the annotations of type Payload below.

LayerZero