@compass-labs/api-sdk 2.2.19 → 2.2.20-rc.0

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 (334) hide show
  1. package/README.md +16 -1
  2. package/codeSamples_typescript.yaml +36 -0
  3. package/dist/commonjs/funcs/creditCreditBorrow.d.ts +25 -0
  4. package/dist/commonjs/funcs/creditCreditBorrow.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/creditCreditBorrow.js +125 -0
  6. package/dist/commonjs/funcs/creditCreditBorrow.js.map +1 -0
  7. package/dist/commonjs/funcs/creditCreditBundle.d.ts +21 -0
  8. package/dist/commonjs/funcs/creditCreditBundle.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/creditCreditBundle.js +121 -0
  10. package/dist/commonjs/funcs/creditCreditBundle.js.map +1 -0
  11. package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts +26 -0
  12. package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/creditCreditCreateAccount.js +126 -0
  14. package/dist/commonjs/funcs/creditCreditCreateAccount.js.map +1 -0
  15. package/dist/commonjs/funcs/creditCreditPositions.d.ts +22 -0
  16. package/dist/commonjs/funcs/creditCreditPositions.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/creditCreditPositions.js +126 -0
  18. package/dist/commonjs/funcs/creditCreditPositions.js.map +1 -0
  19. package/dist/commonjs/funcs/creditCreditRepay.d.ts +26 -0
  20. package/dist/commonjs/funcs/creditCreditRepay.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/creditCreditRepay.js +126 -0
  22. package/dist/commonjs/funcs/creditCreditRepay.js.map +1 -0
  23. package/dist/commonjs/funcs/creditCreditTransfer.d.ts +27 -0
  24. package/dist/commonjs/funcs/creditCreditTransfer.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/creditCreditTransfer.js +127 -0
  26. package/dist/commonjs/funcs/creditCreditTransfer.js.map +1 -0
  27. package/dist/commonjs/lib/config.d.ts +2 -2
  28. package/dist/commonjs/lib/config.js +2 -2
  29. package/dist/commonjs/models/components/accountsummary.d.ts +40 -0
  30. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -0
  31. package/dist/commonjs/models/components/accountsummary.js +66 -0
  32. package/dist/commonjs/models/components/accountsummary.js.map +1 -0
  33. package/dist/commonjs/models/components/borrowabletoken.d.ts +28 -0
  34. package/dist/commonjs/models/components/borrowabletoken.d.ts.map +1 -0
  35. package/dist/commonjs/models/components/borrowabletoken.js +59 -0
  36. package/dist/commonjs/models/components/borrowabletoken.js.map +1 -0
  37. package/dist/commonjs/models/components/collateralposition.d.ts +53 -0
  38. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -0
  39. package/dist/commonjs/models/components/collateralposition.js +71 -0
  40. package/dist/commonjs/models/components/collateralposition.js.map +1 -0
  41. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +39 -0
  42. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +1 -0
  43. package/dist/commonjs/models/components/createcreditaccountrequest.js +64 -0
  44. package/dist/commonjs/models/components/createcreditaccountrequest.js.map +1 -0
  45. package/dist/commonjs/models/components/createcreditaccountresponse.d.ts +21 -0
  46. package/dist/commonjs/models/components/createcreditaccountresponse.d.ts.map +1 -0
  47. package/dist/commonjs/models/components/createcreditaccountresponse.js +57 -0
  48. package/dist/commonjs/models/components/createcreditaccountresponse.js.map +1 -0
  49. package/dist/commonjs/models/components/creditborrowparams.d.ts +44 -0
  50. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -0
  51. package/dist/commonjs/models/components/creditborrowparams.js +65 -0
  52. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -0
  53. package/dist/commonjs/models/components/creditborrowrequest.d.ts +108 -0
  54. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -0
  55. package/dist/commonjs/models/components/creditborrowrequest.js +95 -0
  56. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -0
  57. package/dist/commonjs/models/components/creditborrowresponse.d.ts +23 -0
  58. package/dist/commonjs/models/components/creditborrowresponse.d.ts.map +1 -0
  59. package/dist/commonjs/models/components/creditborrowresponse.js +61 -0
  60. package/dist/commonjs/models/components/creditborrowresponse.js.map +1 -0
  61. package/dist/commonjs/models/components/creditbundlerequest.d.ts +35 -0
  62. package/dist/commonjs/models/components/creditbundlerequest.d.ts.map +1 -0
  63. package/dist/commonjs/models/components/creditbundlerequest.js +59 -0
  64. package/dist/commonjs/models/components/creditbundlerequest.js.map +1 -0
  65. package/dist/commonjs/models/components/creditbundleresponse.d.ts +23 -0
  66. package/dist/commonjs/models/components/creditbundleresponse.d.ts.map +1 -0
  67. package/dist/commonjs/models/components/creditbundleresponse.js +61 -0
  68. package/dist/commonjs/models/components/creditbundleresponse.js.map +1 -0
  69. package/dist/commonjs/models/components/creditevent.d.ts +53 -0
  70. package/dist/commonjs/models/components/creditevent.d.ts.map +1 -0
  71. package/dist/commonjs/models/components/creditevent.js +76 -0
  72. package/dist/commonjs/models/components/creditevent.js.map +1 -0
  73. package/dist/commonjs/models/components/creditpositionsresponse.d.ts +36 -0
  74. package/dist/commonjs/models/components/creditpositionsresponse.d.ts.map +1 -0
  75. package/dist/commonjs/models/components/creditpositionsresponse.js +67 -0
  76. package/dist/commonjs/models/components/creditpositionsresponse.js.map +1 -0
  77. package/dist/commonjs/models/components/creditrepayparams.d.ts +44 -0
  78. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -0
  79. package/dist/commonjs/models/components/creditrepayparams.js +65 -0
  80. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -0
  81. package/dist/commonjs/models/components/creditrepayrequest.d.ts +108 -0
  82. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -0
  83. package/dist/commonjs/models/components/creditrepayrequest.js +95 -0
  84. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -0
  85. package/dist/commonjs/models/components/creditrepayresponse.d.ts +23 -0
  86. package/dist/commonjs/models/components/creditrepayresponse.d.ts.map +1 -0
  87. package/dist/commonjs/models/components/creditrepayresponse.js +61 -0
  88. package/dist/commonjs/models/components/creditrepayresponse.js.map +1 -0
  89. package/dist/commonjs/models/components/creditsupplyparams.d.ts +34 -0
  90. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -0
  91. package/dist/commonjs/models/components/creditsupplyparams.js +62 -0
  92. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -0
  93. package/dist/commonjs/models/components/credittransferrequest.d.ts +40 -0
  94. package/dist/commonjs/models/components/credittransferrequest.d.ts.map +1 -0
  95. package/dist/commonjs/models/components/credittransferrequest.js +59 -0
  96. package/dist/commonjs/models/components/credittransferrequest.js.map +1 -0
  97. package/dist/commonjs/models/components/credittransferresponse.d.ts +11 -0
  98. package/dist/commonjs/models/components/credittransferresponse.d.ts.map +1 -0
  99. package/dist/commonjs/models/components/credittransferresponse.js +56 -0
  100. package/dist/commonjs/models/components/credittransferresponse.js.map +1 -0
  101. package/dist/commonjs/models/components/credituseroperation.d.ts +28 -0
  102. package/dist/commonjs/models/components/credituseroperation.d.ts.map +1 -0
  103. package/dist/commonjs/models/components/credituseroperation.js +78 -0
  104. package/dist/commonjs/models/components/credituseroperation.js.map +1 -0
  105. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +34 -0
  106. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -0
  107. package/dist/commonjs/models/components/creditwithdrawparams.js +62 -0
  108. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -0
  109. package/dist/commonjs/models/components/debtposition.d.ts +49 -0
  110. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -0
  111. package/dist/commonjs/models/components/debtposition.js +69 -0
  112. package/dist/commonjs/models/components/debtposition.js.map +1 -0
  113. package/dist/commonjs/models/components/index.d.ts +21 -0
  114. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  115. package/dist/commonjs/models/components/index.js +21 -0
  116. package/dist/commonjs/models/components/index.js.map +1 -1
  117. package/dist/commonjs/models/operations/index.d.ts +1 -0
  118. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  119. package/dist/commonjs/models/operations/index.js +1 -0
  120. package/dist/commonjs/models/operations/index.js.map +1 -1
  121. package/dist/commonjs/models/operations/v2creditpositions.d.ts +26 -0
  122. package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +1 -0
  123. package/dist/commonjs/models/operations/v2creditpositions.js +57 -0
  124. package/dist/commonjs/models/operations/v2creditpositions.js.map +1 -0
  125. package/dist/commonjs/sdk/credit.d.ts +86 -0
  126. package/dist/commonjs/sdk/credit.d.ts.map +1 -0
  127. package/dist/commonjs/sdk/credit.js +110 -0
  128. package/dist/commonjs/sdk/credit.js.map +1 -0
  129. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  130. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  131. package/dist/commonjs/sdk/sdk.js +4 -0
  132. package/dist/commonjs/sdk/sdk.js.map +1 -1
  133. package/dist/esm/funcs/creditCreditBorrow.d.ts +25 -0
  134. package/dist/esm/funcs/creditCreditBorrow.d.ts.map +1 -0
  135. package/dist/esm/funcs/creditCreditBorrow.js +89 -0
  136. package/dist/esm/funcs/creditCreditBorrow.js.map +1 -0
  137. package/dist/esm/funcs/creditCreditBundle.d.ts +21 -0
  138. package/dist/esm/funcs/creditCreditBundle.d.ts.map +1 -0
  139. package/dist/esm/funcs/creditCreditBundle.js +85 -0
  140. package/dist/esm/funcs/creditCreditBundle.js.map +1 -0
  141. package/dist/esm/funcs/creditCreditCreateAccount.d.ts +26 -0
  142. package/dist/esm/funcs/creditCreditCreateAccount.d.ts.map +1 -0
  143. package/dist/esm/funcs/creditCreditCreateAccount.js +90 -0
  144. package/dist/esm/funcs/creditCreditCreateAccount.js.map +1 -0
  145. package/dist/esm/funcs/creditCreditPositions.d.ts +22 -0
  146. package/dist/esm/funcs/creditCreditPositions.d.ts.map +1 -0
  147. package/dist/esm/funcs/creditCreditPositions.js +90 -0
  148. package/dist/esm/funcs/creditCreditPositions.js.map +1 -0
  149. package/dist/esm/funcs/creditCreditRepay.d.ts +26 -0
  150. package/dist/esm/funcs/creditCreditRepay.d.ts.map +1 -0
  151. package/dist/esm/funcs/creditCreditRepay.js +90 -0
  152. package/dist/esm/funcs/creditCreditRepay.js.map +1 -0
  153. package/dist/esm/funcs/creditCreditTransfer.d.ts +27 -0
  154. package/dist/esm/funcs/creditCreditTransfer.d.ts.map +1 -0
  155. package/dist/esm/funcs/creditCreditTransfer.js +91 -0
  156. package/dist/esm/funcs/creditCreditTransfer.js.map +1 -0
  157. package/dist/esm/lib/config.d.ts +2 -2
  158. package/dist/esm/lib/config.js +2 -2
  159. package/dist/esm/models/components/accountsummary.d.ts +40 -0
  160. package/dist/esm/models/components/accountsummary.d.ts.map +1 -0
  161. package/dist/esm/models/components/accountsummary.js +29 -0
  162. package/dist/esm/models/components/accountsummary.js.map +1 -0
  163. package/dist/esm/models/components/borrowabletoken.d.ts +28 -0
  164. package/dist/esm/models/components/borrowabletoken.d.ts.map +1 -0
  165. package/dist/esm/models/components/borrowabletoken.js +22 -0
  166. package/dist/esm/models/components/borrowabletoken.js.map +1 -0
  167. package/dist/esm/models/components/collateralposition.d.ts +53 -0
  168. package/dist/esm/models/components/collateralposition.d.ts.map +1 -0
  169. package/dist/esm/models/components/collateralposition.js +34 -0
  170. package/dist/esm/models/components/collateralposition.js.map +1 -0
  171. package/dist/esm/models/components/createcreditaccountrequest.d.ts +39 -0
  172. package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +1 -0
  173. package/dist/esm/models/components/createcreditaccountrequest.js +27 -0
  174. package/dist/esm/models/components/createcreditaccountrequest.js.map +1 -0
  175. package/dist/esm/models/components/createcreditaccountresponse.d.ts +21 -0
  176. package/dist/esm/models/components/createcreditaccountresponse.d.ts.map +1 -0
  177. package/dist/esm/models/components/createcreditaccountresponse.js +20 -0
  178. package/dist/esm/models/components/createcreditaccountresponse.js.map +1 -0
  179. package/dist/esm/models/components/creditborrowparams.d.ts +44 -0
  180. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -0
  181. package/dist/esm/models/components/creditborrowparams.js +27 -0
  182. package/dist/esm/models/components/creditborrowparams.js.map +1 -0
  183. package/dist/esm/models/components/creditborrowrequest.d.ts +108 -0
  184. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -0
  185. package/dist/esm/models/components/creditborrowrequest.js +55 -0
  186. package/dist/esm/models/components/creditborrowrequest.js.map +1 -0
  187. package/dist/esm/models/components/creditborrowresponse.d.ts +23 -0
  188. package/dist/esm/models/components/creditborrowresponse.d.ts.map +1 -0
  189. package/dist/esm/models/components/creditborrowresponse.js +24 -0
  190. package/dist/esm/models/components/creditborrowresponse.js.map +1 -0
  191. package/dist/esm/models/components/creditbundlerequest.d.ts +35 -0
  192. package/dist/esm/models/components/creditbundlerequest.d.ts.map +1 -0
  193. package/dist/esm/models/components/creditbundlerequest.js +22 -0
  194. package/dist/esm/models/components/creditbundlerequest.js.map +1 -0
  195. package/dist/esm/models/components/creditbundleresponse.d.ts +23 -0
  196. package/dist/esm/models/components/creditbundleresponse.d.ts.map +1 -0
  197. package/dist/esm/models/components/creditbundleresponse.js +24 -0
  198. package/dist/esm/models/components/creditbundleresponse.js.map +1 -0
  199. package/dist/esm/models/components/creditevent.d.ts +53 -0
  200. package/dist/esm/models/components/creditevent.d.ts.map +1 -0
  201. package/dist/esm/models/components/creditevent.js +39 -0
  202. package/dist/esm/models/components/creditevent.js.map +1 -0
  203. package/dist/esm/models/components/creditpositionsresponse.d.ts +36 -0
  204. package/dist/esm/models/components/creditpositionsresponse.d.ts.map +1 -0
  205. package/dist/esm/models/components/creditpositionsresponse.js +30 -0
  206. package/dist/esm/models/components/creditpositionsresponse.js.map +1 -0
  207. package/dist/esm/models/components/creditrepayparams.d.ts +44 -0
  208. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -0
  209. package/dist/esm/models/components/creditrepayparams.js +27 -0
  210. package/dist/esm/models/components/creditrepayparams.js.map +1 -0
  211. package/dist/esm/models/components/creditrepayrequest.d.ts +108 -0
  212. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -0
  213. package/dist/esm/models/components/creditrepayrequest.js +55 -0
  214. package/dist/esm/models/components/creditrepayrequest.js.map +1 -0
  215. package/dist/esm/models/components/creditrepayresponse.d.ts +23 -0
  216. package/dist/esm/models/components/creditrepayresponse.d.ts.map +1 -0
  217. package/dist/esm/models/components/creditrepayresponse.js +24 -0
  218. package/dist/esm/models/components/creditrepayresponse.js.map +1 -0
  219. package/dist/esm/models/components/creditsupplyparams.d.ts +34 -0
  220. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -0
  221. package/dist/esm/models/components/creditsupplyparams.js +24 -0
  222. package/dist/esm/models/components/creditsupplyparams.js.map +1 -0
  223. package/dist/esm/models/components/credittransferrequest.d.ts +40 -0
  224. package/dist/esm/models/components/credittransferrequest.d.ts.map +1 -0
  225. package/dist/esm/models/components/credittransferrequest.js +21 -0
  226. package/dist/esm/models/components/credittransferrequest.js.map +1 -0
  227. package/dist/esm/models/components/credittransferresponse.d.ts +11 -0
  228. package/dist/esm/models/components/credittransferresponse.d.ts.map +1 -0
  229. package/dist/esm/models/components/credittransferresponse.js +19 -0
  230. package/dist/esm/models/components/credittransferresponse.js.map +1 -0
  231. package/dist/esm/models/components/credituseroperation.d.ts +28 -0
  232. package/dist/esm/models/components/credituseroperation.d.ts.map +1 -0
  233. package/dist/esm/models/components/credituseroperation.js +40 -0
  234. package/dist/esm/models/components/credituseroperation.js.map +1 -0
  235. package/dist/esm/models/components/creditwithdrawparams.d.ts +34 -0
  236. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -0
  237. package/dist/esm/models/components/creditwithdrawparams.js +24 -0
  238. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -0
  239. package/dist/esm/models/components/debtposition.d.ts +49 -0
  240. package/dist/esm/models/components/debtposition.d.ts.map +1 -0
  241. package/dist/esm/models/components/debtposition.js +32 -0
  242. package/dist/esm/models/components/debtposition.js.map +1 -0
  243. package/dist/esm/models/components/index.d.ts +21 -0
  244. package/dist/esm/models/components/index.d.ts.map +1 -1
  245. package/dist/esm/models/components/index.js +21 -0
  246. package/dist/esm/models/components/index.js.map +1 -1
  247. package/dist/esm/models/operations/index.d.ts +1 -0
  248. package/dist/esm/models/operations/index.d.ts.map +1 -1
  249. package/dist/esm/models/operations/index.js +1 -0
  250. package/dist/esm/models/operations/index.js.map +1 -1
  251. package/dist/esm/models/operations/v2creditpositions.d.ts +26 -0
  252. package/dist/esm/models/operations/v2creditpositions.d.ts.map +1 -0
  253. package/dist/esm/models/operations/v2creditpositions.js +20 -0
  254. package/dist/esm/models/operations/v2creditpositions.js.map +1 -0
  255. package/dist/esm/sdk/credit.d.ts +86 -0
  256. package/dist/esm/sdk/credit.d.ts.map +1 -0
  257. package/dist/esm/sdk/credit.js +106 -0
  258. package/dist/esm/sdk/credit.js.map +1 -0
  259. package/dist/esm/sdk/sdk.d.ts +3 -0
  260. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  261. package/dist/esm/sdk/sdk.js +4 -0
  262. package/dist/esm/sdk/sdk.js.map +1 -1
  263. package/docs/models/components/accountsummary.md +30 -0
  264. package/docs/models/components/borrowabletoken.md +25 -0
  265. package/docs/models/components/borrowamount.md +19 -0
  266. package/docs/models/components/collateralposition.md +31 -0
  267. package/docs/models/components/createcreditaccountrequest.md +24 -0
  268. package/docs/models/components/createcreditaccountrequestchain.md +15 -0
  269. package/docs/models/components/createcreditaccountresponse.md +31 -0
  270. package/docs/models/components/creditborrowparams.md +24 -0
  271. package/docs/models/components/creditborrowparamsamount.md +19 -0
  272. package/docs/models/components/creditborrowrequest.md +38 -0
  273. package/docs/models/components/creditborrowrequestamountin.md +19 -0
  274. package/docs/models/components/creditborrowrequestslippage.md +19 -0
  275. package/docs/models/components/creditborrowresponse.md +17 -0
  276. package/docs/models/components/creditbundlerequest.md +25 -0
  277. package/docs/models/components/creditbundleresponse.md +19 -0
  278. package/docs/models/components/creditevent.md +29 -0
  279. package/docs/models/components/creditpositionsresponse.md +33 -0
  280. package/docs/models/components/creditrepayparams.md +24 -0
  281. package/docs/models/components/creditrepayparamsamount.md +19 -0
  282. package/docs/models/components/creditrepayrequest.md +37 -0
  283. package/docs/models/components/creditrepayrequestslippage.md +19 -0
  284. package/docs/models/components/creditrepayresponse.md +17 -0
  285. package/docs/models/components/creditsupplyparams.md +23 -0
  286. package/docs/models/components/creditsupplyparamsamount.md +19 -0
  287. package/docs/models/components/credittransferrequest.md +23 -0
  288. package/docs/models/components/credittransferrequestamount.md +19 -0
  289. package/docs/models/components/credittransferresponse.md +75 -0
  290. package/docs/models/components/credituseroperation.md +23 -0
  291. package/docs/models/components/credituseroperationbody.md +80 -0
  292. package/docs/models/components/creditwithdrawparams.md +23 -0
  293. package/docs/models/components/creditwithdrawparamsamount.md +19 -0
  294. package/docs/models/components/debtposition.md +30 -0
  295. package/docs/models/components/eventtype.md +17 -0
  296. package/docs/models/components/repayamount.md +19 -0
  297. package/docs/models/components/withdrawamount.md +19 -0
  298. package/docs/models/operations/v2creditpositionschain.md +15 -0
  299. package/docs/models/operations/v2creditpositionsrequest.md +19 -0
  300. package/docs/sdks/credit/README.md +562 -0
  301. package/package.json +1 -1
  302. package/src/funcs/creditCreditBorrow.ts +176 -0
  303. package/src/funcs/creditCreditBundle.ts +172 -0
  304. package/src/funcs/creditCreditCreateAccount.ts +178 -0
  305. package/src/funcs/creditCreditPositions.ts +178 -0
  306. package/src/funcs/creditCreditRepay.ts +177 -0
  307. package/src/funcs/creditCreditTransfer.ts +178 -0
  308. package/src/lib/config.ts +2 -2
  309. package/src/models/components/accountsummary.ts +77 -0
  310. package/src/models/components/borrowabletoken.ts +58 -0
  311. package/src/models/components/collateralposition.ts +94 -0
  312. package/src/models/components/createcreditaccountrequest.ts +72 -0
  313. package/src/models/components/createcreditaccountresponse.ts +51 -0
  314. package/src/models/components/creditborrowparams.ts +89 -0
  315. package/src/models/components/creditborrowrequest.ts +198 -0
  316. package/src/models/components/creditborrowresponse.ts +59 -0
  317. package/src/models/components/creditbundlerequest.ts +66 -0
  318. package/src/models/components/creditbundleresponse.ts +59 -0
  319. package/src/models/components/creditevent.ts +92 -0
  320. package/src/models/components/creditpositionsresponse.ts +79 -0
  321. package/src/models/components/creditrepayparams.ts +89 -0
  322. package/src/models/components/creditrepayrequest.ts +190 -0
  323. package/src/models/components/creditrepayresponse.ts +59 -0
  324. package/src/models/components/creditsupplyparams.ts +74 -0
  325. package/src/models/components/credittransferrequest.ts +78 -0
  326. package/src/models/components/credittransferresponse.ts +40 -0
  327. package/src/models/components/credituseroperation.ts +133 -0
  328. package/src/models/components/creditwithdrawparams.ts +74 -0
  329. package/src/models/components/debtposition.ts +88 -0
  330. package/src/models/components/index.ts +21 -0
  331. package/src/models/operations/index.ts +1 -0
  332. package/src/models/operations/v2creditpositions.ts +50 -0
  333. package/src/sdk/credit.ts +156 -0
  334. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditpositionsresponse.js","sourceRoot":"","sources":["../../../../src/models/components/creditpositionsresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEH,0EAQC;AA1ED,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,2DAG6B;AAC7B,6DAG8B;AAC9B,mEAGiC;AACjC,uDAA6E;AA4B7E,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,wDAAgC,CAAC,CAAC,QAAQ,EAAE;IAC1E,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,4CAA0B,CAAC,CAAC,QAAQ,EAAE;IAC9D,eAAe,EAAE,gDAA4B;IAC7C,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,kDAA6B,CAAC,CAAC,QAAQ,EAAE;IACpE,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,sBAAsB,EAAE,qBAAqB;QAC7C,gBAAgB,EAAE,eAAe;QACjC,iBAAiB,EAAE,gBAAgB;QACnC,mBAAmB,EAAE,kBAAkB;QACvC,iBAAiB,EAAE,eAAe;KACnC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6CAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import * as z from "zod/v3";
2
+ import { InterestRateMode } from "./interestratemode.js";
3
+ /**
4
+ * Amount in token units to repay.
5
+ */
6
+ export type CreditRepayParamsAmount = number | string;
7
+ /**
8
+ * Repay debt to Aave via Credit Account.
9
+ */
10
+ export type CreditRepayParams = {
11
+ actionType: "CREDIT_REPAY";
12
+ /**
13
+ * Token to repay to Aave.
14
+ */
15
+ token: string;
16
+ /**
17
+ * Amount in token units to repay.
18
+ */
19
+ amount: number | string;
20
+ /**
21
+ * On AAVE there are 2 different interest modes.
22
+ *
23
+ * @remarks
24
+ *
25
+ * A stable (but typically higher rate), or a variable rate.
26
+ */
27
+ interestRateMode?: InterestRateMode | undefined;
28
+ };
29
+ /** @internal */
30
+ export type CreditRepayParamsAmount$Outbound = number | string;
31
+ /** @internal */
32
+ export declare const CreditRepayParamsAmount$outboundSchema: z.ZodType<CreditRepayParamsAmount$Outbound, z.ZodTypeDef, CreditRepayParamsAmount>;
33
+ export declare function creditRepayParamsAmountToJSON(creditRepayParamsAmount: CreditRepayParamsAmount): string;
34
+ /** @internal */
35
+ export type CreditRepayParams$Outbound = {
36
+ action_type: "CREDIT_REPAY";
37
+ token: string;
38
+ amount: number | string;
39
+ interest_rate_mode?: string | undefined;
40
+ };
41
+ /** @internal */
42
+ export declare const CreditRepayParams$outboundSchema: z.ZodType<CreditRepayParams$Outbound, z.ZodTypeDef, CreditRepayParams>;
43
+ export declare function creditRepayParamsToJSON(creditRepayParams: CreditRepayParams): string;
44
+ //# sourceMappingURL=creditrepayparams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,gCAAgC,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/D,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,gCAAgC,EAChC,CAAC,CAAC,UAAU,EACZ,uBAAuB,CACY,CAAC;AAEtC,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,cAAc,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CAWjB,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreditRepayParams$outboundSchema = exports.CreditRepayParamsAmount$outboundSchema = void 0;
40
+ exports.creditRepayParamsAmountToJSON = creditRepayParamsAmountToJSON;
41
+ exports.creditRepayParamsToJSON = creditRepayParamsToJSON;
42
+ const z = __importStar(require("zod/v3"));
43
+ const primitives_js_1 = require("../../lib/primitives.js");
44
+ const interestratemode_js_1 = require("./interestratemode.js");
45
+ /** @internal */
46
+ exports.CreditRepayParamsAmount$outboundSchema = z.union([z.number(), z.string()]);
47
+ function creditRepayParamsAmountToJSON(creditRepayParamsAmount) {
48
+ return JSON.stringify(exports.CreditRepayParamsAmount$outboundSchema.parse(creditRepayParamsAmount));
49
+ }
50
+ /** @internal */
51
+ exports.CreditRepayParams$outboundSchema = z.object({
52
+ actionType: z.literal("CREDIT_REPAY"),
53
+ token: z.string(),
54
+ amount: z.union([z.number(), z.string()]),
55
+ interestRateMode: interestratemode_js_1.InterestRateMode$outboundSchema.optional(),
56
+ }).transform((v) => {
57
+ return (0, primitives_js_1.remap)(v, {
58
+ actionType: "action_type",
59
+ interestRateMode: "interest_rate_mode",
60
+ });
61
+ });
62
+ function creditRepayParamsToJSON(creditRepayParams) {
63
+ return JSON.stringify(exports.CreditRepayParams$outboundSchema.parse(creditRepayParams));
64
+ }
65
+ //# sourceMappingURL=creditrepayparams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,sEAMC;AA2BD,0DAMC;AApFD,0CAA4B;AAC5B,2DAA0D;AAC1D,+DAG+B;AAiC/B,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,8CAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AAUD,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,gBAAgB,EAAE,qDAA+B,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,oBAAoB;KACvC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,108 @@
1
+ import * as z from "zod/v3";
2
+ import { Chain } from "./chain.js";
3
+ import { InterestRateMode } from "./interestratemode.js";
4
+ /**
5
+ * Amount of repay_token to repay (in token units, not wei).
6
+ */
7
+ export type RepayAmount = number | string;
8
+ /**
9
+ * Amount of collateral to withdraw (in token units, not wei).
10
+ */
11
+ export type WithdrawAmount = number | string;
12
+ /**
13
+ * Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
14
+ */
15
+ export type CreditRepayRequestSlippage = number | string;
16
+ export type CreditRepayRequest = {
17
+ /**
18
+ * The address that owns the Credit Account.
19
+ */
20
+ owner: string;
21
+ /**
22
+ * The chain to use.
23
+ */
24
+ chain: Chain;
25
+ /**
26
+ * The borrowed asset to repay (e.g. WETH). Must match the debt position's token.
27
+ */
28
+ repayToken: string;
29
+ /**
30
+ * Amount of repay_token to repay (in token units, not wei).
31
+ */
32
+ repayAmount: number | string;
33
+ /**
34
+ * On AAVE there are 2 different interest modes.
35
+ *
36
+ * @remarks
37
+ *
38
+ * A stable (but typically higher rate), or a variable rate.
39
+ */
40
+ interestRateMode?: InterestRateMode | undefined;
41
+ /**
42
+ * Collateral token to withdraw from Aave after repaying debt.
43
+ */
44
+ withdrawToken: string;
45
+ /**
46
+ * Amount of collateral to withdraw (in token units, not wei).
47
+ */
48
+ withdrawAmount: number | string;
49
+ /**
50
+ * Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is.
51
+ */
52
+ tokenOut?: string | null | undefined;
53
+ /**
54
+ * Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
55
+ */
56
+ slippage?: number | string | undefined;
57
+ /**
58
+ * If true, returns EIP-712 signature data instead of an unsigned transaction.
59
+ */
60
+ gasSponsorship?: boolean | undefined;
61
+ /**
62
+ * The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the repay bundle will first pull repay_token from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data.
63
+ */
64
+ permit2Signature?: string | null | undefined;
65
+ /**
66
+ * The nonce used in the Permit2 signature (from the signed typed data).
67
+ */
68
+ permit2Nonce?: number | null | undefined;
69
+ /**
70
+ * The deadline timestamp used in the Permit2 signature (from the signed typed data).
71
+ */
72
+ permit2Deadline?: number | null | undefined;
73
+ };
74
+ /** @internal */
75
+ export type RepayAmount$Outbound = number | string;
76
+ /** @internal */
77
+ export declare const RepayAmount$outboundSchema: z.ZodType<RepayAmount$Outbound, z.ZodTypeDef, RepayAmount>;
78
+ export declare function repayAmountToJSON(repayAmount: RepayAmount): string;
79
+ /** @internal */
80
+ export type WithdrawAmount$Outbound = number | string;
81
+ /** @internal */
82
+ export declare const WithdrawAmount$outboundSchema: z.ZodType<WithdrawAmount$Outbound, z.ZodTypeDef, WithdrawAmount>;
83
+ export declare function withdrawAmountToJSON(withdrawAmount: WithdrawAmount): string;
84
+ /** @internal */
85
+ export type CreditRepayRequestSlippage$Outbound = number | string;
86
+ /** @internal */
87
+ export declare const CreditRepayRequestSlippage$outboundSchema: z.ZodType<CreditRepayRequestSlippage$Outbound, z.ZodTypeDef, CreditRepayRequestSlippage>;
88
+ export declare function creditRepayRequestSlippageToJSON(creditRepayRequestSlippage: CreditRepayRequestSlippage): string;
89
+ /** @internal */
90
+ export type CreditRepayRequest$Outbound = {
91
+ owner: string;
92
+ chain: string;
93
+ repay_token: string;
94
+ repay_amount: number | string;
95
+ interest_rate_mode?: string | undefined;
96
+ withdraw_token: string;
97
+ withdraw_amount: number | string;
98
+ token_out?: string | null | undefined;
99
+ slippage?: number | string | undefined;
100
+ gas_sponsorship?: boolean | undefined;
101
+ permit2_signature?: string | null | undefined;
102
+ permit2_nonce?: number | null | undefined;
103
+ permit2_deadline?: number | null | undefined;
104
+ };
105
+ /** @internal */
106
+ export declare const CreditRepayRequest$outboundSchema: z.ZodType<CreditRepayRequest$Outbound, z.ZodTypeDef, CreditRepayRequest>;
107
+ export declare function creditRepayRequestToJSON(creditRepayRequest: CreditRepayRequest): string;
108
+ //# sourceMappingURL=creditrepayrequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayrequest.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreditRepayRequest$outboundSchema = exports.CreditRepayRequestSlippage$outboundSchema = exports.WithdrawAmount$outboundSchema = exports.RepayAmount$outboundSchema = void 0;
40
+ exports.repayAmountToJSON = repayAmountToJSON;
41
+ exports.withdrawAmountToJSON = withdrawAmountToJSON;
42
+ exports.creditRepayRequestSlippageToJSON = creditRepayRequestSlippageToJSON;
43
+ exports.creditRepayRequestToJSON = creditRepayRequestToJSON;
44
+ const z = __importStar(require("zod/v3"));
45
+ const primitives_js_1 = require("../../lib/primitives.js");
46
+ const chain_js_1 = require("./chain.js");
47
+ const interestratemode_js_1 = require("./interestratemode.js");
48
+ /** @internal */
49
+ exports.RepayAmount$outboundSchema = z.union([z.number(), z.string()]);
50
+ function repayAmountToJSON(repayAmount) {
51
+ return JSON.stringify(exports.RepayAmount$outboundSchema.parse(repayAmount));
52
+ }
53
+ /** @internal */
54
+ exports.WithdrawAmount$outboundSchema = z.union([z.number(), z.string()]);
55
+ function withdrawAmountToJSON(withdrawAmount) {
56
+ return JSON.stringify(exports.WithdrawAmount$outboundSchema.parse(withdrawAmount));
57
+ }
58
+ /** @internal */
59
+ exports.CreditRepayRequestSlippage$outboundSchema = z.union([z.number(), z.string()]);
60
+ function creditRepayRequestSlippageToJSON(creditRepayRequestSlippage) {
61
+ return JSON.stringify(exports.CreditRepayRequestSlippage$outboundSchema.parse(creditRepayRequestSlippage));
62
+ }
63
+ /** @internal */
64
+ exports.CreditRepayRequest$outboundSchema = z.object({
65
+ owner: z.string(),
66
+ chain: chain_js_1.Chain$outboundSchema,
67
+ repayToken: z.string(),
68
+ repayAmount: z.union([z.number(), z.string()]),
69
+ interestRateMode: interestratemode_js_1.InterestRateMode$outboundSchema.optional(),
70
+ withdrawToken: z.string(),
71
+ withdrawAmount: z.union([z.number(), z.string()]),
72
+ tokenOut: z.nullable(z.string()).optional(),
73
+ slippage: z.union([z.number(), z.string()]).optional(),
74
+ gasSponsorship: z.boolean().optional(),
75
+ permit2Signature: z.nullable(z.string()).optional(),
76
+ permit2Nonce: z.nullable(z.number().int()).optional(),
77
+ permit2Deadline: z.nullable(z.number().int()).optional(),
78
+ }).transform((v) => {
79
+ return (0, primitives_js_1.remap)(v, {
80
+ repayToken: "repay_token",
81
+ repayAmount: "repay_amount",
82
+ interestRateMode: "interest_rate_mode",
83
+ withdrawToken: "withdraw_token",
84
+ withdrawAmount: "withdraw_amount",
85
+ tokenOut: "token_out",
86
+ gasSponsorship: "gas_sponsorship",
87
+ permit2Signature: "permit2_signature",
88
+ permit2Nonce: "permit2_nonce",
89
+ permit2Deadline: "permit2_deadline",
90
+ });
91
+ });
92
+ function creditRepayRequestToJSON(creditRepayRequest) {
93
+ return JSON.stringify(exports.CreditRepayRequest$outboundSchema.parse(creditRepayRequest));
94
+ }
95
+ //# sourceMappingURL=creditrepayrequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayrequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayrequest.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
5
+ import { UnsignedTransaction } from "./unsignedtransaction.js";
6
+ export type CreditRepayResponse = {
7
+ /**
8
+ * Unsigned transaction to execute the repay bundle. Present when gas_sponsorship is false.
9
+ */
10
+ transaction?: UnsignedTransaction | null | undefined;
11
+ /**
12
+ * EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true.
13
+ */
14
+ eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
15
+ /**
16
+ * Estimated amount of token_out received from swap. Only present when token_out differs from withdraw_token.
17
+ */
18
+ estimatedTokenOutAmount?: string | null | undefined;
19
+ };
20
+ /** @internal */
21
+ export declare const CreditRepayResponse$inboundSchema: z.ZodType<CreditRepayResponse, z.ZodTypeDef, unknown>;
22
+ export declare function creditRepayResponseFromJSON(jsonString: string): SafeParseResult<CreditRepayResponse, SDKValidationError>;
23
+ //# sourceMappingURL=creditrepayresponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,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,MAAM,MAAM,mBAAmB,GAAG;IAChC;;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,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAWP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreditRepayResponse$inboundSchema = void 0;
40
+ exports.creditRepayResponseFromJSON = creditRepayResponseFromJSON;
41
+ const z = __importStar(require("zod/v3"));
42
+ const primitives_js_1 = require("../../lib/primitives.js");
43
+ const schemas_js_1 = require("../../lib/schemas.js");
44
+ const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperationsresponseoutput.js");
45
+ const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
46
+ /** @internal */
47
+ exports.CreditRepayResponse$inboundSchema = z.object({
48
+ transaction: z.nullable(unsignedtransaction_js_1.UnsignedTransaction$inboundSchema).optional(),
49
+ eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema)
50
+ .optional(),
51
+ estimated_token_out_amount: z.nullable(z.string()).optional(),
52
+ }).transform((v) => {
53
+ return (0, primitives_js_1.remap)(v, {
54
+ "eip_712": "eip712",
55
+ "estimated_token_out_amount": "estimatedTokenOutAmount",
56
+ });
57
+ });
58
+ function creditRepayResponseFromJSON(jsonString) {
59
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreditRepayResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreditRepayResponse' from JSON`);
60
+ }
61
+ //# sourceMappingURL=creditrepayresponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditrepayresponse.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,kEAQC;AAtDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,qGAGkD;AAClD,qEAGkC;AAiBlC,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,0DAAiC,CAAC,CAAC,QAAQ,EAAE;IACrE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,0FAAiD,CAAC;SACnE,QAAQ,EAAE;IACb,0BAA0B,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,QAAQ;QACnB,4BAA4B,EAAE,yBAAyB;KACxD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,2BAA2B,CACzC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import * as z from "zod/v3";
2
+ /**
3
+ * Amount in token units to supply.
4
+ */
5
+ export type CreditSupplyParamsAmount = number | string;
6
+ /**
7
+ * Supply collateral to Aave via Credit Account.
8
+ */
9
+ export type CreditSupplyParams = {
10
+ actionType: "CREDIT_SUPPLY";
11
+ /**
12
+ * Collateral token to supply to Aave.
13
+ */
14
+ token: string;
15
+ /**
16
+ * Amount in token units to supply.
17
+ */
18
+ amount: number | string;
19
+ };
20
+ /** @internal */
21
+ export type CreditSupplyParamsAmount$Outbound = number | string;
22
+ /** @internal */
23
+ export declare const CreditSupplyParamsAmount$outboundSchema: z.ZodType<CreditSupplyParamsAmount$Outbound, z.ZodTypeDef, CreditSupplyParamsAmount>;
24
+ export declare function creditSupplyParamsAmountToJSON(creditSupplyParamsAmount: CreditSupplyParamsAmount): string;
25
+ /** @internal */
26
+ export type CreditSupplyParams$Outbound = {
27
+ action_type: "CREDIT_SUPPLY";
28
+ token: string;
29
+ amount: number | string;
30
+ };
31
+ /** @internal */
32
+ export declare const CreditSupplyParams$outboundSchema: z.ZodType<CreditSupplyParams$Outbound, z.ZodTypeDef, CreditSupplyParams>;
33
+ export declare function creditSupplyParamsToJSON(creditSupplyParams: CreditSupplyParams): string;
34
+ //# sourceMappingURL=creditsupplyparams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditsupplyparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditsupplyparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhE,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CACW,CAAC;AAEtC,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,eAAe,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CASlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreditSupplyParams$outboundSchema = exports.CreditSupplyParamsAmount$outboundSchema = void 0;
40
+ exports.creditSupplyParamsAmountToJSON = creditSupplyParamsAmountToJSON;
41
+ exports.creditSupplyParamsToJSON = creditSupplyParamsToJSON;
42
+ const z = __importStar(require("zod/v3"));
43
+ const primitives_js_1 = require("../../lib/primitives.js");
44
+ /** @internal */
45
+ exports.CreditSupplyParamsAmount$outboundSchema = z.union([z.number(), z.string()]);
46
+ function creditSupplyParamsAmountToJSON(creditSupplyParamsAmount) {
47
+ return JSON.stringify(exports.CreditSupplyParamsAmount$outboundSchema.parse(creditSupplyParamsAmount));
48
+ }
49
+ /** @internal */
50
+ exports.CreditSupplyParams$outboundSchema = z.object({
51
+ actionType: z.literal("CREDIT_SUPPLY"),
52
+ token: z.string(),
53
+ amount: z.union([z.number(), z.string()]),
54
+ }).transform((v) => {
55
+ return (0, primitives_js_1.remap)(v, {
56
+ actionType: "action_type",
57
+ });
58
+ });
59
+ function creditSupplyParamsToJSON(creditSupplyParams) {
60
+ return JSON.stringify(exports.CreditSupplyParams$outboundSchema.parse(creditSupplyParams));
61
+ }
62
+ //# sourceMappingURL=creditsupplyparams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creditsupplyparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditsupplyparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCH,wEAMC;AAwBD,4DAMC;AArED,0CAA4B;AAC5B,2DAA0D;AAyB1D,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,8BAA8B,CAC5C,wBAAkD;IAElD,OAAO,IAAI,CAAC,SAAS,CACnB,+CAAuC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACxE,CAAC;AACJ,CAAC;AASD,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v3";
2
+ import { Chain } from "./chain.js";
3
+ /**
4
+ * The amount of tokens to transfer (in token units, not wei).
5
+ */
6
+ export type CreditTransferRequestAmount = number | string;
7
+ export type CreditTransferRequest = {
8
+ /**
9
+ * The owner's wallet address (EOA).
10
+ */
11
+ owner: string;
12
+ /**
13
+ * The chain to use.
14
+ */
15
+ chain: Chain;
16
+ /**
17
+ * The token to transfer from the EOA to the Credit Account.
18
+ */
19
+ token: string;
20
+ /**
21
+ * The amount of tokens to transfer (in token units, not wei).
22
+ */
23
+ amount: number | string;
24
+ };
25
+ /** @internal */
26
+ export type CreditTransferRequestAmount$Outbound = number | string;
27
+ /** @internal */
28
+ export declare const CreditTransferRequestAmount$outboundSchema: z.ZodType<CreditTransferRequestAmount$Outbound, z.ZodTypeDef, CreditTransferRequestAmount>;
29
+ export declare function creditTransferRequestAmountToJSON(creditTransferRequestAmount: CreditTransferRequestAmount): string;
30
+ /** @internal */
31
+ export type CreditTransferRequest$Outbound = {
32
+ owner: string;
33
+ chain: string;
34
+ token: string;
35
+ amount: number | string;
36
+ };
37
+ /** @internal */
38
+ export declare const CreditTransferRequest$outboundSchema: z.ZodType<CreditTransferRequest$Outbound, z.ZodTypeDef, CreditTransferRequest>;
39
+ export declare function creditTransferRequestToJSON(creditTransferRequest: CreditTransferRequest): string;
40
+ //# sourceMappingURL=credittransferrequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credittransferrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/credittransferrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAwB,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CACQ,CAAC;AAEtC,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CAMrB,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreditTransferRequest$outboundSchema = exports.CreditTransferRequestAmount$outboundSchema = void 0;
40
+ exports.creditTransferRequestAmountToJSON = creditTransferRequestAmountToJSON;
41
+ exports.creditTransferRequestToJSON = creditTransferRequestToJSON;
42
+ const z = __importStar(require("zod/v3"));
43
+ const chain_js_1 = require("./chain.js");
44
+ /** @internal */
45
+ exports.CreditTransferRequestAmount$outboundSchema = z.union([z.number(), z.string()]);
46
+ function creditTransferRequestAmountToJSON(creditTransferRequestAmount) {
47
+ return JSON.stringify(exports.CreditTransferRequestAmount$outboundSchema.parse(creditTransferRequestAmount));
48
+ }
49
+ /** @internal */
50
+ exports.CreditTransferRequest$outboundSchema = z.object({
51
+ owner: z.string(),
52
+ chain: chain_js_1.Chain$outboundSchema,
53
+ token: z.string(),
54
+ amount: z.union([z.number(), z.string()]),
55
+ });
56
+ function creditTransferRequestToJSON(creditTransferRequest) {
57
+ return JSON.stringify(exports.CreditTransferRequest$outboundSchema.parse(creditTransferRequest));
58
+ }
59
+ //# sourceMappingURL=credittransferrequest.js.map