aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-31 04:52:27 +0800
committerFabio Berger <me@fabioberger.com>2018-05-31 04:52:27 +0800
commit3302c892844e85d3a36460cb381abbb62d5730d4 (patch)
treec527bf04b2462b6e8b76590457bde1fee2e75be4 /packages/json-schemas/schemas
parent4874d55d03918b47967024777194d88a5f2bc1fc (diff)
downloaddexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar.gz
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar.bz2
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar.lz
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar.xz
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.tar.zst
dexon-sol-tools-3302c892844e85d3a36460cb381abbb62d5730d4.zip
Revivie the ECSignatureSchema
Diffstat (limited to 'packages/json-schemas/schemas')
-rw-r--r--packages/json-schemas/schemas/ec_signature_schema.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/json-schemas/schemas/ec_signature_schema.ts b/packages/json-schemas/schemas/ec_signature_schema.ts
new file mode 100644
index 000000000..71b840dd8
--- /dev/null
+++ b/packages/json-schemas/schemas/ec_signature_schema.ts
@@ -0,0 +1,20 @@
+export const ecSignatureParameterSchema = {
+ id: '/ECSignatureParameter',
+ type: 'string',
+ pattern: '^0[xX][0-9A-Fa-f]{64}$',
+};
+
+export const ecSignatureSchema = {
+ id: '/ECSignature',
+ properties: {
+ v: {
+ type: 'number',
+ minimum: 27,
+ maximum: 28,
+ },
+ r: { $ref: '/ECSignatureParameter' },
+ s: { $ref: '/ECSignatureParameter' },
+ },
+ required: ['v', 'r', 's'],
+ type: 'object',
+};