@gearbox-protocol/sdk 14.12.0-next.80 → 14.12.0-next.82

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 (221) hide show
  1. package/dist/cjs/model/filters.js +0 -4
  2. package/dist/cjs/model/filters.schema.js +10 -1
  3. package/dist/cjs/model/index.js +11 -0
  4. package/dist/cjs/model/liquidations.js +1 -1
  5. package/dist/cjs/model/liquidations.schema.js +1 -1
  6. package/dist/cjs/model/opportunities.js +1 -1
  7. package/dist/cjs/model/opportunities.schema.js +6 -13
  8. package/dist/cjs/model/positions.js +1 -1
  9. package/dist/cjs/model/positions.schema.js +33 -1
  10. package/dist/cjs/model/response.js +1 -0
  11. package/dist/cjs/model/response.schema.js +64 -0
  12. package/dist/cjs/new-sdk/AbstractNamespace.js +46 -128
  13. package/dist/cjs/new-sdk/GearboxSDK.js +55 -42
  14. package/dist/cjs/new-sdk/errors/AllSourcesFailedError.js +20 -0
  15. package/dist/cjs/new-sdk/errors/MissingSourceError.js +25 -0
  16. package/dist/cjs/new-sdk/errors/NoSourceServedError.js +20 -0
  17. package/dist/cjs/new-sdk/errors/SourceChainMismatchError.js +34 -0
  18. package/dist/cjs/new-sdk/errors/SourceUnavailableError.js +25 -0
  19. package/dist/cjs/new-sdk/errors/assertSameChains.js +12 -0
  20. package/dist/cjs/new-sdk/errors/everyChainFailed.js +11 -0
  21. package/dist/cjs/new-sdk/errors/index.js +15 -0
  22. package/dist/cjs/new-sdk/index.js +23 -3
  23. package/dist/cjs/new-sdk/opportunities/OpportunitiesNamespace.js +37 -89
  24. package/dist/cjs/new-sdk/positions/PositionsNamespace.js +27 -94
  25. package/dist/cjs/new-sdk/types.js +0 -21
  26. package/dist/cjs/new-sdk/utils/filterResponse.js +21 -0
  27. package/dist/cjs/new-sdk/utils/index.js +6 -0
  28. package/dist/cjs/new-sdk/utils/mergeChains.js +81 -0
  29. package/dist/cjs/new-sdk/utils/types.js +1 -0
  30. package/dist/cjs/offchain/AbstractOffchainNamespace.js +42 -65
  31. package/dist/cjs/offchain/GearboxAPI.js +12 -8
  32. package/dist/cjs/offchain/errors/OffchainInvalidJsonError.js +19 -0
  33. package/dist/cjs/offchain/errors/OffchainNotConfiguredError.js +20 -0
  34. package/dist/cjs/offchain/errors/OffchainNotImplementedError.js +19 -0
  35. package/dist/cjs/offchain/errors/OffchainRequestFailedError.js +24 -0
  36. package/dist/cjs/offchain/errors/OffchainStatusError.js +20 -0
  37. package/dist/cjs/offchain/errors/OffchainTransportError.js +31 -0
  38. package/dist/cjs/offchain/errors/OffchainValidationError.js +26 -0
  39. package/dist/cjs/offchain/errors/backendMessage.js +28 -0
  40. package/dist/cjs/offchain/errors/errorCause.js +12 -0
  41. package/dist/cjs/offchain/errors/index.js +21 -0
  42. package/dist/cjs/offchain/errors/readResponseBody.js +15 -0
  43. package/dist/cjs/offchain/index.js +22 -5
  44. package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +6 -3
  45. package/dist/cjs/offchain/positions/OffchainPositions.js +15 -21
  46. package/dist/cjs/offchain/types.js +0 -75
  47. package/dist/cjs/sdk/MultichainSDK.js +1 -1
  48. package/dist/cjs/sdk/OnchainSDK.js +1 -1
  49. package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +6 -6
  50. package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +26 -20
  51. package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +38 -14
  52. package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +7 -5
  53. package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +3 -2
  54. package/dist/cjs/sdk/base/MultichainConstruct.js +73 -34
  55. package/dist/cjs/sdk/chain/chains.js +11 -0
  56. package/dist/cjs/sdk/chain/index.js +1 -0
  57. package/dist/cjs/sdk/core/index.js +1 -1
  58. package/dist/cjs/sdk/index.js +2 -1
  59. package/dist/cjs/sdk/market/rwa/RWARegistry.js +4 -2
  60. package/dist/cjs/sdk/opportunities/MultichainOpportunitiesService.js +18 -32
  61. package/dist/cjs/sdk/opportunities/OpportunitiesService.js +1 -4
  62. package/dist/cjs/sdk/pools/PoolService.js +2 -1
  63. package/dist/cjs/sdk/positions/MultichainPositionsService.js +6 -29
  64. package/dist/cjs/sdk/positions/PositionsService.js +12 -6
  65. package/dist/esm/dev/AccountOpener.js +1 -1
  66. package/dist/esm/dev/withdrawalUtils.js +1 -1
  67. package/dist/esm/model/filters.js +0 -4
  68. package/dist/esm/model/filters.schema.js +10 -2
  69. package/dist/esm/model/index.js +5 -3
  70. package/dist/esm/model/liquidations.js +1 -1
  71. package/dist/esm/model/liquidations.schema.js +1 -1
  72. package/dist/esm/model/opportunities.js +1 -1
  73. package/dist/esm/model/opportunities.schema.js +4 -11
  74. package/dist/esm/model/positions.js +1 -1
  75. package/dist/esm/model/positions.schema.js +33 -3
  76. package/dist/esm/model/response.js +1 -0
  77. package/dist/esm/model/response.schema.js +58 -0
  78. package/dist/esm/new-sdk/AbstractNamespace.js +46 -128
  79. package/dist/esm/new-sdk/GearboxSDK.js +55 -42
  80. package/dist/esm/new-sdk/errors/AllSourcesFailedError.js +19 -0
  81. package/dist/esm/new-sdk/errors/MissingSourceError.js +24 -0
  82. package/dist/esm/new-sdk/errors/NoSourceServedError.js +19 -0
  83. package/dist/esm/new-sdk/errors/SourceChainMismatchError.js +33 -0
  84. package/dist/esm/new-sdk/errors/SourceUnavailableError.js +24 -0
  85. package/dist/esm/new-sdk/errors/assertSameChains.js +11 -0
  86. package/dist/esm/new-sdk/errors/everyChainFailed.js +10 -0
  87. package/dist/esm/new-sdk/errors/index.js +8 -0
  88. package/dist/esm/new-sdk/index.js +13 -3
  89. package/dist/esm/new-sdk/opportunities/OpportunitiesNamespace.js +38 -90
  90. package/dist/esm/new-sdk/positions/PositionsNamespace.js +28 -95
  91. package/dist/esm/new-sdk/types.js +1 -21
  92. package/dist/esm/new-sdk/utils/filterResponse.js +20 -0
  93. package/dist/esm/new-sdk/utils/index.js +3 -1
  94. package/dist/esm/new-sdk/utils/mergeChains.js +78 -0
  95. package/dist/esm/new-sdk/utils/types.js +1 -0
  96. package/dist/esm/offchain/AbstractOffchainNamespace.js +41 -64
  97. package/dist/esm/offchain/GearboxAPI.js +12 -8
  98. package/dist/esm/offchain/errors/OffchainInvalidJsonError.js +18 -0
  99. package/dist/esm/offchain/errors/OffchainNotConfiguredError.js +19 -0
  100. package/dist/esm/offchain/errors/OffchainNotImplementedError.js +18 -0
  101. package/dist/esm/offchain/errors/OffchainRequestFailedError.js +23 -0
  102. package/dist/esm/offchain/errors/OffchainStatusError.js +19 -0
  103. package/dist/esm/offchain/errors/OffchainTransportError.js +30 -0
  104. package/dist/esm/offchain/errors/OffchainValidationError.js +25 -0
  105. package/dist/esm/offchain/errors/backendMessage.js +27 -0
  106. package/dist/esm/offchain/errors/errorCause.js +11 -0
  107. package/dist/esm/offchain/errors/index.js +11 -0
  108. package/dist/esm/offchain/errors/readResponseBody.js +14 -0
  109. package/dist/esm/offchain/index.js +13 -2
  110. package/dist/esm/offchain/opportunities/OffchainOpportunities.js +6 -3
  111. package/dist/esm/offchain/positions/OffchainPositions.js +15 -21
  112. package/dist/esm/offchain/types.js +1 -72
  113. package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
  114. package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
  115. package/dist/esm/preview/trace/extractTransfers.js +1 -1
  116. package/dist/esm/sdk/MultichainSDK.js +1 -1
  117. package/dist/esm/sdk/OnchainSDK.js +1 -1
  118. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +2 -2
  119. package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +6 -6
  120. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +27 -21
  121. package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +38 -14
  122. package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +7 -5
  123. package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  124. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  125. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  126. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +4 -3
  127. package/dist/esm/sdk/base/MultichainConstruct.js +73 -34
  128. package/dist/esm/sdk/base/TokensMeta.js +2 -2
  129. package/dist/esm/sdk/chain/chains.js +11 -1
  130. package/dist/esm/sdk/chain/detectNetwork.js +1 -1
  131. package/dist/esm/sdk/chain/index.js +2 -2
  132. package/dist/esm/sdk/core/createAddressProvider.js +1 -1
  133. package/dist/esm/sdk/core/index.js +1 -1
  134. package/dist/esm/sdk/index.js +3 -3
  135. package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
  136. package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
  137. package/dist/esm/sdk/market/rwa/RWARegistry.js +4 -2
  138. package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
  139. package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
  140. package/dist/esm/sdk/opportunities/MultichainOpportunitiesService.js +18 -32
  141. package/dist/esm/sdk/opportunities/OpportunitiesService.js +1 -4
  142. package/dist/esm/sdk/pools/PoolService.js +3 -2
  143. package/dist/esm/sdk/positions/MultichainPositionsService.js +6 -29
  144. package/dist/esm/sdk/positions/PositionsService.js +12 -6
  145. package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
  146. package/dist/types/model/filters.d.ts +9 -3
  147. package/dist/types/model/filters.schema.d.ts +7 -1
  148. package/dist/types/model/index.d.ts +7 -5
  149. package/dist/types/model/liquidations.d.ts +2 -6
  150. package/dist/types/model/liquidations.schema.d.ts +1 -1
  151. package/dist/types/model/opportunities.d.ts +3 -7
  152. package/dist/types/model/opportunities.schema.d.ts +2 -2
  153. package/dist/types/model/positions.d.ts +2 -6
  154. package/dist/types/model/positions.schema.d.ts +32 -2
  155. package/dist/types/model/response.d.ts +105 -0
  156. package/dist/types/model/response.schema.d.ts +98 -0
  157. package/dist/types/new-sdk/AbstractNamespace.d.ts +33 -98
  158. package/dist/types/new-sdk/GearboxSDK.d.ts +10 -25
  159. package/dist/types/new-sdk/errors/AllSourcesFailedError.d.ts +11 -0
  160. package/dist/types/new-sdk/errors/MissingSourceError.d.ts +23 -0
  161. package/dist/types/new-sdk/errors/NoSourceServedError.d.ts +17 -0
  162. package/dist/types/new-sdk/errors/SourceChainMismatchError.d.ts +35 -0
  163. package/dist/types/new-sdk/errors/SourceUnavailableError.d.ts +22 -0
  164. package/dist/types/new-sdk/errors/assertSameChains.d.ts +11 -0
  165. package/dist/types/new-sdk/errors/everyChainFailed.d.ts +10 -0
  166. package/dist/types/new-sdk/errors/index.d.ts +8 -0
  167. package/dist/types/new-sdk/index.d.ts +17 -6
  168. package/dist/types/new-sdk/opportunities/OpportunitiesNamespace.d.ts +19 -40
  169. package/dist/types/new-sdk/opportunities/index.d.ts +2 -2
  170. package/dist/types/new-sdk/opportunities/types.d.ts +80 -26
  171. package/dist/types/new-sdk/positions/PositionsNamespace.d.ts +17 -38
  172. package/dist/types/new-sdk/positions/index.d.ts +2 -2
  173. package/dist/types/new-sdk/positions/types.d.ts +74 -24
  174. package/dist/types/new-sdk/types.d.ts +24 -77
  175. package/dist/types/new-sdk/utils/filterResponse.d.ts +16 -0
  176. package/dist/types/new-sdk/utils/history.d.ts +6 -36
  177. package/dist/types/new-sdk/utils/index.d.ts +5 -2
  178. package/dist/types/new-sdk/utils/mergeChains.d.ts +20 -0
  179. package/dist/types/new-sdk/utils/types.d.ts +11 -0
  180. package/dist/types/offchain/AbstractOffchainNamespace.d.ts +21 -28
  181. package/dist/types/offchain/GearboxAPI.d.ts +13 -9
  182. package/dist/types/offchain/errors/OffchainInvalidJsonError.d.ts +16 -0
  183. package/dist/types/offchain/errors/OffchainNotConfiguredError.d.ts +16 -0
  184. package/dist/types/offchain/errors/OffchainNotImplementedError.d.ts +15 -0
  185. package/dist/types/offchain/errors/OffchainRequestFailedError.d.ts +12 -0
  186. package/dist/types/offchain/errors/OffchainStatusError.d.ts +16 -0
  187. package/dist/types/offchain/errors/OffchainTransportError.d.ts +43 -0
  188. package/dist/types/offchain/errors/OffchainValidationError.d.ts +21 -0
  189. package/dist/types/offchain/errors/backendMessage.d.ts +9 -0
  190. package/dist/types/offchain/errors/errorCause.d.ts +22 -0
  191. package/dist/types/offchain/errors/index.d.ts +11 -0
  192. package/dist/types/offchain/errors/readResponseBody.d.ts +8 -0
  193. package/dist/types/offchain/index.d.ts +13 -2
  194. package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +9 -8
  195. package/dist/types/offchain/positions/OffchainPositions.d.ts +9 -15
  196. package/dist/types/offchain/types.d.ts +7 -88
  197. package/dist/types/sdk/accounts/credit-account-compressor/types.d.ts +4 -0
  198. package/dist/types/sdk/accounts/index.d.ts +3 -3
  199. package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +2 -2
  200. package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +15 -14
  201. package/dist/types/sdk/accounts/liquidations/index.d.ts +2 -2
  202. package/dist/types/sdk/accounts/liquidations/types.d.ts +32 -16
  203. package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +4 -4
  204. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +2 -2
  205. package/dist/types/sdk/accounts/withdrawal-compressor/index.d.ts +2 -2
  206. package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +26 -4
  207. package/dist/types/sdk/base/MultichainConstruct.d.ts +63 -14
  208. package/dist/types/sdk/base/index.d.ts +2 -2
  209. package/dist/types/sdk/chain/chains.d.ts +10 -2
  210. package/dist/types/sdk/chain/index.d.ts +2 -2
  211. package/dist/types/sdk/index.d.ts +7 -7
  212. package/dist/types/sdk/market/MarketSuite.d.ts +1 -1
  213. package/dist/types/sdk/market/rwa/RWARegistry.d.ts +2 -1
  214. package/dist/types/sdk/opportunities/MultichainOpportunitiesService.d.ts +13 -16
  215. package/dist/types/sdk/pools/types.d.ts +4 -0
  216. package/dist/types/sdk/positions/MultichainPositionsService.d.ts +2 -12
  217. package/dist/types/sdk/positions/index.d.ts +2 -2
  218. package/dist/types/sdk/positions/types.d.ts +14 -5
  219. package/dist/types/sdk/types/index.d.ts +2 -2
  220. package/dist/types/sdk/types/multichain.d.ts +16 -36
  221. package/package.json +1 -1
@@ -1,6 +1,9 @@
1
1
  import { ILogger } from "../sdk/types/logger.js";
2
+ import { ChainId } from "../model/primitives.js";
3
+ import { ChainScopedFilter } from "../model/filters.js";
2
4
  import { HistoryMetric, HistoryRange, HistorySeries } from "../model/history.js";
3
- import { GearboxAPIOptions, OffchainResult } from "./types.js";
5
+ import { DataResponse } from "../model/response.js";
6
+ import { GearboxAPIOptions } from "./types.js";
4
7
  import { z } from "zod/v4";
5
8
  //#region src/offchain/AbstractOffchainNamespace.d.ts
6
9
  /**
@@ -23,8 +26,7 @@ interface OffchainGetRequest<S extends z.ZodType> {
23
26
  **/
24
27
  query?: OffchainQuery;
25
28
  /**
26
- * Schema the payload is decoded with. Decoding is what turns the response
27
- * into read model values, so it is required rather than optional.
29
+ * Schema the payload is decoded with.
28
30
  **/
29
31
  schema: S;
30
32
  }
@@ -39,49 +41,40 @@ interface OffchainHistoryRequest<M extends HistoryMetric> {
39
41
  **/
40
42
  path: string;
41
43
  /**
42
- * Metric the response must carry, see
43
- * {@link AbstractOffchainNamespace.readHistory}.
44
+ * Metric the response must carry.
44
45
  **/
45
46
  metric: M;
46
- /**
47
- * Window to cover.
48
- **/
49
47
  range: HistoryRange;
50
48
  }
51
49
  /**
52
- * Common logic of every {@link GearboxAPI} namespace.
53
- *
54
- * A namespace is a set of routes: it knows which path answers which read and
55
- * which schema describes the payload. Everything under that — where the
56
- * backend is, how long a request may take, how a failure is reported and how a
57
- * response becomes read model values — lives here, so a namespace holds
50
+ * Base class of every {@link GearboxAPI} namespace: issues the requests,
51
+ * decodes the responses and reports the failures, so that a namespace holds
58
52
  * nothing but its routes.
59
53
  **/
60
54
  declare abstract class AbstractOffchainNamespace {
61
55
  #private;
62
56
  protected readonly logger?: ILogger;
63
- protected constructor(name: string, options?: GearboxAPIOptions);
57
+ protected constructor(name: string, options: GearboxAPIOptions);
64
58
  /**
65
59
  * Base URL every read of this namespace is issued against.
66
60
  **/
67
61
  get baseUrl(): string | undefined;
68
62
  /**
69
- * Reads one endpoint and decodes its payload.
70
- *
71
- * The envelope is built here rather than by the caller: the status is
72
- * `"success"` whenever this returns at all, because anything else has
73
- * already thrown.
63
+ * Chains one read covers: the configured ones, narrowed by the filter when it
64
+ * names any. A filter naming a chain this client does not cover narrows
65
+ * nothing.
66
+ **/
67
+ protected scopedChainIds(filter?: ChainScopedFilter): ChainId[];
68
+ /**
69
+ * Reads one endpoint and decodes its payload. Timeouts, non-2xx answers and
70
+ * schema skew throw, since none of them is a {@link DataResponse}.
74
71
  **/
75
- protected get<S extends z.ZodType>(request: OffchainGetRequest<S>): Promise<OffchainResult<z.output<S>>>;
72
+ protected get<S extends z.ZodType>(request: OffchainGetRequest<S>): Promise<DataResponse<z.output<S>>>;
76
73
  /**
77
- * Reads one historical series.
78
- *
79
- * The requested metric is pinned in the schema, which is what upholds the
80
- * `HistorySeries<M>` a caller gets back: a response carrying a different
81
- * metric is version skew and fails validation like any other mismatch,
82
- * rather than being cast into the requested shape.
74
+ * Reads one historical series. A response carrying a metric other than the
75
+ * requested one fails validation.
83
76
  **/
84
- protected readHistory<M extends HistoryMetric>(request: OffchainHistoryRequest<M>): Promise<OffchainResult<HistorySeries<M>>>;
77
+ protected readHistory<M extends HistoryMetric>(request: OffchainHistoryRequest<M>): Promise<DataResponse<HistorySeries<M>>>;
85
78
  }
86
79
  //#endregion
87
80
  export { AbstractOffchainNamespace, OffchainGetRequest, OffchainHistoryRequest, OffchainQuery };
@@ -1,3 +1,4 @@
1
+ import { ChainId } from "../model/primitives.js";
1
2
  import { GearboxAPIOptions } from "./types.js";
2
3
  import { OffchainOpportunities } from "./opportunities/OffchainOpportunities.js";
3
4
  import "./opportunities/index.js";
@@ -11,18 +12,21 @@ import "./positions/index.js";
11
12
  * call reads the same way against either source:
12
13
  *
13
14
  * ```ts
14
- * const api = new GearboxAPI({ baseUrl: "https://api.gearbox.fi" });
15
- * const { result } = await api.opportunities.list({ kind: "strategy" });
15
+ * const api = new GearboxAPI({
16
+ * baseUrl: "https://api.gearbox.fi",
17
+ * chainIds: [1, 42161],
18
+ * });
19
+ * const { data } = await api.opportunities.list({ kind: "strategy" });
16
20
  * ```
17
21
  *
18
- * The backend imports the read model from this package and its endpoints
19
- * return those types directly, so there is no wire DTO layer here — only
20
- * transport and schema validation.
21
- *
22
- * The transport is not implemented yet; see {@link OffchainOpportunities} and
23
- * {@link OffchainPositions} for what each stubbed endpoint currently answers.
22
+ * Every read is scoped to {@link GearboxAPIOptions.chainIds}, so a client only
23
+ * ever sees the chains it was built for even though the backend knows more.
24
24
  **/
25
25
  declare class GearboxAPI {
26
+ /**
27
+ * Chains every read of this client is scoped to.
28
+ **/
29
+ readonly chainIds: readonly ChainId[];
26
30
  /**
27
31
  * Namespace for pool and strategy opportunities.
28
32
  **/
@@ -31,7 +35,7 @@ declare class GearboxAPI {
31
35
  * Namespace for the positions a wallet holds.
32
36
  **/
33
37
  readonly positions: OffchainPositions;
34
- constructor(options?: GearboxAPIOptions);
38
+ constructor(options: GearboxAPIOptions);
35
39
  }
36
40
  //#endregion
37
41
  export { GearboxAPI };
@@ -0,0 +1,16 @@
1
+ import { OffchainTransportError } from "./OffchainTransportError.js";
2
+ //#region src/offchain/errors/OffchainInvalidJsonError.d.ts
3
+ /**
4
+ * Thrown when the backend answered in the 2xx range with a body that is not
5
+ * JSON, so there is nothing to validate against the read model.
6
+ **/
7
+ declare class OffchainInvalidJsonError extends OffchainTransportError {
8
+ name: string;
9
+ /**
10
+ * Status the backend answered with.
11
+ **/
12
+ readonly status: number;
13
+ constructor(url: string, status: number, cause: unknown);
14
+ }
15
+ //#endregion
16
+ export { OffchainInvalidJsonError };
@@ -0,0 +1,16 @@
1
+ import { BaseError } from "viem";
2
+ //#region src/offchain/errors/OffchainNotConfiguredError.d.ts
3
+ /**
4
+ * Thrown when a read is issued against a client that was never told where the
5
+ * backend is.
6
+ **/
7
+ declare class OffchainNotConfiguredError extends BaseError {
8
+ name: string;
9
+ /**
10
+ * Path that was read, below the base URL that is missing.
11
+ **/
12
+ readonly path: string;
13
+ constructor(path: string);
14
+ }
15
+ //#endregion
16
+ export { OffchainNotConfiguredError };
@@ -0,0 +1,15 @@
1
+ import { BaseError } from "viem";
2
+ //#region src/offchain/errors/OffchainNotImplementedError.d.ts
3
+ /**
4
+ * Thrown by the endpoints that are not implemented yet.
5
+ **/
6
+ declare class OffchainNotImplementedError extends BaseError {
7
+ name: string;
8
+ /**
9
+ * Endpoint that was asked for.
10
+ **/
11
+ readonly endpoint: string;
12
+ constructor(endpoint: string);
13
+ }
14
+ //#endregion
15
+ export { OffchainNotImplementedError };
@@ -0,0 +1,12 @@
1
+ import { OffchainTransportError } from "./OffchainTransportError.js";
2
+ //#region src/offchain/errors/OffchainRequestFailedError.d.ts
3
+ /**
4
+ * Thrown when a request to the backend never completed: the network was down,
5
+ * or it took longer than {@link GearboxAPIOptions.timeout}.
6
+ **/
7
+ declare class OffchainRequestFailedError extends OffchainTransportError {
8
+ name: string;
9
+ constructor(url: string, cause: unknown);
10
+ }
11
+ //#endregion
12
+ export { OffchainRequestFailedError };
@@ -0,0 +1,16 @@
1
+ import { OffchainTransportError } from "./OffchainTransportError.js";
2
+ //#region src/offchain/errors/OffchainStatusError.d.ts
3
+ /**
4
+ * Thrown when the backend answered with a status outside the 2xx range. What it
5
+ * said about it, when it said anything, is the `details` of the error.
6
+ **/
7
+ declare class OffchainStatusError extends OffchainTransportError {
8
+ name: string;
9
+ /**
10
+ * Status the backend answered with.
11
+ **/
12
+ readonly status: number;
13
+ constructor(url: string, status: number, body?: string);
14
+ }
15
+ //#endregion
16
+ export { OffchainStatusError };
@@ -0,0 +1,43 @@
1
+ import { BaseError } from "viem";
2
+ //#region src/offchain/errors/OffchainTransportError.d.ts
3
+ /**
4
+ * What every transport failure of a backend read names, see
5
+ * {@link OffchainTransportError}.
6
+ **/
7
+ interface OffchainTransportErrorParams {
8
+ /**
9
+ * URL that was requested, query included.
10
+ **/
11
+ url: string;
12
+ /**
13
+ * Status the backend answered with, absent when the request never completed.
14
+ **/
15
+ status?: number;
16
+ /**
17
+ * Value that was caught, normalised by {@link errorCause}.
18
+ **/
19
+ cause?: unknown;
20
+ /**
21
+ * What the backend itself said. Used only when there is no {@link cause},
22
+ * whose message viem reports instead.
23
+ **/
24
+ details?: string;
25
+ }
26
+ /**
27
+ * Thrown when the backend could not be reached, or answered with something
28
+ * other than a JSON body in the 2xx range. Its subclasses say which of the
29
+ * three it was; catch this one to catch all of them.
30
+ **/
31
+ declare abstract class OffchainTransportError extends BaseError {
32
+ /**
33
+ * URL that was requested, query included.
34
+ **/
35
+ readonly url: string;
36
+ /**
37
+ * Status the backend answered with, absent when the request never completed.
38
+ **/
39
+ readonly status?: number;
40
+ protected constructor(shortMessage: string, params: OffchainTransportErrorParams);
41
+ }
42
+ //#endregion
43
+ export { OffchainTransportError, OffchainTransportErrorParams };
@@ -0,0 +1,21 @@
1
+ import { BaseError } from "viem";
2
+ import { z } from "zod/v4";
3
+ //#region src/offchain/errors/OffchainValidationError.d.ts
4
+ /**
5
+ * Thrown when the backend answered, but with a payload the read model does not
6
+ * describe, i.e. the two are of different versions.
7
+ **/
8
+ declare class OffchainValidationError extends BaseError {
9
+ name: string;
10
+ /**
11
+ * URL whose payload failed to validate.
12
+ **/
13
+ readonly url: string;
14
+ /**
15
+ * The zod failure itself, e.g. for `z.treeifyError(error.zodError)`.
16
+ **/
17
+ readonly zodError: z.core.$ZodError;
18
+ constructor(url: string, zodError: z.core.$ZodError);
19
+ }
20
+ //#endregion
21
+ export { OffchainValidationError };
@@ -0,0 +1,9 @@
1
+ //#region src/offchain/errors/backendMessage.d.ts
2
+ /**
3
+ * Why a non-2xx response failed, in the backend's own words: the `message` of a
4
+ * Gearbox backend error body, the whole body when it is not one, and nothing
5
+ * when it said nothing at all.
6
+ **/
7
+ declare function backendMessage(body: string | undefined): string | undefined;
8
+ //#endregion
9
+ export { backendMessage };
@@ -0,0 +1,22 @@
1
+ //#region src/offchain/errors/errorCause.d.ts
2
+ /**
3
+ * The `cause` / `details` pair viem's `BaseError` accepts, see
4
+ * {@link errorCause}.
5
+ **/
6
+ interface ErrorCause {
7
+ /**
8
+ * The caught value when it was an `Error`, so `walk()` reaches it.
9
+ **/
10
+ cause?: Error;
11
+ /**
12
+ * The caught value stringified, when it was not an `Error`.
13
+ **/
14
+ details?: string;
15
+ }
16
+ /**
17
+ * Turns a caught `unknown` into what viem's `BaseError` takes: it types `cause`
18
+ * as an `Error`, so anything else can only be reported as `details`.
19
+ **/
20
+ declare function errorCause(error: unknown): ErrorCause;
21
+ //#endregion
22
+ export { ErrorCause, errorCause };
@@ -0,0 +1,11 @@
1
+ import { backendMessage } from "./backendMessage.js";
2
+ import { ErrorCause, errorCause } from "./errorCause.js";
3
+ import { OffchainTransportError, OffchainTransportErrorParams } from "./OffchainTransportError.js";
4
+ import { OffchainInvalidJsonError } from "./OffchainInvalidJsonError.js";
5
+ import { OffchainNotConfiguredError } from "./OffchainNotConfiguredError.js";
6
+ import { OffchainNotImplementedError } from "./OffchainNotImplementedError.js";
7
+ import { OffchainRequestFailedError } from "./OffchainRequestFailedError.js";
8
+ import { OffchainStatusError } from "./OffchainStatusError.js";
9
+ import { OffchainValidationError } from "./OffchainValidationError.js";
10
+ import { readResponseBody } from "./readResponseBody.js";
11
+ export { ErrorCause, OffchainInvalidJsonError, OffchainNotConfiguredError, OffchainNotImplementedError, OffchainRequestFailedError, OffchainStatusError, OffchainTransportError, OffchainTransportErrorParams, OffchainValidationError, backendMessage, errorCause, readResponseBody };
@@ -0,0 +1,8 @@
1
+ //#region src/offchain/errors/readResponseBody.d.ts
2
+ /**
3
+ * Body of a failed response as text, or nothing when it cannot be read: a
4
+ * failure explaining a failure is not itself worth throwing.
5
+ **/
6
+ declare function readResponseBody(response: Response): Promise<string | undefined>;
7
+ //#endregion
8
+ export { readResponseBody };
@@ -1,8 +1,19 @@
1
- import { GearboxAPIOptions, OffchainNotConfiguredError, OffchainNotImplementedError, OffchainResult, OffchainSourceMeta, OffchainTransportError, OffchainValidationError } from "./types.js";
1
+ import { GearboxAPIOptions } from "./types.js";
2
2
  import { AbstractOffchainNamespace, OffchainGetRequest, OffchainHistoryRequest, OffchainQuery } from "./AbstractOffchainNamespace.js";
3
+ import { backendMessage } from "./errors/backendMessage.js";
4
+ import { ErrorCause, errorCause } from "./errors/errorCause.js";
5
+ import { OffchainTransportError, OffchainTransportErrorParams } from "./errors/OffchainTransportError.js";
6
+ import { OffchainInvalidJsonError } from "./errors/OffchainInvalidJsonError.js";
7
+ import { OffchainNotConfiguredError } from "./errors/OffchainNotConfiguredError.js";
8
+ import { OffchainNotImplementedError } from "./errors/OffchainNotImplementedError.js";
9
+ import { OffchainRequestFailedError } from "./errors/OffchainRequestFailedError.js";
10
+ import { OffchainStatusError } from "./errors/OffchainStatusError.js";
11
+ import { OffchainValidationError } from "./errors/OffchainValidationError.js";
12
+ import { readResponseBody } from "./errors/readResponseBody.js";
13
+ import "./errors/index.js";
3
14
  import { OffchainOpportunities } from "./opportunities/OffchainOpportunities.js";
4
15
  import "./opportunities/index.js";
5
16
  import { OffchainPositions } from "./positions/OffchainPositions.js";
6
17
  import "./positions/index.js";
7
18
  import { GearboxAPI } from "./GearboxAPI.js";
8
- export { AbstractOffchainNamespace, GearboxAPI, GearboxAPIOptions, OffchainGetRequest, OffchainHistoryRequest, OffchainNotConfiguredError, OffchainNotImplementedError, OffchainOpportunities, OffchainPositions, OffchainQuery, OffchainResult, OffchainSourceMeta, OffchainTransportError, OffchainValidationError };
19
+ export { AbstractOffchainNamespace, ErrorCause, GearboxAPI, GearboxAPIOptions, OffchainGetRequest, OffchainHistoryRequest, OffchainInvalidJsonError, OffchainNotConfiguredError, OffchainNotImplementedError, OffchainOpportunities, OffchainPositions, OffchainQuery, OffchainRequestFailedError, OffchainStatusError, OffchainTransportError, OffchainTransportErrorParams, OffchainValidationError, backendMessage, errorCause, readResponseBody };
@@ -1,6 +1,7 @@
1
1
  import { Opportunity, OpportunityFilter, PoolOpportunityDetail, PoolOpportunityKey, StrategyOpportunityDetail, StrategyOpportunityKey } from "../../model/opportunities.js";
2
2
  import { HistoryMetric, HistorySeries, OpportunityHistoryQuery } from "../../model/history.js";
3
- import { GearboxAPIOptions, OffchainResult } from "../types.js";
3
+ import { DataResponse } from "../../model/response.js";
4
+ import { GearboxAPIOptions } from "../types.js";
4
5
  import { AbstractOffchainNamespace } from "../AbstractOffchainNamespace.js";
5
6
  //#region src/offchain/opportunities/OffchainOpportunities.d.ts
6
7
  /**
@@ -8,24 +9,24 @@ import { AbstractOffchainNamespace } from "../AbstractOffchainNamespace.js";
8
9
  **/
9
10
  declare class OffchainOpportunities extends AbstractOffchainNamespace {
10
11
  #private;
11
- constructor(options?: GearboxAPIOptions);
12
+ constructor(options: GearboxAPIOptions);
12
13
  /**
13
- * All opportunities the backend knows about, optionally narrowed by
14
- * {@link OpportunityFilter}.
14
+ * Opportunities of the chains this client covers, optionally narrowed further
15
+ * by {@link OpportunityFilter}.
15
16
  **/
16
- list(filter?: OpportunityFilter): Promise<OffchainResult<Opportunity[]>>;
17
+ list(filter?: OpportunityFilter): Promise<DataResponse<Opportunity[]>>;
17
18
  /**
18
19
  * Detailed view of one pool opportunity.
19
20
  **/
20
- getPool(key: PoolOpportunityKey): Promise<OffchainResult<PoolOpportunityDetail>>;
21
+ getPool(key: PoolOpportunityKey): Promise<DataResponse<PoolOpportunityDetail>>;
21
22
  /**
22
23
  * Detailed view of one strategy opportunity.
23
24
  **/
24
- getStrategy(key: StrategyOpportunityKey): Promise<OffchainResult<StrategyOpportunityDetail>>;
25
+ getStrategy(key: StrategyOpportunityKey): Promise<DataResponse<StrategyOpportunityDetail>>;
25
26
  /**
26
27
  * One historical series of one opportunity
27
28
  **/
28
- getHistory<M extends HistoryMetric>(query: OpportunityHistoryQuery<M>): Promise<OffchainResult<HistorySeries<M>>>;
29
+ getHistory<M extends HistoryMetric>(query: OpportunityHistoryQuery<M>): Promise<DataResponse<HistorySeries<M>>>;
29
30
  }
30
31
  //#endregion
31
32
  export { OffchainOpportunities };
@@ -1,32 +1,26 @@
1
- import { Position, PositionFilter } from "../../model/positions.js";
1
+ import { Position } from "../../model/positions.js";
2
2
  import { HistorySeries, PositionHistoryMetric, PositionHistoryQuery } from "../../model/history.js";
3
- import { GearboxAPIOptions, OffchainResult } from "../types.js";
3
+ import { DataResponse } from "../../model/response.js";
4
+ import { ListPositionsPropsBase } from "../../sdk/positions/types.js";
5
+ import { GearboxAPIOptions } from "../types.js";
4
6
  import { AbstractOffchainNamespace } from "../AbstractOffchainNamespace.js";
5
- import { Address } from "viem";
6
7
  //#region src/offchain/positions/OffchainPositions.d.ts
7
8
  /**
8
9
  * Backend counterpart of the `positions` namespace.
9
10
  **/
10
11
  declare class OffchainPositions extends AbstractOffchainNamespace {
11
- constructor(options?: GearboxAPIOptions);
12
+ #private;
13
+ constructor(options: GearboxAPIOptions);
12
14
  /**
13
15
  * Everything a wallet holds, optionally narrowed by {@link PositionFilter}.
14
- *
15
- * @returns An empty list until the backend client is implemented.
16
16
  **/
17
- list(wallet: Address, filter?: PositionFilter): Promise<OffchainResult<Position[]>>;
17
+ list(props: ListPositionsPropsBase): Promise<DataResponse<Position[]>>;
18
18
  /**
19
- * One historical series of one position. History exists only here: rebuilding
20
- * it from the chain would mean an archive read per point.
21
- *
22
- * The requested metric types the response, so a caller asking for one metric
23
- * does not have to narrow the union back down. When the transport lands,
24
- * validation is what upholds it: a response carrying a different metric than
25
- * the one asked for is a version-skew error like any other.
19
+ * One historical series of one position.
26
20
  *
27
21
  * @returns An empty series until the backend client is implemented.
28
22
  **/
29
- getHistory<M extends PositionHistoryMetric>(query: PositionHistoryQuery<M>): Promise<OffchainResult<HistorySeries<M>>>;
23
+ getHistory<M extends PositionHistoryMetric>(query: PositionHistoryQuery<M>): Promise<DataResponse<HistorySeries<M>>>;
30
24
  }
31
25
  //#endregion
32
26
  export { OffchainPositions };
@@ -1,93 +1,15 @@
1
1
  import { ILogger } from "../sdk/types/logger.js";
2
- import { z } from "zod/v4";
2
+ import { ChainId } from "../model/primitives.js";
3
3
  //#region src/offchain/types.d.ts
4
- /**
5
- * Outcome of the single request that serves a backend read. Unlike the
6
- * on-chain source there is no per-chain breakdown here: one HTTP call covers
7
- * every chain, so splitting it per chain would be fabricated.
8
- **/
9
- interface OffchainSourceMeta {
10
- /**
11
- * Whether the backend served the request.
12
- **/
13
- status: "success" | "error";
14
- /**
15
- * Rejection reason. Only set when {@link status} is `"error"`.
16
- **/
17
- error?: unknown;
18
- }
19
- /**
20
- * What every {@link GearboxAPI} read returns: the payload plus the outcome of
21
- * the request that produced it, in the same shape the combined SDK exposes.
22
- *
23
- * @typeParam T - Payload type.
24
- **/
25
- interface OffchainResult<T> {
26
- /**
27
- * Requested payload.
28
- **/
29
- result: T;
30
- /**
31
- * Outcome of the backend request.
32
- **/
33
- meta: OffchainSourceMeta;
34
- }
35
- /**
36
- * Thrown by the endpoints that have no stub answer, so that a caller in
37
- * `offchain` mode fails loudly instead of reading an empty detail page as a
38
- * missing entity.
39
- *
40
- * Lives here rather than in one namespace because every stubbed namespace
41
- * throws it.
42
- **/
43
- declare class OffchainNotImplementedError extends Error {
44
- constructor(endpoint: string);
45
- }
46
- /**
47
- * Thrown when a read is issued against a client that was never told where the
48
- * backend is.
49
- **/
50
- declare class OffchainNotConfiguredError extends Error {
51
- constructor(path: string);
52
- }
53
- /**
54
- * Thrown when the backend could not be reached, or answered with a status
55
- * outside the 2xx range.
56
- **/
57
- declare class OffchainTransportError extends Error {
58
- /**
59
- * URL that was requested, query included.
60
- **/
61
- readonly url: string;
62
- /**
63
- * Status the backend answered with, absent when the request never completed.
64
- **/
65
- readonly status?: number;
66
- constructor(url: string, reason: string, status?: number);
67
- }
68
- /**
69
- * Thrown when the backend answered, but with a payload the read model does not
70
- * describe.
71
- *
72
- * This is version skew rather than a bad request, and it is deliberately
73
- * handled like a transport error: the combined SDK drops the backend's
74
- * contribution in `both` mode and fails the read in `offchain` mode.
75
- **/
76
- declare class OffchainValidationError extends Error {
77
- /**
78
- * URL whose payload failed to validate.
79
- **/
80
- readonly url: string;
81
- /**
82
- * What did not match, in the order zod reported it.
83
- **/
84
- readonly issues: readonly z.core.$ZodIssue[];
85
- constructor(url: string, issues: readonly z.core.$ZodIssue[]);
86
- }
87
4
  /**
88
5
  * Options for creating a {@link GearboxAPI} instance.
89
6
  **/
90
7
  interface GearboxAPIOptions {
8
+ /**
9
+ * Chains this client reads, which every request names. A caller who thinks in
10
+ * network labels converts with {@link toChainIds}.
11
+ **/
12
+ chainIds: ChainId[];
91
13
  /**
92
14
  * Base URL of the Gearbox backend, without a trailing slash.
93
15
  *
@@ -100,10 +22,7 @@ interface GearboxAPIOptions {
100
22
  * @defaultValue 30 seconds
101
23
  **/
102
24
  timeout?: number;
103
- /**
104
- * Logger used for transport and validation diagnostics.
105
- **/
106
25
  logger?: ILogger;
107
26
  }
108
27
  //#endregion
109
- export { GearboxAPIOptions, OffchainNotConfiguredError, OffchainNotImplementedError, OffchainResult, OffchainSourceMeta, OffchainTransportError, OffchainValidationError };
28
+ export { GearboxAPIOptions };
@@ -159,6 +159,10 @@ interface ListStrategyPositionsProps {
159
159
  * Whether to include accounts that carry no debt.
160
160
  **/
161
161
  includeZeroDebt: boolean;
162
+ /**
163
+ * Block to read at. Defaults to the latest block.
164
+ **/
165
+ blockNumber?: bigint;
162
166
  }
163
167
  //#endregion
164
168
  export { CreditAccountDataCall, CreditAccountFilter, CreditAccountReadOptions, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, CreditManagerFilter, GetCreditAccountsArgs, GetCreditAccountsOptions, ListStrategyPositionsProps };
@@ -1,4 +1,4 @@
1
- import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./withdrawal-compressor/types.js";
1
+ import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./withdrawal-compressor/types.js";
2
2
  import { CreditAccountDataCall, CreditAccountFilter, CreditAccountReadOptions, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, CreditManagerFilter, GetCreditAccountsArgs, GetCreditAccountsOptions, ListStrategyPositionsProps } from "./credit-account-compressor/types.js";
3
3
  import { CreditAccountCompressor } from "./credit-account-compressor/CreditAccountCompressor.js";
4
4
  import { CreditAccountCompressorV310Contract } from "./credit-account-compressor/CreditAccountCompressorV310Contract.js";
@@ -24,8 +24,8 @@ import { CreditAccountSlice, IntentPreviewResult } from "./intents/types.js";
24
24
  import { primaryInstantOutput } from "./intents/operations/claim-delayed/index.js";
25
25
  import { CreditAccountOperationsService } from "./intents/index.js";
26
26
  import { LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./liquidations/constants.js";
27
- import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, LoadRWALiquidatorsProps, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, RWALiquidatorInfo } from "./liquidations/types.js";
27
+ import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, LoadRWALiquidatorsProps, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, RWALiquidatorInfo } from "./liquidations/types.js";
28
28
  import { LiquidationsService } from "./liquidations/LiquidationsService.js";
29
29
  import { MultichainLiquidationsService } from "./liquidations/MultichainLiquidationsService.js";
30
30
  import "./liquidations/index.js";
31
- export { AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountResult, ConnectedBotsCall, ConnectedBotsPerAccount, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountDataCall, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, type IntentPreviewResult, InvalidDelayedIntentError, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidationsService, ListStrategyPositionsProps, LoadRWALiquidatorsProps, MulticallWithFailure, MultichainLiquidationsService, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OpenCAProps, PartiallyLiquidateProps, PendingWithdrawal, PeripheryCompressorV310Contract, PreviewDelayedWithdrawalProps, RWALiquidatorInfo, RedemptionLog, RedemptionLoggerV310Contract, RequestableWithdrawal, Rewards, SetBotProps, SetBotResult, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, primaryInstantOutput, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
31
+ export { AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountResult, ConnectedBotsCall, ConnectedBotsPerAccount, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountDataCall, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, type IntentPreviewResult, InvalidDelayedIntentError, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidationsService, ListStrategyPositionsProps, LoadRWALiquidatorsProps, MulticallWithFailure, MultichainLiquidationsService, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OpenCAProps, PartiallyLiquidateProps, PendingWithdrawal, PeripheryCompressorV310Contract, PreviewDelayedWithdrawalProps, RWALiquidatorInfo, RedemptionLog, RedemptionLoggerV310Contract, RequestableWithdrawal, Rewards, SetBotProps, SetBotResult, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, primaryInstantOutput, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
@@ -3,7 +3,7 @@ import { LiquidatableAccount, LiquidationDetails, LiquidationPosition } from "..
3
3
  import "../../../model/index.js";
4
4
  import { SDKConstruct } from "../../base/SDKConstruct.js";
5
5
  import "../../base/index.js";
6
- import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps } from "./types.js";
6
+ import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps, LoadRWALiquidatorsProps } from "./types.js";
7
7
  //#region src/sdk/accounts/liquidations/LiquidationsService.d.ts
8
8
  /**
9
9
  * Service for discovering liquidatable credit accounts and previewing manual
@@ -40,7 +40,7 @@ declare class LiquidationsService extends SDKConstruct {
40
40
  * deployed for the markets of the chain and registers them in the SDK
41
41
  * contracts register.
42
42
  **/
43
- loadRWALiquidators(): Promise<void>;
43
+ loadRWALiquidators(props?: LoadRWALiquidatorsProps): Promise<void>;
44
44
  }
45
45
  //#endregion
46
46
  export { LiquidationsService };