Last active
November 15, 2023 16:11
-
-
Save ilya-korotya/26ba81feb4da2f49f4b473661b80e8e3 to your computer and use it in GitHub Desktop.
Non merklized balance json schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$metadata": { | |
"uris": { | |
"jsonLdContext": "https://gist.githubusercontent.com/ilya-korotya/ac20f870943abd4805fe882ae8f3dccd/raw/1d9969a6d0454280c8d5e79b959faf9b3978b497/balance.jsonld" | |
}, | |
"version": "1.0", | |
"type": "Balance", | |
"iden3Serialization": { | |
"slotIndexA": "address", | |
"slotIndexB": "balance" | |
} | |
}, | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"description": "Schema for non-merklized balance", | |
"title": "NonMerklizedBalance", | |
"properties": { | |
"credentialSubject": { | |
"description": "Stores the data of the credential", | |
"title": "Credential subject", | |
"properties": { | |
"id": { | |
"description": "Stores the DID of the subject that owns the credential", | |
"title": "Credential subject ID", | |
"format": "uri", | |
"type": "string" | |
}, | |
"address": { | |
"description": "User ethereum address", | |
"title": "address", | |
"type": "string" | |
}, | |
"balance": { | |
"description": "User balance", | |
"title": "balance", | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"address", | |
"balance" | |
], | |
"type": "object" | |
}, | |
"@context": { | |
"type": [ | |
"string", | |
"array", | |
"object" | |
] | |
}, | |
"expirationDate": { | |
"format": "date-time", | |
"type": "string" | |
}, | |
"id": { | |
"type": "string" | |
}, | |
"issuanceDate": { | |
"format": "date-time", | |
"type": "string" | |
}, | |
"issuer": { | |
"type": [ | |
"string", | |
"object" | |
], | |
"format": "uri", | |
"properties": { | |
"id": { | |
"format": "uri", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
}, | |
"type": { | |
"type": [ | |
"string", | |
"array" | |
], | |
"items": { | |
"type": "string" | |
} | |
}, | |
"credentialSchema": { | |
"properties": { | |
"id": { | |
"format": "uri", | |
"type": "string" | |
}, | |
"type": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id", | |
"type" | |
], | |
"type": "object" | |
} | |
}, | |
"required": [ | |
"credentialSubject", | |
"@context", | |
"id", | |
"issuanceDate", | |
"issuer", | |
"type", | |
"credentialSchema" | |
], | |
"type": "object" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment