Skip to content

Commit

Permalink
examples update
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Alvarez <[email protected]>
  • Loading branch information
jonalvarezz committed Feb 19, 2024
1 parent 221c9d4 commit 2109b48
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 47 deletions.
73 changes: 40 additions & 33 deletions examples/4-token-holding-time/token-holding-time-a7-dot.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
{
"@context":[
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id":"0x8b22905e757b7b6961888c6559d13450ac5493452db303cb5e9a0a59bfaeb1a5",
"type":[
"id": "0x27ea5cc4345541a1b78942c7fb53f2e5a126d27c0d3c6c7e66831534e7265eb4",
"type": [
"VerifiableCredential"
],
"credentialSubject":{
"id":"did:litentry:substrate:0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
"description":"The length of time a user continues to hold a particular token (with particular threshold of token amount)",
"type":"DOT Holding Time",
"assertions":[
"credentialSubject": {
"id": "did:litentry:substrate:0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
"description": "The length of time a user continues to hold a particular token (with particular threshold of token amount)",
"type": "DOT Holding Time",
"assertionText": "A7(BoundedVec([49, 48, 46, 48, 49], 64))",
"assertions": [
{
"and":[
"and": [
{
"src":"$minimum_amount",
"op":"==",
"dst":"10"
"src": "$minimum_amount",
"op": "==",
"dst": "10.01"
},
{
"src":"$from_date",
"op":"<",
"dst":"2017-01-01"
"src": "$from_date",
"op": "<",
"dst": "2017-01-01"
},
{
"src":"$to_date",
"op":">=",
"dst":"2023-09-26"
"src": "$to_date",
"op": ">=",
"dst": "2024-02-19"
}
]
}
],
"values":[
true
"values": [
false
],
"endpoint":"http://localhost:9933"
"endpoint": "http://localhost:9933"
},
"issuer":{
"id":"did:litentry:substrate:0x28d3b174041231100f3bea49444fb44b5ee500a463b2d26ff7e6dc5d98f15135",
"name":"Litentry TEE Worker",
"mrenclave":"6cgJxACaf91s7CvoA6fVYUHpvFKLrEDe3mLJHDND6t59"
"issuer": {
"id": "did:litentry:substrate:0xfcdb571a7991e3d3ae4e2df972a84a37d2dcdba33890d919950191f532fb3e88",
"name": "Litentry TEE Worker",
"mrenclave": "21pnuQZwDwPuahVisciZVuqmJawwzMRZatEycE8su62c"
},
"issuanceDate":"2023-09-26T02:49:42.291492361+00:00",
"proof":{
"created":"2023-09-26T02:49:42.291954843+00:00",
"type":"Ed25519Signature2020",
"proofPurpose":"assertionMethod",
"proofValue":"25ff768780046ad249c2d853b9d442850199304221b78f3da99e0aac946a627702927262db5cef1a5411cba82c0925359fd31b0bac1771eb28c71b271bec9f0b",
"verificationMethod":"28d3b174041231100f3bea49444fb44b5ee500a463b2d26ff7e6dc5d98f15135"
"issuanceDate": "2024-02-19T20:29:06.042957423+00:00",
"parachainBlockNumber": 43,
"sidechainBlockNumber": 77,
"proof": {
"created": "2024-02-19T20:29:06.043463802+00:00",
"type": "Ed25519Signature2020",
"proofPurpose": "assertionMethod",
"proofValue": "1832aac066df656c75a62e9f11c9deae1c56a6176bbb627b0b1a3f835b23be4366a23574488161b0c6d30cb7cdf8978637787bbecd18893cba887a80ee989104",
"verificationMethod": "0xfcdb571a7991e3d3ae4e2df972a84a37d2dcdba33890d919950191f532fb3e88"
},
"credentialSchema": {
"id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/4-token-holding-time/1-0-0.json",
"type": "JsonSchemaValidator2018"
}
}
}
50 changes: 36 additions & 14 deletions examples/7-evm-substrate-transaction-count/a8.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,62 @@
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "0x6d576c95cef6442d030ce578c601c67c15d3d2887ee9ccb147e109db80a586d4",
"type": ["VerifiableCredential"],
"id": "0x2f305d2935ca3bc9918f982ba66cbf54914a225e702c4b25e6047ac749ddd150",
"type": [
"VerifiableCredential"
],
"credentialSubject": {
"id": "did:litentry:substrate:0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
"id": "did:litentry:substrate:0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
"description": "Gets the range of number of transactions a user has made for a specific token on all supported networks (invalid transactions are also counted)",
"type": "EVM/Substrate Transaction Count",
"assertionText": "A8(BoundedVec([Polkadot], 128))",
"assertions": [
{
"and": [
{ "src": "$total_txs", "op": ">=", "dst": "0" },
{ "src": "$total_txs", "op": "<", "dst": "1" },
{
"src": "$total_txs",
"op": ">=",
"dst": "20"
},
{
"src": "$total_txs",
"op": "<",
"dst": "50"
},
{
"or": [
{ "src": "$network", "op": "==", "dst": "Litentry" },
{ "src": "$network", "op": "==", "dst": "Litmus" }
{
"src": "$network",
"op": "==",
"dst": "Polkadot"
}
]
}
]
}
],
"values": [false],
"values": [
true
],
"endpoint": "http://localhost:9933"
},
"issuer": {
"id": "did:litentry:substrate:0xf9a07bf94ba238abc2eec2d83e21e3800a7f58e4490a23be583e41f6d200f47f",
"id": "did:litentry:substrate:0xfcdb571a7991e3d3ae4e2df972a84a37d2dcdba33890d919950191f532fb3e88",
"name": "Litentry TEE Worker",
"mrenclave": "7abeD7UnAo9TMe6Rz7tva5B1ZVEbZbCEuQ4bnBr32QH"
"mrenclave": "21pnuQZwDwPuahVisciZVuqmJawwzMRZatEycE8su62c"
},
"issuanceDate": "2023-12-14T18:35:12.128795174+00:00",
"issuanceDate": "2024-02-19T20:29:30.027362937+00:00",
"parachainBlockNumber": 45,
"sidechainBlockNumber": 81,
"proof": {
"created": "2023-12-14T18:35:12.129307699+00:00",
"created": "2024-02-19T20:29:30.027945955+00:00",
"type": "Ed25519Signature2020",
"proofPurpose": "assertionMethod",
"proofValue": "794b3f5d248c6109aa5aa43b4b294a6d892db5fa54f674362ee2fd17e1f2c5da3a650d358711ed6224de2babcf0ce83db1945d5bb34ac9a4e611271d23682609",
"verificationMethod": "0xf9a07bf94ba238abc2eec2d83e21e3800a7f58e4490a23be583e41f6d200f47f"
"proofValue": "d6148ee3912d04ae8cc6b62ae0cf8ceb9e0468ed3c8263be3830824066e7ea324fbeae8647b28921ac83c1e05170aff4013aaeb4165f6a56230992ee0d0d5a0f",
"verificationMethod": "0xfcdb571a7991e3d3ae4e2df972a84a37d2dcdba33890d919950191f532fb3e88"
},
"credentialSchema": {
"id": "https://raw.githubusercontent.com/litentry/vc-jsonschema/main/dist/schemas/7-evm-substrate-transaction-count/1-0-0.json",
"type": "JsonSchemaValidator2018"
}
}

0 comments on commit 2109b48

Please sign in to comment.