aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/schemas
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-24 07:52:41 +0800
committerFabio Berger <me@fabioberger.com>2018-05-24 07:52:41 +0800
commit9c850d152cd024c8852200c237790e8bee82b3a9 (patch)
tree3a7005193851d5ef788a65496b2054b27aed791f /packages/json-schemas/schemas
parent9d11028fce50748d69db5c3b867b1ea063bf2b52 (diff)
downloaddexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar.gz
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar.bz2
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar.lz
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar.xz
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.tar.zst
dexon-sol-tools-9c850d152cd024c8852200c237790e8bee82b3a9.zip
Updated Order, SignedOrder schemas, removed ECSignature schema types and added Hex basic type
Diffstat (limited to 'packages/json-schemas/schemas')
-rw-r--r--packages/json-schemas/schemas/basic_type_schemas.ts6
-rw-r--r--packages/json-schemas/schemas/ec_signature_schema.ts20
-rw-r--r--packages/json-schemas/schemas/order_schemas.ts36
3 files changed, 24 insertions, 38 deletions
diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts
index 9d81ff333..8430b6f4a 100644
--- a/packages/json-schemas/schemas/basic_type_schemas.ts
+++ b/packages/json-schemas/schemas/basic_type_schemas.ts
@@ -4,6 +4,12 @@ export const addressSchema = {
pattern: '^0x[0-9a-f]{40}$',
};
+export const hexSchema = {
+ id: '/Hex',
+ type: 'string',
+ pattern: '^0x[0-9a-f]',
+};
+
export const numberSchema = {
id: '/Number',
type: 'string',
diff --git a/packages/json-schemas/schemas/ec_signature_schema.ts b/packages/json-schemas/schemas/ec_signature_schema.ts
deleted file mode 100644
index 71b840dd8..000000000
--- a/packages/json-schemas/schemas/ec_signature_schema.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-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 6f17224ad..183118c23 100644
--- a/packages/json-schemas/schemas/order_schemas.ts
+++ b/packages/json-schemas/schemas/order_schemas.ts
@@ -1,30 +1,30 @@
export const orderSchema = {
id: '/Order',
properties: {
- maker: { $ref: '/Address' },
- taker: { $ref: '/Address' },
+ makerAddress: { $ref: '/Address' },
+ takerAddress: { $ref: '/Address' },
makerFee: { $ref: '/Number' },
takerFee: { $ref: '/Number' },
- makerTokenAmount: { $ref: '/Number' },
- takerTokenAmount: { $ref: '/Number' },
- makerTokenAddress: { $ref: '/Address' },
- takerTokenAddress: { $ref: '/Address' },
+ makerAssetAmount: { $ref: '/Number' },
+ takerAssetAmount: { $ref: '/Number' },
+ makerAssetData: { $ref: '/Hex' },
+ takerAssetData: { $ref: '/Hex' },
salt: { $ref: '/Number' },
- feeRecipient: { $ref: '/Address' },
- expirationUnixTimestampSec: { $ref: '/Number' },
- exchangeContractAddress: { $ref: '/Address' },
+ feeRecipientAddress: { $ref: '/Address' },
+ expirationTimeSeconds: { $ref: '/Number' },
},
required: [
- 'maker',
- 'taker',
+ 'makerAddress',
+ 'takerAddress',
'makerFee',
'takerFee',
- 'makerTokenAmount',
- 'takerTokenAmount',
+ 'makerAssetAmount',
+ 'takerAssetAmount',
+ 'makerAssetData',
+ 'takerAssetData',
'salt',
- 'feeRecipient',
- 'expirationUnixTimestampSec',
- 'exchangeContractAddress',
+ 'feeRecipientAddress',
+ 'expirationTimeSeconds',
],
type: 'object',
};
@@ -35,9 +35,9 @@ export const signedOrderSchema = {
{ $ref: '/Order' },
{
properties: {
- ecSignature: { $ref: '/ECSignature' },
+ signature: { $ref: '/Hex' },
},
- required: ['ecSignature'],
+ required: ['signature'],
},
],
};