@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.
Files changed (96) hide show
  1. package/README.md +156 -0
  2. package/dist/examples/helpers/delta.d.ts +1 -1
  3. package/dist/examples/helpers/delta.d.ts.map +1 -1
  4. package/dist/examples/helpers/deltaV2.d.ts +3 -3
  5. package/dist/examples/helpers/deltaV2.d.ts.map +1 -1
  6. package/dist/index.d.ts +4 -17
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/methods/delta/helpers/orders.d.ts.map +1 -1
  9. package/dist/methods/delta/helpers/types.d.ts +11 -5
  10. package/dist/methods/delta/helpers/types.d.ts.map +1 -1
  11. package/dist/methods/deltaV2/{buildDeltaOrderV2.d.ts → buildDeltaOrder.d.ts} +10 -9
  12. package/dist/methods/deltaV2/buildDeltaOrder.d.ts.map +1 -0
  13. package/dist/methods/deltaV2/{buildExternalDeltaOrderV2.d.ts → buildExternalDeltaOrder.d.ts} +10 -9
  14. package/dist/methods/deltaV2/buildExternalDeltaOrder.d.ts.map +1 -0
  15. package/dist/methods/deltaV2/{buildTWAPDeltaOrderV2.d.ts → buildTWAPDeltaOrder.d.ts} +13 -12
  16. package/dist/methods/deltaV2/buildTWAPDeltaOrder.d.ts.map +1 -0
  17. package/dist/methods/deltaV2/cancelDeltaOrder.d.ts +21 -0
  18. package/dist/methods/deltaV2/cancelDeltaOrder.d.ts.map +1 -0
  19. package/dist/methods/deltaV2/getAgentsList.d.ts +10 -0
  20. package/dist/methods/deltaV2/getAgentsList.d.ts.map +1 -0
  21. package/dist/methods/deltaV2/getBridgeRoutes.d.ts +3 -3
  22. package/dist/methods/deltaV2/getBridgeRoutes.d.ts.map +1 -1
  23. package/dist/methods/deltaV2/getDeltaOrders.d.ts +40 -0
  24. package/dist/methods/deltaV2/getDeltaOrders.d.ts.map +1 -0
  25. package/dist/methods/deltaV2/{getDeltaPriceV2.d.ts → getDeltaPrice.d.ts} +7 -7
  26. package/dist/methods/deltaV2/getDeltaPrice.d.ts.map +1 -0
  27. package/dist/methods/deltaV2/helpers/orders.d.ts +191 -0
  28. package/dist/methods/deltaV2/helpers/orders.d.ts.map +1 -0
  29. package/dist/methods/deltaV2/index.d.ts +51 -38
  30. package/dist/methods/deltaV2/index.d.ts.map +1 -1
  31. package/dist/methods/deltaV2/isTokenSupportedInDelta.d.ts +8 -0
  32. package/dist/methods/deltaV2/isTokenSupportedInDelta.d.ts.map +1 -0
  33. package/dist/methods/deltaV2/{postDeltaOrderV2.d.ts → postDeltaOrder.d.ts} +9 -8
  34. package/dist/methods/deltaV2/postDeltaOrder.d.ts.map +1 -0
  35. package/dist/methods/deltaV2/postExternalDeltaOrder.d.ts +11 -0
  36. package/dist/methods/deltaV2/postExternalDeltaOrder.d.ts.map +1 -0
  37. package/dist/methods/deltaV2/postTWAPDeltaOrder.d.ts +17 -0
  38. package/dist/methods/deltaV2/postTWAPDeltaOrder.d.ts.map +1 -0
  39. package/dist/methods/deltaV2/types.d.ts +26 -20
  40. package/dist/methods/deltaV2/types.d.ts.map +1 -1
  41. package/dist/sdk/full.d.ts +1 -1
  42. package/dist/sdk/full.d.ts.map +1 -1
  43. package/dist/sdk/simple.d.ts +3 -9
  44. package/dist/sdk/simple.d.ts.map +1 -1
  45. package/dist/sdk.cjs.development.js +1600 -1298
  46. package/dist/sdk.cjs.development.js.map +1 -1
  47. package/dist/sdk.cjs.production.min.js +1 -1
  48. package/dist/sdk.cjs.production.min.js.map +1 -1
  49. package/dist/sdk.esm.js +1584 -1266
  50. package/dist/sdk.esm.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/constants.js +6 -1
  53. package/src/examples/deltaV2.ts +21 -25
  54. package/src/examples/helpers/delta.ts +6 -1
  55. package/src/examples/helpers/deltaV2.ts +9 -4
  56. package/src/index.js +167 -83
  57. package/src/index.ts +27 -143
  58. package/src/methods/delta/helpers/orders.ts +5 -1
  59. package/src/methods/delta/helpers/types.ts +19 -18
  60. package/src/methods/deltaV2/{buildDeltaOrderV2.ts → buildDeltaOrder.ts} +16 -16
  61. package/src/methods/deltaV2/{buildExternalDeltaOrderV2.ts → buildExternalDeltaOrder.ts} +16 -16
  62. package/src/methods/deltaV2/{buildTWAPDeltaOrderV2.ts → buildTWAPDeltaOrder.ts} +22 -22
  63. package/src/methods/deltaV2/{cancelDeltaOrderV2.ts → cancelDeltaOrder.ts} +17 -20
  64. package/src/methods/deltaV2/getAgentsList.ts +32 -0
  65. package/src/methods/deltaV2/getBridgeRoutes.ts +7 -7
  66. package/src/methods/deltaV2/getDeltaOrders.ts +149 -0
  67. package/src/methods/deltaV2/{getDeltaPriceV2.ts → getDeltaPrice.ts} +15 -15
  68. package/src/methods/deltaV2/helpers/orders.ts +363 -0
  69. package/src/methods/deltaV2/index.ts +148 -139
  70. package/src/methods/deltaV2/{isTokenSupportedInDeltaV2.ts → isTokenSupportedInDelta.ts} +7 -7
  71. package/src/methods/deltaV2/{postDeltaOrderV2.ts → postDeltaOrder.ts} +13 -16
  72. package/src/methods/deltaV2/postExternalDeltaOrder.ts +45 -0
  73. package/src/methods/deltaV2/{postTWAPDeltaOrderV2.ts → postTWAPDeltaOrder.ts} +14 -19
  74. package/src/methods/deltaV2/types.ts +35 -22
  75. package/src/sdk/full.ts +2 -2
  76. package/src/sdk/simple.ts +17 -43
  77. package/dist/methods/deltaV2/buildDeltaOrderV2.d.ts.map +0 -1
  78. package/dist/methods/deltaV2/buildExternalDeltaOrderV2.d.ts.map +0 -1
  79. package/dist/methods/deltaV2/buildTWAPDeltaOrderV2.d.ts.map +0 -1
  80. package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts +0 -21
  81. package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts.map +0 -1
  82. package/dist/methods/deltaV2/getAgentsListV2.d.ts +0 -10
  83. package/dist/methods/deltaV2/getAgentsListV2.d.ts.map +0 -1
  84. package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts +0 -33
  85. package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts.map +0 -1
  86. package/dist/methods/deltaV2/getDeltaPriceV2.d.ts.map +0 -1
  87. package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts +0 -8
  88. package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts.map +0 -1
  89. package/dist/methods/deltaV2/postDeltaOrderV2.d.ts.map +0 -1
  90. package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts +0 -11
  91. package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts.map +0 -1
  92. package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts +0 -16
  93. package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts.map +0 -1
  94. package/src/methods/deltaV2/getAgentsListV2.ts +0 -34
  95. package/src/methods/deltaV2/getDeltaOrdersV2.ts +0 -119
  96. package/src/methods/deltaV2/postExternalDeltaOrderV2.ts +0 -45
@@ -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 GetBridgeProtocolsV2 = (requestParams?: RequestParameters) => Promise<BridgeProtocolResponse[]>;
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 (falls through to v1 controller on the v2 path). */
16
- getBridgeProtocolsV2: GetBridgeProtocolsV2;
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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kB,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 { DeltaPriceV2 } from './types';
3
+ import type { DeltaPrice } from './types';
4
4
  type SwapSideUnion = EnumerateLiteral<typeof SwapSide>;
5
- export type DeltaPriceV2Params = {
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 GetDeltaPriceV2 = (options: DeltaPriceV2Params, requestParams?: RequestParameters) => Promise<DeltaPriceV2>;
40
- export type GetDeltaPriceV2Functions = {
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
- getDeltaPriceV2: GetDeltaPriceV2;
42
+ getDeltaPrice: GetDeltaPrice;
43
43
  };
44
- export declare const constructGetDeltaPriceV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetDeltaPriceV2Functions;
44
+ export declare const constructGetDeltaPrice: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetDeltaPriceFunctions;
45
45
  export {};
46
- //# sourceMappingURL=getDeltaPriceV2.d.ts.map
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,EAAE,CAAC,GACT,OAAO,IAAI,CAAC,GAAG;IAAE,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;;;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 '../delta/helpers/types';
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 { BuildDeltaOrderV2Functions, BuildDeltaOrderV2Params, BuiltDeltaOrderV2 } from './buildDeltaOrderV2';
11
- import { BuildExternalDeltaOrderV2Functions, BuildExternalDeltaOrderV2Params } from './buildExternalDeltaOrderV2';
12
- import { BuildTWAPDeltaOrderV2Functions, BuildTWAPDeltaOrderV2Params } from './buildTWAPDeltaOrderV2';
13
- import { DeltaOrderToPostV2, PostDeltaOrderV2Functions } from './postDeltaOrderV2';
14
- import { PostExternalDeltaOrderV2Functions } from './postExternalDeltaOrderV2';
15
- import { PostTWAPDeltaOrderV2Functions } from './postTWAPDeltaOrderV2';
16
- import { GetDeltaPriceV2Functions } from './getDeltaPriceV2';
17
- import { GetDeltaOrdersV2Functions } from './getDeltaOrdersV2';
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 { IsTokenSupportedInDeltaV2Functions } from './isTokenSupportedInDeltaV2';
20
- import { CancelDeltaOrderV2Functions } from './cancelDeltaOrderV2';
21
- import { GetAgentsListV2Functions } from './getAgentsListV2';
22
- type SignDeltaOrderV2 = (builtOrder: BuiltDeltaOrderV2) => Promise<string>;
23
- export type SignDeltaOrderV2Functions = {
24
- /** @description Sign a BuiltDeltaOrderV2 (any order type) using EIP-712 typed data. */
25
- signDeltaOrderV2: SignDeltaOrderV2;
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 constructSignDeltaOrderV2: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller">) => SignDeltaOrderV2Functions;
28
- export type SubmitDeltaOrderV2Params = BuildDeltaOrderV2Params & {
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<DeltaOrderToPostV2, 'type' | 'includeAgents' | 'excludeAgents'>;
33
- type SubmitDeltaOrderV2 = (orderParams: SubmitDeltaOrderV2Params) => Promise<DeltaAuction<'Order'>>;
34
- export type SubmitDeltaOrderV2Funcs = {
35
- submitDeltaOrderV2: SubmitDeltaOrderV2;
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 constructSubmitDeltaOrderV2: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitDeltaOrderV2Funcs;
38
- export type SubmitExternalDeltaOrderV2Params = BuildExternalDeltaOrderV2Params & {
51
+ export declare const constructSubmitDeltaOrder: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitDeltaOrderFuncs;
52
+ export type SubmitExternalDeltaOrderParams = BuildExternalDeltaOrderParams & {
39
53
  referrerAddress?: string;
40
- } & Pick<DeltaOrderToPostV2, 'type' | 'includeAgents' | 'excludeAgents'>;
41
- type SubmitExternalDeltaOrderV2 = (orderParams: SubmitExternalDeltaOrderV2Params) => Promise<DeltaAuction<'ExternalOrder'>>;
42
- export type SubmitExternalDeltaOrderV2Funcs = {
43
- submitExternalDeltaOrderV2: SubmitExternalDeltaOrderV2;
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 constructSubmitExternalDeltaOrderV2: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitExternalDeltaOrderV2Funcs;
46
- export type SubmitTWAPDeltaOrderV2Params = BuildTWAPDeltaOrderV2Params & {
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<DeltaOrderToPostV2, 'type' | 'includeAgents' | 'excludeAgents'>;
50
- type SubmitTWAPDeltaOrderV2 = (orderParams: SubmitTWAPDeltaOrderV2Params) => Promise<DeltaAuction<'TWAPOrder'> | DeltaAuction<'TWAPBuyOrder'>>;
51
- export type SubmitTWAPDeltaOrderV2Funcs = {
52
- submitTWAPDeltaOrderV2: SubmitTWAPDeltaOrderV2;
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 constructSubmitTWAPDeltaOrderV2: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitTWAPDeltaOrderV2Funcs;
55
- export type DeltaV2OrderHandlers<TxResponse> = SubmitDeltaOrderV2Funcs & SubmitExternalDeltaOrderV2Funcs & SubmitTWAPDeltaOrderV2Funcs & BuildDeltaOrderV2Functions & BuildExternalDeltaOrderV2Functions & BuildTWAPDeltaOrderV2Functions & PostDeltaOrderV2Functions & PostExternalDeltaOrderV2Functions & PostTWAPDeltaOrderV2Functions & SignDeltaOrderV2Functions & PreSignDeltaOrderFunctions<TxResponse> & PreSignExternalDeltaOrderFunctions<TxResponse> & PreSignTWAPDeltaOrderFunctions<TxResponse> & GetDeltaPriceV2Functions & GetDeltaOrdersV2Functions & GetBridgeRoutesFunctions & IsTokenSupportedInDeltaV2Functions & GetAgentsListV2Functions & GetDeltaContractFunctions & GetPartnerFeeFunctions & ApproveTokenForDeltaFunctions<TxResponse> & DeltaTokenModuleFunctions<TxResponse> & CancelDeltaOrderV2Functions;
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 constructAllDeltaV2OrdersHandlers: <TxResponse>(options: ConstructProviderFetchInput<TxResponse, "signTypedDataCall" | "transactCall">) => DeltaV2OrderHandlers<TxResponse>;
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,EAAmB,MAAM,wBAAwB,CAAC;AAG5E,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,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kCAAkC,EAClC,+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AAG,CAC1B,WAAW,EAAE,0BAA0B,KACpC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC,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 { DeltaAuction, DeltaOrderType, OnChainOrderMap } from '../delta/helpers/types';
3
- export type DeltaOrderToPostV2<T extends keyof OnChainOrderMap = 'Order'> = {
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 PostDeltaOrderV2Params = Omit<DeltaOrderToPostV2, 'chainId'> & {
20
+ export type PostDeltaOrderParams = Omit<DeltaOrderToPost, 'chainId'> & {
20
21
  degenMode?: boolean;
21
22
  };
22
- type PostDeltaOrderV2 = (postData: PostDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'Order'>>;
23
- export type PostDeltaOrderV2Functions = {
24
- postDeltaOrderV2: PostDeltaOrderV2;
23
+ type PostDeltaOrder = (postData: PostDeltaOrderParams, requestParams?: RequestParameters) => Promise<DeltaAuction<'Order'>>;
24
+ export type PostDeltaOrderFunctions = {
25
+ postDeltaOrder: PostDeltaOrder;
25
26
  };
26
- export declare const constructPostDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostDeltaOrderV2Functions;
27
+ export declare const constructPostDeltaOrder: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostDeltaOrderFunctions;
27
28
  export {};
28
- //# sourceMappingURL=postDeltaOrderV2.d.ts.map
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,EAC9B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,uBAAuB,kCAIjC,mBAAmB,KAAG,uBAqBxB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ConstructFetchInput, RequestParameters } from '../../types';
2
+ import type { DeltaOrderToPost } from './postDeltaOrder';
3
+ import type { DeltaAuction } from './types';
4
+ export type PostExternalDeltaOrderParams = Omit<DeltaOrderToPost<'ExternalOrder'>, 'chainId'>;
5
+ type PostExternalDeltaOrder = (postData: PostExternalDeltaOrderParams, requestParams?: RequestParameters) => Promise<DeltaAuction<'ExternalOrder'>>;
6
+ export type PostExternalDeltaOrderFunctions = {
7
+ postExternalDeltaOrder: PostExternalDeltaOrder;
8
+ };
9
+ export declare const constructPostExternalDeltaOrder: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostExternalDeltaOrderFunctions;
10
+ export {};
11
+ //# sourceMappingURL=postExternalDeltaOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postExternalDeltaOrder.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postExternalDeltaOrder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,gBAAgB,CAAC,eAAe,CAAC,EACjC,SAAS,CACV,CAAC;AAEF,KAAK,sBAAsB,GAAG,CAC5B,QAAQ,EAAE,4BAA4B,EACtC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC;AAE5C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,+BAA+B,kCAIzC,mBAAmB,KAAG,+BAqBxB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { Prettify } from 'ts-essentials';
2
+ import type { ConstructFetchInput, RequestParameters } from '../../types';
3
+ import type { TWAPOnChainOrderType } from '../delta/helpers/types';
4
+ import type { DeltaOrderToPost } from './postDeltaOrder';
5
+ import type { DeltaAuction } from './types';
6
+ export type PostTWAPDeltaOrderParams = Prettify<Omit<DeltaOrderToPost<'TWAPOrder'> | DeltaOrderToPost<'TWAPBuyOrder'>, 'chainId'> & {
7
+ /** @description Must be "TWAPOrder" or "TWAPBuyOrder" */
8
+ onChainOrderType: TWAPOnChainOrderType;
9
+ degenMode?: boolean;
10
+ }>;
11
+ type PostTWAPDeltaOrder = (postData: PostTWAPDeltaOrderParams, requestParams?: RequestParameters) => Promise<DeltaAuction<'TWAPOrder'> | DeltaAuction<'TWAPBuyOrder'>>;
12
+ export type PostTWAPDeltaOrderFunctions = {
13
+ postTWAPDeltaOrder: PostTWAPDeltaOrder;
14
+ };
15
+ export declare const constructPostTWAPDeltaOrder: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostTWAPDeltaOrderFunctions;
16
+ export {};
17
+ //# sourceMappingURL=postTWAPDeltaOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postTWAPDeltaOrder.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postTWAPDeltaOrder.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,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,IAAI,CACF,gBAAgB,CAAC,WAAW,CAAC,GAAG,gBAAgB,CAAC,cAAc,CAAC,EAChE,SAAS,CACV,GAAG;IACF,yDAAyD;IACzD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CACF,CAAC;AAEF,KAAK,kBAAkB,GAAG,CACxB,QAAQ,EAAE,wBAAwB,EAClC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,2BAA2B,GAAG;IACxC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,2BAA2B,kCAIrC,mBAAmB,KAAG,2BAyBxB,CAAC"}