Use Cases
- Tools want to present public metadata supplied by a validator or validator group as part of a list of candidate groups, or a list of current elected validators.
- Governance Explorer UIs may want to present public metadata about the creators of governance proposals
- The Celo Foundation receives notice of a security vulnerability and wants to contact elected validators to facilitate them to make a decision on applying a patch.
- A DApp makes a request to the Celo Wallet for account information or to sign a transaction. The Celo Wallet should provide information about the DApp to allow the user to make a decision whether to sign the transaction or not.
Accounts
smart contract, any account can register a URL under which their metadata file is available. The metadata file contains an unordered list of claims, signed by the account.
Types of Claim
ContractKit currently supports the following types of claim:- Name Claim - An account can claim a human-readable name. This claim is not verifiable.
- Attestation Service URL Claim - For the lightweight identity layer, validators can make a claim under which their Attestation Service is reachable to provide attestations. This claim is not verifiable.
- Keybase User Claim - Accounts can make claims on Keybase usernames. This claim is verifiable by signing a message with the account and hosting it on the publicly accessible path of the Keybase file system.
- Domain Claim - Accounts can make claims on domain names. This claim is verifiable by signing a message with the account and embedding it in a TXT record.
- X User Claim - Accounts can make claims on X usernames. This claim is verifiable by signing a message with the account and posting it as a tweet. Any client can verify the claim with a reference to the tweet in the claim.
Handling Metadata
You can interact with metadata files easily through the CLI, or in your own scripts, tools or DApps via ContractKit. Most commands require a node being available underhttp://localhost:8545
to make view calls, and to modify metadata files, you’ll need the relevant account to be unlocked to sign the files.
You can create an empty metadata file with:
Accounts
smart contract by running: