diff options
Diffstat (limited to 'packages/json-schemas/schemas')
-rw-r--r-- | packages/json-schemas/schemas/ec_signature_schema.ts | 20 | ||||
-rw-r--r-- | packages/json-schemas/schemas/order_schemas.ts | 4 |
2 files changed, 24 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', +}; diff --git a/packages/json-schemas/schemas/order_schemas.ts b/packages/json-schemas/schemas/order_schemas.ts index 183118c23..dcbfde6e0 100644 --- a/packages/json-schemas/schemas/order_schemas.ts +++ b/packages/json-schemas/schemas/order_schemas.ts @@ -5,11 +5,13 @@ export const orderSchema = { takerAddress: { $ref: '/Address' }, makerFee: { $ref: '/Number' }, takerFee: { $ref: '/Number' }, + senderAddress: { $ref: '/Address' }, makerAssetAmount: { $ref: '/Number' }, takerAssetAmount: { $ref: '/Number' }, makerAssetData: { $ref: '/Hex' }, takerAssetData: { $ref: '/Hex' }, salt: { $ref: '/Number' }, + exchangeAddress: { $ref: '/Address' }, feeRecipientAddress: { $ref: '/Address' }, expirationTimeSeconds: { $ref: '/Number' }, }, @@ -18,11 +20,13 @@ export const orderSchema = { 'takerAddress', 'makerFee', 'takerFee', + 'senderAddress', 'makerAssetAmount', 'takerAssetAmount', 'makerAssetData', 'takerAssetData', 'salt', + 'exchangeAddress', 'feeRecipientAddress', 'expirationTimeSeconds', ], |