Skip to content

Commit

Permalink
feat(schemas) add more schemas (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Alvarez <[email protected]>
  • Loading branch information
jonalvarezz authored Dec 26, 2023
1 parent e2e1c27 commit 479c33b
Show file tree
Hide file tree
Showing 12 changed files with 709 additions and 0 deletions.
223 changes: 223 additions & 0 deletions dist/schemas/19-token-holding-amount/1-0-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/19-token-holding-amount/1-0-0.json",
"title": "Token holding amount",
"description": "The amount of a particular token you are holding",
"type": "object",
"required": [
"@context",
"issuer",
"issuanceDate",
"credentialSubject",
"proof"
],
"properties": {
"@context": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"id": {
"type": "string"
},
"type": {
"type": "array",
"items": {
"type": "string"
}
},
"issuer": {
"type": "object",
"required": [
"id",
"name",
"mrenclave"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"mrenclave": {
"type": "string"
}
}
},
"issuanceDate": {
"type": "string",
"format": "date-time"
},
"proof": {
"type": "object",
"required": [
"created",
"type",
"proofPurpose",
"proofValue",
"verificationMethod"
],
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"type": {
"type": "string"
},
"proofPurpose": {
"type": "string"
},
"proofValue": {
"type": "string"
},
"verificationMethod": {
"type": "string"
}
}
},
"credentialSubject": {
"title": "Credential Subject of Token holding amount",
"type": "object",
"required": [
"id",
"type",
"values",
"endpoint",
"assertions"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"values": {
"type": "array",
"minItems": 1,
"items": {
"type": "boolean"
}
},
"endpoint": {
"type": "string",
"format": "uri"
},
"assertions": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"and"
],
"properties": {
"and": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "object",
"required": [
"src",
"op",
"dst"
],
"properties": {
"src": {
"type": "string",
"enum": [
"$holding_amount",
"$wbtc_holding_amount",
"$lit_holding_amount",
"$usdc_holding_amount",
"$usdt_holding_amount",
"$crv_holding_amount",
"$matic_holding_amount",
"$dydx_holding_amount",
"$amp_holding_amount",
"$cvx_holding_amount",
"$tusd_holding_amount",
"$usdd_holding_amount",
"$gusd_holding_amount",
"$link_holding_amount",
"$grt_holding_amount",
"$comp_holding_amount",
"$people_holding_amount",
"$gtc_holding_amount",
"$eth_holding_amount",
"lit_holding_amount"
]
},
"op": {
"type": "string",
"enum": [
">="
]
},
"dst": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"src",
"op",
"dst"
],
"properties": {
"src": {
"type": "string",
"enum": [
"$holding_amount",
"$wbtc_holding_amount",
"$lit_holding_amount",
"$usdc_holding_amount",
"$usdt_holding_amount",
"$crv_holding_amount",
"$matic_holding_amount",
"$dydx_holding_amount",
"$amp_holding_amount",
"$cvx_holding_amount",
"$tusd_holding_amount",
"$usdd_holding_amount",
"$gusd_holding_amount",
"$link_holding_amount",
"$grt_holding_amount",
"$comp_holding_amount",
"$people_holding_amount",
"$gtc_holding_amount",
"$eth_holding_amount",
"lit_holding_amount"
]
},
"op": {
"type": "string",
"enum": [
"<"
]
},
"dst": {
"type": "string"
}
}
}
]
}
}
}
}
}
}
}
}
1 change: 1 addition & 0 deletions dist/schemas/19-token-holding-amount/latest.json
148 changes: 148 additions & 0 deletions dist/schemas/20-weirdoghostgang-holder/1-0-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/20-weirdoghostgang-holder/1-0-0.json",
"title": "WeirdoGhostGang Holder",
"description": "You are WeirdoGhostGang NFT holder",
"type": "object",
"required": [
"@context",
"issuer",
"issuanceDate",
"credentialSubject",
"proof"
],
"properties": {
"@context": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"id": {
"type": "string"
},
"type": {
"type": "array",
"items": {
"type": "string"
}
},
"issuer": {
"type": "object",
"required": [
"id",
"name",
"mrenclave"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"mrenclave": {
"type": "string"
}
}
},
"issuanceDate": {
"type": "string",
"format": "date-time"
},
"proof": {
"type": "object",
"required": [
"created",
"type",
"proofPurpose",
"proofValue",
"verificationMethod"
],
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"type": {
"type": "string"
},
"proofPurpose": {
"type": "string"
},
"proofValue": {
"type": "string"
},
"verificationMethod": {
"type": "string"
}
}
},
"credentialSubject": {
"title": "Credential Subject of NodeReal/ WeirdoGhostGang Holder",
"type": "object",
"required": [
"id",
"type",
"values",
"endpoint",
"assertions"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"values": {
"type": "array",
"minItems": 1,
"items": {
"type": "boolean"
}
},
"endpoint": {
"type": "string",
"format": "uri"
},
"assertions": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"src",
"op",
"dst"
],
"properties": {
"src": {
"type": "string",
"enum": [
"$is_weirdo_ghost_gang_holder"
]
},
"op": {
"type": "string",
"enum": [
"=="
]
},
"dst": {
"type": "string",
"enum": [
"true"
]
}
}
}
}
}
}
}
}
1 change: 1 addition & 0 deletions dist/schemas/20-weirdoghostgang-holder/latest.json
Loading

0 comments on commit 479c33b

Please sign in to comment.