@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
@@ -0,0 +1,75 @@
1
+ import * as v from "valibot";
2
+ // ============================================================
3
+ // API Schemas
4
+ // ============================================================
5
+ import { Address, UnsignedDecimal, UnsignedInteger } from "../../_schemas.js";
6
+ import { ErrorResponse, SignatureSchema, SuccessResponse } from "./_base/commonSchemas.js";
7
+ /** Borrow or lend assets. */
8
+ export const BorrowLendRequest = /* @__PURE__ */ (() => {
9
+ return v.pipe(v.object({
10
+ /** Action to perform. */
11
+ action: v.pipe(v.object({
12
+ /** Type of action. */
13
+ type: v.pipe(v.literal("borrowLend"), v.description("Type of action.")),
14
+ /** Operation type. */
15
+ operation: v.pipe(v.picklist(["supply", "withdraw", "repay", "borrow"]), v.description("Operation type.")),
16
+ /** Token ID. */
17
+ token: v.pipe(UnsignedInteger, v.description("Token ID.")),
18
+ /** Amount to supply/withdraw (null = full). */
19
+ amount: v.pipe(v.nullable(UnsignedDecimal), v.description("Amount to supply/withdraw (null = full).")),
20
+ }), v.description("Action to perform.")),
21
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
22
+ nonce: v.pipe(UnsignedInteger, v.description("Nonce (timestamp in ms) used to prevent replay attacks.")),
23
+ /** ECDSA signature components. */
24
+ signature: v.pipe(SignatureSchema, v.description("ECDSA signature components.")),
25
+ /** Vault address (for vault trading). */
26
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
27
+ /** Expiration time of the action. */
28
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
29
+ }), v.description("Borrow or lend assets."));
30
+ })();
31
+ /** Successful response without specific data or error response. */
32
+ export const BorrowLendResponse = /* @__PURE__ */ (() => {
33
+ return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
34
+ })();
35
+ // ============================================================
36
+ // Execution Logic
37
+ // ============================================================
38
+ import { executeL1Action } from "./_base/execute.js";
39
+ /** Schema for user-provided action parameters (excludes system fields). */
40
+ const BorrowLendParameters = /* @__PURE__ */ (() => {
41
+ return v.omit(v.object(BorrowLendRequest.entries.action.entries), ["type"]);
42
+ })();
43
+ /**
44
+ * Borrow or lend assets.
45
+ *
46
+ * @param config - General configuration for Exchange API requests.
47
+ * @param params - Parameters specific to the API request.
48
+ * @param opts - Request execution options.
49
+ *
50
+ * @returns Successful response without specific data.
51
+ *
52
+ * @throws {ValiError} When the request parameters fail validation (before sending).
53
+ * @throws {TransportError} When the transport layer throws an error.
54
+ * @throws {ApiRequestError} When the API returns an unsuccessful response.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * import { HttpTransport } from "@nktkas/hyperliquid";
59
+ * import { borrowLend } from "@nktkas/hyperliquid/api/exchange";
60
+ * import { privateKeyToAccount } from "npm:viem/accounts";
61
+ *
62
+ * const wallet = privateKeyToAccount("0x..."); // viem or ethers
63
+ * const transport = new HttpTransport(); // or `WebSocketTransport`
64
+ *
65
+ * const data = await borrowLend(
66
+ * { transport, wallet },
67
+ * { operation: "supply", token: 0, amount: "20" },
68
+ * );
69
+ * ```
70
+ */
71
+ export function borrowLend(config, params, opts) {
72
+ const action = v.parse(BorrowLendParameters, params);
73
+ return executeL1Action(config, { type: "borrowLend", ...action }, opts);
74
+ }
75
+ //# sourceMappingURL=borrowLend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"borrowLend.js","sourceRoot":"","sources":["../../../../../src/src/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IAAwB;IAExB,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IACrD,OAAO,eAAe,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC"}
@@ -420,7 +420,7 @@ declare const ModifyParameters: Omit<v.ObjectSchema<{
420
420
  c?: `0x${string}` | undefined;
421
421
  };
422
422
  oid: number | `0x${string}`;
423
- }, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string> | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string>> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>>;
423
+ }, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>>;
424
424
  readonly "~types"?: {
425
425
  readonly input: {
426
426
  order: {
@@ -466,7 +466,7 @@ declare const ModifyParameters: Omit<v.ObjectSchema<{
466
466
  };
467
467
  oid: number | `0x${string}`;
468
468
  };
469
- readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string> | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string>> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>;
469
+ readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.UnionIssue<v.StringIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 34>>;
470
470
  } | undefined;
471
471
  };
472
472
  /** Action parameters for the {@linkcode modify} function. */
@@ -574,7 +574,7 @@ declare const OrderParameters: Omit<v.ObjectSchema<{
574
574
  c?: `0x${string}` | undefined;
575
575
  }[];
576
576
  grouping: "na" | "normalTpsl" | "positionTpsl";
577
- }, v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 42> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string> | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string>> | v.MaxValueIssue<number, 1000>>;
577
+ }, v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 42> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.MaxValueIssue<number, 1000>>;
578
578
  readonly "~types"?: {
579
579
  readonly input: {
580
580
  builder?: {
@@ -628,7 +628,7 @@ declare const OrderParameters: Omit<v.ObjectSchema<{
628
628
  }[];
629
629
  grouping: "na" | "normalTpsl" | "positionTpsl";
630
630
  };
631
- readonly issue: v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 42> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string> | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.BooleanIssue | v.CheckIssue<string>> | v.MaxValueIssue<number, 1000>;
631
+ readonly issue: v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.ToNumberIssue<string | number> | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.LengthIssue<`0x${string}`, 42> | v.LengthIssue<`0x${string}`, 34> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue | v.UnionIssue<v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.PicklistIssue | v.CheckIssue<string> | v.BooleanIssue> | v.MaxValueIssue<number, 1000>;
632
632
  } | undefined;
633
633
  };
634
634
  /** Action parameters for the {@linkcode order} function. */
@@ -155,43 +155,43 @@ declare const SendAssetParameters: Omit<v.ObjectSchema<{
155
155
  readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
156
156
  }, "type" | "nonce" | "signatureChainId" | "hyperliquidChain">;
157
157
  readonly "~standard": v.StandardProps<{
158
+ token: string;
159
+ amount: string | number;
158
160
  destination: string;
159
161
  sourceDex: string;
160
162
  destinationDex: string;
161
- token: string;
162
- amount: string | number;
163
163
  fromSubAccount?: string | undefined;
164
164
  }, {
165
+ token: string;
166
+ amount: string;
165
167
  destination: `0x${string}`;
166
168
  sourceDex: string;
167
169
  destinationDex: string;
168
- token: string;
169
- amount: string;
170
170
  fromSubAccount: "" | `0x${string}`;
171
171
  }>;
172
172
  readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
173
+ token: string;
174
+ amount: string;
173
175
  destination: `0x${string}`;
174
176
  sourceDex: string;
175
177
  destinationDex: string;
176
- token: string;
177
- amount: string;
178
178
  fromSubAccount: "" | `0x${string}`;
179
179
  }, v.StringIssue | v.LiteralIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42> | v.UnionIssue<v.StringIssue | v.LiteralIssue | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>>>;
180
180
  readonly "~types"?: {
181
181
  readonly input: {
182
+ token: string;
183
+ amount: string | number;
182
184
  destination: string;
183
185
  sourceDex: string;
184
186
  destinationDex: string;
185
- token: string;
186
- amount: string | number;
187
187
  fromSubAccount?: string | undefined;
188
188
  };
189
189
  readonly output: {
190
+ token: string;
191
+ amount: string;
190
192
  destination: `0x${string}`;
191
193
  sourceDex: string;
192
194
  destinationDex: string;
193
- token: string;
194
- amount: string;
195
195
  fromSubAccount: "" | `0x${string}`;
196
196
  };
197
197
  readonly issue: v.StringIssue | v.LiteralIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42> | v.UnionIssue<v.StringIssue | v.LiteralIssue | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>>;
@@ -131,29 +131,29 @@ declare const SpotSendParameters: Omit<v.ObjectSchema<{
131
131
  readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
132
132
  }, "type" | "time" | "signatureChainId" | "hyperliquidChain">;
133
133
  readonly "~standard": v.StandardProps<{
134
- destination: string;
135
134
  token: string;
136
135
  amount: string | number;
136
+ destination: string;
137
137
  }, {
138
- destination: `0x${string}`;
139
138
  token: string;
140
139
  amount: string;
140
+ destination: `0x${string}`;
141
141
  }>;
142
142
  readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
143
- destination: `0x${string}`;
144
143
  token: string;
145
144
  amount: string;
145
+ destination: `0x${string}`;
146
146
  }, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>>;
147
147
  readonly "~types"?: {
148
148
  readonly input: {
149
- destination: string;
150
149
  token: string;
151
150
  amount: string | number;
151
+ destination: string;
152
152
  };
153
153
  readonly output: {
154
- destination: `0x${string}`;
155
154
  token: string;
156
155
  amount: string;
156
+ destination: `0x${string}`;
157
157
  };
158
158
  readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>;
159
159
  } | undefined;
@@ -123,24 +123,24 @@ declare const UsdSendParameters: Omit<v.ObjectSchema<{
123
123
  readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
124
124
  }, "type" | "time" | "signatureChainId" | "hyperliquidChain">;
125
125
  readonly "~standard": v.StandardProps<{
126
- destination: string;
127
126
  amount: string | number;
127
+ destination: string;
128
128
  }, {
129
- destination: `0x${string}`;
130
129
  amount: string;
130
+ destination: `0x${string}`;
131
131
  }>;
132
132
  readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
133
- destination: `0x${string}`;
134
133
  amount: string;
134
+ destination: `0x${string}`;
135
135
  }, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>>;
136
136
  readonly "~types"?: {
137
137
  readonly input: {
138
- destination: string;
139
138
  amount: string | number;
139
+ destination: string;
140
140
  };
141
141
  readonly output: {
142
- destination: `0x${string}`;
143
142
  amount: string;
143
+ destination: `0x${string}`;
144
144
  };
145
145
  readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>;
146
146
  } | undefined;
@@ -0,0 +1,193 @@
1
+ import * as v from "valibot";
2
+ /**
3
+ * Enable/disable user portfolio margin.
4
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
5
+ */
6
+ export declare const UserPortfolioMarginRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
7
+ /** Action to perform. */
8
+ readonly action: v.SchemaWithPipe<readonly [v.ObjectSchema<{
9
+ /** Type of action. */
10
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userPortfolioMargin", undefined>, v.DescriptionAction<"userPortfolioMargin", "Type of action.">]>;
11
+ /** Chain ID in hex format for EIP-712 signing. */
12
+ readonly signatureChainId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.DescriptionAction<`0x${string}`, "Chain ID in hex format for EIP-712 signing.">]>;
13
+ /** HyperLiquid network type. */
14
+ readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
15
+ /** User address. */
16
+ readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
17
+ /** Whether to enable or disable user portfolio margin. */
18
+ readonly enabled: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether to enable or disable user portfolio margin.">]>;
19
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
20
+ readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
21
+ }, undefined>, v.DescriptionAction<{
22
+ type: "userPortfolioMargin";
23
+ signatureChainId: `0x${string}`;
24
+ hyperliquidChain: "Testnet" | "Mainnet";
25
+ user: `0x${string}`;
26
+ enabled: boolean;
27
+ nonce: number;
28
+ }, "Action to perform.">]>;
29
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
30
+ readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
31
+ /** ECDSA signature components. */
32
+ readonly signature: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
33
+ readonly r: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "First 32-byte component.">]>;
34
+ readonly s: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>, v.DescriptionAction<`0x${string}`, "Second 32-byte component.">]>;
35
+ readonly v: v.SchemaWithPipe<readonly [v.PicklistSchema<[27, 28], undefined>, v.DescriptionAction<27 | 28, "Recovery identifier.">]>;
36
+ }, undefined>, v.DescriptionAction<{
37
+ r: `0x${string}`;
38
+ s: `0x${string}`;
39
+ v: 27 | 28;
40
+ }, "ECDSA signature components.">]>, v.DescriptionAction<{
41
+ r: `0x${string}`;
42
+ s: `0x${string}`;
43
+ v: 27 | 28;
44
+ }, "ECDSA signature components.">]>;
45
+ }, undefined>, v.DescriptionAction<{
46
+ action: {
47
+ type: "userPortfolioMargin";
48
+ signatureChainId: `0x${string}`;
49
+ hyperliquidChain: "Testnet" | "Mainnet";
50
+ user: `0x${string}`;
51
+ enabled: boolean;
52
+ nonce: number;
53
+ };
54
+ nonce: number;
55
+ signature: {
56
+ r: `0x${string}`;
57
+ s: `0x${string}`;
58
+ v: 27 | 28;
59
+ };
60
+ }, "Enable/disable user portfolio margin.">]>;
61
+ export type UserPortfolioMarginRequest = v.InferOutput<typeof UserPortfolioMarginRequest>;
62
+ /**
63
+ * Successful response without specific data or error response.
64
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
65
+ */
66
+ export declare const UserPortfolioMarginResponse: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
67
+ readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"ok", undefined>, v.DescriptionAction<"ok", "Successful status.">]>;
68
+ readonly response: v.SchemaWithPipe<readonly [v.ObjectSchema<{
69
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"default", undefined>, v.DescriptionAction<"default", "Type of response.">]>;
70
+ }, undefined>, v.DescriptionAction<{
71
+ type: "default";
72
+ }, "Response details.">]>;
73
+ }, undefined>, v.DescriptionAction<{
74
+ status: "ok";
75
+ response: {
76
+ type: "default";
77
+ };
78
+ }, "Successful response without specific data.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
79
+ readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"err", undefined>, v.DescriptionAction<"err", "Error status.">]>;
80
+ readonly response: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
81
+ }, undefined>, v.DescriptionAction<{
82
+ status: "err";
83
+ response: string;
84
+ }, "Error response for failed operations.">]>], undefined>, v.DescriptionAction<{
85
+ status: "err";
86
+ response: string;
87
+ } | {
88
+ status: "ok";
89
+ response: {
90
+ type: "default";
91
+ };
92
+ }, "Successful response without specific data or error response.">]>;
93
+ export type UserPortfolioMarginResponse = v.InferOutput<typeof UserPortfolioMarginResponse>;
94
+ import { type ExchangeConfig, type ExtractRequestOptions } from "./_base/execute.js";
95
+ import type { ExcludeErrorResponse } from "./_base/errors.js";
96
+ /** Schema for user-provided action parameters (excludes system fields). */
97
+ declare const UserPortfolioMarginParameters: Omit<v.ObjectSchema<{
98
+ /** Type of action. */
99
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userPortfolioMargin", undefined>, v.DescriptionAction<"userPortfolioMargin", "Type of action.">]>;
100
+ /** Chain ID in hex format for EIP-712 signing. */
101
+ readonly signatureChainId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.DescriptionAction<`0x${string}`, "Chain ID in hex format for EIP-712 signing.">]>;
102
+ /** HyperLiquid network type. */
103
+ readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
104
+ /** User address. */
105
+ readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
106
+ /** Whether to enable or disable user portfolio margin. */
107
+ readonly enabled: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether to enable or disable user portfolio margin.">]>;
108
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
109
+ readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
110
+ }, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
111
+ readonly entries: Omit<{
112
+ /** Type of action. */
113
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userPortfolioMargin", undefined>, v.DescriptionAction<"userPortfolioMargin", "Type of action.">]>;
114
+ /** Chain ID in hex format for EIP-712 signing. */
115
+ readonly signatureChainId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.DescriptionAction<`0x${string}`, "Chain ID in hex format for EIP-712 signing.">]>;
116
+ /** HyperLiquid network type. */
117
+ readonly hyperliquidChain: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["Mainnet", "Testnet"], undefined>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>, v.DescriptionAction<"Testnet" | "Mainnet", "HyperLiquid network type.">]>;
118
+ /** User address. */
119
+ readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
120
+ /** Whether to enable or disable user portfolio margin. */
121
+ readonly enabled: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether to enable or disable user portfolio margin.">]>;
122
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
123
+ readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
124
+ }, "type" | "nonce" | "signatureChainId" | "hyperliquidChain">;
125
+ readonly "~standard": v.StandardProps<{
126
+ user: string;
127
+ enabled: boolean;
128
+ }, {
129
+ user: `0x${string}`;
130
+ enabled: boolean;
131
+ }>;
132
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
133
+ user: `0x${string}`;
134
+ enabled: boolean;
135
+ }, v.StringIssue | v.ObjectIssue | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42> | v.BooleanIssue>;
136
+ readonly "~types"?: {
137
+ readonly input: {
138
+ user: string;
139
+ enabled: boolean;
140
+ };
141
+ readonly output: {
142
+ user: `0x${string}`;
143
+ enabled: boolean;
144
+ };
145
+ readonly issue: v.StringIssue | v.ObjectIssue | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42> | v.BooleanIssue;
146
+ } | undefined;
147
+ };
148
+ /** Action parameters for the {@linkcode userPortfolioMargin} function. */
149
+ export type UserPortfolioMarginParameters = v.InferInput<typeof UserPortfolioMarginParameters>;
150
+ /** Request options for the {@linkcode userPortfolioMargin} function. */
151
+ export type UserPortfolioMarginOptions = ExtractRequestOptions<v.InferInput<typeof UserPortfolioMarginRequest>>;
152
+ /** Successful variant of {@linkcode UserPortfolioMarginResponse} without errors. */
153
+ export type UserPortfolioMarginSuccessResponse = ExcludeErrorResponse<UserPortfolioMarginResponse>;
154
+ /** EIP-712 types for the {@linkcode UserPortfolioMargin} function. */
155
+ export declare const UserPortfolioMarginTypes: {
156
+ "HyperliquidTransaction:UserPortfolioMargin": {
157
+ name: string;
158
+ type: string;
159
+ }[];
160
+ };
161
+ /**
162
+ * Enable/disable user portfolio margin.
163
+ *
164
+ * @param config - General configuration for Exchange API requests.
165
+ * @param params - Parameters specific to the API request.
166
+ * @param opts - Request execution options.
167
+ *
168
+ * @returns Successful response without specific data.
169
+ *
170
+ * @throws {ValiError} When the request parameters fail validation (before sending).
171
+ * @throws {TransportError} When the transport layer throws an error.
172
+ * @throws {ApiRequestError} When the API returns an unsuccessful response.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * import { HttpTransport } from "@nktkas/hyperliquid";
177
+ * import { userPortfolioMargin } from "@nktkas/hyperliquid/api/exchange";
178
+ * import { privateKeyToAccount } from "npm:viem/accounts";
179
+ *
180
+ * const wallet = privateKeyToAccount("0x..."); // viem or ethers
181
+ * const transport = new HttpTransport(); // or `WebSocketTransport`
182
+ *
183
+ * await userPortfolioMargin(
184
+ * { transport, wallet },
185
+ * { user: "0x...", enabled: true },
186
+ * );
187
+ * ```
188
+ *
189
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
190
+ */
191
+ export declare function userPortfolioMargin(config: ExchangeConfig, params: UserPortfolioMarginParameters, opts?: UserPortfolioMarginOptions): Promise<UserPortfolioMarginSuccessResponse>;
192
+ export {};
193
+ //# sourceMappingURL=userPortfolioMargin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userPortfolioMargin.d.ts","sourceRoot":"","sources":["../../../../../src/src/api/exchange/_methods/userPortfolioMargin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAS7B;;;GAGG;AACH,eAAO,MAAM,0BAA0B;IAGjC,yBAAyB;;QAGrB,sBAAsB;;QAKtB,kDAAkD;;QAKlD,gCAAgC;;QAKhC,oBAAoB;;QAKpB,0DAA0D;;QAK1D,8DAA8D;;;;;;;;;;IAQlE,8DAA8D;;IAK9D,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAQpC,CAAC;AACL,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE1F;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;oEAKpC,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAM5F,OAAO,EAAE,KAAK,cAAc,EAA2B,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,2EAA2E;AAC3E,QAAA,MAAM,6BAA6B;IArEzB,sBAAsB;;IAKtB,kDAAkD;;IAKlD,gCAAgC;;IAKhC,oBAAoB;;IAKpB,0DAA0D;;IAK1D,8DAA8D;;;;QAzB9D,sBAAsB;;QAKtB,kDAAkD;;QAKlD,gCAAgC;;QAKhC,oBAAoB;;QAKpB,0DAA0D;;QAK1D,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;CAiDpE,CAAC;AACL,0EAA0E;AAC1E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE/F,wEAAwE;AACxE,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;AAEhH,oFAAoF;AACpF,MAAM,MAAM,kCAAkC,GAAG,oBAAoB,CAAC,2BAA2B,CAAC,CAAC;AAEnG,sEAAsE;AACtE,eAAO,MAAM,wBAAwB;;;;;CAOpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,6BAA6B,EACrC,IAAI,CAAC,EAAE,0BAA0B,GAChC,OAAO,CAAC,kCAAkC,CAAC,CAQ7C"}
@@ -0,0 +1,92 @@
1
+ import * as v from "valibot";
2
+ // ============================================================
3
+ // API Schemas
4
+ // ============================================================
5
+ import { Address, Hex, UnsignedInteger } from "../../_schemas.js";
6
+ import { ErrorResponse, HyperliquidChainSchema, SignatureSchema, SuccessResponse } from "./_base/commonSchemas.js";
7
+ /**
8
+ * Enable/disable user portfolio margin.
9
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
10
+ */
11
+ export const UserPortfolioMarginRequest = /* @__PURE__ */ (() => {
12
+ return v.pipe(v.object({
13
+ /** Action to perform. */
14
+ action: v.pipe(v.object({
15
+ /** Type of action. */
16
+ type: v.pipe(v.literal("userPortfolioMargin"), v.description("Type of action.")),
17
+ /** Chain ID in hex format for EIP-712 signing. */
18
+ signatureChainId: v.pipe(Hex, v.description("Chain ID in hex format for EIP-712 signing.")),
19
+ /** HyperLiquid network type. */
20
+ hyperliquidChain: v.pipe(HyperliquidChainSchema, v.description("HyperLiquid network type.")),
21
+ /** User address. */
22
+ user: v.pipe(Address, v.description("User address.")),
23
+ /** Whether to enable or disable user portfolio margin. */
24
+ enabled: v.pipe(v.boolean(), v.description("Whether to enable or disable user portfolio margin.")),
25
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
26
+ nonce: v.pipe(UnsignedInteger, v.description("Nonce (timestamp in ms) used to prevent replay attacks.")),
27
+ }), v.description("Action to perform.")),
28
+ /** Nonce (timestamp in ms) used to prevent replay attacks. */
29
+ nonce: v.pipe(UnsignedInteger, v.description("Nonce (timestamp in ms) used to prevent replay attacks.")),
30
+ /** ECDSA signature components. */
31
+ signature: v.pipe(SignatureSchema, v.description("ECDSA signature components.")),
32
+ }), v.description("Enable/disable user portfolio margin."));
33
+ })();
34
+ /**
35
+ * Successful response without specific data or error response.
36
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
37
+ */
38
+ export const UserPortfolioMarginResponse = /* @__PURE__ */ (() => {
39
+ return v.pipe(v.union([SuccessResponse, ErrorResponse]), v.description("Successful response without specific data or error response."));
40
+ })();
41
+ // ============================================================
42
+ // Execution Logic
43
+ // ============================================================
44
+ import { executeUserSignedAction } from "./_base/execute.js";
45
+ /** Schema for user-provided action parameters (excludes system fields). */
46
+ const UserPortfolioMarginParameters = /* @__PURE__ */ (() => {
47
+ return v.omit(v.object(UserPortfolioMarginRequest.entries.action.entries), ["type", "signatureChainId", "hyperliquidChain", "nonce"]);
48
+ })();
49
+ /** EIP-712 types for the {@linkcode UserPortfolioMargin} function. */
50
+ export const UserPortfolioMarginTypes = {
51
+ "HyperliquidTransaction:UserPortfolioMargin": [
52
+ { name: "hyperliquidChain", type: "string" },
53
+ { name: "user", type: "address" },
54
+ { name: "enabled", type: "bool" },
55
+ { name: "nonce", type: "uint64" },
56
+ ],
57
+ };
58
+ /**
59
+ * Enable/disable user portfolio margin.
60
+ *
61
+ * @param config - General configuration for Exchange API requests.
62
+ * @param params - Parameters specific to the API request.
63
+ * @param opts - Request execution options.
64
+ *
65
+ * @returns Successful response without specific data.
66
+ *
67
+ * @throws {ValiError} When the request parameters fail validation (before sending).
68
+ * @throws {TransportError} When the transport layer throws an error.
69
+ * @throws {ApiRequestError} When the API returns an unsuccessful response.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * import { HttpTransport } from "@nktkas/hyperliquid";
74
+ * import { userPortfolioMargin } from "@nktkas/hyperliquid/api/exchange";
75
+ * import { privateKeyToAccount } from "npm:viem/accounts";
76
+ *
77
+ * const wallet = privateKeyToAccount("0x..."); // viem or ethers
78
+ * const transport = new HttpTransport(); // or `WebSocketTransport`
79
+ *
80
+ * await userPortfolioMargin(
81
+ * { transport, wallet },
82
+ * { user: "0x...", enabled: true },
83
+ * );
84
+ * ```
85
+ *
86
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/portfolio-margin
87
+ */
88
+ export function userPortfolioMargin(config, params, opts) {
89
+ const action = v.parse(UserPortfolioMarginParameters, params);
90
+ return executeUserSignedAction(config, { type: "userPortfolioMargin", ...action }, UserPortfolioMarginTypes, opts);
91
+ }
92
+ //# sourceMappingURL=userPortfolioMargin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userPortfolioMargin.js","sourceRoot":"","sources":["../../../../../src/src/api/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S,EAAE;QACjC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;QACjC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;KAClC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAsB,EACtB,MAAqC,EACrC,IAAiC;IAEjC,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,uBAAuB,CAC5B,MAAM,EACN,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,MAAM,EAAE,EAC1C,wBAAwB,EACxB,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -123,24 +123,24 @@ declare const Withdraw3Parameters: Omit<v.ObjectSchema<{
123
123
  readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToNumberAction<string | number, undefined>, v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Nonce (timestamp in ms) used to prevent replay attacks.">]>;
124
124
  }, "type" | "time" | "signatureChainId" | "hyperliquidChain">;
125
125
  readonly "~standard": v.StandardProps<{
126
- destination: string;
127
126
  amount: string | number;
127
+ destination: string;
128
128
  }, {
129
- destination: `0x${string}`;
130
129
  amount: string;
130
+ destination: `0x${string}`;
131
131
  }>;
132
132
  readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
133
- destination: `0x${string}`;
134
133
  amount: string;
134
+ destination: `0x${string}`;
135
135
  }, v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>>;
136
136
  readonly "~types"?: {
137
137
  readonly input: {
138
- destination: string;
139
138
  amount: string | number;
139
+ destination: string;
140
140
  };
141
141
  readonly output: {
142
- destination: `0x${string}`;
143
142
  amount: string;
143
+ destination: `0x${string}`;
144
144
  };
145
145
  readonly issue: v.StringIssue | v.ObjectIssue | v.NumberIssue | v.UnionIssue<v.StringIssue | v.NumberIssue> | v.ToStringIssue<string | number> | v.RegexIssue<string> | v.LengthIssue<`0x${string}`, 42>;
146
146
  } | undefined;