aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-25 18:06:38 +0800
committerFabio Berger <me@fabioberger.com>2017-05-25 18:06:38 +0800
commitfa559377c80a75ba4169cab0825e5808154ae72b (patch)
treec8de187221945b99b63fb8b21553274f4a6ef647 /src/ts/utils
parent0b8ddc1ee18c6d52fbc72177e8c5e180f9106708 (diff)
downloaddexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar.gz
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar.bz2
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar.lz
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar.xz
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.tar.zst
dexon-sol-tools-fa559377c80a75ba4169cab0825e5808154ae72b.zip
Improve ECSignature schema to check signature parameters and that v is 27 or 28
Diffstat (limited to 'src/ts/utils')
-rw-r--r--src/ts/utils/schema_validator.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ts/utils/schema_validator.ts b/src/ts/utils/schema_validator.ts
index a0d6f1bee..1cbffee58 100644
--- a/src/ts/utils/schema_validator.ts
+++ b/src/ts/utils/schema_validator.ts
@@ -1,10 +1,11 @@
import {Validator as V, ValidatorResult} from 'jsonschema';
-import {ECSignatureSchema} from '../schemas/ec_signature_schema';
+import {ECSignatureSchema, ECSignatureParameter} from '../schemas/ec_signature_schema';
export class SchemaValidator {
private v: V;
constructor() {
this.v = new V();
+ this.v.addSchema(ECSignatureParameter, ECSignatureParameter.id);
this.v.addSchema(ECSignatureSchema, ECSignatureSchema.id);
}
public validate(instance: object, schema: Schema): ValidatorResult {