@compass-labs/api-sdk 2.2.105 → 2.2.107

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 (164) hide show
  1. package/README.md +6 -4
  2. package/codeSamples_typescript.yaml +7 -1
  3. package/dist/commonjs/funcs/creditCreditSwap.d.ts +23 -0
  4. package/dist/commonjs/funcs/creditCreditSwap.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/creditCreditSwap.js +124 -0
  6. package/dist/commonjs/funcs/creditCreditSwap.js.map +1 -0
  7. package/dist/commonjs/funcs/earnEarnSwap.d.ts +7 -7
  8. package/dist/commonjs/funcs/earnEarnSwap.js +7 -7
  9. package/dist/commonjs/lib/config.d.ts +2 -2
  10. package/dist/commonjs/lib/config.js +2 -2
  11. package/dist/commonjs/lib/config.js.map +1 -1
  12. package/dist/commonjs/models/components/chain.d.ts +1 -0
  13. package/dist/commonjs/models/components/chain.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/chain.js +1 -0
  15. package/dist/commonjs/models/components/chain.js.map +1 -1
  16. package/dist/commonjs/models/components/creditswaprequest.d.ts +112 -0
  17. package/dist/commonjs/models/components/creditswaprequest.d.ts.map +1 -0
  18. package/dist/commonjs/models/components/creditswaprequest.js +101 -0
  19. package/dist/commonjs/models/components/creditswaprequest.js.map +1 -0
  20. package/dist/commonjs/models/components/creditswapresponse.d.ts +51 -0
  21. package/dist/commonjs/models/components/creditswapresponse.d.ts.map +1 -0
  22. package/dist/commonjs/models/components/creditswapresponse.js +74 -0
  23. package/dist/commonjs/models/components/creditswapresponse.js.map +1 -0
  24. package/dist/commonjs/models/components/earnswaprequest.d.ts +2 -3
  25. package/dist/commonjs/models/components/earnswaprequest.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/earnswaprequest.js.map +1 -1
  27. package/dist/commonjs/models/components/eulermarket.d.ts +12 -0
  28. package/dist/commonjs/models/components/eulermarket.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/eulermarket.js +6 -0
  30. package/dist/commonjs/models/components/eulermarket.js.map +1 -1
  31. package/dist/commonjs/models/components/eulermarketcollateral.d.ts +4 -0
  32. package/dist/commonjs/models/components/eulermarketcollateral.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/eulermarketcollateral.js +2 -0
  34. package/dist/commonjs/models/components/eulermarketcollateral.js.map +1 -1
  35. package/dist/commonjs/models/components/index.d.ts +2 -0
  36. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/index.js +2 -0
  38. package/dist/commonjs/models/components/index.js.map +1 -1
  39. package/dist/commonjs/models/operations/v2earnswapquote.d.ts +1 -0
  40. package/dist/commonjs/models/operations/v2earnswapquote.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/v2earnswapquote.js +1 -0
  42. package/dist/commonjs/models/operations/v2earnswapquote.js.map +1 -1
  43. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.d.ts +1 -0
  44. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.js +1 -0
  46. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.js.map +1 -1
  47. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts +1 -0
  48. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js +1 -0
  50. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  51. package/dist/commonjs/models/operations/v2tokenizedassetspositions.d.ts +1 -0
  52. package/dist/commonjs/models/operations/v2tokenizedassetspositions.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/v2tokenizedassetspositions.js +1 -0
  54. package/dist/commonjs/models/operations/v2tokenizedassetspositions.js.map +1 -1
  55. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.d.ts +1 -0
  56. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.d.ts.map +1 -1
  57. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.js +1 -0
  58. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.js.map +1 -1
  59. package/dist/commonjs/sdk/credit.d.ts +12 -0
  60. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  61. package/dist/commonjs/sdk/credit.js +15 -0
  62. package/dist/commonjs/sdk/credit.js.map +1 -1
  63. package/dist/commonjs/sdk/earn.d.ts +7 -7
  64. package/dist/commonjs/sdk/earn.js +7 -7
  65. package/dist/esm/funcs/creditCreditSwap.d.ts +23 -0
  66. package/dist/esm/funcs/creditCreditSwap.d.ts.map +1 -0
  67. package/dist/esm/funcs/creditCreditSwap.js +88 -0
  68. package/dist/esm/funcs/creditCreditSwap.js.map +1 -0
  69. package/dist/esm/funcs/earnEarnSwap.d.ts +7 -7
  70. package/dist/esm/funcs/earnEarnSwap.js +7 -7
  71. package/dist/esm/lib/config.d.ts +2 -2
  72. package/dist/esm/lib/config.js +2 -2
  73. package/dist/esm/lib/config.js.map +1 -1
  74. package/dist/esm/models/components/chain.d.ts +1 -0
  75. package/dist/esm/models/components/chain.d.ts.map +1 -1
  76. package/dist/esm/models/components/chain.js +1 -0
  77. package/dist/esm/models/components/chain.js.map +1 -1
  78. package/dist/esm/models/components/creditswaprequest.d.ts +112 -0
  79. package/dist/esm/models/components/creditswaprequest.d.ts.map +1 -0
  80. package/dist/esm/models/components/creditswaprequest.js +62 -0
  81. package/dist/esm/models/components/creditswaprequest.js.map +1 -0
  82. package/dist/esm/models/components/creditswapresponse.d.ts +51 -0
  83. package/dist/esm/models/components/creditswapresponse.d.ts.map +1 -0
  84. package/dist/esm/models/components/creditswapresponse.js +37 -0
  85. package/dist/esm/models/components/creditswapresponse.js.map +1 -0
  86. package/dist/esm/models/components/earnswaprequest.d.ts +2 -3
  87. package/dist/esm/models/components/earnswaprequest.d.ts.map +1 -1
  88. package/dist/esm/models/components/earnswaprequest.js.map +1 -1
  89. package/dist/esm/models/components/eulermarket.d.ts +12 -0
  90. package/dist/esm/models/components/eulermarket.d.ts.map +1 -1
  91. package/dist/esm/models/components/eulermarket.js +6 -0
  92. package/dist/esm/models/components/eulermarket.js.map +1 -1
  93. package/dist/esm/models/components/eulermarketcollateral.d.ts +4 -0
  94. package/dist/esm/models/components/eulermarketcollateral.d.ts.map +1 -1
  95. package/dist/esm/models/components/eulermarketcollateral.js +2 -0
  96. package/dist/esm/models/components/eulermarketcollateral.js.map +1 -1
  97. package/dist/esm/models/components/index.d.ts +2 -0
  98. package/dist/esm/models/components/index.d.ts.map +1 -1
  99. package/dist/esm/models/components/index.js +2 -0
  100. package/dist/esm/models/components/index.js.map +1 -1
  101. package/dist/esm/models/operations/v2earnswapquote.d.ts +1 -0
  102. package/dist/esm/models/operations/v2earnswapquote.d.ts.map +1 -1
  103. package/dist/esm/models/operations/v2earnswapquote.js +1 -0
  104. package/dist/esm/models/operations/v2earnswapquote.js.map +1 -1
  105. package/dist/esm/models/operations/v2tokenizedassetsbalances.d.ts +1 -0
  106. package/dist/esm/models/operations/v2tokenizedassetsbalances.d.ts.map +1 -1
  107. package/dist/esm/models/operations/v2tokenizedassetsbalances.js +1 -0
  108. package/dist/esm/models/operations/v2tokenizedassetsbalances.js.map +1 -1
  109. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts +1 -0
  110. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  111. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js +1 -0
  112. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  113. package/dist/esm/models/operations/v2tokenizedassetspositions.d.ts +1 -0
  114. package/dist/esm/models/operations/v2tokenizedassetspositions.d.ts.map +1 -1
  115. package/dist/esm/models/operations/v2tokenizedassetspositions.js +1 -0
  116. package/dist/esm/models/operations/v2tokenizedassetspositions.js.map +1 -1
  117. package/dist/esm/models/operations/v2tokenizedassetsredemptions.d.ts +1 -0
  118. package/dist/esm/models/operations/v2tokenizedassetsredemptions.d.ts.map +1 -1
  119. package/dist/esm/models/operations/v2tokenizedassetsredemptions.js +1 -0
  120. package/dist/esm/models/operations/v2tokenizedassetsredemptions.js.map +1 -1
  121. package/dist/esm/sdk/credit.d.ts +12 -0
  122. package/dist/esm/sdk/credit.d.ts.map +1 -1
  123. package/dist/esm/sdk/credit.js +15 -0
  124. package/dist/esm/sdk/credit.js.map +1 -1
  125. package/dist/esm/sdk/earn.d.ts +7 -7
  126. package/dist/esm/sdk/earn.js +7 -7
  127. package/docs/models/components/chain.md +1 -1
  128. package/docs/models/components/creditswaprequest.md +36 -0
  129. package/docs/models/components/creditswaprequestamountin.md +19 -0
  130. package/docs/models/components/creditswaprequestchain.md +17 -0
  131. package/docs/models/components/creditswaprequestpricing.md +17 -0
  132. package/docs/models/components/creditswaprequestslippage.md +19 -0
  133. package/docs/models/components/creditswapresponse.md +25 -0
  134. package/docs/models/components/creditswapresponseswapprovider.md +17 -0
  135. package/docs/models/components/earnswaprequest.md +2 -3
  136. package/docs/models/components/eulermarket.md +21 -18
  137. package/docs/models/components/eulermarketcollateral.md +11 -10
  138. package/docs/models/operations/v2earnswapquotechain.md +1 -1
  139. package/docs/models/operations/v2tokenizedassetsbalanceschain.md +2 -2
  140. package/docs/models/operations/v2tokenizedassetsmarketssymbolchain.md +2 -2
  141. package/docs/models/operations/v2tokenizedassetspositionschain.md +1 -1
  142. package/docs/models/operations/v2tokenizedassetsredemptionschain.md +1 -1
  143. package/docs/sdks/credit/README.md +94 -0
  144. package/docs/sdks/earn/README.md +7 -7
  145. package/docs/sdks/tokenizedassets/README.md +2 -2
  146. package/openapi_prepped_for_speakeasy.json +272 -3
  147. package/package.json +1 -1
  148. package/src/funcs/creditCreditSwap.ts +176 -0
  149. package/src/funcs/earnEarnSwap.ts +7 -7
  150. package/src/lib/config.ts +2 -2
  151. package/src/models/components/chain.ts +1 -0
  152. package/src/models/components/creditswaprequest.ts +186 -0
  153. package/src/models/components/creditswapresponse.ts +99 -0
  154. package/src/models/components/earnswaprequest.ts +2 -3
  155. package/src/models/components/eulermarket.ts +18 -0
  156. package/src/models/components/eulermarketcollateral.ts +6 -0
  157. package/src/models/components/index.ts +2 -0
  158. package/src/models/operations/v2earnswapquote.ts +1 -0
  159. package/src/models/operations/v2tokenizedassetsbalances.ts +1 -0
  160. package/src/models/operations/v2tokenizedassetsmarketssymbol.ts +1 -0
  161. package/src/models/operations/v2tokenizedassetspositions.ts +1 -0
  162. package/src/models/operations/v2tokenizedassetsredemptions.ts +1 -0
  163. package/src/sdk/credit.ts +23 -0
  164. package/src/sdk/earn.ts +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,0EAAoE;AACpE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,sEAAgE;AAChE,4FAAsF;AACtF,wFAAkF;AAClF,gFAA0E;AAC1E,gFAA0E;AAC1E,wEAAkE;AAClE,8EAAwE;AACxE,0EAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CACnB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAClB,OAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,qBAAqB,CACzB,OAAkD,EAClD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA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nB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAvTD,wBAuTC"}
1
+ {"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,0EAAoE;AACpE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,sEAAgE;AAChE,4FAAsF;AACtF,wFAAkF;AAClF,gFAA0E;AAC1E,gFAA0E;AAC1E,wEAAkE;AAClE,sEAAgE;AAChE,8EAAwE;AACxE,0EAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CACnB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAA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I,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,eAAe,CACnB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA7UD,wBA6UC"}
@@ -161,16 +161,16 @@ export declare class Earn extends ClientSDK {
161
161
  */
162
162
  earnManage(request: components.EarnManageRequest, options?: RequestOptions): Promise<components.EarnManageResponse>;
163
163
  /**
164
- * Swap tokens within Earn Account
164
+ * Swap tokens
165
165
  *
166
166
  * @remarks
167
- * Swap tokens within an Earn Account.
167
+ * Swap one token for another inside an Earn Account.
168
168
  *
169
- * Use this endpoint to exchange one token for another without transferring funds out of the Earn Account.
170
- *
171
- * The swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault—all in one transaction.
172
- *
173
- * Returns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.
169
+ * Exchanges tokens the Earn Account already holds in a single atomic
170
+ * transaction, so funds never leave it, and can be chained with other actions
171
+ * through the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)
172
+ * (for example, swap ETH to USDC and deposit the USDC into a vault at once).
173
+ * Returns an unsigned transaction to sign and the expected output amount.
174
174
  */
175
175
  earnSwap(request: components.EarnSwapRequest, options?: RequestOptions): Promise<components.EarnSwapResponse>;
176
176
  /**
@@ -198,16 +198,16 @@ class Earn extends sdks_js_1.ClientSDK {
198
198
  return (0, fp_js_1.unwrapAsync)((0, earnEarnManage_js_1.earnEarnManage)(this, request, options));
199
199
  }
200
200
  /**
201
- * Swap tokens within Earn Account
201
+ * Swap tokens
202
202
  *
203
203
  * @remarks
204
- * Swap tokens within an Earn Account.
204
+ * Swap one token for another inside an Earn Account.
205
205
  *
206
- * Use this endpoint to exchange one token for another without transferring funds out of the Earn Account.
207
- *
208
- * The swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault—all in one transaction.
209
- *
210
- * Returns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.
206
+ * Exchanges tokens the Earn Account already holds in a single atomic
207
+ * transaction, so funds never leave it, and can be chained with other actions
208
+ * through the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)
209
+ * (for example, swap ETH to USDC and deposit the USDC into a vault at once).
210
+ * Returns an unsigned transaction to sign and the expected output amount.
211
211
  */
212
212
  async earnSwap(request, options) {
213
213
  return (0, fp_js_1.unwrapAsync)((0, earnEarnSwap_js_1.earnEarnSwap)(this, request, options));
@@ -0,0 +1,23 @@
1
+ import { CompassApiSDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import * as components from "../models/components/index.js";
4
+ import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
+ import * as errors from "../models/errors/index.js";
7
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Swap tokens
13
+ *
14
+ * @remarks
15
+ * Swap one token for another inside a Credit Account.
16
+ *
17
+ * Exchanges tokens the Credit Account already holds in a single atomic
18
+ * transaction, so idle or borrowed balances can be converted without moving
19
+ * funds out first. Returns an unsigned transaction to sign, the expected
20
+ * output amount, and which route priced the swap.
21
+ */
22
+ export declare function creditCreditSwap(client: CompassApiSDKCore, request: components.CreditSwapRequest, options?: RequestOptions): APIPromise<Result<components.CreditSwapResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
23
+ //# sourceMappingURL=creditCreditSwap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditCreditSwap.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditSwap.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kBAAkB,EAC3B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { encodeJSON } from "../lib/encodings.js";
5
+ import { matchStatusCode } from "../lib/http.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import * as components from "../models/components/index.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import { APIPromise } from "../types/async.js";
14
+ /**
15
+ * Swap tokens
16
+ *
17
+ * @remarks
18
+ * Swap one token for another inside a Credit Account.
19
+ *
20
+ * Exchanges tokens the Credit Account already holds in a single atomic
21
+ * transaction, so idle or borrowed balances can be converted without moving
22
+ * funds out first. Returns an unsigned transaction to sign, the expected
23
+ * output amount, and which route priced the swap.
24
+ */
25
+ export function creditCreditSwap(client, request, options) {
26
+ return new APIPromise($do(client, request, options));
27
+ }
28
+ async function $do(client, request, options) {
29
+ const parsed = safeParse(request, (value) => components.CreditSwapRequest$outboundSchema.parse(value), "Input validation failed");
30
+ if (!parsed.ok) {
31
+ return [parsed, { status: "invalid" }];
32
+ }
33
+ const payload = parsed.value;
34
+ const body = encodeJSON("body", payload, { explode: true });
35
+ const path = pathToFunc("/v2/credit/swap")();
36
+ const headers = new Headers(compactMap({
37
+ "Content-Type": "application/json",
38
+ Accept: "application/json",
39
+ }));
40
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
41
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
42
+ const requestSecurity = resolveGlobalSecurity(securityInput);
43
+ const context = {
44
+ options: client._options,
45
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
46
+ operationID: "v2_credit_swap",
47
+ oAuth2Scopes: null,
48
+ resolvedSecurity: requestSecurity,
49
+ securitySource: client._options.apiKeyAuth,
50
+ retryConfig: options?.retries
51
+ || client._options.retryConfig
52
+ || { strategy: "none" },
53
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
54
+ };
55
+ const requestRes = client._createRequest(context, {
56
+ security: requestSecurity,
57
+ method: "POST",
58
+ baseURL: options?.serverURL,
59
+ path: path,
60
+ headers: headers,
61
+ body: body,
62
+ userAgent: client._options.userAgent,
63
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
64
+ }, options);
65
+ if (!requestRes.ok) {
66
+ return [requestRes, { status: "invalid" }];
67
+ }
68
+ const req = requestRes.value;
69
+ const doResult = await client._do(req, {
70
+ context,
71
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
72
+ retryConfig: context.retryConfig,
73
+ retryCodes: context.retryCodes,
74
+ });
75
+ if (!doResult.ok) {
76
+ return [doResult, { status: "request-error", request: req }];
77
+ }
78
+ const response = doResult.value;
79
+ const responseFields = {
80
+ HttpMeta: { Response: response, Request: req },
81
+ };
82
+ const [result] = await M.match(M.json(200, components.CreditSwapResponse$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
83
+ if (!result.ok) {
84
+ return [result, { status: "complete", request: req, response }];
85
+ }
86
+ return [result, { status: "complete", request: req, response }];
87
+ }
88
+ //# sourceMappingURL=creditCreditSwap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditCreditSwap.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditSwap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAS5D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAW,UAA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AAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,gCAAgC,CAAC,EACxD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -9,16 +9,16 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
9
  import { APIPromise } from "../types/async.js";
10
10
  import { Result } from "../types/fp.js";
11
11
  /**
12
- * Swap tokens within Earn Account
12
+ * Swap tokens
13
13
  *
14
14
  * @remarks
15
- * Swap tokens within an Earn Account.
15
+ * Swap one token for another inside an Earn Account.
16
16
  *
17
- * Use this endpoint to exchange one token for another without transferring funds out of the Earn Account.
18
- *
19
- * The swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault—all in one transaction.
20
- *
21
- * Returns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.
17
+ * Exchanges tokens the Earn Account already holds in a single atomic
18
+ * transaction, so funds never leave it, and can be chained with other actions
19
+ * through the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)
20
+ * (for example, swap ETH to USDC and deposit the USDC into a vault at once).
21
+ * Returns an unsigned transaction to sign and the expected output amount.
22
22
  */
23
23
  export declare function earnEarnSwap(client: CompassApiSDKCore, request: components.EarnSwapRequest, options?: RequestOptions): APIPromise<Result<components.EarnSwapResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
24
24
  //# sourceMappingURL=earnEarnSwap.d.ts.map
@@ -12,16 +12,16 @@ import * as components from "../models/components/index.js";
12
12
  import * as errors from "../models/errors/index.js";
13
13
  import { APIPromise } from "../types/async.js";
14
14
  /**
15
- * Swap tokens within Earn Account
15
+ * Swap tokens
16
16
  *
17
17
  * @remarks
18
- * Swap tokens within an Earn Account.
18
+ * Swap one token for another inside an Earn Account.
19
19
  *
20
- * Use this endpoint to exchange one token for another without transferring funds out of the Earn Account.
21
- *
22
- * The swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault—all in one transaction.
23
- *
24
- * Returns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.
20
+ * Exchanges tokens the Earn Account already holds in a single atomic
21
+ * transaction, so funds never leave it, and can be chained with other actions
22
+ * through the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)
23
+ * (for example, swap ETH to USDC and deposit the USDC into a vault at once).
24
+ * Returns an unsigned transaction to sign and the expected output amount.
25
25
  */
26
26
  export function earnEarnSwap(client, request, options) {
27
27
  return new APIPromise($do(client, request, options));
@@ -32,7 +32,7 @@ export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "0.0.1";
34
34
  readonly sdkVersion: "2.0.0";
35
- readonly genVersion: "2.935.1";
36
- readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.935.1 0.0.1 @compass-labs/api-sdk";
35
+ readonly genVersion: "2.937.18";
36
+ readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.937.18 0.0.1 @compass-labs/api-sdk";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -28,7 +28,7 @@ export const SDK_METADATA = {
28
28
  language: "typescript",
29
29
  openapiDocVersion: "0.0.1",
30
30
  sdkVersion: "2.0.0",
31
- genVersion: "2.935.1",
32
- userAgent: "speakeasy-sdk/typescript 2.0.0 2.935.1 0.0.1 @compass-labs/api-sdk",
31
+ genVersion: "2.937.18",
32
+ userAgent: "speakeasy-sdk/typescript 2.0.0 2.937.18 0.0.1 @compass-labs/api-sdk",
33
33
  };
34
34
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAU,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;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AAI,SAAS,GAAG,CAAC,IAAI,SAAS,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,wBAAwB,SAAS,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,YAAY;IACtB,iBAAiB,EAAE,OAAO;IAC1B,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,UAAU;IACtB,SAAS,EACP,qEAAqE;CAC/D,CAAC"}
@@ -10,6 +10,7 @@ export declare const Chain: {
10
10
  readonly Hyperevm: "hyperevm";
11
11
  readonly Tempo: "tempo";
12
12
  readonly Bsc: "bsc";
13
+ readonly Robinhood: "robinhood";
13
14
  readonly EthereumSepolia: "ethereum_sepolia";
14
15
  };
15
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/models/components/chain.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;CAQR,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,KAAK,CAE7D,CAAC;AACF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,KAAK,CAC1C,CAAC"}
1
+ {"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/models/components/chain.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;CASR,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAE7C,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,KAAK,CAE7D,CAAC;AACF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,KAAK,CAC1C,CAAC"}
@@ -12,6 +12,7 @@ export const Chain = {
12
12
  Hyperevm: "hyperevm",
13
13
  Tempo: "tempo",
14
14
  Bsc: "bsc",
15
+ Robinhood: "robinhood",
15
16
  EthereumSepolia: "ethereum_sepolia",
16
17
  };
17
18
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/models/components/chain.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,eAAe,EAAE,kBAAkB;CAC3B,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAkC,CAAC,CAAC,UAAU,CAC5E,KAAK,CACN,CAAC;AACF,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAC/B,mBAAmB,CAAC"}
1
+ {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/models/components/chain.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,eAAe,EAAE,kBAAkB;CAC3B,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAkC,CAAC,CAAC,UAAU,CAC5E,KAAK,CACN,CAAC;AACF,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAC/B,mBAAmB,CAAC"}
@@ -0,0 +1,112 @@
1
+ import * as z from "zod/v3";
2
+ import { ClosedEnum } from "../../types/enums.js";
3
+ /**
4
+ * Human-readable amount of `token_in` to swap (token units, not wei).
5
+ */
6
+ export type CreditSwapRequestAmountIn = number | string;
7
+ /**
8
+ * Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Bounds the market route only; a firm quote fills exactly and ignores it.
9
+ */
10
+ export type CreditSwapRequestSlippage = number | string;
11
+ /**
12
+ * Target blockchain network where the swap will execute.
13
+ */
14
+ export declare const CreditSwapRequestChain: {
15
+ readonly Arbitrum: "arbitrum";
16
+ readonly Base: "base";
17
+ readonly Bsc: "bsc";
18
+ readonly Ethereum: "ethereum";
19
+ readonly Hyperevm: "hyperevm";
20
+ readonly Tempo: "tempo";
21
+ };
22
+ /**
23
+ * Target blockchain network where the swap will execute.
24
+ */
25
+ export type CreditSwapRequestChain = ClosedEnum<typeof CreditSwapRequestChain>;
26
+ /**
27
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
28
+ */
29
+ export declare const CreditSwapRequestPricing: {
30
+ readonly Auto: "auto";
31
+ readonly Firm: "firm";
32
+ readonly Market: "market";
33
+ };
34
+ /**
35
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
36
+ */
37
+ export type CreditSwapRequestPricing = ClosedEnum<typeof CreditSwapRequestPricing>;
38
+ /**
39
+ * Swap one token held in the Credit Account for another, in a single
40
+ *
41
+ * @remarks
42
+ * atomic transaction, at a firm quote where one covers the pair and at market
43
+ * rate otherwise.
44
+ */
45
+ export type CreditSwapRequest = {
46
+ /**
47
+ * Action type identifier for swap operations.
48
+ */
49
+ actionType?: "V2_SWAP" | undefined;
50
+ /**
51
+ * Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address.
52
+ */
53
+ tokenIn: string;
54
+ /**
55
+ * Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address.
56
+ */
57
+ tokenOut: string;
58
+ /**
59
+ * Human-readable amount of `token_in` to swap (token units, not wei).
60
+ */
61
+ amountIn: number | string;
62
+ /**
63
+ * Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Bounds the market route only; a firm quote fills exactly and ignores it.
64
+ */
65
+ slippage?: number | string | undefined;
66
+ /**
67
+ * The owner's wallet address. Their Credit Account must already exist (create it with `/v2/credit/create_account`) and hold `token_in` (deposit with `/v2/credit/transfer`).
68
+ */
69
+ owner: string;
70
+ /**
71
+ * Target blockchain network where the swap will execute.
72
+ */
73
+ chain: CreditSwapRequestChain;
74
+ /**
75
+ * Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Gas-sponsored builds always execute at market rate.
76
+ */
77
+ gasSponsorship?: boolean | undefined;
78
+ /**
79
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
80
+ */
81
+ pricing?: CreditSwapRequestPricing | undefined;
82
+ };
83
+ /** @internal */
84
+ export type CreditSwapRequestAmountIn$Outbound = number | string;
85
+ /** @internal */
86
+ export declare const CreditSwapRequestAmountIn$outboundSchema: z.ZodType<CreditSwapRequestAmountIn$Outbound, z.ZodTypeDef, CreditSwapRequestAmountIn>;
87
+ export declare function creditSwapRequestAmountInToJSON(creditSwapRequestAmountIn: CreditSwapRequestAmountIn): string;
88
+ /** @internal */
89
+ export type CreditSwapRequestSlippage$Outbound = number | string;
90
+ /** @internal */
91
+ export declare const CreditSwapRequestSlippage$outboundSchema: z.ZodType<CreditSwapRequestSlippage$Outbound, z.ZodTypeDef, CreditSwapRequestSlippage>;
92
+ export declare function creditSwapRequestSlippageToJSON(creditSwapRequestSlippage: CreditSwapRequestSlippage): string;
93
+ /** @internal */
94
+ export declare const CreditSwapRequestChain$outboundSchema: z.ZodNativeEnum<typeof CreditSwapRequestChain>;
95
+ /** @internal */
96
+ export declare const CreditSwapRequestPricing$outboundSchema: z.ZodNativeEnum<typeof CreditSwapRequestPricing>;
97
+ /** @internal */
98
+ export type CreditSwapRequest$Outbound = {
99
+ action_type?: "V2_SWAP" | undefined;
100
+ token_in: string;
101
+ token_out: string;
102
+ amount_in: number | string;
103
+ slippage?: number | string | undefined;
104
+ owner: string;
105
+ chain: string;
106
+ gas_sponsorship?: boolean | undefined;
107
+ pricing?: string | undefined;
108
+ };
109
+ /** @internal */
110
+ export declare const CreditSwapRequest$outboundSchema: z.ZodType<CreditSwapRequest$Outbound, z.ZodTypeDef, CreditSwapRequest>;
111
+ export declare function creditSwapRequestToJSON(creditSwapRequest: CreditSwapRequest): string;
112
+ //# sourceMappingURL=creditswaprequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditswaprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditswaprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;CAOzB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,sBAAsB,CAAC;IAC9B;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AAC;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CAmBjB,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR"}
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ /**
7
+ * Target blockchain network where the swap will execute.
8
+ */
9
+ export const CreditSwapRequestChain = {
10
+ Arbitrum: "arbitrum",
11
+ Base: "base",
12
+ Bsc: "bsc",
13
+ Ethereum: "ethereum",
14
+ Hyperevm: "hyperevm",
15
+ Tempo: "tempo",
16
+ };
17
+ /**
18
+ * Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
19
+ */
20
+ export const CreditSwapRequestPricing = {
21
+ Auto: "auto",
22
+ Firm: "firm",
23
+ Market: "market",
24
+ };
25
+ /** @internal */
26
+ export const CreditSwapRequestAmountIn$outboundSchema = z.union([z.number(), z.string()]);
27
+ export function creditSwapRequestAmountInToJSON(creditSwapRequestAmountIn) {
28
+ return JSON.stringify(CreditSwapRequestAmountIn$outboundSchema.parse(creditSwapRequestAmountIn));
29
+ }
30
+ /** @internal */
31
+ export const CreditSwapRequestSlippage$outboundSchema = z.union([z.number(), z.string()]);
32
+ export function creditSwapRequestSlippageToJSON(creditSwapRequestSlippage) {
33
+ return JSON.stringify(CreditSwapRequestSlippage$outboundSchema.parse(creditSwapRequestSlippage));
34
+ }
35
+ /** @internal */
36
+ export const CreditSwapRequestChain$outboundSchema = z.nativeEnum(CreditSwapRequestChain);
37
+ /** @internal */
38
+ export const CreditSwapRequestPricing$outboundSchema = z.nativeEnum(CreditSwapRequestPricing);
39
+ /** @internal */
40
+ export const CreditSwapRequest$outboundSchema = z.object({
41
+ actionType: z.literal("V2_SWAP").optional(),
42
+ tokenIn: z.string(),
43
+ tokenOut: z.string(),
44
+ amountIn: z.union([z.number(), z.string()]),
45
+ slippage: z.union([z.number(), z.string()]).optional(),
46
+ owner: z.string(),
47
+ chain: CreditSwapRequestChain$outboundSchema,
48
+ gasSponsorship: z.boolean().optional(),
49
+ pricing: CreditSwapRequestPricing$outboundSchema.optional(),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ actionType: "action_type",
53
+ tokenIn: "token_in",
54
+ tokenOut: "token_out",
55
+ amountIn: "amount_in",
56
+ gasSponsorship: "gas_sponsorship",
57
+ });
58
+ });
59
+ export function creditSwapRequestToJSON(creditSwapRequest) {
60
+ return JSON.stringify(CreditSwapRequest$outboundSchema.parse(creditSwapRequest));
61
+ }
62
+ //# sourceMappingURL=creditswaprequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditswaprequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditswaprequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAa1D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAMX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,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AAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,qCAAqC;IAC5C,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,uCAAuC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,iBAAiB;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,gCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ import * as z from "zod/v3";
2
+ import { ClosedEnum } from "../../types/enums.js";
3
+ import { Result as SafeParseResult } from "../../types/fp.js";
4
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
+ import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
6
+ import { UnsignedTransaction } from "./unsignedtransaction.js";
7
+ /**
8
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
9
+ */
10
+ export declare const CreditSwapResponseSwapProvider: {
11
+ readonly Market: "market";
12
+ readonly Firm: "firm";
13
+ };
14
+ /**
15
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
16
+ */
17
+ export type CreditSwapResponseSwapProvider = ClosedEnum<typeof CreditSwapResponseSwapProvider>;
18
+ /**
19
+ * The swap transaction to sign, plus which route priced it and how long
20
+ *
21
+ * @remarks
22
+ * that price holds.
23
+ */
24
+ export type CreditSwapResponse = {
25
+ /**
26
+ * Unsigned transaction for direct execution. Present when gas_sponsorship=false.
27
+ */
28
+ transaction?: UnsignedTransaction | null | undefined;
29
+ /**
30
+ * EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
31
+ */
32
+ eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
33
+ /**
34
+ * Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits.
35
+ */
36
+ estimatedAmountOut: string;
37
+ /**
38
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
39
+ */
40
+ swapProvider?: CreditSwapResponseSwapProvider | undefined;
41
+ /**
42
+ * Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds.
43
+ */
44
+ quoteExpiresAt?: Date | null | undefined;
45
+ };
46
+ /** @internal */
47
+ export declare const CreditSwapResponseSwapProvider$inboundSchema: z.ZodNativeEnum<typeof CreditSwapResponseSwapProvider>;
48
+ /** @internal */
49
+ export declare const CreditSwapResponse$inboundSchema: z.ZodType<CreditSwapResponse, z.ZodTypeDef, unknown>;
50
+ export declare function creditSwapResponseFromJSON(jsonString: string): SafeParseResult<CreditSwapResponse, SDKValidationError>;
51
+ //# sourceMappingURL=creditswapresponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditswapresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditswapresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;CAGjC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,8BAA8B,CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,8BAA8B,GAAG,SAAS,CAAC;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,aAAa,CACxE,OAAO,8BAA8B,CACS,CAAC;AAEjD,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAiBP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { BatchedSafeOperationsResponseOutput$inboundSchema, } from "./batchedsafeoperationsresponseoutput.js";
8
+ import { UnsignedTransaction$inboundSchema, } from "./unsignedtransaction.js";
9
+ /**
10
+ * Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
11
+ */
12
+ export const CreditSwapResponseSwapProvider = {
13
+ Market: "market",
14
+ Firm: "firm",
15
+ };
16
+ /** @internal */
17
+ export const CreditSwapResponseSwapProvider$inboundSchema = z.nativeEnum(CreditSwapResponseSwapProvider);
18
+ /** @internal */
19
+ export const CreditSwapResponse$inboundSchema = z.object({
20
+ transaction: z.nullable(UnsignedTransaction$inboundSchema).optional(),
21
+ eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
22
+ .optional(),
23
+ estimated_amount_out: z.string(),
24
+ swap_provider: CreditSwapResponseSwapProvider$inboundSchema.optional(),
25
+ quote_expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "eip_712": "eip712",
29
+ "estimated_amount_out": "estimatedAmountOut",
30
+ "swap_provider": "swapProvider",
31
+ "quote_expires_at": "quoteExpiresAt",
32
+ });
33
+ });
34
+ export function creditSwapResponseFromJSON(jsonString) {
35
+ return safeParse(jsonString, (x) => CreditSwapResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreditSwapResponse' from JSON`);
36
+ }
37
+ //# sourceMappingURL=creditswapresponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditswapresponse.js","sourceRoot":"","sources":["../../../../src/models/components/creditswapresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAEL,iDAAiD,GAClD,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;CACJ,CAAC;AAqCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;AAEjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IACrE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;SACnE,QAAQ,EAAE;IACb,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;IAChC,aAAa,EAAE,4CAA4C,CAAC,QAAQ,EAAE;IACtE,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAC1B,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAClE,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,SAAS,EAAE,QAAQ;QACnB,sBAAsB,EAAE,oBAAoB;QAC5C,eAAe,EAAE,cAAc;QAC/B,kBAAkB,EAAE,gBAAgB;KACrC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
@@ -9,11 +9,10 @@ export type EarnSwapRequestAmountIn = number | string;
9
9
  */
10
10
  export type EarnSwapRequestSlippage = number | string;
11
11
  /**
12
- * Request model for swap endpoint.
12
+ * Swap one token held in the Earn Account for another, in a single atomic
13
13
  *
14
14
  * @remarks
15
- *
16
- * Inherits swap params and adds context fields (owner, chain, gas_sponsorship).
15
+ * transaction.
17
16
  */
18
17
  export type EarnSwapRequest = {
19
18
  /**