@velora-dex/sdk 9.5.4-dev.1 → 9.5.4

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 (87) hide show
  1. package/dist/index.d.ts +4 -18
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/methods/delta/cancelDeltaOrder.d.ts.map +1 -1
  4. package/dist/methods/delta/getDeltaOrders.d.ts +4 -4
  5. package/dist/methods/delta/getDeltaOrders.d.ts.map +1 -1
  6. package/dist/methods/delta/getDeltaPrice.d.ts +1 -1
  7. package/dist/methods/delta/getDeltaPrice.d.ts.map +1 -1
  8. package/dist/methods/delta/helpers/orders.d.ts +17 -16
  9. package/dist/methods/delta/helpers/orders.d.ts.map +1 -1
  10. package/dist/methods/delta/helpers/types.d.ts +11 -50
  11. package/dist/methods/delta/helpers/types.d.ts.map +1 -1
  12. package/dist/methods/delta/postDeltaOrder.d.ts +3 -3
  13. package/dist/methods/delta/postDeltaOrder.d.ts.map +1 -1
  14. package/dist/sdk/full.d.ts +0 -2
  15. package/dist/sdk/full.d.ts.map +1 -1
  16. package/dist/sdk/simple.d.ts +0 -10
  17. package/dist/sdk/simple.d.ts.map +1 -1
  18. package/dist/sdk.cjs.development.js +252 -1087
  19. package/dist/sdk.cjs.development.js.map +1 -1
  20. package/dist/sdk.cjs.production.min.js +1 -1
  21. package/dist/sdk.cjs.production.min.js.map +1 -1
  22. package/dist/sdk.esm.js +253 -1071
  23. package/dist/sdk.esm.js.map +1 -1
  24. package/dist/types.d.ts +0 -8
  25. package/dist/types.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/constants.js +6 -1
  28. package/src/index.js +115 -86
  29. package/src/index.ts +0 -153
  30. package/src/methods/delta/cancelDeltaOrder.ts +1 -4
  31. package/src/methods/delta/getDeltaOrders.ts +5 -6
  32. package/src/methods/delta/getDeltaPrice.ts +1 -1
  33. package/src/methods/delta/helpers/orders.ts +19 -27
  34. package/src/methods/delta/helpers/types.ts +19 -63
  35. package/src/methods/delta/postDeltaOrder.ts +4 -4
  36. package/src/methods/delta/postTWAPDeltaOrder.ts +1 -1
  37. package/src/sdk/full.ts +0 -8
  38. package/src/sdk/simple.ts +0 -56
  39. package/src/types.ts +0 -9
  40. package/dist/examples/deltaV2.d.ts +0 -2
  41. package/dist/examples/deltaV2.d.ts.map +0 -1
  42. package/dist/examples/helpers/deltaV2.d.ts +0 -5
  43. package/dist/examples/helpers/deltaV2.d.ts.map +0 -1
  44. package/dist/methods/deltaV2/buildDeltaOrderV2.d.ts +0 -44
  45. package/dist/methods/deltaV2/buildDeltaOrderV2.d.ts.map +0 -1
  46. package/dist/methods/deltaV2/buildExternalDeltaOrderV2.d.ts +0 -48
  47. package/dist/methods/deltaV2/buildExternalDeltaOrderV2.d.ts.map +0 -1
  48. package/dist/methods/deltaV2/buildTWAPDeltaOrderV2.d.ts +0 -59
  49. package/dist/methods/deltaV2/buildTWAPDeltaOrderV2.d.ts.map +0 -1
  50. package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts +0 -21
  51. package/dist/methods/deltaV2/cancelDeltaOrderV2.d.ts.map +0 -1
  52. package/dist/methods/deltaV2/getAgentsListV2.d.ts +0 -10
  53. package/dist/methods/deltaV2/getAgentsListV2.d.ts.map +0 -1
  54. package/dist/methods/deltaV2/getBridgeRoutes.d.ts +0 -20
  55. package/dist/methods/deltaV2/getBridgeRoutes.d.ts.map +0 -1
  56. package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts +0 -33
  57. package/dist/methods/deltaV2/getDeltaOrdersV2.d.ts.map +0 -1
  58. package/dist/methods/deltaV2/getDeltaPriceV2.d.ts +0 -46
  59. package/dist/methods/deltaV2/getDeltaPriceV2.d.ts.map +0 -1
  60. package/dist/methods/deltaV2/index.d.ts +0 -59
  61. package/dist/methods/deltaV2/index.d.ts.map +0 -1
  62. package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts +0 -8
  63. package/dist/methods/deltaV2/isTokenSupportedInDeltaV2.d.ts.map +0 -1
  64. package/dist/methods/deltaV2/postDeltaOrderV2.d.ts +0 -28
  65. package/dist/methods/deltaV2/postDeltaOrderV2.d.ts.map +0 -1
  66. package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts +0 -11
  67. package/dist/methods/deltaV2/postExternalDeltaOrderV2.d.ts.map +0 -1
  68. package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts +0 -16
  69. package/dist/methods/deltaV2/postTWAPDeltaOrderV2.d.ts.map +0 -1
  70. package/dist/methods/deltaV2/types.d.ts +0 -163
  71. package/dist/methods/deltaV2/types.d.ts.map +0 -1
  72. package/src/examples/deltaV2.ts +0 -200
  73. package/src/examples/helpers/deltaV2.ts +0 -29
  74. package/src/methods/deltaV2/buildDeltaOrderV2.ts +0 -86
  75. package/src/methods/deltaV2/buildExternalDeltaOrderV2.ts +0 -95
  76. package/src/methods/deltaV2/buildTWAPDeltaOrderV2.ts +0 -131
  77. package/src/methods/deltaV2/cancelDeltaOrderV2.ts +0 -103
  78. package/src/methods/deltaV2/getAgentsListV2.ts +0 -34
  79. package/src/methods/deltaV2/getBridgeRoutes.ts +0 -82
  80. package/src/methods/deltaV2/getDeltaOrdersV2.ts +0 -119
  81. package/src/methods/deltaV2/getDeltaPriceV2.ts +0 -108
  82. package/src/methods/deltaV2/index.ts +0 -303
  83. package/src/methods/deltaV2/isTokenSupportedInDeltaV2.ts +0 -52
  84. package/src/methods/deltaV2/postDeltaOrderV2.ts +0 -65
  85. package/src/methods/deltaV2/postExternalDeltaOrderV2.ts +0 -45
  86. package/src/methods/deltaV2/postTWAPDeltaOrderV2.ts +0 -63
  87. package/src/methods/deltaV2/types.ts +0 -189
@@ -1,21 +0,0 @@
1
- import type { ConstructProviderFetchInput, RequestParameters } from '../../types';
2
- import { type CancelDeltaOrderData } from '../delta/helpers/buildCancelDeltaOrderData';
3
- type SuccessResponse = {
4
- success: true;
5
- };
6
- type CancelDeltaOrderRequestParams = {
7
- orderIds: string[];
8
- signature: string;
9
- };
10
- export type SignCancelDeltaOrderRequestV2 = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<string>;
11
- export type PostCancelDeltaOrderRequestV2 = (params: CancelDeltaOrderRequestParams, requestParams?: RequestParameters) => Promise<SuccessResponse>;
12
- export type CancelDeltaOrderV2 = (params: CancelDeltaOrderData, requestParams?: RequestParameters) => Promise<SuccessResponse>;
13
- export type CancelDeltaOrderV2Functions = {
14
- signCancelDeltaOrderRequestV2: SignCancelDeltaOrderRequestV2;
15
- postCancelDeltaOrderRequestV2: PostCancelDeltaOrderRequestV2;
16
- /** @description Cancel one or more Delta orders via the v2 endpoint */
17
- cancelDeltaOrdersV2: CancelDeltaOrderV2;
18
- };
19
- export declare const constructCancelDeltaOrderV2: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller" | "fetcher" | "apiURL" | "chainId">) => CancelDeltaOrderV2Functions;
20
- export {};
21
- //# sourceMappingURL=cancelDeltaOrderV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancelDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/cancelDeltaOrderV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,4CAA4C,CAAC;AAEpD,KAAK,eAAe,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AAEzC,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAC1C,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,MAAM,MAAM,6BAA6B,GAAG,CAC1C,MAAM,EAAE,6BAA6B,EACrC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,kBAAkB,GAAG,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,MAAM,2BAA2B,GAAG;IACxC,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,uEAAuE;IACvE,mBAAmB,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,IAAI,CACX,2BAA2B,CAAC,GAAG,EAAE,mBAAmB,CAAC,EACrD,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CACpD,KACA,2BAyDF,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { ConstructFetchInput, RequestParameters } from '../../types';
2
- export type AgentList = string[];
3
- type GetAgentsListV2 = (requestParams?: RequestParameters) => Promise<AgentList>;
4
- export type GetAgentsListV2Functions = {
5
- /** @description List agents available on the current chain. */
6
- getAgentsListV2: GetAgentsListV2;
7
- };
8
- export declare const constructGetAgentsListV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetAgentsListV2Functions;
9
- export {};
10
- //# sourceMappingURL=getAgentsListV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAgentsListV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getAgentsListV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAIjC,KAAK,eAAe,GAAG,CACrB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,SAAS,CAAC,CAAC;AAExB,MAAM,MAAM,wBAAwB,GAAG;IACrC,+DAA+D;IAC/D,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,kCAIlC,mBAAmB,KAAG,wBAaxB,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { ConstructFetchInput, RequestParameters } from '../../types';
2
- import type { BridgeProtocolResponse } from '../delta/getBridgeInfo';
3
- import type { BridgeRoute } from './types';
4
- type GetBridgeRoutesParams = {
5
- /** @description Include tokens that can be swapped on destChain after bridge. Default is true. */
6
- allowBridgeAndSwap?: boolean;
7
- /** @description Include only the specified bridges. Default is all bridges. */
8
- bridges?: string[];
9
- };
10
- type GetBridgeRoutes = (params?: GetBridgeRoutesParams, requestParams?: RequestParameters) => Promise<BridgeRoute[]>;
11
- type GetBridgeProtocolsV2 = (requestParams?: RequestParameters) => Promise<BridgeProtocolResponse[]>;
12
- export type GetBridgeRoutesFunctions = {
13
- /** @description Fetch supported bridge routes as a flat array (v2 replacement for bridge-info). */
14
- getBridgeRoutes: GetBridgeRoutes;
15
- /** @description Fetch supported bridge protocols (falls through to v1 controller on the v2 path). */
16
- getBridgeProtocolsV2: GetBridgeProtocolsV2;
17
- };
18
- export declare const constructGetBridgeRoutes: ({ apiURL, fetcher, }: ConstructFetchInput) => GetBridgeRoutesFunctions;
19
- export {};
20
- //# sourceMappingURL=getBridgeRoutes.d.ts.map
@@ -1 +0,0 @@
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,oBAAoB,GAAG,CAC1B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAMvC,MAAM,MAAM,wBAAwB,GAAG;IACrC,mGAAmG;IACnG,eAAe,EAAE,eAAe,CAAC;IACjC,qGAAqG;IACrG,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,wBAAwB,yBAGlC,mBAAmB,KAAG,wBAsCxB,CAAC"}
@@ -1,33 +0,0 @@
1
- import type { Address, ConstructFetchInput, PaginatedResponse, RequestParameters } from '../../types';
2
- import type { DeltaOrderType, OnChainOrderType } from '../delta/helpers/types';
3
- import type { DeltaOrderStatusV2, DeltaOrderV2Response } from './types';
4
- type GetDeltaOrderByIdV2 = (orderId: string, requestParams?: RequestParameters) => Promise<DeltaOrderV2Response>;
5
- type GetDeltaOrderByHashV2 = (orderHash: string, requestParams?: RequestParameters) => Promise<DeltaOrderV2Response>;
6
- type OrdersV2Filter = {
7
- /** @description `order.owner` to fetch Delta Orders for. */
8
- userAddress: Address;
9
- /** @description Pagination option. Default 1. */
10
- page?: number;
11
- /** @description Pagination option. Default 100, max 1000. */
12
- limit?: number;
13
- /** @description Filter by chainId. Omitted = orders across all chains. */
14
- chainId?: number[];
15
- /** @description Filter by integrator-facing status. */
16
- status?: DeltaOrderStatusV2[];
17
- /** @description Filter by order type. MARKET or LIMIT. */
18
- type?: DeltaOrderType;
19
- /** @description Filter by on-chain order type. */
20
- onChainOrderType?: OnChainOrderType;
21
- };
22
- type GetDeltaOrdersV2 = (options: OrdersV2Filter, requestParams?: RequestParameters) => Promise<PaginatedResponse<DeltaOrderV2Response>>;
23
- export type GetDeltaOrdersV2Functions = {
24
- /** @description Fetch a single order by its UUID. */
25
- getDeltaOrderByIdV2: GetDeltaOrderByIdV2;
26
- /** @description Fetch a single order by its EIP-712 order hash. */
27
- getDeltaOrderByHashV2: GetDeltaOrderByHashV2;
28
- /** @description List Delta orders with the v2 pagination envelope. */
29
- getDeltaOrdersV2: GetDeltaOrdersV2;
30
- };
31
- export declare const constructGetDeltaOrdersV2: ({ apiURL, fetcher, }: ConstructFetchInput) => GetDeltaOrdersV2Functions;
32
- export {};
33
- //# sourceMappingURL=getDeltaOrdersV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDeltaOrdersV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getDeltaOrdersV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAExE,KAAK,mBAAmB,GAAG,CACzB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAEnC,KAAK,qBAAqB,GAAG,CAC3B,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAEnC,KAAK,cAAc,GAAG;IACpB,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,kBAAkB,EAAE,CAAC;IAC9B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAOF,KAAK,gBAAgB,GAAG,CACtB,OAAO,EAAE,cAAc,EACvB,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GAAG;IACtC,qDAAqD;IACrD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,mEAAmE;IACnE,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,sEAAsE;IACtE,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,yBAAyB,yBAGnC,mBAAmB,KAAG,yBAuDxB,CAAC"}
@@ -1,46 +0,0 @@
1
- import { SwapSide } from '../../constants';
2
- import type { ConstructFetchInput, EnumerateLiteral, RequestParameters } from '../../types';
3
- import type { DeltaPriceV2 } from './types';
4
- type SwapSideUnion = EnumerateLiteral<typeof SwapSide>;
5
- export type DeltaPriceV2Params = {
6
- /** @description Source Token Address */
7
- srcToken: string;
8
- /** @description Destination Token Address. For Crosschain Orders, the destination token on the destination chain */
9
- destToken: string;
10
- /** @description srcToken amount in wei */
11
- amount: string;
12
- /** @description Source Token Decimals */
13
- srcDecimals: number;
14
- /** @description Destination Token Decimals */
15
- destDecimals: number;
16
- /** @description User's Wallet Address */
17
- userAddress?: string;
18
- /** @description Beneficiary Address */
19
- beneficiary?: string;
20
- /** @description Partner string. */
21
- partner?: string;
22
- /** @description Partner fee in basis points (bps), 50bps=0.5% */
23
- partnerFeeBps?: number;
24
- /** @description Destination Chain ID for Crosschain Orders */
25
- destChainId?: number;
26
- /** @description SELL or BUY, default is SELL */
27
- side?: SwapSideUnion;
28
- /** @description In %. Bypasses the API price impact check (default = 15%) */
29
- maxImpact?: number;
30
- maxUSDImpact?: number;
31
- includeAgents?: string[];
32
- excludeAgents?: string[];
33
- includeBridges?: string[];
34
- excludeBridges?: string[];
35
- /** @description Allow swap on destChain after bridge. Default is true. */
36
- allowBridgeAndSwap?: boolean;
37
- degenMode?: boolean;
38
- };
39
- type GetDeltaPriceV2 = (options: DeltaPriceV2Params, requestParams?: RequestParameters) => Promise<DeltaPriceV2>;
40
- export type GetDeltaPriceV2Functions = {
41
- /** @description Fetch a v2 price quote (route-based response). */
42
- getDeltaPriceV2: GetDeltaPriceV2;
43
- };
44
- export declare const constructGetDeltaPriceV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetDeltaPriceV2Functions;
45
- export {};
46
- //# sourceMappingURL=getDeltaPriceV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDeltaPriceV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/getDeltaPriceV2.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,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,aAAa,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,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,eAAe,GAAG,CACrB,OAAO,EAAE,kBAAkB,EAC3B,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,MAAM,MAAM,wBAAwB,GAAG;IACrC,kEAAkE;IAClE,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,kCAIlC,mBAAmB,KAAG,wBAkCxB,CAAC"}
@@ -1,59 +0,0 @@
1
- import type { ConstructProviderFetchInput } from '../../types';
2
- import type { DeltaAuction } from '../delta/helpers/types';
3
- import { GetDeltaContractFunctions } from '../delta/getDeltaContract';
4
- import { GetPartnerFeeFunctions } from '../delta/getPartnerFee';
5
- import { ApproveTokenForDeltaFunctions } from '../delta/approveForDelta';
6
- import { PreSignDeltaOrderFunctions } from '../delta/preSignDeltaOrder';
7
- import { PreSignExternalDeltaOrderFunctions } from '../delta/preSignExternalDeltaOrder';
8
- import { PreSignTWAPDeltaOrderFunctions } from '../delta/preSignTWAPDeltaOrder';
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';
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;
26
- };
27
- export declare const constructSignDeltaOrderV2: (options: Pick<ConstructProviderFetchInput<any, "signTypedDataCall">, "contractCaller">) => SignDeltaOrderV2Functions;
28
- export type SubmitDeltaOrderV2Params = BuildDeltaOrderV2Params & {
29
- /** @description Referrer address */
30
- referrerAddress?: string;
31
- degenMode?: boolean;
32
- } & Pick<DeltaOrderToPostV2, 'type' | 'includeAgents' | 'excludeAgents'>;
33
- type SubmitDeltaOrderV2 = (orderParams: SubmitDeltaOrderV2Params) => Promise<DeltaAuction<'Order'>>;
34
- export type SubmitDeltaOrderV2Funcs = {
35
- submitDeltaOrderV2: SubmitDeltaOrderV2;
36
- };
37
- export declare const constructSubmitDeltaOrderV2: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitDeltaOrderV2Funcs;
38
- export type SubmitExternalDeltaOrderV2Params = BuildExternalDeltaOrderV2Params & {
39
- referrerAddress?: string;
40
- } & Pick<DeltaOrderToPostV2, 'type' | 'includeAgents' | 'excludeAgents'>;
41
- type SubmitExternalDeltaOrderV2 = (orderParams: SubmitExternalDeltaOrderV2Params) => Promise<DeltaAuction<'ExternalOrder'>>;
42
- export type SubmitExternalDeltaOrderV2Funcs = {
43
- submitExternalDeltaOrderV2: SubmitExternalDeltaOrderV2;
44
- };
45
- export declare const constructSubmitExternalDeltaOrderV2: (options: ConstructProviderFetchInput<any, "signTypedDataCall">) => SubmitExternalDeltaOrderV2Funcs;
46
- export type SubmitTWAPDeltaOrderV2Params = BuildTWAPDeltaOrderV2Params & {
47
- referrerAddress?: string;
48
- 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;
53
- };
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;
56
- /** @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 {};
59
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,k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C,UAAU,CAAC,GACtC,kCAAkC,CAAC,UAAU,CAAC,GAC9C,8BAA8B,CAAC,UAAU,CAAC,GAC1C,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,GACxB,kCAAkC,GAClC,wBAAwB,GACxB,yBAAyB,GACzB,sBAAsB,GACtB,6BAA6B,CAAC,UAAU,CAAC,GACzC,yBAAyB,CAAC,UAAU,CAAC,GACrC,2BAA2B,CAAC;AAE9B,wHAAwH;AACxH,eAAO,MAAM,iCAAiC,GAAI,UAAU,WACjD,2BAA2B,CAClC,UAAU,EACV,mBAAmB,GAAG,cAAc,CACrC,KACA,oBAAoB,CAAC,UAAU,CA0BjC,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { Address, ConstructFetchInput, RequestParameters } from '../../types';
2
- type IsTokenSupportedInDeltaV2 = (token: Address, requestParams?: RequestParameters) => Promise<boolean>;
3
- export type IsTokenSupportedInDeltaV2Functions = {
4
- isTokenSupportedInDeltaV2: IsTokenSupportedInDeltaV2;
5
- };
6
- export declare const constructIsTokenSupportedInDeltaV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => IsTokenSupportedInDeltaV2Functions;
7
- export {};
8
- //# sourceMappingURL=isTokenSupportedInDeltaV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isTokenSupportedInDeltaV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/isTokenSupportedInDeltaV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAQrB,KAAK,yBAAyB,GAAG,CAC/B,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,yBAAyB,EAAE,yBAAyB,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,kCAAkC,kCAI5C,mBAAmB,KAAG,kCAwBxB,CAAC"}
@@ -1,28 +0,0 @@
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'> = {
4
- /** @description Partner string */
5
- partner?: string;
6
- /** @description Referrer address */
7
- referrerAddress?: string;
8
- order: OnChainOrderMap[T];
9
- /** @description Signature of the order from order.owner address. EOA signatures must be submitted in ERC-2098 Compact Representation. */
10
- signature: string;
11
- chainId: number;
12
- /** @description Designates the Order as being able to be partially filled, as opposed to fill-or-kill */
13
- partiallyFillable?: boolean;
14
- /** @description Type of the order. MARKET or LIMIT. Default is MARKET */
15
- type?: DeltaOrderType;
16
- includeAgents?: string[];
17
- excludeAgents?: string[];
18
- };
19
- export type PostDeltaOrderV2Params = Omit<DeltaOrderToPostV2, 'chainId'> & {
20
- degenMode?: boolean;
21
- };
22
- type PostDeltaOrderV2 = (postData: PostDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'Order'>>;
23
- export type PostDeltaOrderV2Functions = {
24
- postDeltaOrderV2: PostDeltaOrderV2;
25
- };
26
- export declare const constructPostDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostDeltaOrderV2Functions;
27
- export {};
28
- //# sourceMappingURL=postDeltaOrderV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postDeltaOrderV2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,eAAe,GAAG,OAAO,IAAI;IAC1E,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1B,yIAAyI;IACzI,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CACtB,QAAQ,EAAE,sBAAsB,EAChC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,yBAAyB,kCAInC,mBAAmB,KAAG,yBAqBxB,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { ConstructFetchInput, RequestParameters } from '../../types';
2
- import type { DeltaAuction } from '../delta/helpers/types';
3
- import type { DeltaOrderToPostV2 } from './postDeltaOrderV2';
4
- export type PostExternalDeltaOrderV2Params = Omit<DeltaOrderToPostV2<'ExternalOrder'>, 'chainId'>;
5
- type PostExternalDeltaOrderV2 = (postData: PostExternalDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'ExternalOrder'>>;
6
- export type PostExternalDeltaOrderV2Functions = {
7
- postExternalDeltaOrderV2: PostExternalDeltaOrderV2;
8
- };
9
- export declare const constructPostExternalDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostExternalDeltaOrderV2Functions;
10
- export {};
11
- //# sourceMappingURL=postExternalDeltaOrderV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postExternalDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postExternalDeltaOrderV2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,kBAAkB,CAAC,eAAe,CAAC,EACnC,SAAS,CACV,CAAC;AAEF,KAAK,wBAAwB,GAAG,CAC9B,QAAQ,EAAE,8BAA8B,EACxC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC;AAE5C,MAAM,MAAM,iCAAiC,GAAG;IAC9C,wBAAwB,EAAE,wBAAwB,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,iCAAiC,kCAI3C,mBAAmB,KAAG,iCAqBxB,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { Prettify } from 'ts-essentials';
2
- import type { ConstructFetchInput, RequestParameters } from '../../types';
3
- import type { DeltaAuction, TWAPOnChainOrderType } from '../delta/helpers/types';
4
- import type { DeltaOrderToPostV2 } from './postDeltaOrderV2';
5
- export type PostTWAPDeltaOrderV2Params = Prettify<Omit<DeltaOrderToPostV2<'TWAPOrder'> | DeltaOrderToPostV2<'TWAPBuyOrder'>, 'chainId'> & {
6
- /** @description Must be "TWAPOrder" or "TWAPBuyOrder" */
7
- onChainOrderType: TWAPOnChainOrderType;
8
- degenMode?: boolean;
9
- }>;
10
- type PostTWAPDeltaOrderV2 = (postData: PostTWAPDeltaOrderV2Params, requestParams?: RequestParameters) => Promise<DeltaAuction<'TWAPOrder'> | DeltaAuction<'TWAPBuyOrder'>>;
11
- export type PostTWAPDeltaOrderV2Functions = {
12
- postTWAPDeltaOrderV2: PostTWAPDeltaOrderV2;
13
- };
14
- export declare const constructPostTWAPDeltaOrderV2: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => PostTWAPDeltaOrderV2Functions;
15
- export {};
16
- //# sourceMappingURL=postTWAPDeltaOrderV2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postTWAPDeltaOrderV2.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/postTWAPDeltaOrderV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC/C,IAAI,CACF,kBAAkB,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,cAAc,CAAC,EACpE,SAAS,CACV,GAAG;IACF,yDAAyD;IACzD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CACF,CAAC;AAEF,KAAK,oBAAoB,GAAG,CAC1B,QAAQ,EAAE,0BAA0B,EACpC,aAAa,CAAC,EAAE,iBAAiB,KAC9B,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,6BAA6B,kCAIvC,mBAAmB,KAAG,6BA4BxB,CAAC"}
@@ -1,163 +0,0 @@
1
- import type { Address } from '../../types';
2
- import type { TypedDataField } from '../common/orders/buildOrderData';
3
- import type { Bridge, DeltaOrderType, DeltaOrderUnion, OnChainOrderType } from '../delta/helpers/types';
4
- /** @description Response from POST /delta/v2/orders/build — EIP-712 typed data ready to sign. */
5
- export type BuiltDeltaOrderV2 = {
6
- toSign: {
7
- domain: {
8
- name: string;
9
- version: string;
10
- chainId: number;
11
- verifyingContract: string;
12
- };
13
- /** EIP-712 type definitions keyed by type name. */
14
- types: Record<string, TypedDataField[]>;
15
- /** The on-chain order struct value to sign. */
16
- value: Record<string, unknown>;
17
- };
18
- /** EIP-712 order hash. */
19
- orderHash: string;
20
- };
21
- /** @description Token identity used across v2 endpoints. */
22
- export type DeltaPriceToken = {
23
- chainId: number;
24
- address: Address;
25
- };
26
- /** @description A token amount with its USD value, used uniformly for inputs, outputs, and fees. */
27
- export type DeltaTokenAmount = {
28
- token: DeltaPriceToken;
29
- /** @description Amount in wei. */
30
- amount: string;
31
- /** @description USD value of the amount. */
32
- amountUSD: string;
33
- };
34
- /** @description Bridge tag used to mark routes as recommended / fastest / best-return. */
35
- export type BridgeTag = 'recommended' | 'fastest' | 'best-return';
36
- /** @description Subset of the on-chain Bridge struct returned in v2 price responses.
37
- * (the full `route` object is passed to the server when building an order). */
38
- export type DeltaRouteBridgeContractParams = Omit<Bridge, 'destinationChainId'>;
39
- /** @description Bridge details on a route. Same-chain routes carry `null` for `route.bridge`. */
40
- export type DeltaRouteBridge = {
41
- /** @description Bridge protocol identifier (e.g. "Across", "Relay", "Mayan"). */
42
- protocol: string;
43
- /** @description Estimated bridging time in milliseconds. */
44
- estimatedTimeMs: number;
45
- /** @description Tags for this route ("recommended", "fastest", "best-return"). May be empty. */
46
- tags: BridgeTag[];
47
- /** @description Bridge contract parameters as returned by the server. */
48
- contractParams: DeltaRouteBridgeContractParams;
49
- };
50
- /** @description A single step of a route (origin chain or destination chain). */
51
- export type DeltaRouteStep = {
52
- /** @description The token amount entering this step (before any per-step swap). */
53
- input: DeltaTokenAmount;
54
- /** @description The token amount exiting this step (after any per-step swap). */
55
- output: DeltaTokenAmount;
56
- };
57
- /** @description A route describes how the swap flows from origin chain to destination chain. */
58
- export type DeltaRoute = {
59
- /** @description Source-chain step. The on-chain Delta order's amounts come from `origin.input` and `origin.output`. */
60
- origin: DeltaRouteStep;
61
- /** @description Destination-chain step. For same-chain routes this mirrors `origin`. */
62
- destination: DeltaRouteStep;
63
- /** @description Bridge details. `null` for same-chain routes. */
64
- bridge: DeltaRouteBridge | null;
65
- /** @description Fee breakdown for this route. */
66
- fees: {
67
- /** @description Gas fee (single DeltaTokenAmount on the source chain). */
68
- gas: DeltaTokenAmount;
69
- /** @description Bridge fees (empty array for same-chain). */
70
- bridge: DeltaTokenAmount[];
71
- };
72
- };
73
- /** @description v2 price response: route-based, cross-chain first. */
74
- export type DeltaPriceV2 = {
75
- /** @description Unique request ID for tracing. */
76
- id: string;
77
- /** @description Order side. */
78
- side: 'SELL' | 'BUY';
79
- /** @description Token the user trades (identity only — amounts live in route.origin.input). */
80
- inputToken: DeltaPriceToken;
81
- /** @description Token the user receives (identity only — amounts live in route.destination.output). */
82
- outputToken: DeltaPriceToken;
83
- /** @description Recommended route with full amounts and bridge details. */
84
- route: DeltaRoute;
85
- /** @description Partner info attached to this price. */
86
- partner: {
87
- name: string;
88
- /** @description Partner fee in percent (e.g. 0.12 = 0.12%). */
89
- feePercent: number;
90
- };
91
- /** @description Address to approve for spending the input token. */
92
- spender: Address;
93
- /** @description Alternative routes (other bridges). Each is a full DeltaRoute. */
94
- alternatives: DeltaRoute[];
95
- };
96
- /** @description A flat bridge-routes entry returned by GET /delta/v2/prices/bridge-routes. */
97
- export type BridgeRoute = {
98
- srcChainId: number;
99
- destChainId: number;
100
- /** @description Output tokens supported on the dest chain for this src→dest pair. */
101
- tokens: Address[];
102
- };
103
- /** @description Integrator-facing order status returned by v2 order endpoints. */
104
- declare const DeltaOrderStatusV2Map: {
105
- readonly Pending: "PENDING";
106
- readonly AwaitingSignature: "AWAITING_SIGNATURE";
107
- readonly Active: "ACTIVE";
108
- readonly Suspended: "SUSPENDED";
109
- readonly Cancelling: "CANCELLING";
110
- readonly Bridging: "BRIDGING";
111
- readonly Completed: "COMPLETED";
112
- readonly Failed: "FAILED";
113
- readonly Expired: "EXPIRED";
114
- readonly Cancelled: "CANCELLED";
115
- readonly Refunded: "REFUNDED";
116
- };
117
- export type DeltaOrderStatusV2 = (typeof DeltaOrderStatusV2Map)[keyof typeof DeltaOrderStatusV2Map];
118
- /** @description `OnChainOrderType` plus the synthetic `FillableOrder` label, used when a Standard `Order` is `partiallyFillable`. */
119
- export type DeltaOnChainOrderTypeReported = OnChainOrderType | 'FillableOrder';
120
- /** @description Token side on an order. SELL provides an explicit `amount`; BUY provides expected/executed amounts. */
121
- export type DeltaTokenSide = {
122
- chainId: number;
123
- token: Address;
124
- amount: string;
125
- } | {
126
- chainId: number;
127
- token: Address;
128
- expectedAmount: string | null;
129
- executedAmount: string | null;
130
- };
131
- /** @description A single transaction entry on a v2 order. */
132
- export type DeltaTransactionV2 = {
133
- originTx: string;
134
- destinationTx: string | null;
135
- /** @description Filled percent of the slice (0–100). */
136
- filledPercent: number;
137
- spentAmount: string | null;
138
- receivedAmount: string | null;
139
- };
140
- /** @description Order shape returned by GET /v2/orders, /v2/orders/:id, /v2/orders/hash/:hash. */
141
- export type DeltaOrderV2Response = {
142
- id: string;
143
- status: DeltaOrderStatusV2;
144
- side: 'SELL' | 'BUY';
145
- type: DeltaOrderType;
146
- onChainOrderType: DeltaOnChainOrderTypeReported | null;
147
- input: DeltaTokenSide;
148
- output: DeltaTokenSide;
149
- owner: Address;
150
- beneficiary: Address;
151
- orderHash: string | null;
152
- partner: string;
153
- order: DeltaOrderUnion;
154
- transactions: DeltaTransactionV2[];
155
- /** @description ISO datetime string. */
156
- createdAt: string | null;
157
- /** @description ISO datetime string. */
158
- updatedAt: string | null;
159
- /** @description ISO datetime string. */
160
- expiresAt: string | null;
161
- };
162
- export {};
163
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/methods/deltaV2/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,iGAAiG;AACjG,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,MAAM,CAAC;YAChB,iBAAiB,EAAE,MAAM,CAAC;SAC3B,CAAC;QACF,mDAAmD;QACnD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;QACxC,+CAA+C;QAC/C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,oGAAoG;AACpG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAElE;gFACgF;AAChF,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,M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