title | category | type | source |
---|---|---|---|
Issuer Claims |
messages |
reference |
The issuer of a message is the signer of the request. The issuer can present claims about themselves.
This can be used over time to build trust between the issuer of the message and the consuming party.
A selection of verified claims about the issuer can be included in the vc
field of a message.
The verified claims can either be included in their entirety as JWT's's in an array:
{
"iss":"did:ethr:0x012abcd...",
"vc": ["Verified Claim JWT 1", "Verified Claim JWT 2"]
}
Or as an array of IPFS hashes containing individual JWTs.
{
"iss":"did:ethr:0x012abcd...",
"vc": ["/ipfs/QmbpLchVBiF5Deg8Dp31y4AUSNLiBbF92mHAp3xDcAfg4k"]
}
About image links: Images must be stored in IPFS. This is to avoid malicious tracking of users through images.
Upload the image like this:
> curl "https://ipfs.infura.io:5001/api/v0/add?pin=true" -F file=@logo.png
{"Name":"logo.png","Hash":"QmV3pEPwSzkQVMPmkvpWRvWRxexdMrCNayMnZeao8dibm4","Size":"5779"}
Remember to prefix the hash with /ipfs/
.
To reduce the size of messages we remember storing the claims as an as an IPLD Document. QmbpLchVBiF5Deg8Dp31y4AUSNLiBbF92mHAp3xDcAfg4k
Upload your claims document to IPFS.
Example document:
{
"name":"My dApp",
"description":"A really cool place to do stuff decentralized",
"url":"https://mydapp.example",
"profileImage":{"/":"/ipfs/QmSCnmXC91Arz2gj934Ce4DeR7d9fULWRepjzGMX6SSazB"},
"bannerImage":{"/":"/ipfs/QmSCnmXC91Arz2gj934Ce4DeR7d9fULWRepjzGMX6SSazB"},
}
Save the above file to claims.json
> curl "https://ipfs.infura.io:5001/api/v0/add?pin=true" -F file=@claims.json
{"Name":"claims.json","Hash":"QmbpLchVBiF5Deg8Dp31y4AUSNLiBbF92mHAp3xDcAfg4k","Size":"291"}
Now use the returned hash in your requests:
{
"iss":"did:ethr:0x012abcd...",
"vc": ["/ipfs/QmbpLchVBiF5Deg8Dp31y4AUSNLiBbF92mHAp3xDcAfg4k"]
}
Note: For links to other IPFS files such as images, you must add then as an IPLD merkle link. This just means that instead of using the string ipfs/QmV3pEPwSzkQVMPmkvpWRvWRxexdMrCNayMnZeao8dibm4
as in an embedded document. You use the object {"/":"/ipfs/QmV3pEPwSzkQVMPmkvpWRvWRxexdMrCNayMnZeao8dibm4"}
instead.
Name | Description | Required |
---|---|---|
name |
Name of Issuer | no |
description |
Single sentence describing the Issuer | no |
url |
URL of dApp/Requester | no |
profileImage |
Avatar or logo as JPEG or PNG of requester on IPFS as a /ipfs/[HASH] in embedded claims or a merkle link for IPLD documents |
no |
bannerImage |
Banner to e used on certain request cards as JPEG or PNG of requester on IPFS as a /ipfs/[HASH] in embedded claims or a merkle link for IPLD documents |
no |