@nktkas/hyperliquid 0.30.2 → 0.30.3

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 (183) hide show
  1. package/README.md +83 -19
  2. package/esm/bin/cli.js +10 -0
  3. package/esm/bin/cli.js.map +1 -1
  4. package/esm/deps/jsr.io/@std/async/{1.0.16 → 1.1.0}/unstable_semaphore.d.ts +1 -0
  5. package/esm/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts.map +1 -0
  6. package/esm/deps/jsr.io/@std/async/{1.0.16 → 1.1.0}/unstable_semaphore.js +4 -3
  7. package/esm/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.js.map +1 -0
  8. package/esm/src/api/exchange/_methods/_base/_semaphore.js +1 -1
  9. package/esm/src/api/exchange/_methods/_base/_semaphore.js.map +1 -1
  10. package/esm/src/api/exchange/_methods/approveAgent.d.ts +20 -9
  11. package/esm/src/api/exchange/_methods/approveAgent.d.ts.map +1 -1
  12. package/esm/src/api/exchange/_methods/approveAgent.js +21 -3
  13. package/esm/src/api/exchange/_methods/approveAgent.js.map +1 -1
  14. package/esm/src/api/exchange/_methods/batchModify.d.ts +2 -2
  15. package/esm/src/api/exchange/_methods/borrowLend.d.ts +173 -0
  16. package/esm/src/api/exchange/_methods/borrowLend.d.ts.map +1 -0
  17. package/esm/src/api/exchange/_methods/borrowLend.js +75 -0
  18. package/esm/src/api/exchange/_methods/borrowLend.js.map +1 -0
  19. package/esm/src/api/exchange/_methods/modify.d.ts +2 -2
  20. package/esm/src/api/exchange/_methods/order.d.ts +2 -2
  21. package/esm/src/api/exchange/_methods/sendAsset.d.ts +10 -10
  22. package/esm/src/api/exchange/_methods/spotSend.d.ts +5 -5
  23. package/esm/src/api/exchange/_methods/usdSend.d.ts +5 -5
  24. package/esm/src/api/exchange/_methods/userPortfolioMargin.d.ts +193 -0
  25. package/esm/src/api/exchange/_methods/userPortfolioMargin.d.ts.map +1 -0
  26. package/esm/src/api/exchange/_methods/userPortfolioMargin.js +92 -0
  27. package/esm/src/api/exchange/_methods/userPortfolioMargin.js.map +1 -0
  28. package/esm/src/api/exchange/_methods/withdraw3.d.ts +5 -5
  29. package/esm/src/api/exchange/client.d.ts +8 -0
  30. package/esm/src/api/exchange/client.d.ts.map +1 -1
  31. package/esm/src/api/exchange/client.js +10 -0
  32. package/esm/src/api/exchange/client.js.map +1 -1
  33. package/esm/src/api/exchange/mod.d.ts +2 -0
  34. package/esm/src/api/exchange/mod.d.ts.map +1 -1
  35. package/esm/src/api/exchange/mod.js +2 -0
  36. package/esm/src/api/exchange/mod.js.map +1 -1
  37. package/esm/src/api/info/_methods/activeAssetData.js +2 -2
  38. package/esm/src/api/info/_methods/activeAssetData.js.map +1 -1
  39. package/esm/src/api/info/_methods/allBorrowLendReserveStates.d.ts +71 -0
  40. package/esm/src/api/info/_methods/allBorrowLendReserveStates.d.ts.map +1 -0
  41. package/esm/src/api/info/_methods/allBorrowLendReserveStates.js +56 -0
  42. package/esm/src/api/info/_methods/allBorrowLendReserveStates.js.map +1 -0
  43. package/esm/src/api/info/_methods/borrowLendReserveState.d.ts +79 -0
  44. package/esm/src/api/info/_methods/borrowLendReserveState.d.ts.map +1 -0
  45. package/esm/src/api/info/_methods/borrowLendReserveState.js +76 -0
  46. package/esm/src/api/info/_methods/borrowLendReserveState.js.map +1 -0
  47. package/esm/src/api/info/_methods/borrowLendUserState.d.ts +103 -0
  48. package/esm/src/api/info/_methods/borrowLendUserState.d.ts.map +1 -0
  49. package/esm/src/api/info/_methods/borrowLendUserState.js +85 -0
  50. package/esm/src/api/info/_methods/borrowLendUserState.js.map +1 -0
  51. package/esm/src/api/info/_methods/clearinghouseState.js +3 -3
  52. package/esm/src/api/info/_methods/clearinghouseState.js.map +1 -1
  53. package/esm/src/api/info/_methods/perpDexs.d.ts +5 -1
  54. package/esm/src/api/info/_methods/perpDexs.d.ts.map +1 -1
  55. package/esm/src/api/info/_methods/perpDexs.js +3 -1
  56. package/esm/src/api/info/_methods/perpDexs.js.map +1 -1
  57. package/esm/src/api/info/_methods/spotMeta.d.ts +36 -0
  58. package/esm/src/api/info/_methods/spotMeta.d.ts.map +1 -1
  59. package/esm/src/api/info/_methods/spotMeta.js +16 -0
  60. package/esm/src/api/info/_methods/spotMeta.js.map +1 -1
  61. package/esm/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +38 -0
  62. package/esm/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts.map +1 -1
  63. package/esm/src/api/info/_methods/userBorrowLendInterest.d.ts +73 -0
  64. package/esm/src/api/info/_methods/userBorrowLendInterest.d.ts.map +1 -0
  65. package/esm/src/api/info/_methods/userBorrowLendInterest.js +72 -0
  66. package/esm/src/api/info/_methods/userBorrowLendInterest.js.map +1 -0
  67. package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts +57 -0
  68. package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
  69. package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.js +33 -0
  70. package/esm/src/api/info/_methods/userNonFundingLedgerUpdates.js.map +1 -1
  71. package/esm/src/api/info/client.d.ts +16 -0
  72. package/esm/src/api/info/client.d.ts.map +1 -1
  73. package/esm/src/api/info/client.js +20 -0
  74. package/esm/src/api/info/client.js.map +1 -1
  75. package/esm/src/api/info/mod.d.ts +4 -0
  76. package/esm/src/api/info/mod.d.ts.map +1 -1
  77. package/esm/src/api/info/mod.js +4 -0
  78. package/esm/src/api/info/mod.js.map +1 -1
  79. package/esm/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts +75 -0
  80. package/esm/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
  81. package/package.json +1 -1
  82. package/script/bin/cli.js +10 -0
  83. package/script/bin/cli.js.map +1 -1
  84. package/script/deps/jsr.io/@std/async/{1.0.16 → 1.1.0}/unstable_semaphore.d.ts +1 -0
  85. package/script/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.d.ts.map +1 -0
  86. package/script/deps/jsr.io/@std/async/{1.0.16 → 1.1.0}/unstable_semaphore.js +4 -3
  87. package/script/deps/jsr.io/@std/async/1.1.0/unstable_semaphore.js.map +1 -0
  88. package/script/src/api/exchange/_methods/_base/_semaphore.js +1 -1
  89. package/script/src/api/exchange/_methods/_base/_semaphore.js.map +1 -1
  90. package/script/src/api/exchange/_methods/approveAgent.d.ts +20 -9
  91. package/script/src/api/exchange/_methods/approveAgent.d.ts.map +1 -1
  92. package/script/src/api/exchange/_methods/approveAgent.js +21 -3
  93. package/script/src/api/exchange/_methods/approveAgent.js.map +1 -1
  94. package/script/src/api/exchange/_methods/batchModify.d.ts +2 -2
  95. package/script/src/api/exchange/_methods/borrowLend.d.ts +173 -0
  96. package/script/src/api/exchange/_methods/borrowLend.d.ts.map +1 -0
  97. package/script/src/api/exchange/_methods/borrowLend.js +112 -0
  98. package/script/src/api/exchange/_methods/borrowLend.js.map +1 -0
  99. package/script/src/api/exchange/_methods/modify.d.ts +2 -2
  100. package/script/src/api/exchange/_methods/order.d.ts +2 -2
  101. package/script/src/api/exchange/_methods/sendAsset.d.ts +10 -10
  102. package/script/src/api/exchange/_methods/spotSend.d.ts +5 -5
  103. package/script/src/api/exchange/_methods/usdSend.d.ts +5 -5
  104. package/script/src/api/exchange/_methods/userPortfolioMargin.d.ts +193 -0
  105. package/script/src/api/exchange/_methods/userPortfolioMargin.d.ts.map +1 -0
  106. package/script/src/api/exchange/_methods/userPortfolioMargin.js +129 -0
  107. package/script/src/api/exchange/_methods/userPortfolioMargin.js.map +1 -0
  108. package/script/src/api/exchange/_methods/withdraw3.d.ts +5 -5
  109. package/script/src/api/exchange/client.d.ts +8 -0
  110. package/script/src/api/exchange/client.d.ts.map +1 -1
  111. package/script/src/api/exchange/client.js +10 -0
  112. package/script/src/api/exchange/client.js.map +1 -1
  113. package/script/src/api/exchange/mod.d.ts +2 -0
  114. package/script/src/api/exchange/mod.d.ts.map +1 -1
  115. package/script/src/api/exchange/mod.js +2 -0
  116. package/script/src/api/exchange/mod.js.map +1 -1
  117. package/script/src/api/info/_methods/activeAssetData.js +1 -1
  118. package/script/src/api/info/_methods/activeAssetData.js.map +1 -1
  119. package/script/src/api/info/_methods/allBorrowLendReserveStates.d.ts +71 -0
  120. package/script/src/api/info/_methods/allBorrowLendReserveStates.d.ts.map +1 -0
  121. package/script/src/api/info/_methods/allBorrowLendReserveStates.js +93 -0
  122. package/script/src/api/info/_methods/allBorrowLendReserveStates.js.map +1 -0
  123. package/script/src/api/info/_methods/borrowLendReserveState.d.ts +79 -0
  124. package/script/src/api/info/_methods/borrowLendReserveState.d.ts.map +1 -0
  125. package/script/src/api/info/_methods/borrowLendReserveState.js +113 -0
  126. package/script/src/api/info/_methods/borrowLendReserveState.js.map +1 -0
  127. package/script/src/api/info/_methods/borrowLendUserState.d.ts +103 -0
  128. package/script/src/api/info/_methods/borrowLendUserState.d.ts.map +1 -0
  129. package/script/src/api/info/_methods/borrowLendUserState.js +122 -0
  130. package/script/src/api/info/_methods/borrowLendUserState.js.map +1 -0
  131. package/script/src/api/info/_methods/clearinghouseState.js +3 -3
  132. package/script/src/api/info/_methods/clearinghouseState.js.map +1 -1
  133. package/script/src/api/info/_methods/perpDexs.d.ts +5 -1
  134. package/script/src/api/info/_methods/perpDexs.d.ts.map +1 -1
  135. package/script/src/api/info/_methods/perpDexs.js +3 -1
  136. package/script/src/api/info/_methods/perpDexs.js.map +1 -1
  137. package/script/src/api/info/_methods/spotMeta.d.ts +36 -0
  138. package/script/src/api/info/_methods/spotMeta.d.ts.map +1 -1
  139. package/script/src/api/info/_methods/spotMeta.js +16 -0
  140. package/script/src/api/info/_methods/spotMeta.js.map +1 -1
  141. package/script/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts +38 -0
  142. package/script/src/api/info/_methods/spotMetaAndAssetCtxs.d.ts.map +1 -1
  143. package/script/src/api/info/_methods/userBorrowLendInterest.d.ts +73 -0
  144. package/script/src/api/info/_methods/userBorrowLendInterest.d.ts.map +1 -0
  145. package/script/src/api/info/_methods/userBorrowLendInterest.js +109 -0
  146. package/script/src/api/info/_methods/userBorrowLendInterest.js.map +1 -0
  147. package/script/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts +57 -0
  148. package/script/src/api/info/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
  149. package/script/src/api/info/_methods/userNonFundingLedgerUpdates.js +33 -0
  150. package/script/src/api/info/_methods/userNonFundingLedgerUpdates.js.map +1 -1
  151. package/script/src/api/info/client.d.ts +16 -0
  152. package/script/src/api/info/client.d.ts.map +1 -1
  153. package/script/src/api/info/client.js +20 -0
  154. package/script/src/api/info/client.js.map +1 -1
  155. package/script/src/api/info/mod.d.ts +4 -0
  156. package/script/src/api/info/mod.d.ts.map +1 -1
  157. package/script/src/api/info/mod.js +4 -0
  158. package/script/src/api/info/mod.js.map +1 -1
  159. package/script/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts +75 -0
  160. package/script/src/api/subscription/_methods/userNonFundingLedgerUpdates.d.ts.map +1 -1
  161. package/src/bin/cli.ts +10 -0
  162. package/src/deps/jsr.io/@std/async/{1.0.16 → 1.1.0}/unstable_semaphore.ts +4 -3
  163. package/src/src/api/exchange/_methods/_base/_semaphore.ts +1 -1
  164. package/src/src/api/exchange/_methods/approveAgent.ts +25 -5
  165. package/src/src/api/exchange/_methods/borrowLend.ts +133 -0
  166. package/src/src/api/exchange/_methods/userPortfolioMargin.ts +156 -0
  167. package/src/src/api/exchange/client.ts +34 -0
  168. package/src/src/api/exchange/mod.ts +2 -0
  169. package/src/src/api/info/_methods/activeAssetData.ts +2 -2
  170. package/src/src/api/info/_methods/allBorrowLendReserveStates.ts +82 -0
  171. package/src/src/api/info/_methods/borrowLendReserveState.ts +131 -0
  172. package/src/src/api/info/_methods/borrowLendUserState.ts +144 -0
  173. package/src/src/api/info/_methods/clearinghouseState.ts +3 -3
  174. package/src/src/api/info/_methods/perpDexs.ts +6 -1
  175. package/src/src/api/info/_methods/spotMeta.ts +41 -0
  176. package/src/src/api/info/_methods/userBorrowLendInterest.ts +122 -0
  177. package/src/src/api/info/_methods/userNonFundingLedgerUpdates.ts +69 -0
  178. package/src/src/api/info/client.ts +60 -0
  179. package/src/src/api/info/mod.ts +4 -0
  180. package/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts.map +0 -1
  181. package/esm/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js.map +0 -1
  182. package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.d.ts.map +0 -1
  183. package/script/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.js.map +0 -1
@@ -125,6 +125,47 @@ export const SpotMetaResponse = /* @__PURE__ */ (() => {
125
125
  ),
126
126
  v.description("Tokens available for spot trading."),
127
127
  ),
128
+ /** Outcome markets available for spot trading. */
129
+ outcomes: v.pipe(
130
+ v.array(
131
+ v.object({
132
+ /** Unique identifier of the outcome market. */
133
+ outcome: v.pipe(
134
+ UnsignedInteger,
135
+ v.description("Unique identifier of the outcome market."),
136
+ ),
137
+ /** Short name of the outcome market. */
138
+ name: v.pipe(
139
+ v.string(),
140
+ v.description("Short name of the outcome market."),
141
+ ),
142
+ /** Description of the outcome market. */
143
+ description: v.pipe(
144
+ v.string(),
145
+ v.description("Description of the outcome market."),
146
+ ),
147
+ /** Token specifications for each side of the outcome market. */
148
+ sideSpecs: v.pipe(
149
+ v.array(
150
+ v.object({
151
+ /** Side name (e.g., "YES", "NO"). */
152
+ name: v.pipe(
153
+ v.string(),
154
+ v.description('Side name (e.g., "YES", "NO").'),
155
+ ),
156
+ /** Spot token index corresponding to this side. */
157
+ token: v.pipe(
158
+ UnsignedInteger,
159
+ v.description("Spot token index corresponding to this side."),
160
+ ),
161
+ }),
162
+ ),
163
+ v.description("Token specifications for each side of the outcome market."),
164
+ ),
165
+ }),
166
+ ),
167
+ v.description("Outcome markets available for spot trading."),
168
+ ),
128
169
  }),
129
170
  v.description("Metadata for spot assets."),
130
171
  );
@@ -0,0 +1,122 @@
1
+ import * as v from "valibot";
2
+
3
+ // ============================================================
4
+ // API Schemas
5
+ // ============================================================
6
+
7
+ import { Address, UnsignedDecimal, UnsignedInteger } from "../../_schemas.js";
8
+
9
+ /**
10
+ * Request user borrow/lend interest.
11
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-borrow-lend-user-state
12
+ */
13
+ export const UserBorrowLendInterestRequest = /* @__PURE__ */ (() => {
14
+ return v.pipe(
15
+ v.object({
16
+ /** Type of request. */
17
+ type: v.pipe(
18
+ v.literal("userBorrowLendInterest"),
19
+ v.description("Type of request."),
20
+ ),
21
+ /** User address. */
22
+ user: v.pipe(
23
+ Address,
24
+ v.description("User address."),
25
+ ),
26
+ /** Start time (in ms since epoch). */
27
+ startTime: v.pipe(
28
+ UnsignedInteger,
29
+ v.description("Start time (in ms since epoch)."),
30
+ ),
31
+ /** End time (in ms since epoch). */
32
+ endTime: v.pipe(
33
+ v.nullish(UnsignedInteger),
34
+ v.description("End time (in ms since epoch)."),
35
+ ),
36
+ }),
37
+ v.description("Request user borrow/lend interest."),
38
+ );
39
+ })();
40
+ export type UserBorrowLendInterestRequest = v.InferOutput<typeof UserBorrowLendInterestRequest>;
41
+
42
+ /**
43
+ * User's borrow/lend interest.
44
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-borrow-lend-user-state
45
+ */
46
+ export const UserBorrowLendInterestResponse = /* @__PURE__ */ (() => {
47
+ return v.pipe(
48
+ v.array(
49
+ v.object({
50
+ /** Timestamp of the update (in ms since epoch). */
51
+ time: v.pipe(
52
+ UnsignedInteger,
53
+ v.description("Timestamp of the update (in ms since epoch)."),
54
+ ),
55
+ /** Token symbol. */
56
+ token: v.pipe(
57
+ v.string(),
58
+ v.description("Token symbol."),
59
+ ),
60
+ /** Borrow interest amount. */
61
+ borrow: v.pipe(
62
+ UnsignedDecimal,
63
+ v.description("Borrow interest amount."),
64
+ ),
65
+ /** Supply interest amount. */
66
+ supply: v.pipe(
67
+ UnsignedDecimal,
68
+ v.description("Supply interest amount."),
69
+ ),
70
+ }),
71
+ ),
72
+ v.description("User's borrow/lend interest."),
73
+ );
74
+ })();
75
+ export type UserBorrowLendInterestResponse = v.InferOutput<typeof UserBorrowLendInterestResponse>;
76
+ // ============================================================
77
+ // Execution Logic
78
+ // ============================================================
79
+
80
+ import type { InfoConfig } from "./_base/types.js";
81
+
82
+ /** Request parameters for the {@linkcode userBorrowLendInterest} function. */
83
+ export type UserBorrowLendInterestParameters = Omit<v.InferInput<typeof UserBorrowLendInterestRequest>, "type">;
84
+
85
+ /**
86
+ * Request borrow/lend user interest.
87
+ *
88
+ * @param config - General configuration for Info API requests.
89
+ * @param params - Parameters specific to the API request.
90
+ * @param signal - {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal} to cancel the request.
91
+ *
92
+ * @returns User's borrow/lend interest.
93
+ *
94
+ * @throws {ValiError} When the request parameters fail validation (before sending).
95
+ * @throws {TransportError} When the transport layer throws an error.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * import { HttpTransport } from "@nktkas/hyperliquid";
100
+ * import { userBorrowLendInterest } from "@nktkas/hyperliquid/api/info";
101
+ *
102
+ * const transport = new HttpTransport(); // or `WebSocketTransport`
103
+ *
104
+ * const data = await userBorrowLendInterest(
105
+ * { transport },
106
+ * { user: "0x...", startTime: 1725991229384 },
107
+ * );
108
+ * ```
109
+ *
110
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-borrow-lend-user-state
111
+ */
112
+ export function userBorrowLendInterest(
113
+ config: InfoConfig,
114
+ params: UserBorrowLendInterestParameters,
115
+ signal?: AbortSignal,
116
+ ): Promise<UserBorrowLendInterestResponse> {
117
+ const request = v.parse(UserBorrowLendInterestRequest, {
118
+ type: "userBorrowLendInterest",
119
+ ...params,
120
+ });
121
+ return config.transport.request("info", request, signal);
122
+ }
@@ -484,6 +484,75 @@ export const UserNonFundingLedgerUpdatesResponse = /* @__PURE__ */ (() => {
484
484
  v.description("`true` for deposit, `false` for withdrawal."),
485
485
  ),
486
486
  }),
487
+ /** Borrow/lend operation update. */
488
+ v.object({
489
+ /** Update type. */
490
+ type: v.pipe(
491
+ v.literal("borrowLend"),
492
+ v.description("Update type."),
493
+ ),
494
+ /** Token symbol. */
495
+ token: v.pipe(
496
+ v.string(),
497
+ v.description("Token symbol."),
498
+ ),
499
+ /** Operation type. */
500
+ operation: v.pipe(
501
+ v.picklist(["supply", "withdraw", "repay", "borrow"]),
502
+ v.description("Operation type."),
503
+ ),
504
+ /** Amount in the specified token. */
505
+ amount: v.pipe(
506
+ UnsignedDecimal,
507
+ v.description("Amount in the specified token."),
508
+ ),
509
+ /** Interest amount in the specified token. */
510
+ interestAmount: v.pipe(
511
+ UnsignedDecimal,
512
+ v.description("Interest amount in the specified token."),
513
+ ),
514
+ }),
515
+ /** Spot genesis operation update. */
516
+ v.object({
517
+ /** Update type. */
518
+ type: v.pipe(
519
+ v.literal("spotGenesis"),
520
+ v.description("Update type."),
521
+ ),
522
+ /** Token symbol. */
523
+ token: v.pipe(
524
+ v.string(),
525
+ v.description("Token symbol."),
526
+ ),
527
+ /** Amount in the specified token. */
528
+ amount: v.pipe(
529
+ Decimal,
530
+ v.description("Amount in the specified token."),
531
+ ),
532
+ }),
533
+ /** Activate DEX abstraction update. */
534
+ v.object({
535
+ /** Update type. */
536
+ type: v.pipe(
537
+ v.literal("activateDexAbstraction"),
538
+ v.description("Update type."),
539
+ ),
540
+ /** Name of the dex. */
541
+ dex: v.pipe(
542
+ v.string(),
543
+ v.description("Name of the dex."),
544
+ ),
545
+ /** Token symbol. */
546
+ token: v.pipe(
547
+ v.string(),
548
+ v.description("Token symbol."),
549
+ ),
550
+ /** Amount in the specified token. */
551
+ amount: v.pipe(
552
+ UnsignedDecimal,
553
+ v.description("Amount in the specified token."),
554
+ ),
555
+ }),
487
556
  ]),
488
557
  v.description("Update details."),
489
558
  ),
@@ -14,9 +14,23 @@ import {
14
14
  type AlignedQuoteTokenInfoParameters,
15
15
  type AlignedQuoteTokenInfoResponse,
16
16
  } from "./_methods/alignedQuoteTokenInfo.js";
17
+ import {
18
+ allBorrowLendReserveStates,
19
+ type AllBorrowLendReserveStatesResponse,
20
+ } from "./_methods/allBorrowLendReserveStates.js";
17
21
  import { allMids, type AllMidsParameters, type AllMidsResponse } from "./_methods/allMids.js";
18
22
  import { allPerpMetas, type AllPerpMetasResponse } from "./_methods/allPerpMetas.js";
19
23
  import { blockDetails, type BlockDetailsParameters, type BlockDetailsResponse } from "./_methods/blockDetails.js";
24
+ import {
25
+ borrowLendReserveState,
26
+ type BorrowLendReserveStateParameters,
27
+ type BorrowLendReserveStateResponse,
28
+ } from "./_methods/borrowLendReserveState.js";
29
+ import {
30
+ borrowLendUserState,
31
+ type BorrowLendUserStateParameters,
32
+ type BorrowLendUserStateResponse,
33
+ } from "./_methods/borrowLendUserState.js";
20
34
  import {
21
35
  candleSnapshot,
22
36
  type CandleSnapshotParameters,
@@ -116,6 +130,11 @@ import { subAccounts2, type SubAccounts2Parameters, type SubAccounts2Response }
116
130
  import { tokenDetails, type TokenDetailsParameters, type TokenDetailsResponse } from "./_methods/tokenDetails.js";
117
131
  import { twapHistory, type TwapHistoryParameters, type TwapHistoryResponse } from "./_methods/twapHistory.js";
118
132
  import { txDetails, type TxDetailsParameters, type TxDetailsResponse } from "./_methods/txDetails.js";
133
+ import {
134
+ userBorrowLendInterest,
135
+ type UserBorrowLendInterestParameters,
136
+ type UserBorrowLendInterestResponse,
137
+ } from "./_methods/userBorrowLendInterest.js";
119
138
  import { userDetails, type UserDetailsParameters, type UserDetailsResponse } from "./_methods/userDetails.js";
120
139
  import {
121
140
  userDexAbstraction,
@@ -209,6 +228,13 @@ export class InfoClient<C extends InfoConfig = InfoConfig> {
209
228
  return alignedQuoteTokenInfo(this.config_, params, signal);
210
229
  }
211
230
 
231
+ /** @see {@link allBorrowLendReserveStates} */
232
+ allBorrowLendReserveStates(
233
+ signal?: AbortSignal,
234
+ ): Promise<AllBorrowLendReserveStatesResponse> {
235
+ return allBorrowLendReserveStates(this.config_, signal);
236
+ }
237
+
212
238
  /** @see {@link allMids} */
213
239
  allMids(
214
240
  params?: AllMidsParameters,
@@ -241,6 +267,22 @@ export class InfoClient<C extends InfoConfig = InfoConfig> {
241
267
  return blockDetails(this.config_, params, signal);
242
268
  }
243
269
 
270
+ /** @see {@link borrowLendReserveState} */
271
+ borrowLendReserveState(
272
+ params: BorrowLendReserveStateParameters,
273
+ signal?: AbortSignal,
274
+ ): Promise<BorrowLendReserveStateResponse> {
275
+ return borrowLendReserveState(this.config_, params, signal);
276
+ }
277
+
278
+ /** @see {@link borrowLendUserState} */
279
+ borrowLendUserState(
280
+ params: BorrowLendUserStateParameters,
281
+ signal?: AbortSignal,
282
+ ): Promise<BorrowLendUserStateResponse> {
283
+ return borrowLendUserState(this.config_, params, signal);
284
+ }
285
+
244
286
  /** @see {@link candleSnapshot} */
245
287
  candleSnapshot(
246
288
  params: CandleSnapshotParameters,
@@ -610,6 +652,14 @@ export class InfoClient<C extends InfoConfig = InfoConfig> {
610
652
  return txDetails(this.config_, params, signal);
611
653
  }
612
654
 
655
+ /** @see {@link userBorrowLendInterest} */
656
+ userBorrowLendInterest(
657
+ params: UserBorrowLendInterestParameters,
658
+ signal?: AbortSignal,
659
+ ): Promise<UserBorrowLendInterestResponse> {
660
+ return userBorrowLendInterest(this.config_, params, signal);
661
+ }
662
+
613
663
  /** @see {@link userDetails} */
614
664
  userDetails(
615
665
  params: UserDetailsParameters,
@@ -763,9 +813,15 @@ export type {
763
813
  AlignedQuoteTokenInfoParameters,
764
814
  AlignedQuoteTokenInfoResponse,
765
815
  } from "./_methods/alignedQuoteTokenInfo.js";
816
+ export type { AllBorrowLendReserveStatesResponse } from "./_methods/allBorrowLendReserveStates.js";
766
817
  export type { AllMidsParameters, AllMidsResponse } from "./_methods/allMids.js";
767
818
  export type { AllPerpMetasResponse } from "./_methods/allPerpMetas.js";
768
819
  export type { BlockDetailsParameters, BlockDetailsResponse } from "./_methods/blockDetails.js";
820
+ export type {
821
+ BorrowLendReserveStateParameters,
822
+ BorrowLendReserveStateResponse,
823
+ } from "./_methods/borrowLendReserveState.js";
824
+ export type { BorrowLendUserStateParameters, BorrowLendUserStateResponse } from "./_methods/borrowLendUserState.js";
769
825
  export type { CandleSnapshotParameters, CandleSnapshotResponse } from "./_methods/candleSnapshot.js";
770
826
  export type { ClearinghouseStateParameters, ClearinghouseStateResponse } from "./_methods/clearinghouseState.js";
771
827
  export type { DelegationsParameters, DelegationsResponse } from "./_methods/delegations.js";
@@ -816,6 +872,10 @@ export type { SubAccounts2Parameters, SubAccounts2Response } from "./_methods/su
816
872
  export type { TokenDetailsParameters, TokenDetailsResponse } from "./_methods/tokenDetails.js";
817
873
  export type { TwapHistoryParameters, TwapHistoryResponse } from "./_methods/twapHistory.js";
818
874
  export type { TxDetailsParameters, TxDetailsResponse } from "./_methods/txDetails.js";
875
+ export type {
876
+ UserBorrowLendInterestParameters,
877
+ UserBorrowLendInterestResponse,
878
+ } from "./_methods/userBorrowLendInterest.js";
819
879
  export type { UserDetailsParameters, UserDetailsResponse } from "./_methods/userDetails.js";
820
880
  export type {
821
881
  UserDexAbstractionParameters as UserDexAbstractionInfoParameters,
@@ -26,9 +26,12 @@ export type { InfoConfig } from "./_methods/_base/types.js";
26
26
 
27
27
  export * from "./_methods/activeAssetData.js";
28
28
  export * from "./_methods/alignedQuoteTokenInfo.js";
29
+ export * from "./_methods/allBorrowLendReserveStates.js";
29
30
  export * from "./_methods/allMids.js";
30
31
  export * from "./_methods/allPerpMetas.js";
31
32
  export * from "./_methods/blockDetails.js";
33
+ export * from "./_methods/borrowLendReserveState.js";
34
+ export * from "./_methods/borrowLendUserState.js";
32
35
  export * from "./_methods/candleSnapshot.js";
33
36
  export * from "./_methods/clearinghouseState.js";
34
37
  export * from "./_methods/delegations.js";
@@ -73,6 +76,7 @@ export * from "./_methods/subAccounts2.js";
73
76
  export * from "./_methods/tokenDetails.js";
74
77
  export * from "./_methods/twapHistory.js";
75
78
  export * from "./_methods/txDetails.js";
79
+ export * from "./_methods/userBorrowLendInterest.js";
76
80
  export * from "./_methods/userDetails.js";
77
81
  export * from "./_methods/userDexAbstraction.js";
78
82
  export * from "./_methods/userFees.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"unstable_semaphore.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,SAAS;;IASpB;;;;OAIG;gBACS,GAAG,GAAE,MAAU;IAS3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAgB9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,IAAI,UAAU,GAAG,SAAS;IAQpC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,IAAI,IAAI;CAShB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unstable_semaphore.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,qCAAqC;AAQrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,SAAS;IACpB,IAAI,CAAS;IACb,2CAA2C;IAC3C,MAAM,CAAS;IACf,iCAAiC;IACjC,KAAK,CAAmB;IACxB,iCAAiC;IACjC,KAAK,CAAmB;IAExB;;;;OAIG;IACH,YAAY,MAAc,CAAC;QACzB,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACZ,MAAM,IAAI,SAAS,CACjB,yEAAyE,GAAG,EAAE,CAC/E,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;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I,CAAC,IAAI,CAAC,KAAK;gBAAE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QAC1C,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unstable_semaphore.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,SAAS;;IASpB;;;;OAIG;gBACS,GAAG,GAAE,MAAU;IAS3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAgB9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,IAAI,UAAU,GAAG,SAAS;IAQpC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,IAAI,IAAI;CAShB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"unstable_semaphore.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.16/unstable_semaphore.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,qCAAqC;;;AAQrC;;;;;;;;;;;;;;;GAeG;AACH,MAAa,SAAS;IACpB,IAAI,CAAS;IACb,2CAA2C;IAC3C,MAAM,CAAS;IACf,iCAAiC;IACjC,KAAK,CAAmB;IACxB,iCAAiC;IACjC,KAAK,CAAmB;IAExB;;;;OAIG;IACH,YAAY,MAAc,CAAC;QACzB,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACZ,MAAM,IAAI,SAAS,CACjB,yEAAyE,GAAG,EAAE,CAC/E,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;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