aboutsummaryrefslogtreecommitdiffstats
path: root/src/schemas/ec_signature_schema.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-29 17:39:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-29 17:39:12 +0800
commit0848fe96cf09679926d307c86414cfb8b6f16d78 (patch)
treeec1da9d45a01b846de9b45a2bb57fee8bdb0f23e /src/schemas/ec_signature_schema.ts
parent62cc3b919c73b7726793808e3b9631dba41cef28 (diff)
downloaddexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar.gz
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar.bz2
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar.lz
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar.xz
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.tar.zst
dexon-sol-tools-0848fe96cf09679926d307c86414cfb8b6f16d78.zip
Move files up and remove ts folder
Diffstat (limited to 'src/schemas/ec_signature_schema.ts')
-rw-r--r--src/schemas/ec_signature_schema.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/schemas/ec_signature_schema.ts b/src/schemas/ec_signature_schema.ts
new file mode 100644
index 000000000..94e58e53c
--- /dev/null
+++ b/src/schemas/ec_signature_schema.ts
@@ -0,0 +1,20 @@
+export const ECSignatureParameter = {
+ 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',
+};