@compass-labs/api-sdk 2.2.94 → 2.2.95

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 (141) hide show
  1. package/codeSamples_typescript.yaml +1 -1
  2. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +1 -0
  3. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +1 -1
  4. package/dist/commonjs/models/components/createcreditaccountrequest.js +1 -0
  5. package/dist/commonjs/models/components/createcreditaccountrequest.js.map +1 -1
  6. package/dist/commonjs/models/components/creditborrowrequest.d.ts +20 -3
  7. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  8. package/dist/commonjs/models/components/creditborrowrequest.js +15 -3
  9. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  10. package/dist/commonjs/models/components/creditbundlerequest.d.ts +20 -3
  11. package/dist/commonjs/models/components/creditbundlerequest.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/creditbundlerequest.js +15 -3
  13. package/dist/commonjs/models/components/creditbundlerequest.js.map +1 -1
  14. package/dist/commonjs/models/components/creditlooprequest.d.ts +20 -3
  15. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/creditlooprequest.js +15 -3
  17. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  18. package/dist/commonjs/models/components/creditrebalancerequest.d.ts +19 -3
  19. package/dist/commonjs/models/components/creditrebalancerequest.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/creditrebalancerequest.js +14 -3
  21. package/dist/commonjs/models/components/creditrebalancerequest.js.map +1 -1
  22. package/dist/commonjs/models/components/creditrepayrequest.d.ts +20 -3
  23. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/creditrepayrequest.js +15 -3
  25. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  26. package/dist/commonjs/models/components/credittransferrequest.d.ts +19 -3
  27. package/dist/commonjs/models/components/credittransferrequest.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/credittransferrequest.js +15 -3
  29. package/dist/commonjs/models/components/credittransferrequest.js.map +1 -1
  30. package/dist/commonjs/models/components/creditunlooprequest.d.ts +20 -3
  31. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/creditunlooprequest.js +15 -3
  33. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  34. package/dist/commonjs/models/operations/v2creditbalances.d.ts +1 -0
  35. package/dist/commonjs/models/operations/v2creditbalances.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/v2creditbalances.js +1 -0
  37. package/dist/commonjs/models/operations/v2creditbalances.js.map +1 -1
  38. package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts +1 -0
  39. package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/v2crediteulermarkets.js +1 -0
  41. package/dist/commonjs/models/operations/v2crediteulermarkets.js.map +1 -1
  42. package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts +1 -0
  43. package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/v2creditloopedpositions.js +1 -0
  45. package/dist/commonjs/models/operations/v2creditloopedpositions.js.map +1 -1
  46. package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts +1 -0
  47. package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/v2creditmorphomarkets.js +1 -0
  49. package/dist/commonjs/models/operations/v2creditmorphomarkets.js.map +1 -1
  50. package/dist/commonjs/models/operations/v2creditpositions.d.ts +1 -0
  51. package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/v2creditpositions.js +1 -0
  53. package/dist/commonjs/models/operations/v2creditpositions.js.map +1 -1
  54. package/dist/esm/models/components/createcreditaccountrequest.d.ts +1 -0
  55. package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +1 -1
  56. package/dist/esm/models/components/createcreditaccountrequest.js +1 -0
  57. package/dist/esm/models/components/createcreditaccountrequest.js.map +1 -1
  58. package/dist/esm/models/components/creditborrowrequest.d.ts +20 -3
  59. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  60. package/dist/esm/models/components/creditborrowrequest.js +14 -2
  61. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  62. package/dist/esm/models/components/creditbundlerequest.d.ts +20 -3
  63. package/dist/esm/models/components/creditbundlerequest.d.ts.map +1 -1
  64. package/dist/esm/models/components/creditbundlerequest.js +14 -2
  65. package/dist/esm/models/components/creditbundlerequest.js.map +1 -1
  66. package/dist/esm/models/components/creditlooprequest.d.ts +20 -3
  67. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  68. package/dist/esm/models/components/creditlooprequest.js +14 -2
  69. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  70. package/dist/esm/models/components/creditrebalancerequest.d.ts +19 -3
  71. package/dist/esm/models/components/creditrebalancerequest.d.ts.map +1 -1
  72. package/dist/esm/models/components/creditrebalancerequest.js +13 -2
  73. package/dist/esm/models/components/creditrebalancerequest.js.map +1 -1
  74. package/dist/esm/models/components/creditrepayrequest.d.ts +20 -3
  75. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  76. package/dist/esm/models/components/creditrepayrequest.js +14 -2
  77. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  78. package/dist/esm/models/components/credittransferrequest.d.ts +19 -3
  79. package/dist/esm/models/components/credittransferrequest.d.ts.map +1 -1
  80. package/dist/esm/models/components/credittransferrequest.js +14 -2
  81. package/dist/esm/models/components/credittransferrequest.js.map +1 -1
  82. package/dist/esm/models/components/creditunlooprequest.d.ts +20 -3
  83. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  84. package/dist/esm/models/components/creditunlooprequest.js +14 -2
  85. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  86. package/dist/esm/models/operations/v2creditbalances.d.ts +1 -0
  87. package/dist/esm/models/operations/v2creditbalances.d.ts.map +1 -1
  88. package/dist/esm/models/operations/v2creditbalances.js +1 -0
  89. package/dist/esm/models/operations/v2creditbalances.js.map +1 -1
  90. package/dist/esm/models/operations/v2crediteulermarkets.d.ts +1 -0
  91. package/dist/esm/models/operations/v2crediteulermarkets.d.ts.map +1 -1
  92. package/dist/esm/models/operations/v2crediteulermarkets.js +1 -0
  93. package/dist/esm/models/operations/v2crediteulermarkets.js.map +1 -1
  94. package/dist/esm/models/operations/v2creditloopedpositions.d.ts +1 -0
  95. package/dist/esm/models/operations/v2creditloopedpositions.d.ts.map +1 -1
  96. package/dist/esm/models/operations/v2creditloopedpositions.js +1 -0
  97. package/dist/esm/models/operations/v2creditloopedpositions.js.map +1 -1
  98. package/dist/esm/models/operations/v2creditmorphomarkets.d.ts +1 -0
  99. package/dist/esm/models/operations/v2creditmorphomarkets.d.ts.map +1 -1
  100. package/dist/esm/models/operations/v2creditmorphomarkets.js +1 -0
  101. package/dist/esm/models/operations/v2creditmorphomarkets.js.map +1 -1
  102. package/dist/esm/models/operations/v2creditpositions.d.ts +1 -0
  103. package/dist/esm/models/operations/v2creditpositions.d.ts.map +1 -1
  104. package/dist/esm/models/operations/v2creditpositions.js +1 -0
  105. package/dist/esm/models/operations/v2creditpositions.js.map +1 -1
  106. package/docs/models/components/createcreditaccountrequestchain.md +1 -1
  107. package/docs/models/components/creditborrowrequest.md +1 -1
  108. package/docs/models/components/creditborrowrequestchain.md +17 -0
  109. package/docs/models/components/creditbundlerequest.md +7 -7
  110. package/docs/models/components/creditbundlerequestchain.md +17 -0
  111. package/docs/models/components/creditlooprequest.md +1 -1
  112. package/docs/models/components/creditlooprequestchain.md +17 -0
  113. package/docs/models/components/creditrebalancerequest.md +1 -1
  114. package/docs/models/components/creditrebalancerequestchain.md +17 -0
  115. package/docs/models/components/creditrepayrequest.md +1 -1
  116. package/docs/models/components/creditrepayrequestchain.md +17 -0
  117. package/docs/models/components/credittransferrequest.md +1 -1
  118. package/docs/models/components/credittransferrequestchain.md +17 -0
  119. package/docs/models/components/creditunlooprequest.md +1 -1
  120. package/docs/models/components/creditunlooprequestchain.md +17 -0
  121. package/docs/models/operations/v2creditbalanceschain.md +1 -1
  122. package/docs/models/operations/v2crediteulermarketschain.md +1 -1
  123. package/docs/models/operations/v2creditloopedpositionschain.md +1 -1
  124. package/docs/models/operations/v2creditmorphomarketschain.md +1 -1
  125. package/docs/models/operations/v2creditpositionschain.md +1 -1
  126. package/docs/sdks/credit/README.md +2 -2
  127. package/openapi_prepped_for_speakeasy.json +76 -8
  128. package/package.json +1 -1
  129. package/src/models/components/createcreditaccountrequest.ts +1 -0
  130. package/src/models/components/creditborrowrequest.ts +27 -4
  131. package/src/models/components/creditbundlerequest.ts +27 -4
  132. package/src/models/components/creditlooprequest.ts +25 -4
  133. package/src/models/components/creditrebalancerequest.ts +26 -4
  134. package/src/models/components/creditrepayrequest.ts +27 -4
  135. package/src/models/components/credittransferrequest.ts +26 -4
  136. package/src/models/components/creditunlooprequest.ts +27 -4
  137. package/src/models/operations/v2creditbalances.ts +1 -0
  138. package/src/models/operations/v2crediteulermarkets.ts +1 -0
  139. package/src/models/operations/v2creditloopedpositions.ts +1 -0
  140. package/src/models/operations/v2creditmorphomarkets.ts +1 -0
  141. package/src/models/operations/v2creditpositions.ts +1 -0
@@ -11,5 +11,5 @@ let value: V2CreditPositionsChain = "base";
11
11
  ## Values
12
12
 
13
13
  ```typescript
14
- "arbitrum" | "base" | "bsc" | "ethereum" | "tempo"
14
+ "arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
15
15
  ```
@@ -1194,7 +1194,7 @@ const compassApiSDK = new CompassApiSDK({
1194
1194
  async function run() {
1195
1195
  const result = await compassApiSDK.credit.creditBundle({
1196
1196
  owner: "<value>",
1197
- chain: "tempo",
1197
+ chain: "hyperevm",
1198
1198
  actions: [
1199
1199
  {
1200
1200
  body: {
@@ -1233,7 +1233,7 @@ const compassApiSDK = new CompassApiSDKCore({
1233
1233
  async function run() {
1234
1234
  const res = await creditCreditBundle(compassApiSDK, {
1235
1235
  owner: "<value>",
1236
- chain: "tempo",
1236
+ chain: "hyperevm",
1237
1237
  actions: [
1238
1238
  {
1239
1239
  body: {
@@ -5905,6 +5905,7 @@
5905
5905
  "base",
5906
5906
  "bsc",
5907
5907
  "ethereum",
5908
+ "hyperevm",
5908
5909
  "tempo"
5909
5910
  ],
5910
5911
  "title": "Chain",
@@ -5968,6 +5969,7 @@
5968
5969
  "base",
5969
5970
  "bsc",
5970
5971
  "ethereum",
5972
+ "hyperevm",
5971
5973
  "tempo"
5972
5974
  ],
5973
5975
  "title": "Chain",
@@ -6031,6 +6033,7 @@
6031
6033
  "base",
6032
6034
  "bsc",
6033
6035
  "ethereum",
6036
+ "hyperevm",
6034
6037
  "tempo"
6035
6038
  ],
6036
6039
  "title": "Chain",
@@ -6094,6 +6097,7 @@
6094
6097
  "base",
6095
6098
  "bsc",
6096
6099
  "ethereum",
6100
+ "hyperevm",
6097
6101
  "tempo"
6098
6102
  ],
6099
6103
  "title": "Chain",
@@ -6170,6 +6174,7 @@
6170
6174
  "base",
6171
6175
  "bsc",
6172
6176
  "ethereum",
6177
+ "hyperevm",
6173
6178
  "tempo"
6174
6179
  ],
6175
6180
  "title": "Chain",
@@ -12258,6 +12263,7 @@
12258
12263
  "base",
12259
12264
  "bsc",
12260
12265
  "ethereum",
12266
+ "hyperevm",
12261
12267
  "tempo"
12262
12268
  ],
12263
12269
  "title": "Chain",
@@ -12521,7 +12527,16 @@
12521
12527
  "example": "0xfeEb60eBf707DAA8248277058eb8D28EaeCF5425"
12522
12528
  },
12523
12529
  "chain": {
12524
- "$ref": "#/components/schemas/Chain",
12530
+ "type": "string",
12531
+ "enum": [
12532
+ "arbitrum",
12533
+ "base",
12534
+ "bsc",
12535
+ "ethereum",
12536
+ "hyperevm",
12537
+ "tempo"
12538
+ ],
12539
+ "title": "Chain",
12525
12540
  "description": "Blockchain network.",
12526
12541
  "example": "base"
12527
12542
  },
@@ -12803,7 +12818,16 @@
12803
12818
  "description": "The owner's wallet address that controls the Credit Account."
12804
12819
  },
12805
12820
  "chain": {
12806
- "$ref": "#/components/schemas/Chain",
12821
+ "type": "string",
12822
+ "enum": [
12823
+ "arbitrum",
12824
+ "base",
12825
+ "bsc",
12826
+ "ethereum",
12827
+ "hyperevm",
12828
+ "tempo"
12829
+ ],
12830
+ "title": "Chain",
12807
12831
  "description": "Target blockchain network where the bundled actions will execute."
12808
12832
  },
12809
12833
  "actions": {
@@ -13086,7 +13110,16 @@
13086
13110
  "example": "0x5e5b00ed886A6879C2B934612D2312975427fcAf"
13087
13111
  },
13088
13112
  "chain": {
13089
- "$ref": "#/components/schemas/Chain",
13113
+ "type": "string",
13114
+ "enum": [
13115
+ "arbitrum",
13116
+ "base",
13117
+ "bsc",
13118
+ "ethereum",
13119
+ "hyperevm",
13120
+ "tempo"
13121
+ ],
13122
+ "title": "Chain",
13090
13123
  "description": "Blockchain network.",
13091
13124
  "example": "ethereum"
13092
13125
  },
@@ -13488,8 +13521,16 @@
13488
13521
  "example": "0x4D3c07d1db7E4A9E44285fae9810d6549655bc74"
13489
13522
  },
13490
13523
  "chain": {
13491
- "$ref": "#/components/schemas/Chain",
13492
- "description": "Blockchain network.",
13524
+ "type": "string",
13525
+ "enum": [
13526
+ "arbitrum",
13527
+ "base",
13528
+ "bsc",
13529
+ "ethereum",
13530
+ "tempo"
13531
+ ],
13532
+ "title": "Chain",
13533
+ "description": "Blockchain network. Rebalance is not available on HyperEVM yet; use loop/unloop there.",
13493
13534
  "example": "ethereum"
13494
13535
  },
13495
13536
  "targets": {
@@ -13678,7 +13719,16 @@
13678
13719
  "example": "0x831Ad0C52C77708DA5D49dc8278C966dfdD4ddA1"
13679
13720
  },
13680
13721
  "chain": {
13681
- "$ref": "#/components/schemas/Chain",
13722
+ "type": "string",
13723
+ "enum": [
13724
+ "arbitrum",
13725
+ "base",
13726
+ "bsc",
13727
+ "ethereum",
13728
+ "hyperevm",
13729
+ "tempo"
13730
+ ],
13731
+ "title": "Chain",
13682
13732
  "description": "Blockchain network.",
13683
13733
  "example": "base"
13684
13734
  },
@@ -14008,7 +14058,16 @@
14008
14058
  "example": "0x4A83fec8c6A9A25Be28f3242a16dBaD0ab00f3a6"
14009
14059
  },
14010
14060
  "chain": {
14011
- "$ref": "#/components/schemas/Chain",
14061
+ "type": "string",
14062
+ "enum": [
14063
+ "arbitrum",
14064
+ "base",
14065
+ "bsc",
14066
+ "ethereum",
14067
+ "hyperevm",
14068
+ "tempo"
14069
+ ],
14070
+ "title": "Chain",
14012
14071
  "description": "Blockchain network.",
14013
14072
  "example": "base"
14014
14073
  },
@@ -14239,7 +14298,16 @@
14239
14298
  "example": "0x0E407CdeBD8e078E6966ef6740540d25F5897082"
14240
14299
  },
14241
14300
  "chain": {
14242
- "$ref": "#/components/schemas/Chain",
14301
+ "type": "string",
14302
+ "enum": [
14303
+ "arbitrum",
14304
+ "base",
14305
+ "bsc",
14306
+ "ethereum",
14307
+ "hyperevm",
14308
+ "tempo"
14309
+ ],
14310
+ "title": "Chain",
14243
14311
  "description": "Blockchain network.",
14244
14312
  "example": "ethereum"
14245
14313
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.94",
3
+ "version": "2.2.95",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -11,6 +11,7 @@ export const CreateCreditAccountRequestChain = {
11
11
  Base: "base",
12
12
  Bsc: "bsc",
13
13
  Ethereum: "ethereum",
14
+ Hyperevm: "hyperevm",
14
15
  Tempo: "tempo",
15
16
  } as const;
16
17
  export type CreateCreditAccountRequestChain = ClosedEnum<
@@ -4,7 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  CreditFee,
10
10
  CreditFee$Outbound,
@@ -19,6 +19,24 @@ import {
19
19
  InterestRateMode$outboundSchema,
20
20
  } from "./interestratemode.js";
21
21
 
22
+ /**
23
+ * Blockchain network.
24
+ */
25
+ export const CreditBorrowRequestChain = {
26
+ Arbitrum: "arbitrum",
27
+ Base: "base",
28
+ Bsc: "bsc",
29
+ Ethereum: "ethereum",
30
+ Hyperevm: "hyperevm",
31
+ Tempo: "tempo",
32
+ } as const;
33
+ /**
34
+ * Blockchain network.
35
+ */
36
+ export type CreditBorrowRequestChain = ClosedEnum<
37
+ typeof CreditBorrowRequestChain
38
+ >;
39
+
22
40
  /**
23
41
  * Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode.
24
42
  */
@@ -40,9 +58,9 @@ export type CreditBorrowRequest = {
40
58
  */
41
59
  owner: string;
42
60
  /**
43
- * The chain to use.
61
+ * Blockchain network.
44
62
  */
45
- chain: Chain;
63
+ chain: CreditBorrowRequestChain;
46
64
  /**
47
65
  * Which lending protocol a credit action targets.
48
66
  *
@@ -126,6 +144,11 @@ export type CreditBorrowRequest = {
126
144
  permit2Deadline?: number | null | undefined;
127
145
  };
128
146
 
147
+ /** @internal */
148
+ export const CreditBorrowRequestChain$outboundSchema: z.ZodNativeEnum<
149
+ typeof CreditBorrowRequestChain
150
+ > = z.nativeEnum(CreditBorrowRequestChain);
151
+
129
152
  /** @internal */
130
153
  export type CreditBorrowRequestAmountIn$Outbound = number | string;
131
154
 
@@ -210,7 +233,7 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
210
233
  CreditBorrowRequest
211
234
  > = z.object({
212
235
  owner: z.string(),
213
- chain: Chain$outboundSchema,
236
+ chain: CreditBorrowRequestChain$outboundSchema,
214
237
  protocol: CreditProtocol$outboundSchema.optional(),
215
238
  collateralVault: z.nullable(z.string()).optional(),
216
239
  borrowVault: z.nullable(z.string()).optional(),
@@ -4,13 +4,31 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  CreditUserOperation,
10
10
  CreditUserOperation$Outbound,
11
11
  CreditUserOperation$outboundSchema,
12
12
  } from "./credituseroperation.js";
13
13
 
14
+ /**
15
+ * Target blockchain network where the bundled actions will execute.
16
+ */
17
+ export const CreditBundleRequestChain = {
18
+ Arbitrum: "arbitrum",
19
+ Base: "base",
20
+ Bsc: "bsc",
21
+ Ethereum: "ethereum",
22
+ Hyperevm: "hyperevm",
23
+ Tempo: "tempo",
24
+ } as const;
25
+ /**
26
+ * Target blockchain network where the bundled actions will execute.
27
+ */
28
+ export type CreditBundleRequestChain = ClosedEnum<
29
+ typeof CreditBundleRequestChain
30
+ >;
31
+
14
32
  /**
15
33
  * Request to execute multiple credit actions in a single atomic transaction.
16
34
  */
@@ -20,9 +38,9 @@ export type CreditBundleRequest = {
20
38
  */
21
39
  owner: string;
22
40
  /**
23
- * The chain to use.
41
+ * Target blockchain network where the bundled actions will execute.
24
42
  */
25
- chain: Chain;
43
+ chain: CreditBundleRequestChain;
26
44
  /**
27
45
  * List of actions to bundle. Actions are executed in order.
28
46
  */
@@ -33,6 +51,11 @@ export type CreditBundleRequest = {
33
51
  gasSponsorship?: boolean | undefined;
34
52
  };
35
53
 
54
+ /** @internal */
55
+ export const CreditBundleRequestChain$outboundSchema: z.ZodNativeEnum<
56
+ typeof CreditBundleRequestChain
57
+ > = z.nativeEnum(CreditBundleRequestChain);
58
+
36
59
  /** @internal */
37
60
  export type CreditBundleRequest$Outbound = {
38
61
  owner: string;
@@ -48,7 +71,7 @@ export const CreditBundleRequest$outboundSchema: z.ZodType<
48
71
  CreditBundleRequest
49
72
  > = z.object({
50
73
  owner: z.string(),
51
- chain: Chain$outboundSchema,
74
+ chain: CreditBundleRequestChain$outboundSchema,
52
75
  actions: z.array(CreditUserOperation$outboundSchema),
53
76
  gasSponsorship: z.boolean().optional(),
54
77
  }).transform((v) => {
@@ -4,12 +4,28 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  CreditProtocol,
10
10
  CreditProtocol$outboundSchema,
11
11
  } from "./creditprotocol.js";
12
12
 
13
+ /**
14
+ * Blockchain network.
15
+ */
16
+ export const CreditLoopRequestChain = {
17
+ Arbitrum: "arbitrum",
18
+ Base: "base",
19
+ Bsc: "bsc",
20
+ Ethereum: "ethereum",
21
+ Hyperevm: "hyperevm",
22
+ Tempo: "tempo",
23
+ } as const;
24
+ /**
25
+ * Blockchain network.
26
+ */
27
+ export type CreditLoopRequestChain = ClosedEnum<typeof CreditLoopRequestChain>;
28
+
13
29
  /**
14
30
  * Collateral (in token units) already held in the Credit Account to seed the loop.
15
31
  */
@@ -43,9 +59,9 @@ export type CreditLoopRequest = {
43
59
  */
44
60
  owner: string;
45
61
  /**
46
- * The chain to use.
62
+ * Blockchain network.
47
63
  */
48
- chain: Chain;
64
+ chain: CreditLoopRequestChain;
49
65
  /**
50
66
  * Which lending protocol a credit action targets.
51
67
  *
@@ -109,6 +125,11 @@ export type CreditLoopRequest = {
109
125
  gasSponsorship?: boolean | undefined;
110
126
  };
111
127
 
128
+ /** @internal */
129
+ export const CreditLoopRequestChain$outboundSchema: z.ZodNativeEnum<
130
+ typeof CreditLoopRequestChain
131
+ > = z.nativeEnum(CreditLoopRequestChain);
132
+
112
133
  /** @internal */
113
134
  export type CreditLoopRequestInitialCollateralAmount$Outbound = number | string;
114
135
 
@@ -216,7 +237,7 @@ export const CreditLoopRequest$outboundSchema: z.ZodType<
216
237
  CreditLoopRequest
217
238
  > = z.object({
218
239
  owner: z.string(),
219
- chain: Chain$outboundSchema,
240
+ chain: CreditLoopRequestChain$outboundSchema,
220
241
  protocol: CreditProtocol$outboundSchema.optional(),
221
242
  marketId: z.nullable(z.string()).optional(),
222
243
  collateralVault: z.nullable(z.string()).optional(),
@@ -4,13 +4,30 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  RebalanceTarget,
10
10
  RebalanceTarget$Outbound,
11
11
  RebalanceTarget$outboundSchema,
12
12
  } from "./rebalancetarget.js";
13
13
 
14
+ /**
15
+ * Blockchain network. Rebalance is not available on HyperEVM yet; use loop/unloop there.
16
+ */
17
+ export const CreditRebalanceRequestChain = {
18
+ Arbitrum: "arbitrum",
19
+ Base: "base",
20
+ Bsc: "bsc",
21
+ Ethereum: "ethereum",
22
+ Tempo: "tempo",
23
+ } as const;
24
+ /**
25
+ * Blockchain network. Rebalance is not available on HyperEVM yet; use loop/unloop there.
26
+ */
27
+ export type CreditRebalanceRequestChain = ClosedEnum<
28
+ typeof CreditRebalanceRequestChain
29
+ >;
30
+
14
31
  /**
15
32
  * Request-level per-swap slippage tolerance in percent (including routing swaps). A per-target max_slippage_percent overrides it where set.
16
33
  */
@@ -30,9 +47,9 @@ export type CreditRebalanceRequest = {
30
47
  */
31
48
  owner: string;
32
49
  /**
33
- * The chain to use.
50
+ * Blockchain network. Rebalance is not available on HyperEVM yet; use loop/unloop there.
34
51
  */
35
- chain: Chain;
52
+ chain: CreditRebalanceRequestChain;
36
53
  /**
37
54
  * The positions to change. Scoped: only positions named here are touched; any position not listed is left untouched.
38
55
  */
@@ -47,6 +64,11 @@ export type CreditRebalanceRequest = {
47
64
  gasSponsorship?: boolean | undefined;
48
65
  };
49
66
 
67
+ /** @internal */
68
+ export const CreditRebalanceRequestChain$outboundSchema: z.ZodNativeEnum<
69
+ typeof CreditRebalanceRequestChain
70
+ > = z.nativeEnum(CreditRebalanceRequestChain);
71
+
50
72
  /** @internal */
51
73
  export type CreditRebalanceRequestMaxSlippagePercent$Outbound = number | string;
52
74
 
@@ -84,7 +106,7 @@ export const CreditRebalanceRequest$outboundSchema: z.ZodType<
84
106
  CreditRebalanceRequest
85
107
  > = z.object({
86
108
  owner: z.string(),
87
- chain: Chain$outboundSchema,
109
+ chain: CreditRebalanceRequestChain$outboundSchema,
88
110
  targets: z.array(RebalanceTarget$outboundSchema),
89
111
  maxSlippagePercent: z.union([z.number(), z.string()]).optional(),
90
112
  gasSponsorship: z.boolean().optional(),
@@ -4,7 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  CreditProtocol,
10
10
  CreditProtocol$outboundSchema,
@@ -14,6 +14,24 @@ import {
14
14
  InterestRateMode$outboundSchema,
15
15
  } from "./interestratemode.js";
16
16
 
17
+ /**
18
+ * Blockchain network.
19
+ */
20
+ export const CreditRepayRequestChain = {
21
+ Arbitrum: "arbitrum",
22
+ Base: "base",
23
+ Bsc: "bsc",
24
+ Ethereum: "ethereum",
25
+ Hyperevm: "hyperevm",
26
+ Tempo: "tempo",
27
+ } as const;
28
+ /**
29
+ * Blockchain network.
30
+ */
31
+ export type CreditRepayRequestChain = ClosedEnum<
32
+ typeof CreditRepayRequestChain
33
+ >;
34
+
17
35
  /**
18
36
  * Amount of repay_token to repay (in token units, not wei).
19
37
  */
@@ -35,9 +53,9 @@ export type CreditRepayRequest = {
35
53
  */
36
54
  owner: string;
37
55
  /**
38
- * The chain to use.
56
+ * Blockchain network.
39
57
  */
40
- chain: Chain;
58
+ chain: CreditRepayRequestChain;
41
59
  /**
42
60
  * Which lending protocol a credit action targets.
43
61
  *
@@ -117,6 +135,11 @@ export type CreditRepayRequest = {
117
135
  permit2Deadline?: number | null | undefined;
118
136
  };
119
137
 
138
+ /** @internal */
139
+ export const CreditRepayRequestChain$outboundSchema: z.ZodNativeEnum<
140
+ typeof CreditRepayRequestChain
141
+ > = z.nativeEnum(CreditRepayRequestChain);
142
+
120
143
  /** @internal */
121
144
  export type RepayAmount$Outbound = number | string;
122
145
 
@@ -192,7 +215,7 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
192
215
  CreditRepayRequest
193
216
  > = z.object({
194
217
  owner: z.string(),
195
- chain: Chain$outboundSchema,
218
+ chain: CreditRepayRequestChain$outboundSchema,
196
219
  protocol: CreditProtocol$outboundSchema.optional(),
197
220
  borrowVault: z.nullable(z.string()).optional(),
198
221
  marketId: z.nullable(z.string()).optional(),
@@ -5,7 +5,24 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { ClosedEnum } from "../../types/enums.js";
8
- import { Chain, Chain$outboundSchema } from "./chain.js";
8
+
9
+ /**
10
+ * Blockchain network.
11
+ */
12
+ export const CreditTransferRequestChain = {
13
+ Arbitrum: "arbitrum",
14
+ Base: "base",
15
+ Bsc: "bsc",
16
+ Ethereum: "ethereum",
17
+ Hyperevm: "hyperevm",
18
+ Tempo: "tempo",
19
+ } as const;
20
+ /**
21
+ * Blockchain network.
22
+ */
23
+ export type CreditTransferRequestChain = ClosedEnum<
24
+ typeof CreditTransferRequestChain
25
+ >;
9
26
 
10
27
  /**
11
28
  * The amount of tokens to transfer (in token units, not wei).
@@ -32,9 +49,9 @@ export type CreditTransferRequest = {
32
49
  */
33
50
  owner: string;
34
51
  /**
35
- * The chain to use.
52
+ * Blockchain network.
36
53
  */
37
- chain: Chain;
54
+ chain: CreditTransferRequestChain;
38
55
  /**
39
56
  * The token to transfer.
40
57
  */
@@ -57,6 +74,11 @@ export type CreditTransferRequest = {
57
74
  spender?: string | null | undefined;
58
75
  };
59
76
 
77
+ /** @internal */
78
+ export const CreditTransferRequestChain$outboundSchema: z.ZodNativeEnum<
79
+ typeof CreditTransferRequestChain
80
+ > = z.nativeEnum(CreditTransferRequestChain);
81
+
60
82
  /** @internal */
61
83
  export type CreditTransferRequestAmount$Outbound = number | string;
62
84
 
@@ -100,7 +122,7 @@ export const CreditTransferRequest$outboundSchema: z.ZodType<
100
122
  CreditTransferRequest
101
123
  > = z.object({
102
124
  owner: z.string(),
103
- chain: Chain$outboundSchema,
125
+ chain: CreditTransferRequestChain$outboundSchema,
104
126
  token: z.string(),
105
127
  amount: z.union([z.number(), z.string()]),
106
128
  action: CreditTransferRequestAction$outboundSchema,
@@ -4,12 +4,30 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
- import { Chain, Chain$outboundSchema } from "./chain.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
8
  import {
9
9
  CreditProtocol,
10
10
  CreditProtocol$outboundSchema,
11
11
  } from "./creditprotocol.js";
12
12
 
13
+ /**
14
+ * Blockchain network.
15
+ */
16
+ export const CreditUnloopRequestChain = {
17
+ Arbitrum: "arbitrum",
18
+ Base: "base",
19
+ Bsc: "bsc",
20
+ Ethereum: "ethereum",
21
+ Hyperevm: "hyperevm",
22
+ Tempo: "tempo",
23
+ } as const;
24
+ /**
25
+ * Blockchain network.
26
+ */
27
+ export type CreditUnloopRequestChain = ClosedEnum<
28
+ typeof CreditUnloopRequestChain
29
+ >;
30
+
13
31
  /**
14
32
  * Target leverage after the unwind. Omit (null) for a FULL unwind: the debt is cleared exactly — accrued interest included — and all pair collateral is withdrawn back to the Credit Account. `1` runs the same exact debt close but leaves the collateral supplied (earning). A value greater than 1 delevers the position to that multiplier. Must be below the position's current multiplier.
15
33
  */
@@ -33,9 +51,9 @@ export type CreditUnloopRequest = {
33
51
  */
34
52
  owner: string;
35
53
  /**
36
- * The chain to use.
54
+ * Blockchain network.
37
55
  */
38
- chain: Chain;
56
+ chain: CreditUnloopRequestChain;
39
57
  /**
40
58
  * Which lending protocol a credit action targets.
41
59
  *
@@ -91,6 +109,11 @@ export type CreditUnloopRequest = {
91
109
  gasSponsorship?: boolean | undefined;
92
110
  };
93
111
 
112
+ /** @internal */
113
+ export const CreditUnloopRequestChain$outboundSchema: z.ZodNativeEnum<
114
+ typeof CreditUnloopRequestChain
115
+ > = z.nativeEnum(CreditUnloopRequestChain);
116
+
94
117
  /** @internal */
95
118
  export type CreditUnloopRequestTargetMultiplier$Outbound = number | string;
96
119
 
@@ -155,7 +178,7 @@ export const CreditUnloopRequest$outboundSchema: z.ZodType<
155
178
  CreditUnloopRequest
156
179
  > = z.object({
157
180
  owner: z.string(),
158
- chain: Chain$outboundSchema,
181
+ chain: CreditUnloopRequestChain$outboundSchema,
159
182
  protocol: CreditProtocol$outboundSchema.optional(),
160
183
  marketId: z.nullable(z.string()).optional(),
161
184
  collateralVault: z.nullable(z.string()).optional(),
@@ -10,6 +10,7 @@ export const V2CreditBalancesChain = {
10
10
  Base: "base",
11
11
  Bsc: "bsc",
12
12
  Ethereum: "ethereum",
13
+ Hyperevm: "hyperevm",
13
14
  Tempo: "tempo",
14
15
  } as const;
15
16
  export type V2CreditBalancesChain = ClosedEnum<typeof V2CreditBalancesChain>;
@@ -10,6 +10,7 @@ export const V2CreditEulerMarketsChain = {
10
10
  Base: "base",
11
11
  Bsc: "bsc",
12
12
  Ethereum: "ethereum",
13
+ Hyperevm: "hyperevm",
13
14
  Tempo: "tempo",
14
15
  } as const;
15
16
  export type V2CreditEulerMarketsChain = ClosedEnum<
@@ -10,6 +10,7 @@ export const V2CreditLoopedPositionsChain = {
10
10
  Base: "base",
11
11
  Bsc: "bsc",
12
12
  Ethereum: "ethereum",
13
+ Hyperevm: "hyperevm",
13
14
  Tempo: "tempo",
14
15
  } as const;
15
16
  export type V2CreditLoopedPositionsChain = ClosedEnum<