diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-15 08:31:19 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-15 08:31:19 +0800 |
commit | 3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96 (patch) | |
tree | 46c40599c55d0e44c2f780d03e7f5cc02235d4a6 /packages/connect/src | |
parent | 80e5127a469a0f38cddc18a45a4a7e019191760c (diff) | |
download | dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar.gz dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar.bz2 dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar.lz dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar.xz dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.tar.zst dexon-0x-contracts-3eeb9ddfa6440d9287c0b2e6c6c51847cedf8b96.zip |
Update connect json-schemas
Diffstat (limited to 'packages/connect/src')
-rw-r--r-- | packages/connect/src/schemas/asset_pairs_request_opts_schema.ts (renamed from packages/connect/src/schemas/token_pairs_request_opts_schema.ts) | 2 | ||||
-rw-r--r-- | packages/connect/src/schemas/fees_request_schema.ts | 26 | ||||
-rw-r--r-- | packages/connect/src/schemas/order_config_request_schema.ts | 24 | ||||
-rw-r--r-- | packages/connect/src/schemas/orderbook_request_schema.ts | 4 | ||||
-rw-r--r-- | packages/connect/src/schemas/orders_request_opts_schema.ts | 23 | ||||
-rw-r--r-- | packages/connect/src/schemas/schemas.ts | 8 |
6 files changed, 44 insertions, 43 deletions
diff --git a/packages/connect/src/schemas/token_pairs_request_opts_schema.ts b/packages/connect/src/schemas/asset_pairs_request_opts_schema.ts index bf1caa20d..f224503cc 100644 --- a/packages/connect/src/schemas/token_pairs_request_opts_schema.ts +++ b/packages/connect/src/schemas/asset_pairs_request_opts_schema.ts @@ -1,4 +1,4 @@ -export const AssetPairsRequestOptsSchema = { +export const assetPairsRequestOptsSchema = { id: '/AssetPairsRequestOpts', type: 'object', properties: { diff --git a/packages/connect/src/schemas/fees_request_schema.ts b/packages/connect/src/schemas/fees_request_schema.ts deleted file mode 100644 index e41e49e09..000000000 --- a/packages/connect/src/schemas/fees_request_schema.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const feesRequestSchema = { - id: '/OrderConfigRequest', - type: 'object', - properties: { - exchangeAddress: { $ref: '/Address' }, - maker: { $ref: '/Address' }, - taker: { $ref: '/Address' }, - makerTokenAddress: { $ref: '/Address' }, - takerTokenAddress: { $ref: '/Address' }, - makerAssetAmount: { $ref: '/Number' }, - takerAssetAmount: { $ref: '/Number' }, - expirationTimeSeconds: { $ref: '/Number' }, - salt: { $ref: '/Number' }, - }, - required: [ - 'exchangeAddress', - 'maker', - 'taker', - 'makerTokenAddress', - 'takerTokenAddress', - 'makerAssetAmount', - 'takerAssetAmount', - 'expirationTimeSeconds', - 'salt', - ], -}; diff --git a/packages/connect/src/schemas/order_config_request_schema.ts b/packages/connect/src/schemas/order_config_request_schema.ts new file mode 100644 index 000000000..8f6b19500 --- /dev/null +++ b/packages/connect/src/schemas/order_config_request_schema.ts @@ -0,0 +1,24 @@ +export const orderConfigRequestSchema = { + id: '/OrderConfigRequest', + type: 'object', + properties: { + makerAddress: { $ref: '/addressSchema' }, + takerAddress: { $ref: '/addressSchema' }, + makerAssetAmount: { $ref: '/numberSchema' }, + takerAssetAmount: { $ref: '/numberSchema' }, + makerAssetData: { $ref: '/hexSchema'}, + takerAssetData: { $ref: '/hexSchema' }, + exchangeAddress: { $ref: '/addressSchema' }, + expirationTimeSeconds: { $ref: '/numberSchema' }, + }, + required: [ + 'makerAddress', + 'takerAddress', + 'makerAssetAmount', + 'takerAssetAmount', + 'makerAssetData', + 'takerAssetData', + 'exchangeAddress', + 'expirationTimeSeconds', + ], +}; diff --git a/packages/connect/src/schemas/orderbook_request_schema.ts b/packages/connect/src/schemas/orderbook_request_schema.ts index cc75ada5c..0c9389d50 100644 --- a/packages/connect/src/schemas/orderbook_request_schema.ts +++ b/packages/connect/src/schemas/orderbook_request_schema.ts @@ -2,8 +2,8 @@ export const orderBookRequestSchema = { id: '/OrderBookRequest', type: 'object', properties: { - baseAssetData: { $ref: '/Address' }, - quoteAssetData: { $ref: '/Address' }, + baseAssetData: { $ref: '/hexSchema' }, + quoteAssetData: { $ref: '/hexSchema' }, }, required: ['baseAssetData', 'quoteAssetData'], }; diff --git a/packages/connect/src/schemas/orders_request_opts_schema.ts b/packages/connect/src/schemas/orders_request_opts_schema.ts index 1a9f74f7f..71ce3d06f 100644 --- a/packages/connect/src/schemas/orders_request_opts_schema.ts +++ b/packages/connect/src/schemas/orders_request_opts_schema.ts @@ -2,15 +2,18 @@ export const ordersRequestOptsSchema = { id: '/OrdersRequestOpts', type: 'object', properties: { - exchangeAddress: { $ref: '/Address' }, - tokenAddress: { $ref: '/Address' }, - makerTokenAddress: { $ref: '/Address' }, - takerTokenAddress: { $ref: '/Address' }, - assetDataA: { $ref: '/Address' }, - assetDataB: { $ref: '/Address' }, - maker: { $ref: '/Address' }, - taker: { $ref: '/Address' }, - trader: { $ref: '/Address' }, - feeRecipient: { $ref: '/Address' }, + makerAssetProxyId: { $ref: '/hexSchema' }, + takerAssetProxyId: { $ref: '/hexSchema' }, + makerAssetAddress: { $ref: '/addressSchema' }, + takerAssetAddress: { $ref: '/addressSchema' }, + exchangeAddress: { $ref: '/addressSchema' }, + senderAddress: { $ref: '/addressSchema' }, + makerAssetData: { $ref: '/hexSchema' }, + takerAssetData: { $ref: '/hexSchema' }, + traderAssetData: { $ref: '/hexSchema' }, + makerAddress: { $ref: '/addressSchema' }, + takerAddress: { $ref: '/addressSchema' }, + traderAddress: { $ref: '/addressSchema' }, + feeRecipientAddress: { $ref: '/addressSchema' }, }, }; diff --git a/packages/connect/src/schemas/schemas.ts b/packages/connect/src/schemas/schemas.ts index e6ca010ae..a7e968a01 100644 --- a/packages/connect/src/schemas/schemas.ts +++ b/packages/connect/src/schemas/schemas.ts @@ -1,13 +1,13 @@ -import { feesRequestSchema } from './fees_request_schema'; +import { assetPairsRequestOptsSchema } from './asset_pairs_request_opts_schema'; +import { orderConfigRequestSchema } from './order_config_request_schema'; import { orderBookRequestSchema } from './orderbook_request_schema'; import { ordersRequestOptsSchema } from './orders_request_opts_schema'; import { pagedRequestOptsSchema } from './paged_request_opts_schema'; -import { AssetPairsRequestOptsSchema } from './token_pairs_request_opts_schema'; export const schemas = { - feesRequestSchema, + orderConfigRequestSchema, orderBookRequestSchema, ordersRequestOptsSchema, pagedRequestOptsSchema, - AssetPairsRequestOptsSchema, + assetPairsRequestOptsSchema, }; |