aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/types.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-16 11:09:53 +0800
committerFabio Berger <me@fabioberger.com>2018-02-16 11:09:53 +0800
commite2b51c5dc46b30b21e0561689de1f9a3d0127554 (patch)
treec8f93b5700961a46b16e49e52d159c989c11102d /packages/connect/src/types.ts
parentb610b7c1923dcc56883c5167393122ceaed26708 (diff)
parentb75fdd6b66a30196d53331827733b863bed770f0 (diff)
downloaddexon-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/types.ts')
-rw-r--r--packages/connect/src/types.ts15
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index edb6c77a6..970eff498 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -30,10 +30,10 @@ export interface ECSignature {
}
export interface Client {
- getTokenPairsAsync: (request?: TokenPairsRequest) => Promise<TokenPairsItem[]>;
- getOrdersAsync: (request?: OrdersRequest) => Promise<SignedOrder[]>;
+ getTokenPairsAsync: (requestOpts?: TokenPairsRequestOpts & PagedRequestOpts) => Promise<TokenPairsItem[]>;
+ getOrdersAsync: (requestOpts?: OrdersRequestOpts & PagedRequestOpts) => Promise<SignedOrder[]>;
getOrderAsync: (orderHash: string) => Promise<SignedOrder>;
- getOrderbookAsync: (request: OrderbookRequest) => Promise<OrderbookResponse>;
+ getOrderbookAsync: (request: OrderbookRequest, requestOpts?: PagedRequestOpts) => Promise<OrderbookResponse>;
getFeesAsync: (request: FeesRequest) => Promise<FeesResponse>;
submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
}
@@ -111,7 +111,7 @@ export enum WebsocketClientEventType {
ConnectFailed = 'connectFailed',
}
-export interface TokenPairsRequest {
+export interface TokenPairsRequestOpts {
tokenA?: string;
tokenB?: string;
}
@@ -128,7 +128,7 @@ export interface TokenTradeInfo {
precision: number;
}
-export interface OrdersRequest {
+export interface OrdersRequestOpts {
exchangeContractAddress?: string;
tokenAddress?: string;
makerTokenAddress?: string;
@@ -167,6 +167,11 @@ export interface FeesResponse {
takerFee: BigNumber;
}
+export interface PagedRequestOpts {
+ page?: number;
+ perPage?: number;
+}
+
export interface HttpRequestOptions {
params?: object;
payload?: object;