// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.15;interfaceIERC7231{/**
* @notice emit the use binding information
* @param id nft id
* @param identitiesRoot new identity root
*/eventSetIdentitiesRoot(uint256id,bytes32identitiesRoot);/**
* @notice
* @dev set the user ID binding information of NFT with identitiesRoot
* @param id nft id
* @param identitiesRoot multi UserID Root data hash
* MUST allow external calls
*/functionsetIdentitiesRoot(uint256id,bytes32identitiesRoot)external;/**
* @notice
* @dev get the multi-userID root by NFTID
* @param id nft id
* MUST return the bytes32 multiUserIDsRoot
* MUST NOT modify the state
* MUST allow external calls
*/functiongetIdentitiesRoot(uint256id)externalreturns(bytes32);/**
* @notice
* @dev verify the userIDs binding
* @param id nft id
* @param userIDs userIDs for check
* @param identitiesRoot msg hash to verify
* @param signature ECDSA signature
* MUST If the verification is passed, return true, otherwise return false
* MUST NOT modify the state
* MUST allow external calls
*/functionverifyIdentitiesBinding(uint256id,addressnftOwnerAddress,string[]memoryuserIDs,bytes32identitiesRoot,bytescalldatasignature)externalreturns(bool);}
这是上面引用的“元数据 JSON 模式”。
{"title":"Asset Metadata","type":"object","properties":{"name":{"type":"string","description":"Identifies the asset to which this NFT represents"},"description":{"type":"string","description":"Describes the asset to which this NFT represents"},"image":{"type":"string","description":"A URI pointing to a resource with mime type image"},"MultiIdentities":[{"userID":{"type":"string","description":"User ID of Web2 and web3(DID)"},"verifierUri":{"type":"string","description":"Verifier Uri of the userID"},"memo":{"type":"string","description":"Memo of the userID"},"properties":{"type":"object","description":"properties of the user ID information"}}]}}