@velora-dex/sdk 9.5.4-dev.0 → 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/examples/wagmi.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 +16 -1
- package/dist/methods/delta/helpers/orders.d.ts.map +1 -1
- package/dist/methods/delta/helpers/types.d.ts +48 -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 +1602 -1281
- 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 +1586 -1249
- 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 +32 -143
- package/src/methods/delta/helpers/orders.ts +31 -1
- package/src/methods/delta/helpers/types.ts +59 -19
- 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,7 +1,8 @@
|
|
|
1
1
|
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
type
|
|
2
|
+
import type { TWAPBuyDeltaOrder, TWAPDeltaOrder } from '../delta/helpers/types';
|
|
3
|
+
import type { BuiltDeltaOrder, DeltaRoute } from './types';
|
|
4
|
+
export type { BuiltDeltaOrder } from './types';
|
|
5
|
+
type BuildTWAPDeltaOrderBase = {
|
|
5
6
|
/** @description The address of the order owner */
|
|
6
7
|
owner: string;
|
|
7
8
|
/** @description The address of the order beneficiary. Defaults to owner. */
|
|
@@ -20,7 +21,7 @@ type BuildTWAPDeltaOrderV2Base = {
|
|
|
20
21
|
numSlices: number;
|
|
21
22
|
/** @description Slippage in basis points (bps). 10000 = 100%, 50 = 0.5%. Default 0. */
|
|
22
23
|
slippage?: number;
|
|
23
|
-
/** @description DeltaRoute from
|
|
24
|
+
/** @description DeltaRoute from getDeltaPrice for a single slice */
|
|
24
25
|
route: DeltaRoute;
|
|
25
26
|
/** @description Partner fee in basis points (bps) */
|
|
26
27
|
partnerFeeBps?: number;
|
|
@@ -37,23 +38,23 @@ type BuildTWAPDeltaOrderV2Base = {
|
|
|
37
38
|
/** @description If passed, the server will use this as SELL destAmount (as BUY srcAmount) and expectedAmount for each slice */
|
|
38
39
|
limitAmount?: string;
|
|
39
40
|
};
|
|
40
|
-
export type
|
|
41
|
+
export type BuildTWAPSellDeltaOrderParams = BuildTWAPDeltaOrderBase & {
|
|
41
42
|
onChainOrderType: 'TWAPOrder';
|
|
42
43
|
/** @description Total source token amount across all slices. route.origin.input.amount must equal floor(totalSrcAmount / numSlices). */
|
|
43
44
|
totalSrcAmount: string;
|
|
44
45
|
};
|
|
45
|
-
export type
|
|
46
|
+
export type BuildTWAPBuyDeltaOrderParams = BuildTWAPDeltaOrderBase & {
|
|
46
47
|
onChainOrderType: 'TWAPBuyOrder';
|
|
47
48
|
/** @description Total destination token amount to buy across all slices. route.origin.output.amount must equal floor(totalDestAmount / numSlices). */
|
|
48
49
|
totalDestAmount: string;
|
|
49
50
|
/** @description Maximum source token amount willing to spend across all slices. */
|
|
50
51
|
maxSrcAmount: string;
|
|
51
52
|
};
|
|
52
|
-
export type
|
|
53
|
-
type
|
|
54
|
-
export type
|
|
53
|
+
export type BuildTWAPDeltaOrderParams = BuildTWAPSellDeltaOrderParams | BuildTWAPBuyDeltaOrderParams;
|
|
54
|
+
type BuildTWAPDeltaOrder = (buildOrderParams: BuildTWAPDeltaOrderParams, requestParams?: RequestParameters) => Promise<BuiltDeltaOrder<TWAPDeltaOrder | TWAPBuyDeltaOrder>>;
|
|
55
|
+
export type BuildTWAPDeltaOrderFunctions = {
|
|
55
56
|
/** @description Build a Delta v2 TWAP Order (sell or buy) from a DeltaRoute via the server endpoint, ready to sign and post. */
|
|
56
|
-
|
|
57
|
+
buildTWAPDeltaOrder: BuildTWAPDeltaOrder;
|
|
57
58
|
};
|
|
58
|
-
export declare const
|
|
59
|
-
//# sourceMappingURL=
|
|
59
|
+
export declare const constructBuildTWAPDeltaOrder: (options: ConstructFetchInput) => BuildTWAPDeltaOrderFunctions;
|
|
60
|
+
//# sourceMappingURL=buildTWAPDeltaOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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C;CACtB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,GAAG;IACpE,gBAAgB,EAAE,WAAW,CAAC;IAC9B,wIAAwI;IACxI,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,GAAG;IACnE,gBAAgB,EAAE,cAAc,CAAC;IACjC,sJAAsJ;IACtJ,eAAe,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC,6BAA6B,GAC7B,4BAA4B,CAAC;AAEjC,KAAK,mBAAmB,GAAG,CACzB,gBAAgB,EAAE,yBAAyB,EAC3C,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,cAAc,GAAG,iBAAiB,CAAC,CAAC,CAAC;AAElE,MAAM,MAAM,4BAA4B,GAAG;IACzC,gIAAgI;IAChI,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,4BAA4B,YAC9B,mBAAmB,KAC3B,4BAyDF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 SignCancelDeltaOrderRequest = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<string>;
|
|
11
|
+
export type PostCancelDeltaOrderRequest = (params: CancelDeltaOrderRequestParams, requestParams?: RequestParameters) => Promise<SuccessResponse>;
|
|
12
|
+
export type CancelDeltaOrder = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<SuccessResponse>;
|
|
13
|
+
export type CancelDeltaOrderFunctions = {
|
|
14
|
+
signCancelDeltaOrderRequest: SignCancelDeltaOrderRequest;
|
|
15
|
+
postCancelDeltaOrderRequest: PostCancelDeltaOrderRequest;
|
|
16
|
+
/** @description Cancel one or more Delta orders via the v2 endpoint */
|
|
17
|
+
cancelDeltaOrders: CancelDeltaOrder;
|
|
18
|
+
};
|
|
19
|
+
export declare const constructCancelDeltaOrder: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller" | "fetcher" | "apiURL" | "chainId">) => CancelDeltaOrderFunctions;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=cancelDeltaOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelDeltaOrder.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/cancelDeltaOrder.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,2BAA2B,GAAG,CACxC,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,MAAM,MAAM,2BAA2B,GAAG,CACxC,MAAM,EAAE,6BAA6B,EACrC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,gBAAgB,GAAG,CAC7B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,yBAAyB,GAAG;IACtC,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,uEAAuE;IACvE,iBAAiB,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC3B,IAAI,CACX,2BAA2B,CAAC,GAAG,EAAE,mBAAmB,CAAC,EACrD,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CACpD,KACA,yBAsDF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
+
export type AgentList = string[];
|
|
3
|
+
type GetAgentsList = (requestParams?: RequestParameters) => Promise<AgentList>;
|
|
4
|
+
export type GetAgentsListFunctions = {
|
|
5
|
+
/** @description List agents available on the current chain. */
|
|
6
|
+
getAgentsList: GetAgentsList;
|
|
7
|
+
};
|
|
8
|
+
export declare const constructGetAgentsList: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetAgentsListFunctions;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=getAgentsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAgentsList.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getAgentsList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAIjC,KAAK,aAAa,GAAG,CAAC,aAAa,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;AAE/E,MAAM,MAAM,sBAAsB,GAAG;IACnC,+DAA+D;IAC/D,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,kCAIhC,mBAAmB,KAAG,sBAaxB,CAAC"}
|
|
@@ -8,12 +8,12 @@ type GetBridgeRoutesParams = {
|
|
|
8
8
|
bridges?: string[];
|
|
9
9
|
};
|
|
10
10
|
type GetBridgeRoutes = (params?: GetBridgeRoutesParams, requestParams?: RequestParameters) => Promise<BridgeRoute[]>;
|
|
11
|
-
type
|
|
11
|
+
type GetBridgeProtocols = (requestParams?: RequestParameters) => Promise<BridgeProtocolResponse[]>;
|
|
12
12
|
export type GetBridgeRoutesFunctions = {
|
|
13
13
|
/** @description Fetch supported bridge routes as a flat array (v2 replacement for bridge-info). */
|
|
14
14
|
getBridgeRoutes: GetBridgeRoutes;
|
|
15
|
-
/** @description Fetch supported bridge protocols (
|
|
16
|
-
|
|
15
|
+
/** @description Fetch supported bridge protocols (unchanged from v1). */
|
|
16
|
+
getBridgeProtocols: GetBridgeProtocols;
|
|
17
17
|
};
|
|
18
18
|
export declare const constructGetBridgeRoutes: ({ apiURL, fetcher, }: ConstructFetchInput) => GetBridgeRoutesFunctions;
|
|
19
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBridgeRoutes.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getBridgeRoutes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,KAAK,qBAAqB,GAAG;IAC3B,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AASF,KAAK,eAAe,GAAG,CACrB,MAAM,CAAC,EAAE,qBAAqB,EAC9B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;AAE5B,KAAK,
|
|
1
|
+
{"version":3,"file":"getBridgeRoutes.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getBridgeRoutes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,KAAK,qBAAqB,GAAG;IAC3B,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AASF,KAAK,eAAe,GAAG,CACrB,MAAM,CAAC,EAAE,qBAAqB,EAC9B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;AAE5B,KAAK,kBAAkB,GAAG,CACxB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAMvC,MAAM,MAAM,wBAAwB,GAAG;IACrC,mGAAmG;IACnG,eAAe,EAAE,eAAe,CAAC;IACjC,yEAAyE;IACzE,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yBAGlC,mBAAmB,KAAG,wBAsCxB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Address, ConstructFetchInput, PaginatedResponse, RequestParameters } from '../../types';
|
|
2
|
+
import type { DeltaOrderType, OnChainOrderType } from '../delta/helpers/types';
|
|
3
|
+
import type { DeltaOrderStatus, DeltaAuction } from './types';
|
|
4
|
+
type GetDeltaOrderById = (orderId: string, requestParams?: RequestParameters) => Promise<DeltaAuction>;
|
|
5
|
+
type GetDeltaOrderByHash = (orderHash: string, requestParams?: RequestParameters) => Promise<DeltaAuction>;
|
|
6
|
+
type OrdersFilter = {
|
|
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?: DeltaOrderStatus[];
|
|
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 GetDeltaOrders = (options: OrdersFilter, requestParams?: RequestParameters) => Promise<PaginatedResponse<DeltaAuction>>;
|
|
23
|
+
type GetRequiredBalanceParams = {
|
|
24
|
+
userAddress: Address;
|
|
25
|
+
tokenAddress?: Address;
|
|
26
|
+
};
|
|
27
|
+
type GetRequiredBalance = (userParams: GetRequiredBalanceParams, requestParams?: RequestParameters) => Promise<Record<string, string>>;
|
|
28
|
+
export type GetDeltaOrdersFunctions = {
|
|
29
|
+
/** @description Fetch a single order by its UUID. */
|
|
30
|
+
getDeltaOrderById: GetDeltaOrderById;
|
|
31
|
+
/** @description Fetch a single order by its EIP-712 order hash. */
|
|
32
|
+
getDeltaOrderByHash: GetDeltaOrderByHash;
|
|
33
|
+
/** @description List Delta orders with the v2 pagination envelope. */
|
|
34
|
+
getDeltaOrders: GetDeltaOrders;
|
|
35
|
+
/** @description Required balance per token across the user's open Delta v2 orders. Pass `tokenAddress` to narrow the result to a single token. */
|
|
36
|
+
getRequiredBalanceForDeltaOrders: GetRequiredBalance;
|
|
37
|
+
};
|
|
38
|
+
export declare const constructGetDeltaOrders: ({ apiURL, fetcher, chainId, }: ConstructFetchInput) => GetDeltaOrdersFunctions;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=getDeltaOrders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeltaOrders.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getDeltaOrders.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9D,KAAK,iBAAiB,GAAG,CACvB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,KAAK,mBAAmB,GAAG,CACzB,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,KAAK,YAAY,GAAG;IAClB,4DAA4D;IAC5D,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAOF,KAAK,cAAc,GAAG,CACpB,OAAO,EAAE,YAAY,EACrB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;AAE9C,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,kBAAkB,GAAG,CACxB,UAAU,EAAE,wBAAwB,EACpC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAErC,MAAM,MAAM,uBAAuB,GAAG;IACpC,qDAAqD;IACrD,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,mEAAmE;IACnE,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,sEAAsE;IACtE,cAAc,EAAE,cAAc,CAAC;IAC/B,kJAAkJ;IAClJ,gCAAgC,EAAE,kBAAkB,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,kCAIjC,mBAAmB,KAAG,uBA2ExB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SwapSide } from '../../constants';
|
|
2
2
|
import type { ConstructFetchInput, EnumerateLiteral, RequestParameters } from '../../types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DeltaPrice } from './types';
|
|
4
4
|
type SwapSideUnion = EnumerateLiteral<typeof SwapSide>;
|
|
5
|
-
export type
|
|
5
|
+
export type DeltaPriceParams = {
|
|
6
6
|
/** @description Source Token Address */
|
|
7
7
|
srcToken: string;
|
|
8
8
|
/** @description Destination Token Address. For Crosschain Orders, the destination token on the destination chain */
|
|
@@ -36,11 +36,11 @@ export type DeltaPriceV2Params = {
|
|
|
36
36
|
allowBridgeAndSwap?: boolean;
|
|
37
37
|
degenMode?: boolean;
|
|
38
38
|
};
|
|
39
|
-
type
|
|
40
|
-
export type
|
|
39
|
+
type GetDeltaPrice = (options: DeltaPriceParams, requestParams?: RequestParameters) => Promise<DeltaPrice>;
|
|
40
|
+
export type GetDeltaPriceFunctions = {
|
|
41
41
|
/** @description Fetch a v2 price quote (route-based response). */
|
|
42
|
-
|
|
42
|
+
getDeltaPrice: GetDeltaPrice;
|
|
43
43
|
};
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const constructGetDeltaPrice: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetDeltaPriceFunctions;
|
|
45
45
|
export {};
|
|
46
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=getDeltaPrice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeltaPrice.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getDeltaPrice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,aAAa,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,oHAAoH;IACpH,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAaF,KAAK,aAAa,GAAG,CACnB,OAAO,EAAE,gBAAgB,EACzB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB,MAAM,MAAM,sBAAsB,GAAG;IACnC,kEAAkE;IAClE,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,kCAIhC,mBAAmB,KAAG,sBAkCxB,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { NonEmptyArray } from 'ts-essentials';
|
|
2
|
+
import type { SwapSideUnion, UnifiedDeltaOrderData } from '../../delta/helpers/types';
|
|
3
|
+
import type { DeltaAuction, DeltaTransaction } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* @description Checks whether an auction is fully executed (settled on every chain).
|
|
6
|
+
*/
|
|
7
|
+
declare function isCompletedAuction<T extends Pick<DeltaAuction, 'status'>>(auction: T): auction is T & {
|
|
8
|
+
status: 'COMPLETED';
|
|
9
|
+
};
|
|
10
|
+
declare const failedAuctionStatuses: readonly ["FAILED", "EXPIRED", "CANCELLED", "REFUNDED"];
|
|
11
|
+
/**
|
|
12
|
+
* @description Checks whether an auction is in a terminal failure state
|
|
13
|
+
* (failed, expired, cancelled, or refunded).
|
|
14
|
+
*/
|
|
15
|
+
declare function isFailedAuction<T extends Pick<DeltaAuction, 'status'>>(auction: T): auction is T & {
|
|
16
|
+
status: (typeof failedAuctionStatuses)[number];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @description Checks whether an auction status is cancelled.
|
|
20
|
+
*/
|
|
21
|
+
declare function isCanceledAuction<T extends Pick<DeltaAuction, 'status'>>(auction: T): auction is T & {
|
|
22
|
+
status: 'CANCELLED';
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @description Checks whether an auction status is expired.
|
|
26
|
+
*/
|
|
27
|
+
declare function isExpiredAuction<T extends Pick<DeltaAuction, 'status'>>(auction: T): auction is T & {
|
|
28
|
+
status: 'EXPIRED';
|
|
29
|
+
};
|
|
30
|
+
declare const pendingAuctionStatuses: readonly ["PENDING", "AWAITING_SIGNATURE", "ACTIVE", "BRIDGING"];
|
|
31
|
+
/**
|
|
32
|
+
* @description Checks whether an auction is still in flight (not yet settled
|
|
33
|
+
* and not failed): awaiting signature, pending, actively executing, or bridging.
|
|
34
|
+
*/
|
|
35
|
+
declare function isPendingAuction<T extends Pick<DeltaAuction, 'status'>>(auction: T): auction is T & {
|
|
36
|
+
status: (typeof pendingAuctionStatuses)[number];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @description Checks whether an auction is a Fillable auction.
|
|
40
|
+
* `FillableOrder` is the `onChainOrderType` the server reports for a
|
|
41
|
+
* `partiallyFillable` Standard order; it carries the same order struct as
|
|
42
|
+
* `Order`. Consumers that don't distinguish the two should treat
|
|
43
|
+
* `isDeltaAuction(a) || isFillableAuction(a)` as "is a standard order".
|
|
44
|
+
*/
|
|
45
|
+
declare function isFillableAuction<T extends Pick<DeltaAuction, 'onChainOrderType'>>(auction: T): auction is T & {
|
|
46
|
+
onChainOrderType: 'FillableOrder';
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @description Checks whether an auction has been partially executed:
|
|
50
|
+
* it has at least one transaction and an overall filled percent strictly
|
|
51
|
+
* between 0 and 100.
|
|
52
|
+
*/
|
|
53
|
+
declare function isPartiallyExecutedAuction<T extends Pick<DeltaAuction, 'order' | 'transactions'>>(auction: T): auction is T & {
|
|
54
|
+
transactions: NonEmptyArray<DeltaTransaction>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @description Returns the source chain id for the auction (the input side's chain).
|
|
58
|
+
*/
|
|
59
|
+
declare function getAuctionSrcChainId(auction: Pick<DeltaAuction, 'input'>): number;
|
|
60
|
+
/**
|
|
61
|
+
* @description Returns the destination chain id for the auction (the output side's chain).
|
|
62
|
+
* Equals the source chain id for same-chain orders.
|
|
63
|
+
*/
|
|
64
|
+
declare function getAuctionDestChainId(auction: Pick<DeltaAuction, 'output'>): number;
|
|
65
|
+
/**
|
|
66
|
+
* @description Returns the swap side for any auction. v2 carries `side` on the
|
|
67
|
+
* auction directly, so no order introspection is needed.
|
|
68
|
+
*/
|
|
69
|
+
declare function getAuctionSwapSide(auction: Pick<DeltaAuction, 'side'>): SwapSideUnion;
|
|
70
|
+
/**
|
|
71
|
+
* @description Returns source and destination token addresses for the auction,
|
|
72
|
+
* read from the input/output sides (already resolved to the dest-chain token
|
|
73
|
+
* for cross-chain orders).
|
|
74
|
+
*/
|
|
75
|
+
declare function getAuctionTokenAddresses(auction: Pick<DeltaAuction, 'input' | 'output'>): {
|
|
76
|
+
srcToken: string;
|
|
77
|
+
destToken: string;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* @description Aggregates transaction amounts into total spent (src) and
|
|
81
|
+
* received (dest) values.
|
|
82
|
+
*/
|
|
83
|
+
declare function getTransactionAmounts(transactions: DeltaTransaction[]): {
|
|
84
|
+
srcAmount: string;
|
|
85
|
+
destAmount: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @description Calculates the overall filled percent (0–100) from the
|
|
89
|
+
* per-transaction `filledPercent` values. For TWAP orders each transaction is
|
|
90
|
+
* a slice (0–100 of that slice), so the slice values are averaged across
|
|
91
|
+
* `numSlices`; for single-fill orders the values sum directly.
|
|
92
|
+
*/
|
|
93
|
+
declare function getFilledPercent(auction: Pick<DeltaAuction, 'order' | 'transactions'>): number;
|
|
94
|
+
/**
|
|
95
|
+
* @description Returns expected amounts and, once the auction is completed,
|
|
96
|
+
* executed amounts. Executed amounts prefer the `executedAmount` baked onto the
|
|
97
|
+
* token sides and fall back to summing transactions.
|
|
98
|
+
*/
|
|
99
|
+
declare function getAuctionAmounts(auction: Pick<DeltaAuction, 'status' | 'order' | 'input' | 'output' | 'transactions'>): {
|
|
100
|
+
expected: {
|
|
101
|
+
srcAmount: string;
|
|
102
|
+
destAmount: string;
|
|
103
|
+
};
|
|
104
|
+
executed?: undefined;
|
|
105
|
+
} | {
|
|
106
|
+
expected: {
|
|
107
|
+
srcAmount: string;
|
|
108
|
+
destAmount: string;
|
|
109
|
+
};
|
|
110
|
+
executed: {
|
|
111
|
+
srcAmount: string;
|
|
112
|
+
destAmount: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* @description Returns unified order data with normalized amounts, tokens,
|
|
117
|
+
* chain ids, and side — the v2 counterpart of v1's `getUnifiedDeltaOrderData`,
|
|
118
|
+
* built from the v2 auction envelope.
|
|
119
|
+
*/
|
|
120
|
+
declare function getUnifiedDeltaOrderData(auction: DeltaAuction): UnifiedDeltaOrderData;
|
|
121
|
+
export declare const OrderHelpers: {
|
|
122
|
+
checks: {
|
|
123
|
+
isTWAPOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").TWAPDeltaOrder | import("../../delta/helpers/types").TWAPBuyDeltaOrder;
|
|
124
|
+
isTWAPSellOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").TWAPDeltaOrder;
|
|
125
|
+
isTWAPBuyOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").TWAPBuyDeltaOrder;
|
|
126
|
+
isExternalOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").ExternalDeltaOrder;
|
|
127
|
+
isDeltaOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").DeltaAuctionOrder;
|
|
128
|
+
isProductiveOrder: (order: import("../../delta/helpers/types").DeltaOrderUnion) => order is import("../../delta/helpers/types").ProductiveDeltaOrder;
|
|
129
|
+
isTWAPAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
130
|
+
onChainOrderType: T;
|
|
131
|
+
}) => auction is {
|
|
132
|
+
onChainOrderType: ("TWAPOrder" | "TWAPBuyOrder") & T;
|
|
133
|
+
};
|
|
134
|
+
isTWAPSellAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
135
|
+
onChainOrderType: T;
|
|
136
|
+
}) => auction is {
|
|
137
|
+
onChainOrderType: "TWAPOrder" & T;
|
|
138
|
+
};
|
|
139
|
+
isTWAPBuyAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
140
|
+
onChainOrderType: T;
|
|
141
|
+
}) => auction is {
|
|
142
|
+
onChainOrderType: "TWAPBuyOrder" & T;
|
|
143
|
+
};
|
|
144
|
+
isDeltaAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
145
|
+
onChainOrderType: T;
|
|
146
|
+
}) => auction is {
|
|
147
|
+
onChainOrderType: "Order" & T;
|
|
148
|
+
};
|
|
149
|
+
isExternalAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
150
|
+
onChainOrderType: T;
|
|
151
|
+
}) => auction is {
|
|
152
|
+
onChainOrderType: "ExternalOrder" & T;
|
|
153
|
+
};
|
|
154
|
+
isProductiveAuction: <T extends import("../../delta/helpers/types").OnChainOrderType>(auction: {
|
|
155
|
+
onChainOrderType: T;
|
|
156
|
+
}) => auction is {
|
|
157
|
+
onChainOrderType: "ProductiveOrder" & T;
|
|
158
|
+
};
|
|
159
|
+
isFillableAuction: typeof isFillableAuction;
|
|
160
|
+
isCompletedAuction: typeof isCompletedAuction;
|
|
161
|
+
isFailedAuction: typeof isFailedAuction;
|
|
162
|
+
isCanceledAuction: typeof isCanceledAuction;
|
|
163
|
+
isExpiredAuction: typeof isExpiredAuction;
|
|
164
|
+
isPendingAuction: typeof isPendingAuction;
|
|
165
|
+
isPartiallyExecutedAuction: typeof isPartiallyExecutedAuction;
|
|
166
|
+
};
|
|
167
|
+
getters: {
|
|
168
|
+
getUnifiedDeltaOrderData: typeof getUnifiedDeltaOrderData;
|
|
169
|
+
getAuctionTokenAddresses: typeof getAuctionTokenAddresses;
|
|
170
|
+
getAuctionSrcChainId: typeof getAuctionSrcChainId;
|
|
171
|
+
getAuctionDestChainId: typeof getAuctionDestChainId;
|
|
172
|
+
getAuctionSwapSide: typeof getAuctionSwapSide;
|
|
173
|
+
getTransactionAmounts: typeof getTransactionAmounts;
|
|
174
|
+
getAuctionAmounts: typeof getAuctionAmounts;
|
|
175
|
+
getFilledPercent: typeof getFilledPercent;
|
|
176
|
+
getOrderTokenAddresses: (order: import("../../delta/helpers/types").DeltaAuction["order"]) => {
|
|
177
|
+
srcToken: string;
|
|
178
|
+
destToken: string;
|
|
179
|
+
};
|
|
180
|
+
getSwapSideFromDeltaOrder: (order: import("../../delta/helpers/types").DeltaAuctionOrder | import("../../delta/helpers/types").ExternalDeltaOrder) => SwapSideUnion;
|
|
181
|
+
getSwapSideFromTwapOrderType: (onChainOrderType: "TWAPOrder" | "TWAPBuyOrder") => SwapSideUnion;
|
|
182
|
+
getExpectedTwapSrcAmount: (order: Pick<import("../../delta/helpers/types").TWAPDeltaOrder, "totalSrcAmount"> | Pick<import("../../delta/helpers/types").TWAPBuyDeltaOrder, "maxSrcAmount">) => string;
|
|
183
|
+
getExpectedTwapDestAmount: (order: Pick<import("../../delta/helpers/types").TWAPDeltaOrder, "destAmountPerSlice" | "numSlices" | "bridge"> | Pick<import("../../delta/helpers/types").TWAPBuyDeltaOrder, "totalDestAmount" | "bridge">) => string;
|
|
184
|
+
getExpectedTwapOrderAmounts: (order: import("../../delta/helpers/types").TWAPDeltaOrder | import("../../delta/helpers/types").TWAPBuyDeltaOrder) => {
|
|
185
|
+
srcAmount: string;
|
|
186
|
+
destAmount: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
export {};
|
|
191
|
+
//# sourceMappingURL=orders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../../src/methods/deltaV2/helpers/orders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,YAAY,EAGZ,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA0BlB;;GAEG;AACH,iBAAS,kBAAkB,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAChE,OAAO,EAAE,CAAC,GACT,OAAO,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAExC;AAED,QAAA,MAAM,qBAAqB,yDAKjB,CAAC;AAMX;;;GAGG;AACH,iBAAS,eAAe,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAC7D,OAAO,EAAE,CAAC,GACT,OAAO,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAEnE;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAC/D,OAAO,EAAE,CAAC,GACT,OAAO,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAExC;AAED;;GAEG;AACH,iBAAS,gBAAgB,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAC9D,OAAO,EA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C,YAAY,EAAE,gBAAgB,EAAE;;;EAa9D;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CACvB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,cAAc,CAAC,GACpD,MAAM,CAaR;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CACxB,OAAO,EAAE,IAAI,CACX,YAAY,EACZ,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,CACzD;;;;;;;;;;;;;;;EAmBF;AAcD;;;;GAIG;AACH,iBAAS,wBAAwB,CAC/B,OAAO,EAAE,YAAY,GACpB,qBAAqB,CAuBvB;AAuBD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConstructProviderFetchInput } from '../../types';
|
|
2
|
-
import type { DeltaAuction } from '
|
|
2
|
+
import type { DeltaAuction } from './types';
|
|
3
3
|
import { GetDeltaContractFunctions } from '../delta/getDeltaContract';
|
|
4
4
|
import { GetPartnerFeeFunctions } from '../delta/getPartnerFee';
|
|
5
5
|
import { ApproveTokenForDeltaFunctions } from '../delta/approveForDelta';
|
|
@@ -7,53 +7,66 @@ import { PreSignDeltaOrderFunctions } from '../delta/preSignDeltaOrder';
|
|
|
7
7
|
import { PreSignExternalDeltaOrderFunctions } from '../delta/preSignExternalDeltaOrder';
|
|
8
8
|
import { PreSignTWAPDeltaOrderFunctions } from '../delta/preSignTWAPDeltaOrder';
|
|
9
9
|
import { DeltaTokenModuleFunctions } from '../delta/deltaTokenModule';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { BuildDeltaOrderFunctions, BuildDeltaOrderParams, BuiltDeltaOrder } from './buildDeltaOrder';
|
|
11
|
+
import { BuildExternalDeltaOrderFunctions, BuildExternalDeltaOrderParams } from './buildExternalDeltaOrder';
|
|
12
|
+
import { BuildTWAPDeltaOrderFunctions, BuildTWAPDeltaOrderParams } from './buildTWAPDeltaOrder';
|
|
13
|
+
import { DeltaOrderToPost, PostDeltaOrderFunctions } from './postDeltaOrder';
|
|
14
|
+
import { PostExternalDeltaOrderFunctions } from './postExternalDeltaOrder';
|
|
15
|
+
import { PostTWAPDeltaOrderFunctions } from './postTWAPDeltaOrder';
|
|
16
|
+
import { GetDeltaPriceFunctions } from './getDeltaPrice';
|
|
17
|
+
import { GetDeltaOrdersFunctions } from './getDeltaOrders';
|
|
18
18
|
import { GetBridgeRoutesFunctions } from './getBridgeRoutes';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
import { IsTokenSupportedInDeltaFunctions } from './isTokenSupportedInDelta';
|
|
20
|
+
import { CancelDeltaOrderFunctions } from './cancelDeltaOrder';
|
|
21
|
+
import { GetAgentsListFunctions } from './getAgentsList';
|
|
22
|
+
export * from './types';
|
|
23
|
+
export * from './buildDeltaOrder';
|
|
24
|
+
export * from './buildExternalDeltaOrder';
|
|
25
|
+
export * from './buildTWAPDeltaOrder';
|
|
26
|
+
export * from './postDeltaOrder';
|
|
27
|
+
export * from './postExternalDeltaOrder';
|
|
28
|
+
export * from './postTWAPDeltaOrder';
|
|
29
|
+
export * from './getDeltaPrice';
|
|
30
|
+
export * from './getDeltaOrders';
|
|
31
|
+
export * from './getBridgeRoutes';
|
|
32
|
+
export * from './isTokenSupportedInDelta';
|
|
33
|
+
export * from './cancelDeltaOrder';
|
|
34
|
+
export * from './getAgentsList';
|
|
35
|
+
export { OrderHelpers } from './helpers/orders';
|
|
36
|
+
type SignDeltaOrder = (builtOrder: BuiltDeltaOrder) => Promise<string>;
|
|
37
|
+
export type SignDeltaOrderFunctions = {
|
|
38
|
+
/** @description Sign a BuiltDeltaOrder (any order type) using EIP-712 typed data. */
|
|
39
|
+
signDeltaOrder: SignDeltaOrder;
|
|
26
40
|
};
|
|
27
|
-
export declare const
|
|
28
|
-
export type
|
|
41
|
+
export declare const constructSignDeltaOrder: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller">) => SignDeltaOrderFunctions;
|
|
42
|
+
export type SubmitDeltaOrderParams = BuildDeltaOrderParams & {
|
|
29
43
|
/** @description Referrer address */
|
|
30
44
|
referrerAddress?: string;
|
|
31
45
|
degenMode?: boolean;
|
|
32
|
-
} & Pick<
|
|
33
|
-
type
|
|
34
|
-
export type
|
|
35
|
-
|
|
46
|
+
} & Pick<DeltaOrderToPost, 'type' | 'includeAgents' | 'excludeAgents'>;
|
|
47
|
+
type SubmitDeltaOrder = (orderParams: SubmitDeltaOrderParams) => Promise<DeltaAuction<'Order'>>;
|
|
48
|
+
export type SubmitDeltaOrderFuncs = {
|
|
49
|
+
submitDeltaOrder: SubmitDeltaOrder;
|
|
36
50
|
};
|
|
37
|
-
export declare const
|
|
38
|
-
export type
|
|
51
|
+
export declare const constructSubmitDeltaOrder: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitDeltaOrderFuncs;
|
|
52
|
+
export type SubmitExternalDeltaOrderParams = BuildExternalDeltaOrderParams & {
|
|
39
53
|
referrerAddress?: string;
|
|
40
|
-
} & Pick<
|
|
41
|
-
type
|
|
42
|
-
export type
|
|
43
|
-
|
|
54
|
+
} & Pick<DeltaOrderToPost, 'type' | 'includeAgents' | 'excludeAgents'>;
|
|
55
|
+
type SubmitExternalDeltaOrder = (orderParams: SubmitExternalDeltaOrderParams) => Promise<DeltaAuction<'ExternalOrder'>>;
|
|
56
|
+
export type SubmitExternalDeltaOrderFuncs = {
|
|
57
|
+
submitExternalDeltaOrder: SubmitExternalDeltaOrder;
|
|
44
58
|
};
|
|
45
|
-
export declare const
|
|
46
|
-
export type
|
|
59
|
+
export declare const constructSubmitExternalDeltaOrder: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitExternalDeltaOrderFuncs;
|
|
60
|
+
export type SubmitTWAPDeltaOrderParams = BuildTWAPDeltaOrderParams & {
|
|
47
61
|
referrerAddress?: string;
|
|
48
62
|
degenMode?: boolean;
|
|
49
|
-
} & Pick<
|
|
50
|
-
type
|
|
51
|
-
export type
|
|
52
|
-
|
|
63
|
+
} & Pick<DeltaOrderToPost, 'type' | 'includeAgents' | 'excludeAgents'>;
|
|
64
|
+
type SubmitTWAPDeltaOrder = (orderParams: SubmitTWAPDeltaOrderParams) => Promise<DeltaAuction<'TWAPOrder'> | DeltaAuction<'TWAPBuyOrder'>>;
|
|
65
|
+
export type SubmitTWAPDeltaOrderFuncs = {
|
|
66
|
+
submitTWAPDeltaOrder: SubmitTWAPDeltaOrder;
|
|
53
67
|
};
|
|
54
|
-
export declare const
|
|
55
|
-
export type
|
|
68
|
+
export declare const constructSubmitTWAPDeltaOrder: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitTWAPDeltaOrderFuncs;
|
|
69
|
+
export type DeltaOrderHandlers<TxResponse> = SubmitDeltaOrderFuncs & SubmitExternalDeltaOrderFuncs & SubmitTWAPDeltaOrderFuncs & BuildDeltaOrderFunctions & BuildExternalDeltaOrderFunctions & BuildTWAPDeltaOrderFunctions & PostDeltaOrderFunctions & PostExternalDeltaOrderFunctions & PostTWAPDeltaOrderFunctions & SignDeltaOrderFunctions & PreSignDeltaOrderFunctions<TxResponse> & PreSignExternalDeltaOrderFunctions<TxResponse> & PreSignTWAPDeltaOrderFunctions<TxResponse> & GetDeltaPriceFunctions & GetDeltaOrdersFunctions & GetBridgeRoutesFunctions & IsTokenSupportedInDeltaFunctions & GetAgentsListFunctions & GetDeltaContractFunctions & GetPartnerFeeFunctions & ApproveTokenForDeltaFunctions<TxResponse> & DeltaTokenModuleFunctions<TxResponse> & CancelDeltaOrderFunctions;
|
|
56
70
|
/** @description Construct an SDK bundle exposing every Delta v2 method (queries, build/sign/post, on-chain helpers). */
|
|
57
|
-
export declare const
|
|
58
|
-
export {};
|
|
71
|
+
export declare const constructAllDeltaOrdersHandlers: <TxResponse>(options: ConstructProviderFetchInput<TxResponse, "signTypedDataCall" | "transactCall">) => DeltaOrderHandlers<TxResponse>;
|
|
59
72
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,OAAO,EACL,yBAAyB,EAE1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,6BAA6B,EAE9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,kCAAkC,EACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,8BAA8B,EAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,yBAAyB,EAE1B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EAE1B,MAAM,uBAAuB,CA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cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,yBAAyB,GAAG;IACtC,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,6BAA6B,YAC/B,2BAA2B,CAAC,GAAG,EAAE,mBAAmB,CAAC,KAC7D,yBAwBF,CAAC;AAIF,MAAM,MAAM,kBAAkB,CAAC,UAAU,IAAI,qBAAqB,GAChE,6BAA6B,GAC7B,yBAAyB,GACzB,wBAAwB,GACxB,gCAAgC,GAChC,4BAA4B,GAC5B,uBAAuB,GACvB,+BAA+B,GAC/B,2BAA2B,GAC3B,uBAAuB,GACvB,0BAA0B,CAAC,UAAU,CAAC,GACtC,kCAAkC,CAAC,UAAU,CAAC,GAC9C,8BAA8B,CAAC,UAAU,CAAC,GAC1C,sBAAsB,GACtB,uBAAuB,GACvB,wBAAwB,GACxB,gCAAgC,GAChC,sBAAsB,GACtB,yBAAyB,GACzB,sBAAsB,GACtB,6BAA6B,CAAC,UAAU,CAAC,GACzC,yBAAyB,CAAC,UAAU,CAAC,GACrC,yBAAyB,CAAC;AAE5B,wHAAwH;AACxH,eAAO,MAAM,+BAA+B,GAAI,UAAU,WAC/C,2BAA2B,CAClC,UAAU,EACV,mBAAmB,GAAG,cAAc,CACrC,KACA,kBAAkB,CAAC,UAAU,CA0B/B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Address, ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
+
type IsTokenSupportedInDelta = (token: Address, requestParams?: RequestParameters) => Promise<boolean>;
|
|
3
|
+
export type IsTokenSupportedInDeltaFunctions = {
|
|
4
|
+
isTokenSupportedInDelta: IsTokenSupportedInDelta;
|
|
5
|
+
};
|
|
6
|
+
export declare const constructIsTokenSupportedInDelta: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => IsTokenSupportedInDeltaFunctions;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=isTokenSupportedInDelta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTokenSupportedInDelta.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/isTokenSupportedInDelta.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAQrB,KAAK,uBAAuB,GAAG,CAC7B,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,MAAM,gCAAgC,GAAG;IAC7C,uBAAuB,EAAE,uBAAuB,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,gCAAgC,kCAI1C,mBAAmB,KAAG,gCAwBxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ConstructFetchInput, RequestParameters } from '../../types';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { DeltaOrderType, OnChainOrderMap } from '../delta/helpers/types';
|
|
3
|
+
import type { DeltaAuction } from './types';
|
|
4
|
+
export type DeltaOrderToPost<T extends keyof OnChainOrderMap = 'Order'> = {
|
|
4
5
|
/** @description Partner string */
|
|
5
6
|
partner?: string;
|
|
6
7
|
/** @description Referrer address */
|
|
@@ -16,13 +17,13 @@ export type DeltaOrderToPostV2<T extends keyof OnChainOrderMap = 'Order'> = {
|
|
|
16
17
|
includeAgents?: string[];
|
|
17
18
|
excludeAgents?: string[];
|
|
18
19
|
};
|
|
19
|
-
export type
|
|
20
|
+
export type PostDeltaOrderParams = Omit<DeltaOrderToPost, 'chainId'> & {
|
|
20
21
|
degenMode?: boolean;
|
|
21
22
|
};
|
|
22
|
-
type
|
|
23
|
-
export type
|
|
24
|
-
|
|
23
|
+
type PostDeltaOrder = (postData: PostDeltaOrderParams, requestParams?: RequestParameters) => Promise<DeltaAuction<'Order'>>;
|
|
24
|
+
export type PostDeltaOrderFunctions = {
|
|
25
|
+
postDeltaOrder: PostDeltaOrder;
|
|
25
26
|
};
|
|
26
|
-
export declare const
|
|
27
|
+
export declare const constructPostDeltaOrder: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostDeltaOrderFunctions;
|
|
27
28
|
export {};
|
|
28
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=postDeltaOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postDeltaOrder.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postDeltaOrder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,eAAe,GAAG,OAAO,IAAI;IACxE,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,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG,CACpB,QAAQ,EAAE,oBAAoB,E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