Skip to content

Instantly share code, notes, and snippets.

@ilya-korotya
Created October 19, 2023 14:57
Show Gist options
  • Save ilya-korotya/ac6301168991e798a8f316944a3f2f58 to your computer and use it in GitHub Desktop.
Save ilya-korotya/ac6301168991e798a8f316944a3f2f58 to your computer and use it in GitHub Desktop.
JSON balance schema for refresh service
{
"$metadata": {
"uris": {
"jsonLdContext": "https://gist.githubusercontent.com/ilya-korotya/1549ee89a053bc42a98e53392dafc6f6/raw/64ba9d9bffd2806cc0ea6f5b4f22567e798c416d/balance.jsonld"
},
"version": "1.0",
"type": "Balance"
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "MATIC 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": "MATIC balance",
"title": "balance",
"type": "string"
},
"address": {
"description": "Wallet address",
"title": "address",
"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