diff options
Diffstat (limited to 'packages/connect/src/types.ts')
-rw-r--r-- | packages/connect/src/types.ts | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts index eb6df3ba9..71dd8dac2 100644 --- a/packages/connect/src/types.ts +++ b/packages/connect/src/types.ts @@ -1,6 +1,34 @@ -import {SignedOrder} from '0x.js'; import {BigNumber} from 'bignumber.js'; +// TODO: Consolidate Order, SignedOrder and ECSignature into a shared package instead of duplicating them from 0x.js +export interface Order { + maker: string; + taker: string; + makerFee: BigNumber; + takerFee: BigNumber; + makerTokenAmount: BigNumber; + takerTokenAmount: BigNumber; + makerTokenAddress: string; + takerTokenAddress: string; + salt: BigNumber; + exchangeContractAddress: string; + feeRecipient: string; + expirationUnixTimestampSec: BigNumber; +} + +export interface SignedOrder extends Order { + ecSignature: ECSignature; +} + +/** + * Elliptic Curve signature + */ +export interface ECSignature { + v: number; + r: string; + s: string; +} + export interface Client { getTokenPairsAsync: (request?: TokenPairsRequest) => Promise<TokenPairsItem[]>; getOrdersAsync: (request?: OrdersRequest) => Promise<SignedOrder[]>; |