Revivie the ECSignatureSchema

This commit is contained in:
Fabio Berger
2018-05-30 13:52:27 -07:00
parent 4874d55d03
commit 3302c89284
2 changed files with 22 additions and 0 deletions

View File

@@ -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',
};

View File

@@ -1,5 +1,6 @@
import { addressSchema, hexSchema, numberSchema } from '../schemas/basic_type_schemas';
import { blockParamSchema, blockRangeSchema } from '../schemas/block_range_schema';
import { ecSignatureSchema } from '../schemas/ec_signature_schema';
import { indexFilterValuesSchema } from '../schemas/index_filter_values_schema';
import { orderCancellationRequestsSchema } from '../schemas/order_cancel_schema';
import { orderFillOrKillRequestsSchema } from '../schemas/order_fill_or_kill_requests_schema';
@@ -31,6 +32,7 @@ export const schemas = {
numberSchema,
addressSchema,
hexSchema,
ecSignatureSchema,
indexFilterValuesSchema,
orderCancellationRequestsSchema,
orderFillOrKillRequestsSchema,