diff options
author | Fabio Berger <me@fabioberger.com> | 2018-02-16 11:09:53 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-02-16 11:09:53 +0800 |
commit | e2b51c5dc46b30b21e0561689de1f9a3d0127554 (patch) | |
tree | c8f93b5700961a46b16e49e52d159c989c11102d /packages/connect/src/schemas | |
parent | b610b7c1923dcc56883c5167393122ceaed26708 (diff) | |
parent | b75fdd6b66a30196d53331827733b863bed770f0 (diff) | |
download | dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.gz dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.bz2 dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.lz dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.xz dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.tar.zst dexon-sol-tools-e2b51c5dc46b30b21e0561689de1f9a3d0127554.zip |
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js: (24 commits)
Rename variables
Update CHANGELOG
Add npm config for contracts list
Run prettier
Fix checks, add contract list to compile script in package.json
Add contracts to compiler options
Add missing public types from connect docs
Change imports order
Change default page params in connect to page 1 and perPage 100
Add docs staging to 0x.js package
Fix a typo
Add an assertion
Add PR numbers
Fix entry points
Add tests for dev-utils package
Move subproviders from dev-utils to subproviders
Add missing CHANGELOG entry
Add support for intersection types in docs
Add stagedocs script to connect package
web3 typings fix - web3.net.peerCount returns number
...
Diffstat (limited to 'packages/connect/src/schemas')
-rw-r--r-- | packages/connect/src/schemas/fees_request_schema.ts | 26 | ||||
-rw-r--r-- | packages/connect/src/schemas/orderbook_request_schema.ts (renamed from packages/connect/src/schemas/relayer_fees_request_schema.ts) | 5 | ||||
-rw-r--r-- | packages/connect/src/schemas/orders_request_opts_schema.ts (renamed from packages/connect/src/schemas/relayer_orders_request_schema.ts) | 4 | ||||
-rw-r--r-- | packages/connect/src/schemas/paged_request_opts_schema.ts | 8 | ||||
-rw-r--r-- | packages/connect/src/schemas/relayer_orderbook_request_schema.ts | 8 | ||||
-rw-r--r-- | packages/connect/src/schemas/schemas.ts | 16 | ||||
-rw-r--r-- | packages/connect/src/schemas/token_pairs_request_opts_schema.ts (renamed from packages/connect/src/schemas/relayer_token_pairs_request_schema.ts) | 4 |
7 files changed, 51 insertions, 20 deletions
diff --git a/packages/connect/src/schemas/fees_request_schema.ts b/packages/connect/src/schemas/fees_request_schema.ts new file mode 100644 index 000000000..ff3d7b9d3 --- /dev/null +++ b/packages/connect/src/schemas/fees_request_schema.ts @@ -0,0 +1,26 @@ +export const feesRequestSchema = { + id: '/FeesRequest', + type: 'object', + properties: { + exchangeContractAddress: { $ref: '/Address' }, + maker: { $ref: '/Address' }, + taker: { $ref: '/Address' }, + makerTokenAddress: { $ref: '/Address' }, + takerTokenAddress: { $ref: '/Address' }, + makerTokenAmount: { $ref: '/Number' }, + takerTokenAmount: { $ref: '/Number' }, + expirationUnixTimestampSec: { $ref: '/Number' }, + salt: { $ref: '/Number' }, + }, + required: [ + 'exchangeContractAddress', + 'maker', + 'taker', + 'makerTokenAddress', + 'takerTokenAddress', + 'makerTokenAmount', + 'takerTokenAmount', + 'expirationUnixTimestampSec', + 'salt', + ], +}; diff --git a/packages/connect/src/schemas/relayer_fees_request_schema.ts b/packages/connect/src/schemas/orderbook_request_schema.ts index f20e077ba..5f3463242 100644 --- a/packages/connect/src/schemas/relayer_fees_request_schema.ts +++ b/packages/connect/src/schemas/orderbook_request_schema.ts @@ -1,8 +1,9 @@ -export const relayerOrderBookRequestSchema = { - id: '/RelayerOrderBookRequest', +export const orderBookRequestSchema = { + id: '/OrderBookRequest', type: 'object', properties: { baseTokenAddress: { $ref: '/Address' }, quoteTokenAddress: { $ref: '/Address' }, }, + required: ['baseTokenAddress', 'quoteTokenAddress'], }; diff --git a/packages/connect/src/schemas/relayer_orders_request_schema.ts b/packages/connect/src/schemas/orders_request_opts_schema.ts index 570238dae..5facbc959 100644 --- a/packages/connect/src/schemas/relayer_orders_request_schema.ts +++ b/packages/connect/src/schemas/orders_request_opts_schema.ts @@ -1,5 +1,5 @@ -export const relayerOrdersRequestSchema = { - id: '/RelayerOrdersRequest', +export const ordersRequestOptsSchema = { + id: '/OrdersRequestOpts', type: 'object', properties: { exchangeContractAddress: { $ref: '/Address' }, diff --git a/packages/connect/src/schemas/paged_request_opts_schema.ts b/packages/connect/src/schemas/paged_request_opts_schema.ts new file mode 100644 index 000000000..eb2e52100 --- /dev/null +++ b/packages/connect/src/schemas/paged_request_opts_schema.ts @@ -0,0 +1,8 @@ +export const pagedRequestOptsSchema = { + id: '/PagedRequestOpts', + type: 'object', + properties: { + page: { type: 'number' }, + perPage: { type: 'number' }, + }, +}; diff --git a/packages/connect/src/schemas/relayer_orderbook_request_schema.ts b/packages/connect/src/schemas/relayer_orderbook_request_schema.ts deleted file mode 100644 index f20e077ba..000000000 --- a/packages/connect/src/schemas/relayer_orderbook_request_schema.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const relayerOrderBookRequestSchema = { - id: '/RelayerOrderBookRequest', - type: 'object', - properties: { - baseTokenAddress: { $ref: '/Address' }, - quoteTokenAddress: { $ref: '/Address' }, - }, -}; diff --git a/packages/connect/src/schemas/schemas.ts b/packages/connect/src/schemas/schemas.ts index 288d6969d..0b8b798a9 100644 --- a/packages/connect/src/schemas/schemas.ts +++ b/packages/connect/src/schemas/schemas.ts @@ -1,9 +1,13 @@ -import { relayerOrderBookRequestSchema } from './relayer_orderbook_request_schema'; -import { relayerOrdersRequestSchema } from './relayer_orders_request_schema'; -import { relayerTokenPairsRequestSchema } from './relayer_token_pairs_request_schema'; +import { feesRequestSchema } from './fees_request_schema'; +import { orderBookRequestSchema } from './orderbook_request_schema'; +import { ordersRequestOptsSchema } from './orders_request_opts_schema'; +import { pagedRequestOptsSchema } from './paged_request_opts_schema'; +import { tokenPairsRequestOptsSchema } from './token_pairs_request_opts_schema'; export const schemas = { - relayerOrderBookRequestSchema, - relayerOrdersRequestSchema, - relayerTokenPairsRequestSchema, + feesRequestSchema, + orderBookRequestSchema, + ordersRequestOptsSchema, + pagedRequestOptsSchema, + tokenPairsRequestOptsSchema, }; diff --git a/packages/connect/src/schemas/relayer_token_pairs_request_schema.ts b/packages/connect/src/schemas/token_pairs_request_opts_schema.ts index 379232204..9b73a917b 100644 --- a/packages/connect/src/schemas/relayer_token_pairs_request_schema.ts +++ b/packages/connect/src/schemas/token_pairs_request_opts_schema.ts @@ -1,5 +1,5 @@ -export const relayerTokenPairsRequestSchema = { - id: '/RelayerTokenPairsRequest', +export const tokenPairsRequestOptsSchema = { + id: '/TokenPairsRequestOpts', type: 'object', properties: { tokenA: { $ref: '/Address' }, |