Skip to content

Commit 8093926

Browse files
committed
cargo schema
1 parent 5469b79 commit 8093926

File tree

3 files changed

+122
-4
lines changed

3 files changed

+122
-4
lines changed

contracts/crypto-verify/schema/crypto-verify.json

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,52 @@
5959
"additionalProperties": false
6060
},
6161
{
62-
"description": "Ethereum text verification (compatible to the eth_sign RPC/web3 enpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign",
62+
"description": "Cosmos format (secp256r1 verification scheme).",
63+
"type": "object",
64+
"required": [
65+
"verify_secp256_r1_signature"
66+
],
67+
"properties": {
68+
"verify_secp256_r1_signature": {
69+
"type": "object",
70+
"required": [
71+
"message",
72+
"public_key",
73+
"signature"
74+
],
75+
"properties": {
76+
"message": {
77+
"description": "Message to verify.",
78+
"allOf": [
79+
{
80+
"$ref": "#/definitions/Binary"
81+
}
82+
]
83+
},
84+
"public_key": {
85+
"description": "Serialized compressed (33 bytes) or uncompressed (65 bytes) public key.",
86+
"allOf": [
87+
{
88+
"$ref": "#/definitions/Binary"
89+
}
90+
]
91+
},
92+
"signature": {
93+
"description": "Serialized signature. Cosmos format (64 bytes).",
94+
"allOf": [
95+
{
96+
"$ref": "#/definitions/Binary"
97+
}
98+
]
99+
}
100+
},
101+
"additionalProperties": false
102+
}
103+
},
104+
"additionalProperties": false
105+
},
106+
{
107+
"description": "Ethereum text verification (compatible to the eth_sign RPC/web3 endpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign",
63108
"type": "object",
64109
"required": [
65110
"verify_ethereum_text"
@@ -86,7 +131,7 @@
86131
]
87132
},
88133
"signer_address": {
89-
"description": "Signer address. This is matched case insensitive, so you can provide checksummed and non-checksummed addresses. Checksums are not validated.",
134+
"description": "Signer address. This is matched case insensitive, so you can provide check-summed and non-check-summed addresses. Checksums are not validated.",
90135
"type": "string"
91136
}
92137
},
@@ -339,6 +384,20 @@
339384
},
340385
"additionalProperties": false
341386
},
387+
"verify_secp256_r1_signature": {
388+
"$schema": "http://json-schema.org/draft-07/schema#",
389+
"title": "VerifyResponse",
390+
"type": "object",
391+
"required": [
392+
"verifies"
393+
],
394+
"properties": {
395+
"verifies": {
396+
"type": "boolean"
397+
}
398+
},
399+
"additionalProperties": false
400+
},
342401
"verify_tendermint_batch": {
343402
"$schema": "http://json-schema.org/draft-07/schema#",
344403
"title": "VerifyResponse",

contracts/crypto-verify/schema/raw/query.json

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,52 @@
4848
"additionalProperties": false
4949
},
5050
{
51-
"description": "Ethereum text verification (compatible to the eth_sign RPC/web3 enpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign",
51+
"description": "Cosmos format (secp256r1 verification scheme).",
52+
"type": "object",
53+
"required": [
54+
"verify_secp256_r1_signature"
55+
],
56+
"properties": {
57+
"verify_secp256_r1_signature": {
58+
"type": "object",
59+
"required": [
60+
"message",
61+
"public_key",
62+
"signature"
63+
],
64+
"properties": {
65+
"message": {
66+
"description": "Message to verify.",
67+
"allOf": [
68+
{
69+
"$ref": "#/definitions/Binary"
70+
}
71+
]
72+
},
73+
"public_key": {
74+
"description": "Serialized compressed (33 bytes) or uncompressed (65 bytes) public key.",
75+
"allOf": [
76+
{
77+
"$ref": "#/definitions/Binary"
78+
}
79+
]
80+
},
81+
"signature": {
82+
"description": "Serialized signature. Cosmos format (64 bytes).",
83+
"allOf": [
84+
{
85+
"$ref": "#/definitions/Binary"
86+
}
87+
]
88+
}
89+
},
90+
"additionalProperties": false
91+
}
92+
},
93+
"additionalProperties": false
94+
},
95+
{
96+
"description": "Ethereum text verification (compatible to the eth_sign RPC/web3 endpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign",
5297
"type": "object",
5398
"required": [
5499
"verify_ethereum_text"
@@ -75,7 +120,7 @@
75120
]
76121
},
77122
"signer_address": {
78-
"description": "Signer address. This is matched case insensitive, so you can provide checksummed and non-checksummed addresses. Checksums are not validated.",
123+
"description": "Signer address. This is matched case insensitive, so you can provide check-summed and non-check-summed addresses. Checksums are not validated.",
79124
"type": "string"
80125
}
81126
},
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "VerifyResponse",
4+
"type": "object",
5+
"required": [
6+
"verifies"
7+
],
8+
"properties": {
9+
"verifies": {
10+
"type": "boolean"
11+
}
12+
},
13+
"additionalProperties": false
14+
}

0 commit comments

Comments
 (0)