@velora-dex/sdk 9.5.4-dev.1 → 9.5.4-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +156 -0
- package/dist/examples/helpers/delta.d.ts +1 -1
- package/dist/examples/helpers/delta.d.ts.map +1 -1
- package/dist/examples/helpers/deltaV2.d.ts +3 -3
- package/dist/examples/helpers/deltaV2.d.ts.map +1 -1
- package/dist/index.d.ts +4 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/methods/delta/helpers/orders.d.ts.map +1 -1
- package/dist/methods/delta/helpers/types.d.ts +11 -5
- package/dist/methods/delta/helpers/types.d.ts.map +1 -1
- package/dist/methods/deltaV2/{buildDeltaOrderV2.d.ts → buildDeltaOrder.d.ts} +10 -9
- package/dist/methods/deltaV2/buildDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/{buildExternalDeltaOrderV2.d.ts → buildExternalDeltaOrder.d.ts} +10 -9
- package/dist/methods/deltaV2/buildExternalDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/{buildTWAPDeltaOrderV2.d.ts → buildTWAPDeltaOrder.d.ts} +13 -12
- package/dist/methods/deltaV2/buildTWAPDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/cancelDeltaOrder.d.ts +21 -0
- package/dist/methods/deltaV2/cancelDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/getAgentsList.d.ts +10 -0
- package/dist/methods/deltaV2/getAgentsList.d.ts.map +1 -0
- package/dist/methods/deltaV2/getBridgeRoutes.d.ts +3 -3
- package/dist/methods/deltaV2/getBridgeRoutes.d.ts.map +1 -1
- package/dist/methods/deltaV2/getDeltaOrders.d.ts +40 -0
- package/dist/methods/deltaV2/getDeltaOrders.d.ts.map +1 -0
- package/dist/methods/deltaV2/{getDeltaPriceV2.d.ts → getDeltaPrice.d.ts} +7 -7
- package/dist/methods/deltaV2/getDeltaPrice.d.ts.map +1 -0
- package/dist/methods/deltaV2/helpers/orders.d.ts +191 -0
- package/dist/methods/deltaV2/helpers/orders.d.ts.map +1 -0
- package/dist/methods/deltaV2/index.d.ts +51 -38
- package/dist/methods/deltaV2/index.d.ts.map +1 -1
- package/dist/methods/deltaV2/isTokenSupportedInDelta.d.ts +8 -0
- package/dist/methods/deltaV2/isTokenSupportedInDelta.d.ts.map +1 -0
- package/dist/methods/deltaV2/{postDeltaOrderV2.d.ts → postDeltaOrder.d.ts} +9 -8
- package/dist/methods/deltaV2/postDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/postExternalDeltaOrder.d.ts +11 -0
- package/dist/methods/deltaV2/postExternalDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/postTWAPDeltaOrder.d.ts +17 -0
- package/dist/methods/deltaV2/postTWAPDeltaOrder.d.ts.map +1 -0
- package/dist/methods/deltaV2/types.d.ts +26 -20
- package/dist/methods/deltaV2/types.d.ts.map +1 -1
- package/dist/sdk/full.d.ts +1 -1
- package/dist/sdk/full.d.ts.map +1 -1
- package/dist/sdk/simple.d.ts +3 -9
- package/dist/sdk/simple.d.ts.map +1 -1
- package/dist/sdk.cjs.development.js +1600 -1298
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +1584 -1266
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.js +6 -1
- package/src/examples/deltaV2.ts +21 -25
- package/src/examples/helpers/delta.ts +6 -1
- package/src/examples/helpers/deltaV2.ts +9 -4
- package/src/index.js +167 -83
- package/src/index.ts +27 -143
- package/src/methods/delta/helpers/orders.ts +5 -1
- package/src/methods/delta/helpers/types.ts +19 -18
- package/src/methods/deltaV2/{buildDeltaOrderV2.ts → buildDeltaOrder.ts} +16 -16
- package/src/methods/deltaV2/{buildExternalDeltaOrderV2.ts → buildExternalDeltaOrder.ts} +16 -16
- package/src/methods/deltaV2/{buildTWAPDeltaOrderV2.ts → buildTWAPDeltaOrder.ts} +22 -22
- package/src/methods/deltaV2/{cancelDeltaOrderV2.ts → cancelDeltaOrder.ts} +17 -20
- package/src/methods/deltaV2/getAgentsList.ts +32 -0
- package/src/methods/deltaV2/getBridgeRoutes.ts +7 -7
- package/src/methods/deltaV2/getDeltaOrders.ts +149 -0
- package/src/methods/deltaV2/{getDeltaPriceV2.ts → getDeltaPrice.ts} +15 -15
- package/src/methods/deltaV2/helpers/orders.ts +363 -0
- package/src/methods/deltaV2/index.ts +148 -139
- package/src/methods/deltaV2/{isTokenSupportedInDeltaV2.ts → isTokenSupportedInDelta.ts} +7 -7
- package/src/methods/deltaV2/{postDeltaOrderV2.ts → postDeltaOrder.ts} +13 -16
- package/src/methods/deltaV2/postExternalDeltaOrder.ts +45 -0
- package/src/methods/deltaV2/{postTWAPDeltaOrderV2.ts → postTWAPDeltaOrder.ts} +14 -19
- package/src/methods/deltaV2/types.ts +35 -22
- package/src/sdk/full.ts +2 -2
- package/src/sdk/simple.ts +17 -43
- package/dist/methods/deltaV2/buildDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/buildExternalDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/buildTWAPDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts +0 -21
- package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/getAgentsListV2.d.ts +0 -10
- package/dist/methods/deltaV2/getAgentsListV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts +0 -33
- package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/getDeltaPriceV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts +0 -8
- package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/postDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts +0 -11
- package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts.map +0 -1
- package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts +0 -16
- package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts.map +0 -1
- package/src/methods/deltaV2/getAgentsListV2.ts +0 -34
- package/src/methods/deltaV2/getDeltaOrdersV2.ts +0 -119
- package/src/methods/deltaV2/postExternalDeltaOrderV2.ts +0 -45
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import type { Prettify } from 'ts-essentials';
|
|
1
2
|
import type { Address } from '../../types';
|
|
2
3
|
import type { TypedDataField } from '../common/orders/buildOrderData';
|
|
3
4
|
import type {
|
|
4
5
|
Bridge,
|
|
5
6
|
DeltaOrderType,
|
|
6
7
|
DeltaOrderUnion,
|
|
8
|
+
OnChainOrderMap,
|
|
7
9
|
OnChainOrderType,
|
|
8
10
|
} from '../delta/helpers/types';
|
|
9
11
|
|
|
10
12
|
/** @description Response from POST /delta/v2/orders/build — EIP-712 typed data ready to sign. */
|
|
11
|
-
export type
|
|
13
|
+
export type BuiltDeltaOrder<T extends DeltaOrderUnion = DeltaOrderUnion> = {
|
|
12
14
|
toSign: {
|
|
13
15
|
domain: {
|
|
14
16
|
name: string;
|
|
@@ -19,7 +21,7 @@ export type BuiltDeltaOrderV2 = {
|
|
|
19
21
|
/** EIP-712 type definitions keyed by type name. */
|
|
20
22
|
types: Record<string, TypedDataField[]>;
|
|
21
23
|
/** The on-chain order struct value to sign. */
|
|
22
|
-
value:
|
|
24
|
+
value: T;
|
|
23
25
|
};
|
|
24
26
|
/** EIP-712 order hash. */
|
|
25
27
|
orderHash: string;
|
|
@@ -85,7 +87,7 @@ export type DeltaRoute = {
|
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
/** @description v2 price response: route-based, cross-chain first. */
|
|
88
|
-
export type
|
|
90
|
+
export type DeltaPrice = {
|
|
89
91
|
/** @description Unique request ID for tracing. */
|
|
90
92
|
id: string;
|
|
91
93
|
/** @description Order side. */
|
|
@@ -108,7 +110,10 @@ export type DeltaPriceV2 = {
|
|
|
108
110
|
alternatives: DeltaRoute[];
|
|
109
111
|
};
|
|
110
112
|
|
|
111
|
-
/** @description
|
|
113
|
+
/** @description
|
|
114
|
+
* A flat bridge-routes entry returned by GET /delta/v2/prices/bridge-routes (better version of v1 prices/bridge-info).
|
|
115
|
+
* Can be used to populate bridge selection UIs and to validate that bridge is possible for a given src/dest pair before calling GET /delta/v2/prices.
|
|
116
|
+
* */
|
|
112
117
|
export type BridgeRoute = {
|
|
113
118
|
srcChainId: number;
|
|
114
119
|
destChainId: number;
|
|
@@ -117,11 +122,12 @@ export type BridgeRoute = {
|
|
|
117
122
|
};
|
|
118
123
|
|
|
119
124
|
/* ------------------------------------------------------------------ */
|
|
120
|
-
/* Orders v2 response shape
|
|
125
|
+
/* Orders v2 response shape: DeltaAuction<T>, same generic shape as */
|
|
126
|
+
/* v1's DeltaAuction but with v2 base fields. */
|
|
121
127
|
/* ------------------------------------------------------------------ */
|
|
122
128
|
|
|
123
129
|
/** @description Integrator-facing order status returned by v2 order endpoints. */
|
|
124
|
-
const
|
|
130
|
+
const DeltaOrderStatusMap = {
|
|
125
131
|
Pending: 'PENDING',
|
|
126
132
|
AwaitingSignature: 'AWAITING_SIGNATURE',
|
|
127
133
|
Active: 'ACTIVE',
|
|
@@ -135,11 +141,8 @@ const DeltaOrderStatusV2Map = {
|
|
|
135
141
|
Refunded: 'REFUNDED',
|
|
136
142
|
} as const;
|
|
137
143
|
|
|
138
|
-
export type
|
|
139
|
-
(typeof
|
|
140
|
-
|
|
141
|
-
/** @description `OnChainOrderType` plus the synthetic `FillableOrder` label, used when a Standard `Order` is `partiallyFillable`. */
|
|
142
|
-
export type DeltaOnChainOrderTypeReported = OnChainOrderType | 'FillableOrder';
|
|
144
|
+
export type DeltaOrderStatus =
|
|
145
|
+
(typeof DeltaOrderStatusMap)[keyof typeof DeltaOrderStatusMap];
|
|
143
146
|
|
|
144
147
|
/** @description Token side on an order. SELL provides an explicit `amount`; BUY provides expected/executed amounts. */
|
|
145
148
|
export type DeltaTokenSide =
|
|
@@ -156,7 +159,7 @@ export type DeltaTokenSide =
|
|
|
156
159
|
};
|
|
157
160
|
|
|
158
161
|
/** @description A single transaction entry on a v2 order. */
|
|
159
|
-
export type
|
|
162
|
+
export type DeltaTransaction = {
|
|
160
163
|
originTx: string;
|
|
161
164
|
destinationTx: string | null;
|
|
162
165
|
/** @description Filled percent of the slice (0–100). */
|
|
@@ -165,25 +168,35 @@ export type DeltaTransactionV2 = {
|
|
|
165
168
|
receivedAmount: string | null;
|
|
166
169
|
};
|
|
167
170
|
|
|
168
|
-
|
|
169
|
-
export type DeltaOrderV2Response = {
|
|
171
|
+
type DeltaAuctionBase = {
|
|
170
172
|
id: string;
|
|
171
|
-
status:
|
|
173
|
+
status: DeltaOrderStatus;
|
|
172
174
|
side: 'SELL' | 'BUY';
|
|
173
175
|
type: DeltaOrderType;
|
|
174
|
-
onChainOrderType: DeltaOnChainOrderTypeReported | null;
|
|
175
176
|
input: DeltaTokenSide;
|
|
176
177
|
output: DeltaTokenSide;
|
|
177
178
|
owner: Address;
|
|
178
179
|
beneficiary: Address;
|
|
179
|
-
orderHash: string
|
|
180
|
+
orderHash: string;
|
|
180
181
|
partner: string;
|
|
181
|
-
|
|
182
|
-
transactions: DeltaTransactionV2[];
|
|
182
|
+
transactions: DeltaTransaction[];
|
|
183
183
|
/** @description ISO datetime string. */
|
|
184
|
-
createdAt: string
|
|
184
|
+
createdAt: string;
|
|
185
185
|
/** @description ISO datetime string. */
|
|
186
|
-
updatedAt: string
|
|
186
|
+
updatedAt: string;
|
|
187
187
|
/** @description ISO datetime string. */
|
|
188
|
-
expiresAt: string
|
|
188
|
+
expiresAt: string;
|
|
189
189
|
};
|
|
190
|
+
|
|
191
|
+
/** @description Order shape returned by GET /v2/orders, /v2/orders/:id, /v2/orders/hash/:hash.
|
|
192
|
+
* Generic over `onChainOrderType` like v1's `DeltaAuction`: the type distributes over the
|
|
193
|
+
* union so that `order` narrows to the matching family (`OnChainOrderMap[T]`). */
|
|
194
|
+
export type DeltaAuction<T extends OnChainOrderType = OnChainOrderType> =
|
|
195
|
+
T extends T
|
|
196
|
+
? Prettify<
|
|
197
|
+
DeltaAuctionBase & {
|
|
198
|
+
onChainOrderType: T;
|
|
199
|
+
order: OnChainOrderMap[T];
|
|
200
|
+
}
|
|
201
|
+
>
|
|
202
|
+
: never;
|
package/src/sdk/full.ts
CHANGED
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
DeltaOrderHandlers,
|
|
14
14
|
} from '../methods/delta';
|
|
15
15
|
import {
|
|
16
|
-
constructAllDeltaV2OrdersHandlers,
|
|
17
|
-
DeltaV2OrderHandlers,
|
|
16
|
+
constructAllDeltaOrdersHandlers as constructAllDeltaV2OrdersHandlers,
|
|
17
|
+
DeltaOrderHandlers as DeltaV2OrderHandlers,
|
|
18
18
|
} from '../methods/deltaV2';
|
|
19
19
|
import {
|
|
20
20
|
constructGetQuote,
|
package/src/sdk/simple.ts
CHANGED
|
@@ -136,34 +136,8 @@ import {
|
|
|
136
136
|
constructIsTokenSupportedInDelta,
|
|
137
137
|
IsTokenSupportedInDeltaFunctions,
|
|
138
138
|
} from '../methods/delta/isTokenSupportedInDelta';
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
DeltaV2OrderHandlers,
|
|
142
|
-
} from '../methods/deltaV2';
|
|
143
|
-
import {
|
|
144
|
-
BuildDeltaOrderV2Functions,
|
|
145
|
-
constructBuildDeltaOrderV2,
|
|
146
|
-
} from '../methods/deltaV2/buildDeltaOrderV2';
|
|
147
|
-
import {
|
|
148
|
-
constructPostDeltaOrderV2,
|
|
149
|
-
PostDeltaOrderV2Functions,
|
|
150
|
-
} from '../methods/deltaV2/postDeltaOrderV2';
|
|
151
|
-
import {
|
|
152
|
-
constructGetDeltaOrdersV2,
|
|
153
|
-
GetDeltaOrdersV2Functions,
|
|
154
|
-
} from '../methods/deltaV2/getDeltaOrdersV2';
|
|
155
|
-
import {
|
|
156
|
-
constructGetDeltaPriceV2,
|
|
157
|
-
GetDeltaPriceV2Functions,
|
|
158
|
-
} from '../methods/deltaV2/getDeltaPriceV2';
|
|
159
|
-
import {
|
|
160
|
-
constructGetBridgeRoutes,
|
|
161
|
-
GetBridgeRoutesFunctions,
|
|
162
|
-
} from '../methods/deltaV2/getBridgeRoutes';
|
|
163
|
-
import {
|
|
164
|
-
constructIsTokenSupportedInDeltaV2,
|
|
165
|
-
IsTokenSupportedInDeltaV2Functions,
|
|
166
|
-
} from '../methods/deltaV2/isTokenSupportedInDeltaV2';
|
|
139
|
+
|
|
140
|
+
import * as DeltaV2 from '../methods/deltaV2';
|
|
167
141
|
|
|
168
142
|
export type SwapFetchMethods = GetBalancesFunctions &
|
|
169
143
|
GetTokensFunctions &
|
|
@@ -196,14 +170,14 @@ export type DeltaFetchMethods = BuildDeltaOrderFunctions &
|
|
|
196
170
|
IsTokenSupportedInDeltaFunctions &
|
|
197
171
|
PostDeltaOrderFunctions;
|
|
198
172
|
|
|
199
|
-
export type DeltaV2FetchMethods =
|
|
200
|
-
|
|
201
|
-
|
|
173
|
+
export type DeltaV2FetchMethods = DeltaV2.BuildDeltaOrderFunctions &
|
|
174
|
+
DeltaV2.GetDeltaOrdersFunctions &
|
|
175
|
+
DeltaV2.GetDeltaPriceFunctions &
|
|
202
176
|
GetDeltaContractFunctions &
|
|
203
177
|
GetPartnerFeeFunctions &
|
|
204
|
-
GetBridgeRoutesFunctions &
|
|
205
|
-
|
|
206
|
-
|
|
178
|
+
DeltaV2.GetBridgeRoutesFunctions &
|
|
179
|
+
DeltaV2.IsTokenSupportedInDeltaFunctions &
|
|
180
|
+
DeltaV2.PostDeltaOrderFunctions;
|
|
207
181
|
|
|
208
182
|
export type SimpleFetchSDK = {
|
|
209
183
|
swap: SwapFetchMethods;
|
|
@@ -225,7 +199,7 @@ export type SimpleSDK = {
|
|
|
225
199
|
/** @deprecated NFT Orders are deprecated and will be removed in a future version. */
|
|
226
200
|
nftOrders: NFTOrderHandlers<TxHash>;
|
|
227
201
|
delta: DeltaOrderHandlers<TxHash>;
|
|
228
|
-
deltaV2:
|
|
202
|
+
deltaV2: DeltaV2.DeltaOrderHandlers<TxHash>;
|
|
229
203
|
quote: QuoteFetchMethods;
|
|
230
204
|
} & Required<ConstructBaseInput>;
|
|
231
205
|
|
|
@@ -339,14 +313,14 @@ export function constructSimpleSDK(
|
|
|
339
313
|
|
|
340
314
|
const deltaV2 = constructPartialSDK(
|
|
341
315
|
config,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
316
|
+
DeltaV2.constructBuildDeltaOrder,
|
|
317
|
+
DeltaV2.constructPostDeltaOrder,
|
|
318
|
+
DeltaV2.constructGetDeltaOrders,
|
|
319
|
+
DeltaV2.constructGetDeltaPrice,
|
|
346
320
|
constructGetDeltaContract,
|
|
347
321
|
constructGetPartnerFee,
|
|
348
|
-
constructGetBridgeRoutes,
|
|
349
|
-
|
|
322
|
+
DeltaV2.constructGetBridgeRoutes,
|
|
323
|
+
DeltaV2.constructIsTokenSupportedInDelta
|
|
350
324
|
);
|
|
351
325
|
|
|
352
326
|
const quote = constructPartialSDK(config, constructGetQuote);
|
|
@@ -385,8 +359,8 @@ export function constructSimpleSDK(
|
|
|
385
359
|
const delta: DeltaOrderHandlers<TxHash> =
|
|
386
360
|
constructAllDeltaOrdersHandlers<TxHash>(config);
|
|
387
361
|
|
|
388
|
-
const deltaV2:
|
|
389
|
-
|
|
362
|
+
const deltaV2: DeltaV2.DeltaOrderHandlers<TxHash> =
|
|
363
|
+
DeltaV2.constructAllDeltaOrdersHandlers<TxHash>(config);
|
|
390
364
|
|
|
391
365
|
const quote = constructGetQuote(config);
|
|
392
366
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,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,21 +0,0 @@
|
|
|
1
|
-
import type { ConstructProviderFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
import { type CancelDeltaOrderData } from '../delta/helpers/buildCancelDeltaOrderData';
|
|
3
|
-
type SuccessResponse = {
|
|
4
|
-
success: true;
|
|
5
|
-
};
|
|
6
|
-
type CancelDeltaOrderRequestParams = {
|
|
7
|
-
orderIds: string[];
|
|
8
|
-
signature: string;
|
|
9
|
-
};
|
|
10
|
-
export type SignCancelDeltaOrderRequestV2 = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<string>;
|
|
11
|
-
export type PostCancelDeltaOrderRequestV2 = (params: CancelDeltaOrderRequestParams, requestParams?: RequestParameters) => Promise<SuccessResponse>;
|
|
12
|
-
export type CancelDeltaOrderV2 = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<SuccessResponse>;
|
|
13
|
-
export type CancelDeltaOrderV2Functions = {
|
|
14
|
-
signCancelDeltaOrderRequestV2: SignCancelDeltaOrderRequestV2;
|
|
15
|
-
postCancelDeltaOrderRequestV2: PostCancelDeltaOrderRequestV2;
|
|
16
|
-
/** @description Cancel one or more Delta orders via the v2 endpoint */
|
|
17
|
-
cancelDeltaOrdersV2: CancelDeltaOrderV2;
|
|
18
|
-
};
|
|
19
|
-
export declare const constructCancelDeltaOrderV2: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller" | "fetcher" | "apiURL" | "chainId">) => CancelDeltaOrderV2Functions;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=cancelDeltaOrderV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancelDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/cancelDeltaOrderV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,4CAA4C,CAAC;AAEpD,KAAK,eAAe,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AAEzC,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAC1C,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,MAAM,MAAM,6BAA6B,GAAG,CAC1C,MAAM,EAAE,6BAA6B,EACrC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,kBAAkB,GAAG,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,2BAA2B,GAAG;IACxC,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,uEAAuE;IACvE,mBAAmB,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,IAAI,CACX,2BAA2B,CAAC,GAAG,EAAE,mBAAmB,CAAC,EACrD,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CACpD,KACA,2BAyDF,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
export type AgentList = string[];
|
|
3
|
-
type GetAgentsListV2 = (requestParams?: RequestParameters) => Promise<AgentList>;
|
|
4
|
-
export type GetAgentsListV2Functions = {
|
|
5
|
-
/** @description List agents available on the current chain. */
|
|
6
|
-
getAgentsListV2: GetAgentsListV2;
|
|
7
|
-
};
|
|
8
|
-
export declare const constructGetAgentsListV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetAgentsListV2Functions;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=getAgentsListV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAgentsListV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getAgentsListV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAIjC,KAAK,eAAe,GAAG,CACrB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,SAAS,CAAC,CAAC;AAExB,MAAM,MAAM,wBAAwB,GAAG;IACrC,+DAA+D;IAC/D,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,kCAIlC,mBAAmB,KAAG,wBAaxB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Address, ConstructFetchInput, PaginatedResponse, RequestParameters } from '../../types';
|
|
2
|
-
import type { DeltaOrderType, OnChainOrderType } from '../delta/helpers/types';
|
|
3
|
-
import type { DeltaOrderStatusV2, DeltaOrderV2Response } from './types';
|
|
4
|
-
type GetDeltaOrderByIdV2 = (orderId: string, requestParams?: RequestParameters) => Promise<DeltaOrderV2Response>;
|
|
5
|
-
type GetDeltaOrderByHashV2 = (orderHash: string, requestParams?: RequestParameters) => Promise<DeltaOrderV2Response>;
|
|
6
|
-
type OrdersV2Filter = {
|
|
7
|
-
/** @description `order.owner` to fetch Delta Orders for. */
|
|
8
|
-
userAddress: Address;
|
|
9
|
-
/** @description Pagination option. Default 1. */
|
|
10
|
-
page?: number;
|
|
11
|
-
/** @description Pagination option. Default 100, max 1000. */
|
|
12
|
-
limit?: number;
|
|
13
|
-
/** @description Filter by chainId. Omitted = orders across all chains. */
|
|
14
|
-
chainId?: number[];
|
|
15
|
-
/** @description Filter by integrator-facing status. */
|
|
16
|
-
status?: DeltaOrderStatusV2[];
|
|
17
|
-
/** @description Filter by order type. MARKET or LIMIT. */
|
|
18
|
-
type?: DeltaOrderType;
|
|
19
|
-
/** @description Filter by on-chain order type. */
|
|
20
|
-
onChainOrderType?: OnChainOrderType;
|
|
21
|
-
};
|
|
22
|
-
type GetDeltaOrdersV2 = (options: OrdersV2Filter, requestParams?: RequestParameters) => Promise<PaginatedResponse<DeltaOrderV2Response>>;
|
|
23
|
-
export type GetDeltaOrdersV2Functions = {
|
|
24
|
-
/** @description Fetch a single order by its UUID. */
|
|
25
|
-
getDeltaOrderByIdV2: GetDeltaOrderByIdV2;
|
|
26
|
-
/** @description Fetch a single order by its EIP-712 order hash. */
|
|
27
|
-
getDeltaOrderByHashV2: GetDeltaOrderByHashV2;
|
|
28
|
-
/** @description List Delta orders with the v2 pagination envelope. */
|
|
29
|
-
getDeltaOrdersV2: GetDeltaOrdersV2;
|
|
30
|
-
};
|
|
31
|
-
export declare const constructGetDeltaOrdersV2: ({ apiURL, fetcher, }: ConstructFetchInput) => GetDeltaOrdersV2Functions;
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=getDeltaOrdersV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDeltaOrdersV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getDeltaOrdersV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAExE,KAAK,mBAAmB,GAAG,CACzB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,oBAAoB,CA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AClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,kCAIlC,mBAAmB,KAAG,wBAkCxB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Address, ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
type IsTokenSupportedInDeltaV2 = (token: Address, requestParams?: RequestParameters) => Promise<boolean>;
|
|
3
|
-
export type IsTokenSupportedInDeltaV2Functions = {
|
|
4
|
-
isTokenSupportedInDeltaV2: IsTokenSupportedInDeltaV2;
|
|
5
|
-
};
|
|
6
|
-
export declare const constructIsTokenSupportedInDeltaV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => IsTokenSupportedInDeltaV2Functions;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=isTokenSupportedInDeltaV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isTokenSupportedInDeltaV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/isTokenSupportedInDeltaV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAQrB,KAAK,yBAAyB,GAAG,CAC/B,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,yBAAyB,EAAE,yBAAyB,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,kCAAkC,kCAI5C,mBAAmB,KAAG,kCAwBxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postDeltaOrderV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,eAAe,GAAG,OAAO,IAAI;IAC1E,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1B,yIAAyI;IACzI,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CACtB,QAAQ,EAAE,sBAAsB,EAChC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,yBAAyB,kCAInC,mBAAmB,KAAG,yBAqBxB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
import type { DeltaAuction } from '../delta/helpers/types';
|
|
3
|
-
import type { DeltaOrderToPostV2 } from './postDeltaOrderV2';
|
|
4
|
-
export type PostExternalDeltaOrderV2Params = Omit<DeltaOrderToPostV2<'ExternalOrder'>, 'chainId'>;
|
|
5
|
-
type PostExternalDeltaOrderV2 = (postData: PostExternalDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'ExternalOrder'>>;
|
|
6
|
-
export type PostExternalDeltaOrderV2Functions = {
|
|
7
|
-
postExternalDeltaOrderV2: PostExternalDeltaOrderV2;
|
|
8
|
-
};
|
|
9
|
-
export declare const constructPostExternalDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostExternalDeltaOrderV2Functions;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=postExternalDeltaOrderV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postExternalDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postExternalDeltaOrderV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,kBAAkB,CAAC,eAAe,CAAC,EACnC,SAAS,CACV,CAAC;AAEF,KAAK,wBAAwB,GAAG,CAC9B,QAAQ,EAAE,8BAA8B,EACxC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC;AAE5C,MAAM,MAAM,iCAAiC,GAAG;IAC9C,wBAAwB,EAAE,wBAAwB,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,iCAAiC,kCAI3C,mBAAmB,KAAG,iCAqBxB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Prettify } from 'ts-essentials';
|
|
2
|
-
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
3
|
-
import type { DeltaAuction, TWAPOnChainOrderType } from '../delta/helpers/types';
|
|
4
|
-
import type { DeltaOrderToPostV2 } from './postDeltaOrderV2';
|
|
5
|
-
export type PostTWAPDeltaOrderV2Params = Prettify<Omit<DeltaOrderToPostV2<'TWAPOrder'> | DeltaOrderToPostV2<'TWAPBuyOrder'>, 'chainId'> & {
|
|
6
|
-
/** @description Must be "TWAPOrder" or "TWAPBuyOrder" */
|
|
7
|
-
onChainOrderType: TWAPOnChainOrderType;
|
|
8
|
-
degenMode?: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
type PostTWAPDeltaOrderV2 = (postData: PostTWAPDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'TWAPOrder'> | DeltaAuction<'TWAPBuyOrder'>>;
|
|
11
|
-
export type PostTWAPDeltaOrderV2Functions = {
|
|
12
|
-
postTWAPDeltaOrderV2: PostTWAPDeltaOrderV2;
|
|
13
|
-
};
|
|
14
|
-
export declare const constructPostTWAPDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostTWAPDeltaOrderV2Functions;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=postTWAPDeltaOrderV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postTWAPDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postTWAPDeltaOrderV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC/C,IAAI,CACF,kBAAkB,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,cAAc,CAAC,EACpE,SAAS,CACV,GAAG;IACF,yDAAyD;IACzD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CACF,CAAC;AAEF,KAAK,oBAAoB,GAAG,CAC1B,QAAQ,EAAE,0BAA0B,EACpC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,6BAA6B,kCAIvC,mBAAmB,KAAG,6BA4BxB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { API_URL } from '../../constants';
|
|
2
|
-
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
3
|
-
|
|
4
|
-
export type AgentList = string[];
|
|
5
|
-
|
|
6
|
-
type AgentsListV2Response = AgentList;
|
|
7
|
-
|
|
8
|
-
type GetAgentsListV2 = (
|
|
9
|
-
requestParams?: RequestParameters
|
|
10
|
-
) => Promise<AgentList>;
|
|
11
|
-
|
|
12
|
-
export type GetAgentsListV2Functions = {
|
|
13
|
-
/** @description List agents available on the current chain. */
|
|
14
|
-
getAgentsListV2: GetAgentsListV2;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const constructGetAgentsListV2 = ({
|
|
18
|
-
apiURL = API_URL,
|
|
19
|
-
chainId,
|
|
20
|
-
fetcher,
|
|
21
|
-
}: ConstructFetchInput): GetAgentsListV2Functions => {
|
|
22
|
-
const baseUrl = `${apiURL}/delta/v2/agents/list/${chainId}` as const;
|
|
23
|
-
|
|
24
|
-
const getAgentsListV2: GetAgentsListV2 = async (requestParams) => {
|
|
25
|
-
const data = await fetcher<AgentsListV2Response>({
|
|
26
|
-
url: baseUrl,
|
|
27
|
-
method: 'GET',
|
|
28
|
-
requestParams,
|
|
29
|
-
});
|
|
30
|
-
return data;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return { getAgentsListV2 };
|
|
34
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { API_URL } from '../../constants';
|
|
2
|
-
import { constructSearchString } from '../../helpers/misc';
|
|
3
|
-
import type {
|
|
4
|
-
Address,
|
|
5
|
-
ConstructFetchInput,
|
|
6
|
-
PaginatedResponse,
|
|
7
|
-
RequestParameters,
|
|
8
|
-
} from '../../types';
|
|
9
|
-
import type {
|
|
10
|
-
DeltaOrderType,
|
|
11
|
-
OnChainOrderType,
|
|
12
|
-
} from '../delta/helpers/types';
|
|
13
|
-
import type { DeltaOrderStatusV2, DeltaOrderV2Response } from './types';
|
|
14
|
-
|
|
15
|
-
type GetDeltaOrderByIdV2 = (
|
|
16
|
-
orderId: string,
|
|
17
|
-
requestParams?: RequestParameters
|
|
18
|
-
) => Promise<DeltaOrderV2Response>;
|
|
19
|
-
|
|
20
|
-
type GetDeltaOrderByHashV2 = (
|
|
21
|
-
orderHash: string,
|
|
22
|
-
requestParams?: RequestParameters
|
|
23
|
-
) => Promise<DeltaOrderV2Response>;
|
|
24
|
-
|
|
25
|
-
type OrdersV2Filter = {
|
|
26
|
-
/** @description `order.owner` to fetch Delta Orders for. */
|
|
27
|
-
userAddress: Address;
|
|
28
|
-
/** @description Pagination option. Default 1. */
|
|
29
|
-
page?: number;
|
|
30
|
-
/** @description Pagination option. Default 100, max 1000. */
|
|
31
|
-
limit?: number;
|
|
32
|
-
/** @description Filter by chainId. Omitted = orders across all chains. */
|
|
33
|
-
chainId?: number[];
|
|
34
|
-
/** @description Filter by integrator-facing status. */
|
|
35
|
-
status?: DeltaOrderStatusV2[];
|
|
36
|
-
/** @description Filter by order type. MARKET or LIMIT. */
|
|
37
|
-
type?: DeltaOrderType;
|
|
38
|
-
/** @description Filter by on-chain order type. */
|
|
39
|
-
onChainOrderType?: OnChainOrderType;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type OrderFiltersV2Query = Omit<OrdersV2Filter, 'chainId' | 'status'> & {
|
|
43
|
-
chainId?: string;
|
|
44
|
-
status?: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
type GetDeltaOrdersV2 = (
|
|
48
|
-
options: OrdersV2Filter,
|
|
49
|
-
requestParams?: RequestParameters
|
|
50
|
-
) => Promise<PaginatedResponse<DeltaOrderV2Response>>;
|
|
51
|
-
|
|
52
|
-
export type GetDeltaOrdersV2Functions = {
|
|
53
|
-
/** @description Fetch a single order by its UUID. */
|
|
54
|
-
getDeltaOrderByIdV2: GetDeltaOrderByIdV2;
|
|
55
|
-
/** @description Fetch a single order by its EIP-712 order hash. */
|
|
56
|
-
getDeltaOrderByHashV2: GetDeltaOrderByHashV2;
|
|
57
|
-
/** @description List Delta orders with the v2 pagination envelope. */
|
|
58
|
-
getDeltaOrdersV2: GetDeltaOrdersV2;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const constructGetDeltaOrdersV2 = ({
|
|
62
|
-
apiURL = API_URL,
|
|
63
|
-
fetcher,
|
|
64
|
-
}: ConstructFetchInput): GetDeltaOrdersV2Functions => {
|
|
65
|
-
const baseUrl = `${apiURL}/delta/v2/orders` as const;
|
|
66
|
-
|
|
67
|
-
const getDeltaOrderByIdV2: GetDeltaOrderByIdV2 = async (
|
|
68
|
-
orderId,
|
|
69
|
-
requestParams
|
|
70
|
-
) => {
|
|
71
|
-
const fetchURL = `${baseUrl}/${orderId}` as const;
|
|
72
|
-
return fetcher<DeltaOrderV2Response>({
|
|
73
|
-
url: fetchURL,
|
|
74
|
-
method: 'GET',
|
|
75
|
-
requestParams,
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const getDeltaOrderByHashV2: GetDeltaOrderByHashV2 = async (
|
|
80
|
-
orderHash,
|
|
81
|
-
requestParams
|
|
82
|
-
) => {
|
|
83
|
-
const fetchURL = `${baseUrl}/hash/${orderHash}` as const;
|
|
84
|
-
return fetcher<DeltaOrderV2Response>({
|
|
85
|
-
url: fetchURL,
|
|
86
|
-
method: 'GET',
|
|
87
|
-
requestParams,
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const getDeltaOrdersV2: GetDeltaOrdersV2 = async (options, requestParams) => {
|
|
92
|
-
const chainIdString = options.chainId?.join(',');
|
|
93
|
-
const statusString = options.status?.join(',');
|
|
94
|
-
|
|
95
|
-
const search = constructSearchString<OrderFiltersV2Query>({
|
|
96
|
-
userAddress: options.userAddress,
|
|
97
|
-
page: options.page,
|
|
98
|
-
limit: options.limit,
|
|
99
|
-
type: options.type,
|
|
100
|
-
onChainOrderType: options.onChainOrderType,
|
|
101
|
-
chainId: chainIdString,
|
|
102
|
-
status: statusString,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
const fetchURL = `${baseUrl}${search}` as const;
|
|
106
|
-
|
|
107
|
-
return fetcher<PaginatedResponse<DeltaOrderV2Response>>({
|
|
108
|
-
url: fetchURL,
|
|
109
|
-
method: 'GET',
|
|
110
|
-
requestParams,
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
return {
|
|
115
|
-
getDeltaOrderByIdV2,
|
|
116
|
-
getDeltaOrderByHashV2,
|
|
117
|
-
getDeltaOrdersV2,
|
|
118
|
-
};
|
|
119
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { API_URL } from '../../constants';
|
|
2
|
-
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
3
|
-
import type { DeltaAuction } from '../delta/helpers/types';
|
|
4
|
-
import type { DeltaOrderToPostV2 } from './postDeltaOrderV2';
|
|
5
|
-
|
|
6
|
-
export type PostExternalDeltaOrderV2Params = Omit<
|
|
7
|
-
DeltaOrderToPostV2<'ExternalOrder'>,
|
|
8
|
-
'chainId'
|
|
9
|
-
>;
|
|
10
|
-
|
|
11
|
-
type PostExternalDeltaOrderV2 = (
|
|
12
|
-
postData: PostExternalDeltaOrderV2Params,
|
|
13
|
-
requestParams?: RequestParameters
|
|
14
|
-
) => Promise<DeltaAuction<'ExternalOrder'>>;
|
|
15
|
-
|
|
16
|
-
export type PostExternalDeltaOrderV2Functions = {
|
|
17
|
-
postExternalDeltaOrderV2: PostExternalDeltaOrderV2;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const constructPostExternalDeltaOrderV2 = ({
|
|
21
|
-
apiURL = API_URL,
|
|
22
|
-
chainId,
|
|
23
|
-
fetcher,
|
|
24
|
-
}: ConstructFetchInput): PostExternalDeltaOrderV2Functions => {
|
|
25
|
-
const postOrderUrl = `${apiURL}/delta/v2/orders` as const;
|
|
26
|
-
|
|
27
|
-
const postExternalDeltaOrderV2: PostExternalDeltaOrderV2 = (
|
|
28
|
-
postData,
|
|
29
|
-
requestParams
|
|
30
|
-
) => {
|
|
31
|
-
const deltaOrderToPost: DeltaOrderToPostV2<'ExternalOrder'> = {
|
|
32
|
-
...postData,
|
|
33
|
-
chainId,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return fetcher<DeltaAuction<'ExternalOrder'>>({
|
|
37
|
-
url: postOrderUrl,
|
|
38
|
-
method: 'POST',
|
|
39
|
-
data: deltaOrderToPost,
|
|
40
|
-
requestParams,
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return { postExternalDeltaOrderV2 };
|
|
45
|
-
};
|