Skip to content

Instantly share code, notes, and snippets.

@ilya-korotya
Created January 30, 2024 12:54
Show Gist options
  • Save ilya-korotya/e60fd4fb8e2001c61ebd6ed4b6a4ff23 to your computer and use it in GitHub Desktop.
Save ilya-korotya/e60fd4fb8e2001c61ebd6ed4b6a4ff23 to your computer and use it in GitHub Desktop.
Balance JSON schema for refresh service. Balance field is nonNegativeInteger
{
"$metadata": {
"uris": {
"jsonLdContext": "https://gist.githubusercontent.com/ilya-korotya/314a60978556135485eca7e3275ec8cb/raw/8b6274eca26e18f656c877e63d13acd918421d4a/balance.jsonld"
},
"version": "1.0",
"type": "Balance"
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Schema for mumbai balance",
"title": "Balance",
"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"
},
"balance": {
"description": "balance",
"title": "balance",
"type": "string"
},
"address": {
"description": "balance owner",
"title": "owner",
"type": "string"
}
},
"required": [
"balance",
"address"
],
"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