aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'packages/connect/src/schemas')
-rw-r--r--packages/connect/src/schemas/fees_request_schema.ts26
-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.ts8
-rw-r--r--packages/connect/src/schemas/relayer_orderbook_request_schema.ts8
-rw-r--r--packages/connect/src/schemas/schemas.ts16
-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..f41a637b1
--- /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' },
+ per_page: { 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' },