@symmio/trading-core 3.5.0 → 4.0.0

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 (161) hide show
  1. package/dist/gasless/delegation-preflight.d.ts +22 -0
  2. package/dist/gasless/delegation-preflight.d.ts.map +1 -1
  3. package/dist/gasless/delegation-preflight.js +34 -19
  4. package/dist/gasless/delegation-preflight.js.map +1 -1
  5. package/dist/index.d.ts +14 -4
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +248 -243
  8. package/dist/pools/index.d.ts +1 -0
  9. package/dist/pools/index.d.ts.map +1 -1
  10. package/dist/pools/markets/get-listing-markets.d.ts +2 -0
  11. package/dist/pools/markets/get-listing-markets.d.ts.map +1 -1
  12. package/dist/pools/markets/get-listing-markets.js +1 -0
  13. package/dist/pools/markets/get-listing-markets.js.map +1 -1
  14. package/dist/pools/markets/query.d.ts.map +1 -1
  15. package/dist/pools/markets/query.js +1 -0
  16. package/dist/pools/markets/query.js.map +1 -1
  17. package/dist/pools/markets/to-search-params.d.ts +1 -0
  18. package/dist/pools/markets/to-search-params.d.ts.map +1 -1
  19. package/dist/pools/markets/to-search-params.js +1 -1
  20. package/dist/pools/markets/to-search-params.js.map +1 -1
  21. package/dist/pools/token-price/get-token-price.d.ts +71 -0
  22. package/dist/pools/token-price/get-token-price.d.ts.map +1 -0
  23. package/dist/pools/token-price/get-token-price.js +30 -0
  24. package/dist/pools/token-price/get-token-price.js.map +1 -0
  25. package/dist/pools/token-price/index.d.ts +4 -0
  26. package/dist/pools/token-price/index.d.ts.map +1 -0
  27. package/dist/pools/token-price/query.d.ts +52 -0
  28. package/dist/pools/token-price/query.d.ts.map +1 -0
  29. package/dist/pools/token-price/query.js +29 -0
  30. package/dist/pools/token-price/query.js.map +1 -0
  31. package/dist/pools/token-price/to-token-price.d.ts +14 -0
  32. package/dist/pools/token-price/to-token-price.d.ts.map +1 -0
  33. package/dist/pools/token-price/to-token-price.js +8 -0
  34. package/dist/pools/token-price/to-token-price.js.map +1 -0
  35. package/dist/pools/transactions/get-pool-transactions.d.ts +59 -17
  36. package/dist/pools/transactions/get-pool-transactions.d.ts.map +1 -1
  37. package/dist/pools/transactions/get-pool-transactions.js +7 -4
  38. package/dist/pools/transactions/get-pool-transactions.js.map +1 -1
  39. package/dist/pools/transactions/query.d.ts +6 -2
  40. package/dist/pools/transactions/query.d.ts.map +1 -1
  41. package/dist/pools/transactions/query.js +12 -13
  42. package/dist/pools/transactions/query.js.map +1 -1
  43. package/dist/pools/transactions/to-pool-transaction.d.ts +7 -0
  44. package/dist/pools/transactions/to-pool-transaction.d.ts.map +1 -1
  45. package/dist/pools/transactions/to-pool-transaction.js +3 -1
  46. package/dist/pools/transactions/to-pool-transaction.js.map +1 -1
  47. package/dist/pools/types/generated/listing-backend.js +8 -8
  48. package/dist/pools/types/generated/listing-backend.js.map +1 -1
  49. package/dist/pools/types.d.ts +53 -10
  50. package/dist/pools/types.d.ts.map +1 -1
  51. package/dist/pools/types.js +6 -4
  52. package/dist/pools/types.js.map +1 -1
  53. package/dist/solvers/estimated-price/get-estimated-price.d.ts +2 -0
  54. package/dist/solvers/estimated-price/get-estimated-price.d.ts.map +1 -1
  55. package/dist/solvers/estimated-price/get-estimated-price.js +4 -1
  56. package/dist/solvers/estimated-price/get-estimated-price.js.map +1 -1
  57. package/dist/solvers/estimated-price/query.d.ts +6 -2
  58. package/dist/solvers/estimated-price/query.d.ts.map +1 -1
  59. package/dist/solvers/estimated-price/query.js +3 -2
  60. package/dist/solvers/estimated-price/query.js.map +1 -1
  61. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts +4 -0
  62. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts.map +1 -0
  63. package/dist/solvers/funding-info/adapters/enigma-funding-info.js +17 -0
  64. package/dist/solvers/funding-info/adapters/enigma-funding-info.js.map +1 -0
  65. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts +4 -0
  66. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts.map +1 -0
  67. package/dist/solvers/funding-info/adapters/rasa-funding-info.js +21 -0
  68. package/dist/solvers/funding-info/adapters/rasa-funding-info.js.map +1 -0
  69. package/dist/solvers/funding-info/get-funding-info.d.ts +22 -13
  70. package/dist/solvers/funding-info/get-funding-info.d.ts.map +1 -1
  71. package/dist/solvers/funding-info/get-funding-info.js +24 -12
  72. package/dist/solvers/funding-info/get-funding-info.js.map +1 -1
  73. package/dist/solvers/funding-info/query.d.ts +14 -6
  74. package/dist/solvers/funding-info/query.d.ts.map +1 -1
  75. package/dist/solvers/funding-info/query.js +1 -0
  76. package/dist/solvers/funding-info/query.js.map +1 -1
  77. package/dist/solvers/funding-info/to-funding-info.d.ts +8 -4
  78. package/dist/solvers/funding-info/to-funding-info.d.ts.map +1 -1
  79. package/dist/solvers/funding-info/to-funding-info.js +2 -1
  80. package/dist/solvers/funding-info/to-funding-info.js.map +1 -1
  81. package/dist/solvers/funding-info/types.d.ts +26 -4
  82. package/dist/solvers/funding-info/types.d.ts.map +1 -1
  83. package/dist/solvers/instant-close/instant-close/instant-close.d.ts +8 -1
  84. package/dist/solvers/instant-close/instant-close/instant-close.d.ts.map +1 -1
  85. package/dist/solvers/instant-close/instant-close/instant-close.js +40 -32
  86. package/dist/solvers/instant-close/instant-close/instant-close.js.map +1 -1
  87. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.d.ts +7 -1
  88. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.d.ts.map +1 -1
  89. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.js +48 -40
  90. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.js.map +1 -1
  91. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.d.ts +4 -2
  92. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.d.ts.map +1 -1
  93. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.js +1 -0
  94. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.js.map +1 -1
  95. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.d.ts +4 -2
  96. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.d.ts.map +1 -1
  97. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.js +2 -1
  98. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.js.map +1 -1
  99. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts +2 -0
  100. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts.map +1 -1
  101. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +64 -56
  102. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js.map +1 -1
  103. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.d.ts +2 -0
  104. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.d.ts.map +1 -1
  105. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +51 -43
  106. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js.map +1 -1
  107. package/dist/solvers/instant-open/instant-open/instant-open.d.ts +6 -0
  108. package/dist/solvers/instant-open/instant-open/instant-open.d.ts.map +1 -1
  109. package/dist/solvers/instant-open/instant-open/instant-open.js.map +1 -1
  110. package/dist/solvers/instant-open/instant-open/types.d.ts +2 -1
  111. package/dist/solvers/instant-open/instant-open/types.d.ts.map +1 -1
  112. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts +3 -1
  113. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts.map +1 -1
  114. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js +2 -1
  115. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js.map +1 -1
  116. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts +3 -3
  117. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts.map +1 -1
  118. package/dist/solvers/market-info/adapters/enigma-market-info.js +7 -5
  119. package/dist/solvers/market-info/adapters/enigma-market-info.js.map +1 -1
  120. package/dist/solvers/market-info/get-market-info.d.ts +3 -2
  121. package/dist/solvers/market-info/get-market-info.d.ts.map +1 -1
  122. package/dist/solvers/market-info/get-market-info.js.map +1 -1
  123. package/dist/solvers/market-info/types.d.ts +4 -3
  124. package/dist/solvers/market-info/types.d.ts.map +1 -1
  125. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts +10 -10
  126. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts.map +1 -1
  127. package/dist/solvers/notional-cap/get-notional-cap-all.js +26 -23
  128. package/dist/solvers/notional-cap/get-notional-cap-all.js.map +1 -1
  129. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts +49 -0
  130. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts.map +1 -0
  131. package/dist/solvers/notional-cap/get-notional-cap-page.js +37 -0
  132. package/dist/solvers/notional-cap/get-notional-cap-page.js.map +1 -0
  133. package/dist/solvers/notional-cap/index.d.ts +2 -0
  134. package/dist/solvers/notional-cap/index.d.ts.map +1 -1
  135. package/dist/solvers/notional-cap/query-page.d.ts +45 -0
  136. package/dist/solvers/notional-cap/query-page.d.ts.map +1 -0
  137. package/dist/solvers/notional-cap/query-page.js +26 -0
  138. package/dist/solvers/notional-cap/query-page.js.map +1 -0
  139. package/dist/solvers/shared/index.d.ts +1 -0
  140. package/dist/solvers/shared/index.d.ts.map +1 -1
  141. package/dist/solvers/shared/instant-delegation-preflight.d.ts +65 -0
  142. package/dist/solvers/shared/instant-delegation-preflight.d.ts.map +1 -0
  143. package/dist/solvers/shared/instant-delegation-preflight.js +34 -0
  144. package/dist/solvers/shared/instant-delegation-preflight.js.map +1 -0
  145. package/dist/solvers/symbols/get-symbols.d.ts +3 -2
  146. package/dist/solvers/symbols/get-symbols.d.ts.map +1 -1
  147. package/dist/solvers/symbols/get-symbols.js +17 -3
  148. package/dist/solvers/symbols/get-symbols.js.map +1 -1
  149. package/dist/solvers/trade-volume/get-trade-volume.d.ts +2 -1
  150. package/dist/solvers/trade-volume/get-trade-volume.d.ts.map +1 -1
  151. package/dist/solvers/trade-volume/get-trade-volume.js +6 -1
  152. package/dist/solvers/trade-volume/get-trade-volume.js.map +1 -1
  153. package/dist/solvers/trade-volume/to-daily-volume.d.ts +6 -6
  154. package/dist/solvers/trade-volume/to-daily-volume.js.map +1 -1
  155. package/dist/solvers/trade-volume/types.d.ts +4 -3
  156. package/dist/solvers/trade-volume/types.d.ts.map +1 -1
  157. package/dist/solvers/types/generated/enigma-solver.js +3 -3
  158. package/dist/solvers/types/generated/enigma-solver.js.map +1 -1
  159. package/dist/solvers/types/generated/rasa-solver.js +8 -2
  160. package/dist/solvers/types/generated/rasa-solver.js.map +1 -1
  161. package/package.json +3 -3
@@ -0,0 +1,49 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { Compute, ReadSolverParameter } from '../../shared/types/properties.js';
3
+ import { EnigmaNotionalCap } from './types.js';
4
+ /**
5
+ * Parameters for {@link getNotionalCapPage}.
6
+ * Paging is optional; omit it for the first 100 rows. Totals cover only that page.
7
+ * @example
8
+ * const parameters: GetNotionalCapPageParameters = { chainId: 42161, limit: 50, offset: 100 };
9
+ */
10
+ export type GetNotionalCapPageParameters = Compute<ReadSolverParameter & {
11
+ /** Maximum rows in this page (1–100, default 100). */
12
+ limit?: number;
13
+ /** Zero-based row offset (default 0). */
14
+ offset?: number;
15
+ }>;
16
+ /**
17
+ * One page of normalized caps and its aggregate totals in float dollars.
18
+ * Missing numeric wire fields are zero, matching the existing cap API.
19
+ * @example
20
+ * const page: GetNotionalCapPageReturnType = await getNotionalCapPage(config, { offset: 100 });
21
+ * console.log(page.symbols, page.totalUsed);
22
+ */
23
+ export interface GetNotionalCapPageReturnType {
24
+ /** Number of symbols the solver returned. */
25
+ count: number;
26
+ /** Σ `openInterest` across this page (dollars). */
27
+ totalOpenInterest: number;
28
+ /** Σ `used` across this page (dollars). */
29
+ totalUsed: number;
30
+ /** Per-symbol rows. `/notional_cap` (list) is Enigma-only, so rows are always Enigma-shaped. */
31
+ symbols: EnigmaNotionalCap[];
32
+ }
33
+ /**
34
+ * Fetch one Enigma notional-cap page, with page-only totals in float dollars.
35
+ * The live endpoint accepts at most 100 rows despite the generated spec's 500.
36
+ * Missing numeric fields retain the existing zero fallback.
37
+ * @param config - SDK configuration selecting the deployment.
38
+ * @param parameters - Chain, solver and optional limit/offset.
39
+ * @returns Normalized rows and totals for this page only.
40
+ * @throws {SymmError} For invalid paging or an unsupported solver/chain.
41
+ * @throws {SymmApiError} When the upstream request fails.
42
+ * @example
43
+ * ```ts
44
+ * const page = await getNotionalCapPage(config, { limit: 100, offset: 100 });
45
+ * console.log(page.totalUsed, page.symbols);
46
+ * ```
47
+ */
48
+ export declare function getNotionalCapPage(config: Config, parameters?: GetNotionalCapPageParameters): Promise<GetNotionalCapPageReturnType>;
49
+ //# sourceMappingURL=get-notional-cap-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-notional-cap-page.d.ts","sourceRoot":"","sources":["../../../src/solvers/notional-cap/get-notional-cap-page.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAChD,mBAAmB,GAAG;IACpB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CACF,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,4BAAiC,GAC5C,OAAO,CAAC,4BAA4B,CAAC,CAkCvC"}
@@ -0,0 +1,37 @@
1
+ import { SymmApiError as e, SymmError as t } from "../../shared/errors/symm-error.js";
2
+ import { getNotionalCap as n } from "../types/generated/enigma-solver.js";
3
+ import { assertSolverKind as r } from "../assert-solver-kind.js";
4
+ import { toEnigmaNotionalCap as i } from "./adapters/enigma-notional-cap.js";
5
+ import { isAxiosError as a } from "axios";
6
+ import { toFiniteNumber as o } from "@symmio/utils/number";
7
+ //#region src/solvers/notional-cap/get-notional-cap-page.ts
8
+ async function s(s, c = {}) {
9
+ let l = s.getSolver({
10
+ chainId: c.chainId,
11
+ solverId: c.solverId
12
+ });
13
+ r(l, "enigma", "getNotionalCapPage");
14
+ let u = c.limit ?? 100, d = c.offset ?? 0;
15
+ if (!Number.isInteger(u) || u < 1 || u > 100 || !Number.isInteger(d) || d < 0) throw new t("validation", "INVALID_NOTIONAL_CAP_PAGE", "limit must be an integer from 1 to 100 and offset a non-negative integer.");
16
+ try {
17
+ let e = (await n({
18
+ limit: u,
19
+ offset: d
20
+ }, { baseURL: l.url })).data, t = Array.isArray(e.symbols) ? e.symbols : [];
21
+ return {
22
+ count: o(e.count),
23
+ totalOpenInterest: o(e.total_open_interest),
24
+ totalUsed: o(e.total_used),
25
+ symbols: t.map(i)
26
+ };
27
+ } catch (n) {
28
+ throw n instanceof t ? n : a(n) ? e.fromAxios(n, {
29
+ code: "FETCH_NOTIONAL_CAP_PAGE_FAILED",
30
+ baseURL: l.url
31
+ }) : new t("api", "FETCH_NOTIONAL_CAP_PAGE_FAILED", `Failed to fetch notional caps: ${n instanceof Error ? n.message : String(n)}`, { cause: n instanceof Error ? n : void 0 });
32
+ }
33
+ }
34
+ //#endregion
35
+ export { s as getNotionalCapPage };
36
+
37
+ //# sourceMappingURL=get-notional-cap-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-notional-cap-page.js","names":[],"sources":["../../../src/solvers/notional-cap/get-notional-cap-page.ts"],"sourcesContent":["import { toFiniteNumber } from \"@symmio/utils/number\";\nimport { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getNotionalCap } from \"../types/generated/enigma-solver\";\nimport { toEnigmaNotionalCap } from \"./adapters\";\nimport type { EnigmaNotionalCap } from \"./types\";\n\n/**\n * Parameters for {@link getNotionalCapPage}.\n * Paging is optional; omit it for the first 100 rows. Totals cover only that page.\n * @example\n * const parameters: GetNotionalCapPageParameters = { chainId: 42161, limit: 50, offset: 100 };\n */\nexport type GetNotionalCapPageParameters = Compute<\n ReadSolverParameter & {\n /** Maximum rows in this page (1–100, default 100). */\n limit?: number;\n /** Zero-based row offset (default 0). */\n offset?: number;\n }\n>;\n\n/**\n * One page of normalized caps and its aggregate totals in float dollars.\n * Missing numeric wire fields are zero, matching the existing cap API.\n * @example\n * const page: GetNotionalCapPageReturnType = await getNotionalCapPage(config, { offset: 100 });\n * console.log(page.symbols, page.totalUsed);\n */\nexport interface GetNotionalCapPageReturnType {\n /** Number of symbols the solver returned. */\n count: number;\n /** Σ `openInterest` across this page (dollars). */\n totalOpenInterest: number;\n /** Σ `used` across this page (dollars). */\n totalUsed: number;\n /** Per-symbol rows. `/notional_cap` (list) is Enigma-only, so rows are always Enigma-shaped. */\n symbols: EnigmaNotionalCap[];\n}\n\n/**\n * Fetch one Enigma notional-cap page, with page-only totals in float dollars.\n * The live endpoint accepts at most 100 rows despite the generated spec's 500.\n * Missing numeric fields retain the existing zero fallback.\n * @param config - SDK configuration selecting the deployment.\n * @param parameters - Chain, solver and optional limit/offset.\n * @returns Normalized rows and totals for this page only.\n * @throws {SymmError} For invalid paging or an unsupported solver/chain.\n * @throws {SymmApiError} When the upstream request fails.\n * @example\n * ```ts\n * const page = await getNotionalCapPage(config, { limit: 100, offset: 100 });\n * console.log(page.totalUsed, page.symbols);\n * ```\n */\nexport async function getNotionalCapPage(\n config: Config,\n parameters: GetNotionalCapPageParameters = {},\n): Promise<GetNotionalCapPageReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getNotionalCapPage\");\n const limit = parameters.limit ?? 100;\n const offset = parameters.offset ?? 0;\n if (!Number.isInteger(limit) || limit < 1 || limit > 100 || !Number.isInteger(offset) || offset < 0) {\n throw new SymmError(\n \"validation\",\n \"INVALID_NOTIONAL_CAP_PAGE\",\n \"limit must be an integer from 1 to 100 and offset a non-negative integer.\",\n );\n }\n try {\n const response = await getNotionalCap({ limit, offset }, { baseURL: solver.url });\n const r = response.data as Record<string, unknown>;\n const rawSymbols = Array.isArray(r.symbols) ? (r.symbols as Parameters<typeof toEnigmaNotionalCap>[0][]) : [];\n return {\n count: toFiniteNumber(r.count as number | string | undefined),\n totalOpenInterest: toFiniteNumber(r.total_open_interest as number | string | undefined),\n totalUsed: toFiniteNumber(r.total_used as number | string | undefined),\n symbols: rawSymbols.map(toEnigmaNotionalCap),\n };\n } catch (err) {\n if (err instanceof SymmError) throw err;\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_NOTIONAL_CAP_PAGE_FAILED\", baseURL: solver.url });\n }\n throw new SymmError(\n \"api\",\n \"FETCH_NOTIONAL_CAP_PAGE_FAILED\",\n `Failed to fetch notional caps: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;;AA0DA,eAAsB,EACpB,GACA,IAA2C,CAAC,GACL;CACvC,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAC9F,EAAiB,GAAQ,UAAU,oBAAoB;CACvD,IAAM,IAAQ,EAAW,SAAS,KAC5B,IAAS,EAAW,UAAU;CACpC,IAAI,CAAC,OAAO,UAAU,CAAK,KAAK,IAAQ,KAAK,IAAQ,OAAO,CAAC,OAAO,UAAU,CAAM,KAAK,IAAS,GAChG,MAAM,IAAI,EACR,cACA,6BACA,2EACF;CAEF,IAAI;EAEF,IAAM,KAAI,MADa,EAAe;GAAE;GAAO;EAAO,GAAG,EAAE,SAAS,EAAO,IAAI,CAAC,GAC7D,MACb,IAAa,MAAM,QAAQ,EAAE,OAAO,IAAK,EAAE,UAA0D,CAAC;EAC5G,OAAO;GACL,OAAO,EAAe,EAAE,KAAoC;GAC5D,mBAAmB,EAAe,EAAE,mBAAkD;GACtF,WAAW,EAAe,EAAE,UAAyC;GACrE,SAAS,EAAW,IAAI,CAAmB;EAC7C;CACF,SAAS,GAAK;EAKZ,MAJI,aAAe,IAAiB,IAChC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAAkC,SAAS,EAAO;EAAI,CAAC,IAE7F,IAAI,EACR,OACA,kCACA,kCAAkC,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KACjF,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
@@ -1,9 +1,11 @@
1
1
  export * from './check-notional-cap.js';
2
2
  export * from './get-notional-cap-all.js';
3
3
  export * from './get-notional-cap-by-symbol-id.js';
4
+ export * from './get-notional-cap-page.js';
4
5
  export * from './get-open-interest-by-symbol-id.js';
5
6
  export * from './query.js';
6
7
  export * from './query-all.js';
7
8
  export * from './query-open-interest.js';
9
+ export * from './query-page.js';
8
10
  export * from './types.js';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solvers/notional-cap/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solvers/notional-cap/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { Compute, ConfigKeyParameter } from '../../shared/types/properties.js';
3
+ import { QueryParameter, SymmioQueryOptions } from '../../shared/types/query.js';
4
+ import { GetNotionalCapPageParameters, GetNotionalCapPageReturnType } from './get-notional-cap-page.js';
5
+ /**
6
+ * One page of normalized cap rows and page-only totals resolved by the query.
7
+ * @example const page: GetNotionalCapPageData = await getNotionalCapPage(config, {});
8
+ */
9
+ export type GetNotionalCapPageData = GetNotionalCapPageReturnType;
10
+ /** Build a deployment- and page-specific query key.
11
+ * @param options - Paging and deployment identity.
12
+ * @returns A stable query-key tuple.
13
+ * @throws Does not throw for valid options.
14
+ * @example getNotionalCapPageQueryKey({ limit: 100, offset: 100 });
15
+ */
16
+ export declare function getNotionalCapPageQueryKey(options: Compute<GetNotionalCapPageParameters & ConfigKeyParameter>): readonly ["getNotionalCapPage", Record<string, unknown>];
17
+ /**
18
+ * Stable tuple identifying a page and its deployment in the query cache.
19
+ * @example const key: GetNotionalCapPageQueryKey = getNotionalCapPageQueryKey({ offset: 100 });
20
+ */
21
+ export type GetNotionalCapPageQueryKey = ReturnType<typeof getNotionalCapPageQueryKey>;
22
+ /**
23
+ * Page/deployment inputs and TanStack Query overrides for the page read.
24
+ * @example const options: GetNotionalCapPageOptions = { limit: 50, query: { enabled: false } };
25
+ */
26
+ export type GetNotionalCapPageOptions = Compute<GetNotionalCapPageParameters & QueryParameter<GetNotionalCapPageData, Error, GetNotionalCapPageData, GetNotionalCapPageQueryKey>>;
27
+ /**
28
+ * Executable query options with a page-specific key and normalized cap result.
29
+ * @example const query: GetNotionalCapPageQueryOptions = getNotionalCapPageQueryOptions(config, { offset: 100 });
30
+ */
31
+ export type GetNotionalCapPageQueryOptions = SymmioQueryOptions<GetNotionalCapPageData, Error, GetNotionalCapPageData, GetNotionalCapPageQueryKey>;
32
+ /**
33
+ * Build TanStack Query options for one notional-cap page.
34
+ * @param config - SDK configuration.
35
+ * @param options - Paging, deployment and query overrides.
36
+ * @returns Options whose key includes the page and deployment identity.
37
+ * @throws {SymmError} When configuration cannot be resolved; the query function propagates action errors.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * useQuery(getNotionalCapPageQueryOptions(config, {}));
42
+ * ```
43
+ */
44
+ export declare function getNotionalCapPageQueryOptions(config: Config, options?: GetNotionalCapPageOptions): GetNotionalCapPageQueryOptions;
45
+ //# sourceMappingURL=query-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-page.d.ts","sourceRoot":"","sources":["../../../src/solvers/notional-cap/query-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EAClC,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,4BAA4B,GAAG,kBAAkB,CAAC,4DAE7G;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,4BAA4B,GAC1B,cAAc,CAAC,sBAAsB,EAAE,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,CAAC,CACpG,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAC7D,sBAAsB,EACtB,KAAK,EACL,sBAAsB,EACtB,0BAA0B,CAC3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,yBAA8B,GACtC,8BAA8B,CAgBhC"}
@@ -0,0 +1,26 @@
1
+ import { filterQueryOptions as e } from "../../shared/utils/query.js";
2
+ import { getNotionalCapPage as t } from "./get-notional-cap-page.js";
3
+ //#region src/solvers/notional-cap/query-page.ts
4
+ function n(t) {
5
+ return ["getNotionalCapPage", e(t)];
6
+ }
7
+ function r(e, r = {}) {
8
+ return {
9
+ ...r.query,
10
+ queryKey: n({
11
+ ...r,
12
+ configKey: e.getChainConfigKey(r.chainId)
13
+ }),
14
+ enabled: r.query?.enabled ?? !0,
15
+ queryFn: () => t(e, {
16
+ chainId: r.chainId,
17
+ solverId: r.solverId,
18
+ limit: r.limit,
19
+ offset: r.offset
20
+ })
21
+ };
22
+ }
23
+ //#endregion
24
+ export { n as getNotionalCapPageQueryKey, r as getNotionalCapPageQueryOptions };
25
+
26
+ //# sourceMappingURL=query-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-page.js","names":[],"sources":["../../../src/solvers/notional-cap/query-page.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport type { Compute, ConfigKeyParameter } from \"../../shared/types/properties\";\nimport type { QueryParameter, SymmioQueryOptions } from \"../../shared/types/query\";\nimport { filterQueryOptions } from \"../../shared/utils/query\";\nimport {\n getNotionalCapPage,\n type GetNotionalCapPageParameters,\n type GetNotionalCapPageReturnType,\n} from \"./get-notional-cap-page\";\n\n/**\n * One page of normalized cap rows and page-only totals resolved by the query.\n * @example const page: GetNotionalCapPageData = await getNotionalCapPage(config, {});\n */\nexport type GetNotionalCapPageData = GetNotionalCapPageReturnType;\n\n/** Build a deployment- and page-specific query key.\n * @param options - Paging and deployment identity.\n * @returns A stable query-key tuple.\n * @throws Does not throw for valid options.\n * @example getNotionalCapPageQueryKey({ limit: 100, offset: 100 });\n */\nexport function getNotionalCapPageQueryKey(options: Compute<GetNotionalCapPageParameters & ConfigKeyParameter>) {\n return [\"getNotionalCapPage\", filterQueryOptions(options)] as const;\n}\n\n/**\n * Stable tuple identifying a page and its deployment in the query cache.\n * @example const key: GetNotionalCapPageQueryKey = getNotionalCapPageQueryKey({ offset: 100 });\n */\nexport type GetNotionalCapPageQueryKey = ReturnType<typeof getNotionalCapPageQueryKey>;\n\n/**\n * Page/deployment inputs and TanStack Query overrides for the page read.\n * @example const options: GetNotionalCapPageOptions = { limit: 50, query: { enabled: false } };\n */\nexport type GetNotionalCapPageOptions = Compute<\n GetNotionalCapPageParameters &\n QueryParameter<GetNotionalCapPageData, Error, GetNotionalCapPageData, GetNotionalCapPageQueryKey>\n>;\n\n/**\n * Executable query options with a page-specific key and normalized cap result.\n * @example const query: GetNotionalCapPageQueryOptions = getNotionalCapPageQueryOptions(config, { offset: 100 });\n */\nexport type GetNotionalCapPageQueryOptions = SymmioQueryOptions<\n GetNotionalCapPageData,\n Error,\n GetNotionalCapPageData,\n GetNotionalCapPageQueryKey\n>;\n\n/**\n * Build TanStack Query options for one notional-cap page.\n * @param config - SDK configuration.\n * @param options - Paging, deployment and query overrides.\n * @returns Options whose key includes the page and deployment identity.\n * @throws {SymmError} When configuration cannot be resolved; the query function propagates action errors.\n *\n * @example\n * ```ts\n * useQuery(getNotionalCapPageQueryOptions(config, {}));\n * ```\n */\nexport function getNotionalCapPageQueryOptions(\n config: Config,\n options: GetNotionalCapPageOptions = {},\n): GetNotionalCapPageQueryOptions {\n return {\n ...options.query,\n queryKey: getNotionalCapPageQueryKey({\n ...options,\n configKey: config.getChainConfigKey(options.chainId),\n }),\n enabled: options.query?.enabled ?? true,\n queryFn: () =>\n getNotionalCapPage(config, {\n chainId: options.chainId,\n solverId: options.solverId,\n limit: options.limit,\n offset: options.offset,\n }),\n };\n}\n"],"mappings":";;;AAsBA,SAAgB,EAA2B,GAAqE;CAC9G,OAAO,CAAC,sBAAsB,EAAmB,CAAO,CAAC;AAC3D;AAwCA,SAAgB,EACd,GACA,IAAqC,CAAC,GACN;CAChC,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAA2B;GACnC,GAAG;GACH,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EACrD,CAAC;EACD,SAAS,EAAQ,OAAO,WAAW;EACnC,eACE,EAAmB,GAAQ;GACzB,SAAS,EAAQ;GACjB,UAAU,EAAQ;GAClB,OAAO,EAAQ;GACf,QAAQ,EAAQ;EAClB,CAAC;CACL;AACF"}
@@ -5,6 +5,7 @@
5
5
  * instant-* slices lives here. Slice-specific shared lives under each slice's
6
6
  * own `shared/` folder.
7
7
  */
8
+ export * from './instant-delegation-preflight.js';
8
9
  export * from './resolvers/index.js';
9
10
  export * from './solver-close-fee.js';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solvers/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/solvers/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { SignedOperation } from '../instant-open/shared/types.js';
3
+ /**
4
+ * Per-call switch for the delegation check that instant trade writes run
5
+ * before signing.
6
+ *
7
+ * `instantOpen`, `instantClose` and `instantCloseBulk` — and every flow built
8
+ * on them (`instantOpenAuto`, `limitOpenAuto`, `instantCloseAuto`,
9
+ * `limitCloseAuto`, `instantCloseBulkAuto`) — confirm that the signer may act
10
+ * for the account each operation runs under before anything is signed or sent
11
+ * to the solver. A session key without the InstantLayer delegation fails right
12
+ * there with `INSTANT_SIGNER_NOT_DELEGATED`, instead of after the solver tries
13
+ * to execute the trade. The account's owner needs no delegation, so an
14
+ * owner-signed trade skips the delegation reads.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * // The app already gates its trade button on delegation: skip the extra read.
19
+ * await instantClose(config, { from: sessionKey, partyA, order, preflightDelegation: false });
20
+ * ```
21
+ */
22
+ export interface InstantDelegationPreflightParameter {
23
+ /**
24
+ * Check, before signing, that the signer holds an active InstantLayer
25
+ * delegation for every operation it signs, and throw
26
+ * `INSTANT_SIGNER_NOT_DELEGATED` when it does not. Defaults to `true`.
27
+ *
28
+ * Pass `false` when your app already gates the trade on delegation and you
29
+ * want to skip the extra RPC read.
30
+ */
31
+ preflightDelegation?: boolean;
32
+ }
33
+ /**
34
+ * Throw when the signer of a set of instant-trade operations lacks the
35
+ * InstantLayer delegation they need — before any of them is signed or sent.
36
+ *
37
+ * Built on the gasless relay's delegation pre-flight
38
+ * (`findUndelegatedGaslessSelectors`), so relayed writes and instant trades
39
+ * share one delegation check. This adds the two steps that check leaves to its
40
+ * caller:
41
+ *
42
+ * 1. Each operation's selector is read from its calldata, so the check covers
43
+ * exactly what is about to be signed.
44
+ * 2. Each operation's `signerAccount` is resolved to its delegator — a live
45
+ * virtual account to its parent sub-account, as the InstantLayer does.
46
+ * Without it a close signed under a virtual account would skip the check.
47
+ *
48
+ * Operations are grouped by signer and delegator, so a bulk close across many
49
+ * virtual accounts of one sub-account costs one check.
50
+ *
51
+ * @param config - The SDK config.
52
+ * @param parameters - The chain, the calling action (named in the error), the
53
+ * operations about to be signed, and `enabled` (`false` skips the check).
54
+ * @throws {SymmError} `INSTANT_SIGNER_NOT_DELEGATED` naming every signer,
55
+ * sub-account and selector that lacks an active delegation.
56
+ *
57
+ * @internal
58
+ */
59
+ export declare function assertInstantSignerDelegated(config: Config, parameters: {
60
+ chainId?: number;
61
+ action: string;
62
+ operations: readonly Pick<SignedOperation, "signer" | "callData" | "signerAccount">[];
63
+ enabled?: boolean;
64
+ }): Promise<void>;
65
+ //# sourceMappingURL=instant-delegation-preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instant-delegation-preflight.d.ts","sourceRoot":"","sources":["../../../src/solvers/shared/instant-delegation-preflight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AASD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,UAAU,GAAG,eAAe,CAAC,EAAE,CAAC;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACA,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
@@ -0,0 +1,34 @@
1
+ import { SymmError as e } from "../../shared/errors/symm-error.js";
2
+ import { findUndelegatedGaslessSelectors as t, getCachedDelegatorAccount as n } from "../../gasless/delegation-preflight.js";
3
+ //#region src/solvers/shared/instant-delegation-preflight.ts
4
+ async function r(r, i) {
5
+ if (i.enabled === !1 || i.operations.length === 0) return;
6
+ let { chainId: a } = r.getChainConfig(i.chainId), o = await Promise.all(i.operations.map(async (e) => ({
7
+ operation: e,
8
+ account: await n(r, a, e.signerAccount.addr)
9
+ }))), s = /* @__PURE__ */ new Map();
10
+ for (let { operation: e, account: t } of o) {
11
+ let n = `${e.signer.toLowerCase()}:${t.toLowerCase()}`, r = s.get(n) ?? {
12
+ signer: e.signer,
13
+ account: t,
14
+ selectors: /* @__PURE__ */ new Set()
15
+ };
16
+ r.selectors.add(e.callData.slice(0, 10).toLowerCase()), s.set(n, r);
17
+ }
18
+ let c = (await Promise.all([...s.values()].map(async (e) => ({
19
+ ...e,
20
+ missing: await t(r, {
21
+ chainId: a,
22
+ signer: e.signer,
23
+ signerAccount: e.account,
24
+ selectors: [...e.selectors]
25
+ })
26
+ })))).filter((e) => e.missing.length > 0);
27
+ if (c.length === 0) return;
28
+ let l = c.map((e) => `signer ${e.signer} holds no active InstantLayer delegation from sub-account ${e.account} for selector(s) ${e.missing.join(", ")}`).join("; ");
29
+ throw new e("validation", "INSTANT_SIGNER_NOT_DELEGATED", `${i.action}: ${l}. Grant those selectors to the signer (getInstantTradeRequiredSelectors builds the trade set), sign with the sub-account's owner, or pass \`preflightDelegation: false\` to skip this check.`);
30
+ }
31
+ //#endregion
32
+ export { r as assertInstantSignerDelegated };
33
+
34
+ //# sourceMappingURL=instant-delegation-preflight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instant-delegation-preflight.js","names":[],"sources":["../../../src/solvers/shared/instant-delegation-preflight.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport { findUndelegatedGaslessSelectors, getCachedDelegatorAccount } from \"../../gasless/delegation-preflight\";\nimport { SymmError } from \"../../shared/errors/symm-error\";\nimport type { SignedOperation } from \"../instant-open/shared/types\";\n\n/**\n * Per-call switch for the delegation check that instant trade writes run\n * before signing.\n *\n * `instantOpen`, `instantClose` and `instantCloseBulk` — and every flow built\n * on them (`instantOpenAuto`, `limitOpenAuto`, `instantCloseAuto`,\n * `limitCloseAuto`, `instantCloseBulkAuto`) — confirm that the signer may act\n * for the account each operation runs under before anything is signed or sent\n * to the solver. A session key without the InstantLayer delegation fails right\n * there with `INSTANT_SIGNER_NOT_DELEGATED`, instead of after the solver tries\n * to execute the trade. The account's owner needs no delegation, so an\n * owner-signed trade skips the delegation reads.\n *\n * @example\n * ```ts\n * // The app already gates its trade button on delegation: skip the extra read.\n * await instantClose(config, { from: sessionKey, partyA, order, preflightDelegation: false });\n * ```\n */\nexport interface InstantDelegationPreflightParameter {\n /**\n * Check, before signing, that the signer holds an active InstantLayer\n * delegation for every operation it signs, and throw\n * `INSTANT_SIGNER_NOT_DELEGATED` when it does not. Defaults to `true`.\n *\n * Pass `false` when your app already gates the trade on delegation and you\n * want to skip the extra RPC read.\n */\n preflightDelegation?: boolean;\n}\n\n/** The selectors one signer signs under one delegator account. */\ninterface DelegationCheck {\n signer: Address;\n account: Address;\n selectors: Set<Hex>;\n}\n\n/**\n * Throw when the signer of a set of instant-trade operations lacks the\n * InstantLayer delegation they need — before any of them is signed or sent.\n *\n * Built on the gasless relay's delegation pre-flight\n * (`findUndelegatedGaslessSelectors`), so relayed writes and instant trades\n * share one delegation check. This adds the two steps that check leaves to its\n * caller:\n *\n * 1. Each operation's selector is read from its calldata, so the check covers\n * exactly what is about to be signed.\n * 2. Each operation's `signerAccount` is resolved to its delegator — a live\n * virtual account to its parent sub-account, as the InstantLayer does.\n * Without it a close signed under a virtual account would skip the check.\n *\n * Operations are grouped by signer and delegator, so a bulk close across many\n * virtual accounts of one sub-account costs one check.\n *\n * @param config - The SDK config.\n * @param parameters - The chain, the calling action (named in the error), the\n * operations about to be signed, and `enabled` (`false` skips the check).\n * @throws {SymmError} `INSTANT_SIGNER_NOT_DELEGATED` naming every signer,\n * sub-account and selector that lacks an active delegation.\n *\n * @internal\n */\nexport async function assertInstantSignerDelegated(\n config: Config,\n parameters: {\n chainId?: number;\n action: string;\n operations: readonly Pick<SignedOperation, \"signer\" | \"callData\" | \"signerAccount\">[];\n enabled?: boolean;\n },\n): Promise<void> {\n if (parameters.enabled === false || parameters.operations.length === 0) return;\n const { chainId } = config.getChainConfig(parameters.chainId);\n\n const resolved = await Promise.all(\n parameters.operations.map(async (operation) => ({\n operation,\n account: await getCachedDelegatorAccount(config, chainId, operation.signerAccount.addr),\n })),\n );\n\n const checks = new Map<string, DelegationCheck>();\n for (const { operation, account } of resolved) {\n const key = `${operation.signer.toLowerCase()}:${account.toLowerCase()}`;\n const check = checks.get(key) ?? { signer: operation.signer, account, selectors: new Set<Hex>() };\n check.selectors.add(operation.callData.slice(0, 10).toLowerCase() as Hex);\n checks.set(key, check);\n }\n\n const results = await Promise.all(\n [...checks.values()].map(async (check) => ({\n ...check,\n missing: await findUndelegatedGaslessSelectors(config, {\n chainId,\n signer: check.signer,\n signerAccount: check.account,\n selectors: [...check.selectors],\n }),\n })),\n );\n const undelegated = results.filter((result) => result.missing.length > 0);\n if (undelegated.length === 0) return;\n\n const detail = undelegated\n .map(\n (result) =>\n `signer ${result.signer} holds no active InstantLayer delegation from sub-account ${result.account} for selector(s) ${result.missing.join(\", \")}`,\n )\n .join(\"; \");\n throw new SymmError(\n \"validation\",\n \"INSTANT_SIGNER_NOT_DELEGATED\",\n `${parameters.action}: ${detail}. Grant those selectors to the signer (getInstantTradeRequiredSelectors builds the trade set), sign with the sub-account's owner, or pass \\`preflightDelegation: false\\` to skip this check.`,\n );\n}\n"],"mappings":";;;AAsEA,eAAsB,EACpB,GACA,GAMe;CACf,IAAI,EAAW,YAAY,MAAS,EAAW,WAAW,WAAW,GAAG;CACxE,IAAM,EAAE,eAAY,EAAO,eAAe,EAAW,OAAO,GAEtD,IAAW,MAAM,QAAQ,IAC7B,EAAW,WAAW,IAAI,OAAO,OAAe;EAC9C;EACA,SAAS,MAAM,EAA0B,GAAQ,GAAS,EAAU,cAAc,IAAI;CACxF,EAAE,CACJ,GAEM,oBAAS,IAAI,IAA6B;CAChD,KAAK,IAAM,EAAE,cAAW,gBAAa,GAAU;EAC7C,IAAM,IAAM,GAAG,EAAU,OAAO,YAAY,EAAE,GAAG,EAAQ,YAAY,KAC/D,IAAQ,EAAO,IAAI,CAAG,KAAK;GAAE,QAAQ,EAAU;GAAQ;GAAS,2BAAW,IAAI,IAAS;EAAE;EAEhG,AADA,EAAM,UAAU,IAAI,EAAU,SAAS,MAAM,GAAG,EAAE,EAAE,YAAY,CAAQ,GACxE,EAAO,IAAI,GAAK,CAAK;CACvB;CAaA,IAAM,KAAc,MAXE,QAAQ,IAC5B,CAAC,GAAG,EAAO,OAAO,CAAC,EAAE,IAAI,OAAO,OAAW;EACzC,GAAG;EACH,SAAS,MAAM,EAAgC,GAAQ;GACrD;GACA,QAAQ,EAAM;GACd,eAAe,EAAM;GACrB,WAAW,CAAC,GAAG,EAAM,SAAS;EAChC,CAAC;CACH,EAAE,CACJ,GAC4B,QAAQ,MAAW,EAAO,QAAQ,SAAS,CAAC;CACxE,IAAI,EAAY,WAAW,GAAG;CAE9B,IAAM,IAAS,EACZ,KACE,MACC,UAAU,EAAO,OAAO,4DAA4D,EAAO,QAAQ,mBAAmB,EAAO,QAAQ,KAAK,IAAI,GAClJ,EACC,KAAK,IAAI;CACZ,MAAM,IAAI,EACR,cACA,gCACA,GAAG,EAAW,OAAO,IAAI,EAAO,6LAClC;AACF"}
@@ -5,7 +5,7 @@ import { SolverSymbol, SymbolStateFilter, SymbolValidityFilter } from './types.j
5
5
  * Parameters for {@link getSymbols}.
6
6
  */
7
7
  export type GetSymbolsParameters = Compute<ReadSolverParameter & {
8
- /** Max rows to return (solver max 500, default 100). */
8
+ /** Explicit page size (solver max 500, default 100). Omit both limit and offset to read all pages. */
9
9
  limit?: number;
10
10
  /** Row offset for pagination (default 0). */
11
11
  offset?: number;
@@ -30,7 +30,8 @@ export type GetSymbolsReturnType = SolverSymbol[];
30
30
  * Fetch the tradable symbol catalogue from the chain's solver `/symbols`
31
31
  * endpoint. Returns a normalized {@link SolverSymbol} per row — id, name,
32
32
  * precisions, leverage, fees, and per-side trading state — filtered and paged by
33
- * the given `parameters`. The solver base URL is resolved from `config` per call,
33
+ * the given `parameters`. With neither `limit` nor `offset`, reads every page
34
+ * in server order. Supplying either retains explicit single-page behavior. The solver base URL is resolved from `config` per call,
34
35
  * so multiple chains never clobber each other.
35
36
  *
36
37
  * `/symbols` is an **Enigma-only** endpoint; the action asserts the resolved
@@ -1 +1 @@
1
- {"version":3,"file":"get-symbols.d.ts","sourceRoot":"","sources":["../../../src/solvers/symbols/get-symbols.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,mBAAmB,GAAG;IACpB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,sCAAsC;IACtC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,uCAAuC;IACvC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CACF,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,oBAAoB,GAAG,YAAY,EAAE,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,GAAE,oBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAIrH"}
1
+ {"version":3,"file":"get-symbols.d.ts","sourceRoot":"","sources":["../../../src/solvers/symbols/get-symbols.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,mBAAmB,GAAG;IACpB,sGAAsG;IACtG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,sCAAsC;IACtC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,uCAAuC;IACvC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CACF,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,oBAAoB,GAAG,YAAY,EAAE,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,GAAE,oBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAcrH"}
@@ -9,11 +9,21 @@ async function o(e, t = {}) {
9
9
  chainId: t.chainId,
10
10
  solverId: t.solverId
11
11
  });
12
- return r(n, "enigma", "getSymbols"), s(n.url, t);
12
+ if (r(n, "enigma", "getSymbols"), t.limit !== void 0 || t.offset !== void 0) return (await s(n.url, t)).symbols;
13
+ let i = [];
14
+ for (let e = 0;; e += 500) {
15
+ let r = await s(n.url, {
16
+ ...t,
17
+ limit: 500,
18
+ offset: e
19
+ });
20
+ if (i.push(...r.symbols), r.rawCount < 500) break;
21
+ }
22
+ return i;
13
23
  }
14
24
  async function s(r, o) {
15
25
  try {
16
- return i((await n({
26
+ let e = (await n({
17
27
  limit: o.limit,
18
28
  offset: o.offset,
19
29
  symbol_id: o.symbolId,
@@ -23,7 +33,11 @@ async function s(r, o) {
23
33
  is_valid: o.isValid,
24
34
  state_long: o.stateLong,
25
35
  state_short: o.stateShort
26
- }, { baseURL: r })).data.symbols ?? []);
36
+ }, { baseURL: r })).data.symbols ?? [];
37
+ return {
38
+ symbols: i(e),
39
+ rawCount: e.length
40
+ };
27
41
  } catch (n) {
28
42
  throw n instanceof t ? n : a(n) ? e.fromAxios(n, {
29
43
  code: "FETCH_SYMBOLS_FAILED",
@@ -1 +1 @@
1
- {"version":3,"file":"get-symbols.js","names":[],"sources":["../../../src/solvers/symbols/get-symbols.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getSymbols as requestSymbols } from \"../types/generated/enigma-solver\";\nimport { toSolverSymbols } from \"./to-solver-symbol\";\nimport type { SolverSymbol, SymbolStateFilter, SymbolValidityFilter } from \"./types\";\n\n/**\n * Parameters for {@link getSymbols}.\n */\nexport type GetSymbolsParameters = Compute<\n ReadSolverParameter & {\n /** Max rows to return (solver max 500, default 100). */\n limit?: number;\n /** Row offset for pagination (default 0). */\n offset?: number;\n /** Restrict to a single symbol by its numeric id. */\n symbolId?: number;\n /** Case-insensitive substring match on the symbol name. */\n search?: string;\n /** Exact-match filter on the base asset. */\n asset?: string;\n /** Exact-match filter on the collateral token address. */\n tokenAddress?: string;\n /** Validity filter; the solver defaults to `\"true\"` (valid symbols only). */\n isValid?: SymbolValidityFilter;\n /** Long-side trading-state filter. */\n stateLong?: SymbolStateFilter;\n /** Short-side trading-state filter. */\n stateShort?: SymbolStateFilter;\n }\n>;\n\n/** Return type of {@link getSymbols}: one entry per symbol. */\nexport type GetSymbolsReturnType = SolverSymbol[];\n\n/**\n * Fetch the tradable symbol catalogue from the chain's solver `/symbols`\n * endpoint. Returns a normalized {@link SolverSymbol} per row — id, name,\n * precisions, leverage, fees, and per-side trading state — filtered and paged by\n * the given `parameters`. The solver base URL is resolved from `config` per call,\n * so multiple chains never clobber each other.\n *\n * `/symbols` is an **Enigma-only** endpoint; the action asserts the resolved\n * solver is an `enigma` solver and throws before hitting the wire otherwise.\n *\n * @param config - The SDK config.\n * @param parameters - Optional chain id, solver id, and `/symbols` filters.\n * @returns Normalized symbols, one {@link SolverSymbol} per row.\n * @throws {SymmApiError} when the API request fails.\n * @throws {SymmError} `UNSUPPORTED_BY_SOLVER` when the resolved solver is not an `enigma` solver, or when the chain is unsupported.\n *\n * @example\n * ```ts\n * const symbols = await getSymbols(config, { search: \"BTC\" });\n * const btc = symbols.find((s) => s.name === \"BTCUSDT\");\n * console.log(btc?.maxLeverage);\n * ```\n */\nexport async function getSymbols(config: Config, parameters: GetSymbolsParameters = {}): Promise<GetSymbolsReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getSymbols\");\n return fetchSymbols(solver.url, parameters);\n}\n\n/**\n * Call the solver's `/symbols` endpoint with a per-call base URL, mapping the\n * SDK's camelCase filters onto the generated snake_case query params, and\n * normalize the response rows into the SDK's stable array.\n *\n * @internal\n */\nasync function fetchSymbols(baseURL: string, parameters: GetSymbolsParameters): Promise<SolverSymbol[]> {\n try {\n const response = await requestSymbols(\n {\n limit: parameters.limit,\n offset: parameters.offset,\n symbol_id: parameters.symbolId,\n search: parameters.search,\n asset: parameters.asset,\n token_address: parameters.tokenAddress,\n is_valid: parameters.isValid,\n state_long: parameters.stateLong,\n state_short: parameters.stateShort,\n },\n { baseURL },\n );\n return toSolverSymbols(response.data.symbols ?? []);\n } catch (err) {\n if (err instanceof SymmError) throw err;\n\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_SYMBOLS_FAILED\", baseURL });\n }\n\n throw new SymmError(\n \"api\",\n \"FETCH_SYMBOLS_FAILED\",\n `Failed to fetch symbols: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;AA6DA,eAAsB,EAAW,GAAgB,IAAmC,CAAC,GAAkC;CACrH,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAE9F,OADA,EAAiB,GAAQ,UAAU,YAAY,GACxC,EAAa,EAAO,KAAK,CAAU;AAC5C;AASA,eAAe,EAAa,GAAiB,GAA2D;CACtG,IAAI;EAeF,OAAO,GAAgB,MAdA,EACrB;GACE,OAAO,EAAW;GAClB,QAAQ,EAAW;GACnB,WAAW,EAAW;GACtB,QAAQ,EAAW;GACnB,OAAO,EAAW;GAClB,eAAe,EAAW;GAC1B,UAAU,EAAW;GACrB,YAAY,EAAW;GACvB,aAAa,EAAW;EAC1B,GACA,EAAE,WAAQ,CACZ,GACgC,KAAK,WAAW,CAAC,CAAC;CACpD,SAAS,GAAK;EAOZ,MANI,aAAe,IAAiB,IAEhC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAAwB;EAAQ,CAAC,IAGvE,IAAI,EACR,OACA,wBACA,4BAA4B,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KAC3E,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
1
+ {"version":3,"file":"get-symbols.js","names":[],"sources":["../../../src/solvers/symbols/get-symbols.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getSymbols as requestSymbols } from \"../types/generated/enigma-solver\";\nimport { toSolverSymbols } from \"./to-solver-symbol\";\nimport type { SolverSymbol, SymbolStateFilter, SymbolValidityFilter } from \"./types\";\n\n/**\n * Parameters for {@link getSymbols}.\n */\nexport type GetSymbolsParameters = Compute<\n ReadSolverParameter & {\n /** Explicit page size (solver max 500, default 100). Omit both limit and offset to read all pages. */\n limit?: number;\n /** Row offset for pagination (default 0). */\n offset?: number;\n /** Restrict to a single symbol by its numeric id. */\n symbolId?: number;\n /** Case-insensitive substring match on the symbol name. */\n search?: string;\n /** Exact-match filter on the base asset. */\n asset?: string;\n /** Exact-match filter on the collateral token address. */\n tokenAddress?: string;\n /** Validity filter; the solver defaults to `\"true\"` (valid symbols only). */\n isValid?: SymbolValidityFilter;\n /** Long-side trading-state filter. */\n stateLong?: SymbolStateFilter;\n /** Short-side trading-state filter. */\n stateShort?: SymbolStateFilter;\n }\n>;\n\n/** Return type of {@link getSymbols}: one entry per symbol. */\nexport type GetSymbolsReturnType = SolverSymbol[];\n\n/**\n * Fetch the tradable symbol catalogue from the chain's solver `/symbols`\n * endpoint. Returns a normalized {@link SolverSymbol} per row — id, name,\n * precisions, leverage, fees, and per-side trading state — filtered and paged by\n * the given `parameters`. With neither `limit` nor `offset`, reads every page\n * in server order. Supplying either retains explicit single-page behavior. The solver base URL is resolved from `config` per call,\n * so multiple chains never clobber each other.\n *\n * `/symbols` is an **Enigma-only** endpoint; the action asserts the resolved\n * solver is an `enigma` solver and throws before hitting the wire otherwise.\n *\n * @param config - The SDK config.\n * @param parameters - Optional chain id, solver id, and `/symbols` filters.\n * @returns Normalized symbols, one {@link SolverSymbol} per row.\n * @throws {SymmApiError} when the API request fails.\n * @throws {SymmError} `UNSUPPORTED_BY_SOLVER` when the resolved solver is not an `enigma` solver, or when the chain is unsupported.\n *\n * @example\n * ```ts\n * const symbols = await getSymbols(config, { search: \"BTC\" });\n * const btc = symbols.find((s) => s.name === \"BTCUSDT\");\n * console.log(btc?.maxLeverage);\n * ```\n */\nexport async function getSymbols(config: Config, parameters: GetSymbolsParameters = {}): Promise<GetSymbolsReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getSymbols\");\n if (parameters.limit !== undefined || parameters.offset !== undefined) {\n return (await fetchSymbols(solver.url, parameters)).symbols;\n }\n const result: SolverSymbol[] = [];\n const pageSize = 500;\n for (let offset = 0; ; offset += pageSize) {\n const page = await fetchSymbols(solver.url, { ...parameters, limit: pageSize, offset });\n result.push(...page.symbols);\n if (page.rawCount < pageSize) break;\n }\n return result;\n}\n\n/**\n * Call the solver's `/symbols` endpoint with a per-call base URL, mapping the\n * SDK's camelCase filters onto the generated snake_case query params, and\n * normalize the response rows into the SDK's stable array.\n *\n * @internal\n */\nasync function fetchSymbols(\n baseURL: string,\n parameters: GetSymbolsParameters,\n): Promise<{ symbols: SolverSymbol[]; rawCount: number }> {\n try {\n const response = await requestSymbols(\n {\n limit: parameters.limit,\n offset: parameters.offset,\n symbol_id: parameters.symbolId,\n search: parameters.search,\n asset: parameters.asset,\n token_address: parameters.tokenAddress,\n is_valid: parameters.isValid,\n state_long: parameters.stateLong,\n state_short: parameters.stateShort,\n },\n { baseURL },\n );\n const rows = response.data.symbols ?? [];\n return { symbols: toSolverSymbols(rows), rawCount: rows.length };\n } catch (err) {\n if (err instanceof SymmError) throw err;\n\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_SYMBOLS_FAILED\", baseURL });\n }\n\n throw new SymmError(\n \"api\",\n \"FETCH_SYMBOLS_FAILED\",\n `Failed to fetch symbols: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;AA8DA,eAAsB,EAAW,GAAgB,IAAmC,CAAC,GAAkC;CACrH,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAE9F,IADA,EAAiB,GAAQ,UAAU,YAAY,GAC3C,EAAW,UAAU,KAAA,KAAa,EAAW,WAAW,KAAA,GAC1D,QAAQ,MAAM,EAAa,EAAO,KAAK,CAAU,GAAG;CAEtD,IAAM,IAAyB,CAAC;CAEhC,KAAK,IAAI,IAAS,IAAK,KAAU,KAAU;EACzC,IAAM,IAAO,MAAM,EAAa,EAAO,KAAK;GAAE,GAAG;GAAY,OAAO;GAAU;EAAO,CAAC;EAEtF,IADA,EAAO,KAAK,GAAG,EAAK,OAAO,GACvB,EAAK,WAAW,KAAU;CAChC;CACA,OAAO;AACT;AASA,eAAe,EACb,GACA,GACwD;CACxD,IAAI;EAeF,IAAM,KAAO,MAdU,EACrB;GACE,OAAO,EAAW;GAClB,QAAQ,EAAW;GACnB,WAAW,EAAW;GACtB,QAAQ,EAAW;GACnB,OAAO,EAAW;GAClB,eAAe,EAAW;GAC1B,UAAU,EAAW;GACrB,YAAY,EAAW;GACvB,aAAa,EAAW;EAC1B,GACA,EAAE,WAAQ,CACZ,GACsB,KAAK,WAAW,CAAC;EACvC,OAAO;GAAE,SAAS,EAAgB,CAAI;GAAG,UAAU,EAAK;EAAO;CACjE,SAAS,GAAK;EAOZ,MANI,aAAe,IAAiB,IAEhC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAAwB;EAAQ,CAAC,IAGvE,IAAI,EACR,OACA,wBACA,4BAA4B,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KAC3E,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
@@ -13,7 +13,8 @@ export type GetTradeVolumeReturnType = SolverDailyVolume[];
13
13
  /**
14
14
  * Fetch the last N daily trade-volume rows for one market from the chain's
15
15
  * enigma solver `/trade-volume/{symbol_id}` endpoint. Rows are returned in
16
- * ascending day order. The solver base URL is resolved from `config` per call,
16
+ * ascending day order. Malformed rows (invalid timestamp or absent/non-numeric
17
+ * volume) are omitted, while genuine zero-volume observations are retained. The solver base URL is resolved from `config` per call,
17
18
  * so multiple chains never clobber each other.
18
19
  *
19
20
  * `/trade-volume/{symbol_id}` is an **Enigma-only** endpoint; the action asserts
@@ -1 +1 @@
1
- {"version":3,"file":"get-trade-volume.d.ts","sourceRoot":"","sources":["../../../src/solvers/trade-volume/get-trade-volume.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,mBAAmB,GAAG;IACpB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;CAClB,CACF,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,EAAE,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,wBAAwB,GACnC,OAAO,CAAC,wBAAwB,CAAC,CAInC"}
1
+ {"version":3,"file":"get-trade-volume.d.ts","sourceRoot":"","sources":["../../../src/solvers/trade-volume/get-trade-volume.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,mBAAmB,GAAG;IACpB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;CAClB,CACF,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,EAAE,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,wBAAwB,GACnC,OAAO,CAAC,wBAAwB,CAAC,CAInC"}
@@ -13,7 +13,8 @@ async function o(e, t) {
13
13
  }
14
14
  async function s(r, o) {
15
15
  try {
16
- return ((await n(o, { baseURL: r })).data ?? []).map(i);
16
+ let e = await n(o, { baseURL: r });
17
+ return (Array.isArray(e.data) ? e.data : []).filter(c).map(i);
17
18
  } catch (n) {
18
19
  throw n instanceof t ? n : a(n) ? e.fromAxios(n, {
19
20
  code: "FETCH_TRADE_VOLUME_FAILED",
@@ -21,6 +22,10 @@ async function s(r, o) {
21
22
  }) : new t("api", "FETCH_TRADE_VOLUME_FAILED", `Failed to fetch trade volume: ${n instanceof Error ? n.message : String(n)}`, { cause: n instanceof Error ? n : void 0 });
22
23
  }
23
24
  }
25
+ function c(e) {
26
+ let t = e?.timestamp, n = e?.volume;
27
+ return typeof t == "string" && t.trim().length > 0 && Number.isFinite(Date.parse(t)) && typeof n == "string" && n.trim().length > 0 && Number.isFinite(Number(n));
28
+ }
24
29
  //#endregion
25
30
  export { o as getTradeVolume };
26
31
 
@@ -1 +1 @@
1
- {"version":3,"file":"get-trade-volume.js","names":[],"sources":["../../../src/solvers/trade-volume/get-trade-volume.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getTradeVolumeSymbolId } from \"../types/generated/enigma-solver\";\nimport { toSolverDailyVolume } from \"./to-daily-volume\";\nimport type { SolverDailyVolume } from \"./types\";\n\n/**\n * Parameters for {@link getTradeVolume}.\n */\nexport type GetTradeVolumeParameters = Compute<\n ReadSolverParameter & {\n /** Solver market id (`symbol_id`) to read daily trade volume for. Required. */\n symbolId: number;\n }\n>;\n\n/** Return type of {@link getTradeVolume}: one entry per day, ascending. */\nexport type GetTradeVolumeReturnType = SolverDailyVolume[];\n\n/**\n * Fetch the last N daily trade-volume rows for one market from the chain's\n * enigma solver `/trade-volume/{symbol_id}` endpoint. Rows are returned in\n * ascending day order. The solver base URL is resolved from `config` per call,\n * so multiple chains never clobber each other.\n *\n * `/trade-volume/{symbol_id}` is an **Enigma-only** endpoint; the action asserts\n * the resolved solver is an `enigma` solver and throws before hitting the wire\n * otherwise.\n *\n * @param config - The SDK config.\n * @param parameters - The required `symbolId` plus optional chain id / solver.\n * @returns Normalized daily volume, one {@link SolverDailyVolume} per day.\n * @throws {SymmApiError} when the API request fails.\n * @throws {SymmError} `UNSUPPORTED_BY_SOLVER` when the resolved solver is not an `enigma` solver, or when the chain is unsupported.\n *\n * @example\n * ```ts\n * const volume = await getTradeVolume(config, { symbolId: 1 });\n * const latest = volume.at(-1);\n * console.log(latest?.volume); // notional traded on the most recent day\n * ```\n */\nexport async function getTradeVolume(\n config: Config,\n parameters: GetTradeVolumeParameters,\n): Promise<GetTradeVolumeReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getTradeVolume\");\n return fetchTradeVolume(solver.url, parameters.symbolId);\n}\n\n/**\n * Call the solver's `/trade-volume/{symbol_id}` endpoint with a per-call base URL\n * and map each raw daily row into the SDK's normalized array.\n *\n * @internal\n */\nasync function fetchTradeVolume(baseURL: string, symbolId: number): Promise<SolverDailyVolume[]> {\n try {\n const response = await getTradeVolumeSymbolId(symbolId, { baseURL });\n return (response.data ?? []).map(toSolverDailyVolume);\n } catch (err) {\n if (err instanceof SymmError) throw err;\n\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_TRADE_VOLUME_FAILED\", baseURL });\n }\n\n throw new SymmError(\n \"api\",\n \"FETCH_TRADE_VOLUME_FAILED\",\n `Failed to fetch trade volume: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;AA6CA,eAAsB,EACpB,GACA,GACmC;CACnC,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAE9F,OADA,EAAiB,GAAQ,UAAU,gBAAgB,GAC5C,EAAiB,EAAO,KAAK,EAAW,QAAQ;AACzD;AAQA,eAAe,EAAiB,GAAiB,GAAgD;CAC/F,IAAI;EAEF,SAAQ,MADe,EAAuB,GAAU,EAAE,WAAQ,CAAC,GAClD,QAAQ,CAAC,GAAG,IAAI,CAAmB;CACtD,SAAS,GAAK;EAOZ,MANI,aAAe,IAAiB,IAEhC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAA6B;EAAQ,CAAC,IAG5E,IAAI,EACR,OACA,6BACA,iCAAiC,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KAChF,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
1
+ {"version":3,"file":"get-trade-volume.js","names":[],"sources":["../../../src/solvers/trade-volume/get-trade-volume.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getTradeVolumeSymbolId, type ApiDailyTradeVolumeResponse } from \"../types/generated/enigma-solver\";\nimport { toSolverDailyVolume } from \"./to-daily-volume\";\nimport type { SolverDailyVolume } from \"./types\";\n\n/**\n * Parameters for {@link getTradeVolume}.\n */\nexport type GetTradeVolumeParameters = Compute<\n ReadSolverParameter & {\n /** Solver market id (`symbol_id`) to read daily trade volume for. Required. */\n symbolId: number;\n }\n>;\n\n/** Return type of {@link getTradeVolume}: one entry per day, ascending. */\nexport type GetTradeVolumeReturnType = SolverDailyVolume[];\n\n/**\n * Fetch the last N daily trade-volume rows for one market from the chain's\n * enigma solver `/trade-volume/{symbol_id}` endpoint. Rows are returned in\n * ascending day order. Malformed rows (invalid timestamp or absent/non-numeric\n * volume) are omitted, while genuine zero-volume observations are retained. The solver base URL is resolved from `config` per call,\n * so multiple chains never clobber each other.\n *\n * `/trade-volume/{symbol_id}` is an **Enigma-only** endpoint; the action asserts\n * the resolved solver is an `enigma` solver and throws before hitting the wire\n * otherwise.\n *\n * @param config - The SDK config.\n * @param parameters - The required `symbolId` plus optional chain id / solver.\n * @returns Normalized daily volume, one {@link SolverDailyVolume} per day.\n * @throws {SymmApiError} when the API request fails.\n * @throws {SymmError} `UNSUPPORTED_BY_SOLVER` when the resolved solver is not an `enigma` solver, or when the chain is unsupported.\n *\n * @example\n * ```ts\n * const volume = await getTradeVolume(config, { symbolId: 1 });\n * const latest = volume.at(-1);\n * console.log(latest?.volume); // notional traded on the most recent day\n * ```\n */\nexport async function getTradeVolume(\n config: Config,\n parameters: GetTradeVolumeParameters,\n): Promise<GetTradeVolumeReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getTradeVolume\");\n return fetchTradeVolume(solver.url, parameters.symbolId);\n}\n\n/**\n * Call the solver's `/trade-volume/{symbol_id}` endpoint with a per-call base URL\n * and map each raw daily row into the SDK's normalized array.\n *\n * @internal\n */\nasync function fetchTradeVolume(baseURL: string, symbolId: number): Promise<SolverDailyVolume[]> {\n try {\n const response = await getTradeVolumeSymbolId(symbolId, { baseURL });\n const rows = Array.isArray(response.data) ? response.data : [];\n return rows.filter(isValidDailyVolume).map(toSolverDailyVolume);\n } catch (err) {\n if (err instanceof SymmError) throw err;\n\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_TRADE_VOLUME_FAILED\", baseURL });\n }\n\n throw new SymmError(\n \"api\",\n \"FETCH_TRADE_VOLUME_FAILED\",\n `Failed to fetch trade volume: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n\n/** Validate wire observations before the public mapper applies its legacy defaults. */\nfunction isValidDailyVolume(raw: ApiDailyTradeVolumeResponse | null | undefined): raw is SolverDailyVolume {\n const timestamp = raw?.timestamp;\n const volume = raw?.volume;\n return (\n typeof timestamp === \"string\" &&\n timestamp.trim().length > 0 &&\n Number.isFinite(Date.parse(timestamp)) &&\n typeof volume === \"string\" &&\n volume.trim().length > 0 &&\n Number.isFinite(Number(volume))\n );\n}\n"],"mappings":";;;;;;AA8CA,eAAsB,EACpB,GACA,GACmC;CACnC,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAE9F,OADA,EAAiB,GAAQ,UAAU,gBAAgB,GAC5C,EAAiB,EAAO,KAAK,EAAW,QAAQ;AACzD;AAQA,eAAe,EAAiB,GAAiB,GAAgD;CAC/F,IAAI;EACF,IAAM,IAAW,MAAM,EAAuB,GAAU,EAAE,WAAQ,CAAC;EAEnE,QADa,MAAM,QAAQ,EAAS,IAAI,IAAI,EAAS,OAAO,CAAC,GACjD,OAAO,CAAkB,EAAE,IAAI,CAAmB;CAChE,SAAS,GAAK;EAOZ,MANI,aAAe,IAAiB,IAEhC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAA6B;EAAQ,CAAC,IAG5E,IAAI,EACR,OACA,6BACA,iCAAiC,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KAChF,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF;AAGA,SAAS,EAAmB,GAA+E;CACzG,IAAM,IAAY,GAAK,WACjB,IAAS,GAAK;CACpB,OACE,OAAO,KAAc,YACrB,EAAU,KAAK,EAAE,SAAS,KAC1B,OAAO,SAAS,KAAK,MAAM,CAAS,CAAC,KACrC,OAAO,KAAW,YAClB,EAAO,KAAK,EAAE,SAAS,KACvB,OAAO,SAAS,OAAO,CAAM,CAAC;AAElC"}
@@ -1,12 +1,12 @@
1
1
  import { ApiDailyTradeVolumeResponse } from '../types/generated/enigma-solver.js';
2
2
  import { SolverDailyVolume } from './types.js';
3
3
  /**
4
- * Map one raw `/trade-volume/{symbol_id}` row into the SDK's
5
- * {@link SolverDailyVolume}. The timestamp is the solver's ISO 8601 datetime
6
- * string, passed through unchanged; a missing timestamp or volume defaults to
7
- * `""` / `"0"`.
8
- *
9
- * @param raw - One raw daily-volume row from the solver.
4
+ * Map one daily observation, preserving the existing missing-field defaults.
5
+ * This mapper does not validate rows; getTradeVolume filters malformed input first.
6
+ * @param raw - One raw daily-volume object from the solver.
7
+ * @returns A row with unchanged strings; missing timestamp/volume default to ""/"0".
8
+ * @throws Does not throw for inputs matching the declared type.
9
+ * @example toSolverDailyVolume({ timestamp: "2026-10-17T00:00:00Z", volume: "0" });
10
10
  */
11
11
  export declare function toSolverDailyVolume(raw: ApiDailyTradeVolumeResponse): SolverDailyVolume;
12
12
  //# sourceMappingURL=to-daily-volume.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-daily-volume.js","names":[],"sources":["../../../src/solvers/trade-volume/to-daily-volume.ts"],"sourcesContent":["import type { ApiDailyTradeVolumeResponse } from \"../types/generated/enigma-solver\";\nimport type { SolverDailyVolume } from \"./types\";\n\n/**\n * Map one raw `/trade-volume/{symbol_id}` row into the SDK's\n * {@link SolverDailyVolume}. The timestamp is the solver's ISO 8601 datetime\n * string, passed through unchanged; a missing timestamp or volume defaults to\n * `\"\"` / `\"0\"`.\n *\n * @param raw - One raw daily-volume row from the solver.\n */\nexport function toSolverDailyVolume(raw: ApiDailyTradeVolumeResponse): SolverDailyVolume {\n return {\n timestamp: raw.timestamp ?? \"\",\n volume: raw.volume ?? \"0\",\n };\n}\n"],"mappings":";AAWA,SAAgB,EAAoB,GAAqD;CACvF,OAAO;EACL,WAAW,EAAI,aAAa;EAC5B,QAAQ,EAAI,UAAU;CACxB;AACF"}
1
+ {"version":3,"file":"to-daily-volume.js","names":[],"sources":["../../../src/solvers/trade-volume/to-daily-volume.ts"],"sourcesContent":["import type { ApiDailyTradeVolumeResponse } from \"../types/generated/enigma-solver\";\nimport type { SolverDailyVolume } from \"./types\";\n\n/**\n * Map one daily observation, preserving the existing missing-field defaults.\n * This mapper does not validate rows; getTradeVolume filters malformed input first.\n * @param raw - One raw daily-volume object from the solver.\n * @returns A row with unchanged strings; missing timestamp/volume default to \"\"/\"0\".\n * @throws Does not throw for inputs matching the declared type.\n * @example toSolverDailyVolume({ timestamp: \"2026-10-17T00:00:00Z\", volume: \"0\" });\n */\nexport function toSolverDailyVolume(raw: ApiDailyTradeVolumeResponse): SolverDailyVolume {\n return {\n timestamp: raw.timestamp ?? \"\",\n volume: raw.volume ?? \"0\",\n };\n}\n"],"mappings":";AAWA,SAAgB,EAAoB,GAAqD;CACvF,OAAO;EACL,WAAW,EAAI,aAAa;EAC5B,QAAQ,EAAI,UAAU;CACxB;AACF"}
@@ -9,12 +9,13 @@
9
9
  export interface SolverDailyVolume {
10
10
  /**
11
11
  * The day bucket, as the ISO 8601 datetime string the solver reports (e.g.
12
- * `"2026-07-09T00:00:00Z"`, midnight UTC on the bucket's day). Empty string
13
- * when the solver omits it. Parse with `new Date(timestamp)` to render;
12
+ * `"2026-07-09T00:00:00Z"`, midnight UTC on the bucket's day). getTradeVolume
13
+ * omits rows with missing or invalid timestamps; direct toSolverDailyVolume
14
+ * calls retain the empty-string fallback. Parse with `new Date(timestamp)` to render;
14
15
  * ISO 8601 also sorts correctly as a plain string.
15
16
  */
16
17
  timestamp: string;
17
- /** Notional traded that day, as the decimal string the solver reports (`"0"` when absent). */
18
+ /** Decimal volume, unchanged. getTradeVolume omits missing values; direct mapper calls default them to "0". */
18
19
  volume: string;
19
20
  }
20
21
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/solvers/trade-volume/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/solvers/trade-volume/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,+GAA+G;IAC/G,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -6,7 +6,7 @@ var t = (t) => e.get("/contract-symbols", t), n = (t) => e.get("/error_codes", t
6
6
  ...t,
7
7
  ...n?.params
8
8
  }
9
- }), i = (t, n) => e.get("/get_funding_info", {
9
+ }), i = (t, n) => e.get("/funding-info", {
10
10
  ...n,
11
11
  params: {
12
12
  ...t,
@@ -18,7 +18,7 @@ var t = (t) => e.get("/contract-symbols", t), n = (t) => e.get("/error_codes", t
18
18
  ...n,
19
19
  ...r?.params
20
20
  }
21
- }), o = (t) => e.get("/get_market_info", t), s = (t) => e.get("/info", t), c = (t, n) => e.get(`/instant_close/${t}`, n), l = (t, n) => e.get(`/instant_open/${t}`, n), u = (t, n) => e.get(`/instant_quote_id/${t}`, n), d = (t, n) => e.post("/instant_trade/instant_close", t, n), f = (t, n) => e.post("/instant_trade/instant_open", t, n), p = (t, n) => e.get("/notional_cap", {
21
+ }), o = (t) => e.get("/info", t), s = (t, n) => e.get(`/instant_close/${t}`, n), c = (t, n) => e.get(`/instant_open/${t}`, n), l = (t, n) => e.get(`/instant_quote_id/${t}`, n), u = (t, n) => e.post("/instant_trade/instant_close", t, n), d = (t, n) => e.post("/instant_trade/instant_open", t, n), f = (t) => e.get("/market-info", t), p = (t, n) => e.get("/notional_cap", {
22
22
  ...n,
23
23
  params: {
24
24
  ...t,
@@ -44,6 +44,6 @@ var t = (t) => e.get("/contract-symbols", t), n = (t) => e.get("/error_codes", t
44
44
  }
45
45
  }), v = (t, n) => e.get(`/trade-volume/${t}`, n);
46
46
  //#endregion
47
- export { t as getContractSymbols, n as getErrorCodes, r as getEstimatedPrice, i as getGetFundingInfo, a as getGetLockedParamsSymbol, o as getGetMarketInfo, s as getInfo, c as getInstantCloseAccountAddress, l as getInstantOpenAccountAddress, u as getInstantQuoteIdTempQuoteId, p as getNotionalCap, m as getNotionalCapSymbolId, h as getRevenueRecords, g as getRevenueSymbolId, _ as getSymbols, v as getTradeVolumeSymbolId, d as postInstantTradeInstantClose, f as postInstantTradeInstantOpen };
47
+ export { t as getContractSymbols, n as getErrorCodes, r as getEstimatedPrice, i as getFundingInfo, a as getGetLockedParamsSymbol, o as getInfo, s as getInstantCloseAccountAddress, c as getInstantOpenAccountAddress, l as getInstantQuoteIdTempQuoteId, f as getMarketInfo, p as getNotionalCap, m as getNotionalCapSymbolId, h as getRevenueRecords, g as getRevenueSymbolId, _ as getSymbols, v as getTradeVolumeSymbolId, u as postInstantTradeInstantClose, d as postInstantTradeInstantOpen };
48
48
 
49
49
  //# sourceMappingURL=enigma-solver.js.map