aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/connect/package.json2
-rw-r--r--packages/connect/src/types.ts36
-rw-r--r--packages/connect/src/utils/assert.ts3
-rw-r--r--packages/sra-api/src/api.ts9
4 files changed, 31 insertions, 19 deletions
diff --git a/packages/connect/package.json b/packages/connect/package.json
index 39376a9a6..336cb85fc 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -53,7 +53,7 @@
"dependencies": {
"@0xproject/assert": "^0.2.14",
"@0xproject/json-schemas": "^1.0.1-rc.4",
- "@0xproject/types": "^0.8.2",
+ "@0xproject/types": "^1.0.1-rc.4",
"@0xproject/typescript-typings": "^1.0.4",
"@0xproject/utils": "^1.0.5",
"lodash": "^4.17.5",
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index fb51dca98..dab01c935 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -94,14 +94,18 @@ export interface Asset {
}
export interface OrdersRequestOpts {
+ makerAssetProxyId?: string;
+ takerAssetProxyId?: string;
+ makerAssetAddress?: string;
+ takerAssetAddress?: string;
exchangeAddress?: string;
- tokenAddress?: string;
- makerTokenAddress?: string;
- takerTokenAddress?: string;
- maker?: string;
- taker?: string;
- trader?: string;
- feeRecipient?: string;
+ senderAddress?: string;
+ makerAssetData?: string;
+ takerAssetData?: string;
+ makerAddress?: string;
+ takerAddress?: string;
+ traderAddress?: string;
+ feeRecipientAddress?: string;
}
export interface OrderbookRequest {
@@ -122,21 +126,21 @@ export interface PaginatedCollection<T> {
}
export interface OrderConfigRequest {
+ makerAddress: string;
+ takerAddress: string;
+ makerAssetAmount: string;
+ takerAssetAmount: string;
+ makerAssetData: string;
+ takerAssetData: string;
exchangeAddress: string;
- maker: string;
- taker: string;
- makerTokenAddress: string;
- takerTokenAddress: string;
- makerAssetAmount: BigNumber;
- takerAssetAmount: BigNumber;
- expirationTimeSeconds: BigNumber;
- salt: BigNumber;
+ expirationTimeSeconds: string;
}
export interface OrderConfigResponse {
- feeRecipient: string;
makerFee: BigNumber;
takerFee: BigNumber;
+ feeRecipientAddress: string;
+ senderAddress: string;
}
export interface PagedRequestOpts {
diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts
index a0fd12fbd..353b7f29f 100644
--- a/packages/connect/src/utils/assert.ts
+++ b/packages/connect/src/utils/assert.ts
@@ -14,11 +14,10 @@ export const assert = {
sharedAssert.doesConformToSchema(
variableName,
subscriptionOpts,
- schemas.relayerApiOrderbookChannelSubscribePayload,
+ schemas.relayerApiOrdersChannelSubscribePayload,
);
},
isOrderbookChannelHandler(variableName: string, handler: any): void {
- sharedAssert.isFunction(`${variableName}.onSnapshot`, _.get(handler, 'onSnapshot'));
sharedAssert.isFunction(`${variableName}.onUpdate`, _.get(handler, 'onUpdate'));
sharedAssert.isFunction(`${variableName}.onError`, _.get(handler, 'onError'));
sharedAssert.isFunction(`${variableName}.onClose`, _.get(handler, 'onClose'));
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts
index 4143a663c..f80d343d8 100644
--- a/packages/sra-api/src/api.ts
+++ b/packages/sra-api/src/api.ts
@@ -151,6 +151,15 @@ export const api: OpenApiSpec = {
},
},
{
+ name: 'takerAddress',
+ in: 'query',
+ description: `Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
+ example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
+ schema: {
+ $ref: '#/components/schemas/addressSchema',
+ },
+ },
+ {
name: 'traderAddress',
in: 'query',
description: `Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,