@compass-labs/api-sdk 2.2.18-rc.2 → 2.2.18

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 (324) hide show
  1. package/README.md +1 -16
  2. package/codeSamples_typescript.yaml +0 -36
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/models/components/index.d.ts +0 -20
  6. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  7. package/dist/commonjs/models/components/index.js +0 -20
  8. package/dist/commonjs/models/components/index.js.map +1 -1
  9. package/dist/commonjs/models/operations/index.d.ts +0 -1
  10. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  11. package/dist/commonjs/models/operations/index.js +0 -1
  12. package/dist/commonjs/models/operations/index.js.map +1 -1
  13. package/dist/commonjs/sdk/sdk.d.ts +0 -3
  14. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  15. package/dist/commonjs/sdk/sdk.js +0 -4
  16. package/dist/commonjs/sdk/sdk.js.map +1 -1
  17. package/dist/esm/lib/config.d.ts +2 -2
  18. package/dist/esm/lib/config.js +2 -2
  19. package/dist/esm/models/components/index.d.ts +0 -20
  20. package/dist/esm/models/components/index.d.ts.map +1 -1
  21. package/dist/esm/models/components/index.js +0 -20
  22. package/dist/esm/models/components/index.js.map +1 -1
  23. package/dist/esm/models/operations/index.d.ts +0 -1
  24. package/dist/esm/models/operations/index.d.ts.map +1 -1
  25. package/dist/esm/models/operations/index.js +0 -1
  26. package/dist/esm/models/operations/index.js.map +1 -1
  27. package/dist/esm/sdk/sdk.d.ts +0 -3
  28. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  29. package/dist/esm/sdk/sdk.js +0 -4
  30. package/dist/esm/sdk/sdk.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/lib/config.ts +2 -2
  33. package/src/models/components/index.ts +0 -20
  34. package/src/models/operations/index.ts +0 -1
  35. package/src/sdk/sdk.ts +0 -6
  36. package/dist/commonjs/funcs/creditCreditBorrow.d.ts +0 -25
  37. package/dist/commonjs/funcs/creditCreditBorrow.d.ts.map +0 -1
  38. package/dist/commonjs/funcs/creditCreditBorrow.js +0 -125
  39. package/dist/commonjs/funcs/creditCreditBorrow.js.map +0 -1
  40. package/dist/commonjs/funcs/creditCreditBundle.d.ts +0 -21
  41. package/dist/commonjs/funcs/creditCreditBundle.d.ts.map +0 -1
  42. package/dist/commonjs/funcs/creditCreditBundle.js +0 -121
  43. package/dist/commonjs/funcs/creditCreditBundle.js.map +0 -1
  44. package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts +0 -26
  45. package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts.map +0 -1
  46. package/dist/commonjs/funcs/creditCreditCreateAccount.js +0 -126
  47. package/dist/commonjs/funcs/creditCreditCreateAccount.js.map +0 -1
  48. package/dist/commonjs/funcs/creditCreditPositions.d.ts +0 -22
  49. package/dist/commonjs/funcs/creditCreditPositions.d.ts.map +0 -1
  50. package/dist/commonjs/funcs/creditCreditPositions.js +0 -126
  51. package/dist/commonjs/funcs/creditCreditPositions.js.map +0 -1
  52. package/dist/commonjs/funcs/creditCreditRepay.d.ts +0 -26
  53. package/dist/commonjs/funcs/creditCreditRepay.d.ts.map +0 -1
  54. package/dist/commonjs/funcs/creditCreditRepay.js +0 -126
  55. package/dist/commonjs/funcs/creditCreditRepay.js.map +0 -1
  56. package/dist/commonjs/funcs/creditCreditTransfer.d.ts +0 -27
  57. package/dist/commonjs/funcs/creditCreditTransfer.d.ts.map +0 -1
  58. package/dist/commonjs/funcs/creditCreditTransfer.js +0 -127
  59. package/dist/commonjs/funcs/creditCreditTransfer.js.map +0 -1
  60. package/dist/commonjs/models/components/accountsummary.d.ts +0 -40
  61. package/dist/commonjs/models/components/accountsummary.d.ts.map +0 -1
  62. package/dist/commonjs/models/components/accountsummary.js +0 -66
  63. package/dist/commonjs/models/components/accountsummary.js.map +0 -1
  64. package/dist/commonjs/models/components/collateralposition.d.ts +0 -53
  65. package/dist/commonjs/models/components/collateralposition.d.ts.map +0 -1
  66. package/dist/commonjs/models/components/collateralposition.js +0 -71
  67. package/dist/commonjs/models/components/collateralposition.js.map +0 -1
  68. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +0 -39
  69. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +0 -1
  70. package/dist/commonjs/models/components/createcreditaccountrequest.js +0 -64
  71. package/dist/commonjs/models/components/createcreditaccountrequest.js.map +0 -1
  72. package/dist/commonjs/models/components/createcreditaccountresponse.d.ts +0 -21
  73. package/dist/commonjs/models/components/createcreditaccountresponse.d.ts.map +0 -1
  74. package/dist/commonjs/models/components/createcreditaccountresponse.js +0 -57
  75. package/dist/commonjs/models/components/createcreditaccountresponse.js.map +0 -1
  76. package/dist/commonjs/models/components/creditborrowparams.d.ts +0 -44
  77. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +0 -1
  78. package/dist/commonjs/models/components/creditborrowparams.js +0 -65
  79. package/dist/commonjs/models/components/creditborrowparams.js.map +0 -1
  80. package/dist/commonjs/models/components/creditborrowrequest.d.ts +0 -108
  81. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +0 -1
  82. package/dist/commonjs/models/components/creditborrowrequest.js +0 -95
  83. package/dist/commonjs/models/components/creditborrowrequest.js.map +0 -1
  84. package/dist/commonjs/models/components/creditborrowresponse.d.ts +0 -23
  85. package/dist/commonjs/models/components/creditborrowresponse.d.ts.map +0 -1
  86. package/dist/commonjs/models/components/creditborrowresponse.js +0 -61
  87. package/dist/commonjs/models/components/creditborrowresponse.js.map +0 -1
  88. package/dist/commonjs/models/components/creditbundlerequest.d.ts +0 -35
  89. package/dist/commonjs/models/components/creditbundlerequest.d.ts.map +0 -1
  90. package/dist/commonjs/models/components/creditbundlerequest.js +0 -59
  91. package/dist/commonjs/models/components/creditbundlerequest.js.map +0 -1
  92. package/dist/commonjs/models/components/creditbundleresponse.d.ts +0 -23
  93. package/dist/commonjs/models/components/creditbundleresponse.d.ts.map +0 -1
  94. package/dist/commonjs/models/components/creditbundleresponse.js +0 -61
  95. package/dist/commonjs/models/components/creditbundleresponse.js.map +0 -1
  96. package/dist/commonjs/models/components/creditevent.d.ts +0 -53
  97. package/dist/commonjs/models/components/creditevent.d.ts.map +0 -1
  98. package/dist/commonjs/models/components/creditevent.js +0 -76
  99. package/dist/commonjs/models/components/creditevent.js.map +0 -1
  100. package/dist/commonjs/models/components/creditpositionsresponse.d.ts +0 -31
  101. package/dist/commonjs/models/components/creditpositionsresponse.d.ts.map +0 -1
  102. package/dist/commonjs/models/components/creditpositionsresponse.js +0 -64
  103. package/dist/commonjs/models/components/creditpositionsresponse.js.map +0 -1
  104. package/dist/commonjs/models/components/creditrepayparams.d.ts +0 -44
  105. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +0 -1
  106. package/dist/commonjs/models/components/creditrepayparams.js +0 -65
  107. package/dist/commonjs/models/components/creditrepayparams.js.map +0 -1
  108. package/dist/commonjs/models/components/creditrepayrequest.d.ts +0 -108
  109. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +0 -1
  110. package/dist/commonjs/models/components/creditrepayrequest.js +0 -95
  111. package/dist/commonjs/models/components/creditrepayrequest.js.map +0 -1
  112. package/dist/commonjs/models/components/creditrepayresponse.d.ts +0 -23
  113. package/dist/commonjs/models/components/creditrepayresponse.d.ts.map +0 -1
  114. package/dist/commonjs/models/components/creditrepayresponse.js +0 -61
  115. package/dist/commonjs/models/components/creditrepayresponse.js.map +0 -1
  116. package/dist/commonjs/models/components/creditsupplyparams.d.ts +0 -34
  117. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +0 -1
  118. package/dist/commonjs/models/components/creditsupplyparams.js +0 -62
  119. package/dist/commonjs/models/components/creditsupplyparams.js.map +0 -1
  120. package/dist/commonjs/models/components/credittransferrequest.d.ts +0 -40
  121. package/dist/commonjs/models/components/credittransferrequest.d.ts.map +0 -1
  122. package/dist/commonjs/models/components/credittransferrequest.js +0 -59
  123. package/dist/commonjs/models/components/credittransferrequest.js.map +0 -1
  124. package/dist/commonjs/models/components/credittransferresponse.d.ts +0 -11
  125. package/dist/commonjs/models/components/credittransferresponse.d.ts.map +0 -1
  126. package/dist/commonjs/models/components/credittransferresponse.js +0 -56
  127. package/dist/commonjs/models/components/credittransferresponse.js.map +0 -1
  128. package/dist/commonjs/models/components/credituseroperation.d.ts +0 -28
  129. package/dist/commonjs/models/components/credituseroperation.d.ts.map +0 -1
  130. package/dist/commonjs/models/components/credituseroperation.js +0 -78
  131. package/dist/commonjs/models/components/credituseroperation.js.map +0 -1
  132. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +0 -34
  133. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +0 -1
  134. package/dist/commonjs/models/components/creditwithdrawparams.js +0 -62
  135. package/dist/commonjs/models/components/creditwithdrawparams.js.map +0 -1
  136. package/dist/commonjs/models/components/debtposition.d.ts +0 -49
  137. package/dist/commonjs/models/components/debtposition.d.ts.map +0 -1
  138. package/dist/commonjs/models/components/debtposition.js +0 -69
  139. package/dist/commonjs/models/components/debtposition.js.map +0 -1
  140. package/dist/commonjs/models/operations/v2creditpositions.d.ts +0 -26
  141. package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +0 -1
  142. package/dist/commonjs/models/operations/v2creditpositions.js +0 -57
  143. package/dist/commonjs/models/operations/v2creditpositions.js.map +0 -1
  144. package/dist/commonjs/sdk/credit.d.ts +0 -86
  145. package/dist/commonjs/sdk/credit.d.ts.map +0 -1
  146. package/dist/commonjs/sdk/credit.js +0 -110
  147. package/dist/commonjs/sdk/credit.js.map +0 -1
  148. package/dist/esm/funcs/creditCreditBorrow.d.ts +0 -25
  149. package/dist/esm/funcs/creditCreditBorrow.d.ts.map +0 -1
  150. package/dist/esm/funcs/creditCreditBorrow.js +0 -89
  151. package/dist/esm/funcs/creditCreditBorrow.js.map +0 -1
  152. package/dist/esm/funcs/creditCreditBundle.d.ts +0 -21
  153. package/dist/esm/funcs/creditCreditBundle.d.ts.map +0 -1
  154. package/dist/esm/funcs/creditCreditBundle.js +0 -85
  155. package/dist/esm/funcs/creditCreditBundle.js.map +0 -1
  156. package/dist/esm/funcs/creditCreditCreateAccount.d.ts +0 -26
  157. package/dist/esm/funcs/creditCreditCreateAccount.d.ts.map +0 -1
  158. package/dist/esm/funcs/creditCreditCreateAccount.js +0 -90
  159. package/dist/esm/funcs/creditCreditCreateAccount.js.map +0 -1
  160. package/dist/esm/funcs/creditCreditPositions.d.ts +0 -22
  161. package/dist/esm/funcs/creditCreditPositions.d.ts.map +0 -1
  162. package/dist/esm/funcs/creditCreditPositions.js +0 -90
  163. package/dist/esm/funcs/creditCreditPositions.js.map +0 -1
  164. package/dist/esm/funcs/creditCreditRepay.d.ts +0 -26
  165. package/dist/esm/funcs/creditCreditRepay.d.ts.map +0 -1
  166. package/dist/esm/funcs/creditCreditRepay.js +0 -90
  167. package/dist/esm/funcs/creditCreditRepay.js.map +0 -1
  168. package/dist/esm/funcs/creditCreditTransfer.d.ts +0 -27
  169. package/dist/esm/funcs/creditCreditTransfer.d.ts.map +0 -1
  170. package/dist/esm/funcs/creditCreditTransfer.js +0 -91
  171. package/dist/esm/funcs/creditCreditTransfer.js.map +0 -1
  172. package/dist/esm/models/components/accountsummary.d.ts +0 -40
  173. package/dist/esm/models/components/accountsummary.d.ts.map +0 -1
  174. package/dist/esm/models/components/accountsummary.js +0 -29
  175. package/dist/esm/models/components/accountsummary.js.map +0 -1
  176. package/dist/esm/models/components/collateralposition.d.ts +0 -53
  177. package/dist/esm/models/components/collateralposition.d.ts.map +0 -1
  178. package/dist/esm/models/components/collateralposition.js +0 -34
  179. package/dist/esm/models/components/collateralposition.js.map +0 -1
  180. package/dist/esm/models/components/createcreditaccountrequest.d.ts +0 -39
  181. package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +0 -1
  182. package/dist/esm/models/components/createcreditaccountrequest.js +0 -27
  183. package/dist/esm/models/components/createcreditaccountrequest.js.map +0 -1
  184. package/dist/esm/models/components/createcreditaccountresponse.d.ts +0 -21
  185. package/dist/esm/models/components/createcreditaccountresponse.d.ts.map +0 -1
  186. package/dist/esm/models/components/createcreditaccountresponse.js +0 -20
  187. package/dist/esm/models/components/createcreditaccountresponse.js.map +0 -1
  188. package/dist/esm/models/components/creditborrowparams.d.ts +0 -44
  189. package/dist/esm/models/components/creditborrowparams.d.ts.map +0 -1
  190. package/dist/esm/models/components/creditborrowparams.js +0 -27
  191. package/dist/esm/models/components/creditborrowparams.js.map +0 -1
  192. package/dist/esm/models/components/creditborrowrequest.d.ts +0 -108
  193. package/dist/esm/models/components/creditborrowrequest.d.ts.map +0 -1
  194. package/dist/esm/models/components/creditborrowrequest.js +0 -55
  195. package/dist/esm/models/components/creditborrowrequest.js.map +0 -1
  196. package/dist/esm/models/components/creditborrowresponse.d.ts +0 -23
  197. package/dist/esm/models/components/creditborrowresponse.d.ts.map +0 -1
  198. package/dist/esm/models/components/creditborrowresponse.js +0 -24
  199. package/dist/esm/models/components/creditborrowresponse.js.map +0 -1
  200. package/dist/esm/models/components/creditbundlerequest.d.ts +0 -35
  201. package/dist/esm/models/components/creditbundlerequest.d.ts.map +0 -1
  202. package/dist/esm/models/components/creditbundlerequest.js +0 -22
  203. package/dist/esm/models/components/creditbundlerequest.js.map +0 -1
  204. package/dist/esm/models/components/creditbundleresponse.d.ts +0 -23
  205. package/dist/esm/models/components/creditbundleresponse.d.ts.map +0 -1
  206. package/dist/esm/models/components/creditbundleresponse.js +0 -24
  207. package/dist/esm/models/components/creditbundleresponse.js.map +0 -1
  208. package/dist/esm/models/components/creditevent.d.ts +0 -53
  209. package/dist/esm/models/components/creditevent.d.ts.map +0 -1
  210. package/dist/esm/models/components/creditevent.js +0 -39
  211. package/dist/esm/models/components/creditevent.js.map +0 -1
  212. package/dist/esm/models/components/creditpositionsresponse.d.ts +0 -31
  213. package/dist/esm/models/components/creditpositionsresponse.d.ts.map +0 -1
  214. package/dist/esm/models/components/creditpositionsresponse.js +0 -27
  215. package/dist/esm/models/components/creditpositionsresponse.js.map +0 -1
  216. package/dist/esm/models/components/creditrepayparams.d.ts +0 -44
  217. package/dist/esm/models/components/creditrepayparams.d.ts.map +0 -1
  218. package/dist/esm/models/components/creditrepayparams.js +0 -27
  219. package/dist/esm/models/components/creditrepayparams.js.map +0 -1
  220. package/dist/esm/models/components/creditrepayrequest.d.ts +0 -108
  221. package/dist/esm/models/components/creditrepayrequest.d.ts.map +0 -1
  222. package/dist/esm/models/components/creditrepayrequest.js +0 -55
  223. package/dist/esm/models/components/creditrepayrequest.js.map +0 -1
  224. package/dist/esm/models/components/creditrepayresponse.d.ts +0 -23
  225. package/dist/esm/models/components/creditrepayresponse.d.ts.map +0 -1
  226. package/dist/esm/models/components/creditrepayresponse.js +0 -24
  227. package/dist/esm/models/components/creditrepayresponse.js.map +0 -1
  228. package/dist/esm/models/components/creditsupplyparams.d.ts +0 -34
  229. package/dist/esm/models/components/creditsupplyparams.d.ts.map +0 -1
  230. package/dist/esm/models/components/creditsupplyparams.js +0 -24
  231. package/dist/esm/models/components/creditsupplyparams.js.map +0 -1
  232. package/dist/esm/models/components/credittransferrequest.d.ts +0 -40
  233. package/dist/esm/models/components/credittransferrequest.d.ts.map +0 -1
  234. package/dist/esm/models/components/credittransferrequest.js +0 -21
  235. package/dist/esm/models/components/credittransferrequest.js.map +0 -1
  236. package/dist/esm/models/components/credittransferresponse.d.ts +0 -11
  237. package/dist/esm/models/components/credittransferresponse.d.ts.map +0 -1
  238. package/dist/esm/models/components/credittransferresponse.js +0 -19
  239. package/dist/esm/models/components/credittransferresponse.js.map +0 -1
  240. package/dist/esm/models/components/credituseroperation.d.ts +0 -28
  241. package/dist/esm/models/components/credituseroperation.d.ts.map +0 -1
  242. package/dist/esm/models/components/credituseroperation.js +0 -40
  243. package/dist/esm/models/components/credituseroperation.js.map +0 -1
  244. package/dist/esm/models/components/creditwithdrawparams.d.ts +0 -34
  245. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +0 -1
  246. package/dist/esm/models/components/creditwithdrawparams.js +0 -24
  247. package/dist/esm/models/components/creditwithdrawparams.js.map +0 -1
  248. package/dist/esm/models/components/debtposition.d.ts +0 -49
  249. package/dist/esm/models/components/debtposition.d.ts.map +0 -1
  250. package/dist/esm/models/components/debtposition.js +0 -32
  251. package/dist/esm/models/components/debtposition.js.map +0 -1
  252. package/dist/esm/models/operations/v2creditpositions.d.ts +0 -26
  253. package/dist/esm/models/operations/v2creditpositions.d.ts.map +0 -1
  254. package/dist/esm/models/operations/v2creditpositions.js +0 -20
  255. package/dist/esm/models/operations/v2creditpositions.js.map +0 -1
  256. package/dist/esm/sdk/credit.d.ts +0 -86
  257. package/dist/esm/sdk/credit.d.ts.map +0 -1
  258. package/dist/esm/sdk/credit.js +0 -106
  259. package/dist/esm/sdk/credit.js.map +0 -1
  260. package/docs/models/components/accountsummary.md +0 -30
  261. package/docs/models/components/borrowamount.md +0 -19
  262. package/docs/models/components/collateralposition.md +0 -31
  263. package/docs/models/components/createcreditaccountrequest.md +0 -24
  264. package/docs/models/components/createcreditaccountrequestchain.md +0 -15
  265. package/docs/models/components/createcreditaccountresponse.md +0 -31
  266. package/docs/models/components/creditborrowparams.md +0 -24
  267. package/docs/models/components/creditborrowparamsamount.md +0 -19
  268. package/docs/models/components/creditborrowrequest.md +0 -38
  269. package/docs/models/components/creditborrowrequestamountin.md +0 -19
  270. package/docs/models/components/creditborrowrequestslippage.md +0 -19
  271. package/docs/models/components/creditborrowresponse.md +0 -17
  272. package/docs/models/components/creditbundlerequest.md +0 -25
  273. package/docs/models/components/creditbundleresponse.md +0 -19
  274. package/docs/models/components/creditevent.md +0 -29
  275. package/docs/models/components/creditpositionsresponse.md +0 -31
  276. package/docs/models/components/creditrepayparams.md +0 -24
  277. package/docs/models/components/creditrepayparamsamount.md +0 -19
  278. package/docs/models/components/creditrepayrequest.md +0 -37
  279. package/docs/models/components/creditrepayrequestslippage.md +0 -19
  280. package/docs/models/components/creditrepayresponse.md +0 -17
  281. package/docs/models/components/creditsupplyparams.md +0 -23
  282. package/docs/models/components/creditsupplyparamsamount.md +0 -19
  283. package/docs/models/components/credittransferrequest.md +0 -23
  284. package/docs/models/components/credittransferrequestamount.md +0 -19
  285. package/docs/models/components/credittransferresponse.md +0 -75
  286. package/docs/models/components/credituseroperation.md +0 -23
  287. package/docs/models/components/credituseroperationbody.md +0 -80
  288. package/docs/models/components/creditwithdrawparams.md +0 -23
  289. package/docs/models/components/creditwithdrawparamsamount.md +0 -19
  290. package/docs/models/components/debtposition.md +0 -30
  291. package/docs/models/components/eventtype.md +0 -17
  292. package/docs/models/components/repayamount.md +0 -19
  293. package/docs/models/components/withdrawamount.md +0 -19
  294. package/docs/models/operations/v2creditpositionschain.md +0 -15
  295. package/docs/models/operations/v2creditpositionsrequest.md +0 -19
  296. package/docs/sdks/credit/README.md +0 -562
  297. package/src/funcs/creditCreditBorrow.ts +0 -176
  298. package/src/funcs/creditCreditBundle.ts +0 -172
  299. package/src/funcs/creditCreditCreateAccount.ts +0 -178
  300. package/src/funcs/creditCreditPositions.ts +0 -178
  301. package/src/funcs/creditCreditRepay.ts +0 -177
  302. package/src/funcs/creditCreditTransfer.ts +0 -178
  303. package/src/models/components/accountsummary.ts +0 -77
  304. package/src/models/components/collateralposition.ts +0 -94
  305. package/src/models/components/createcreditaccountrequest.ts +0 -72
  306. package/src/models/components/createcreditaccountresponse.ts +0 -51
  307. package/src/models/components/creditborrowparams.ts +0 -89
  308. package/src/models/components/creditborrowrequest.ts +0 -198
  309. package/src/models/components/creditborrowresponse.ts +0 -59
  310. package/src/models/components/creditbundlerequest.ts +0 -66
  311. package/src/models/components/creditbundleresponse.ts +0 -59
  312. package/src/models/components/creditevent.ts +0 -92
  313. package/src/models/components/creditpositionsresponse.ts +0 -69
  314. package/src/models/components/creditrepayparams.ts +0 -89
  315. package/src/models/components/creditrepayrequest.ts +0 -190
  316. package/src/models/components/creditrepayresponse.ts +0 -59
  317. package/src/models/components/creditsupplyparams.ts +0 -74
  318. package/src/models/components/credittransferrequest.ts +0 -78
  319. package/src/models/components/credittransferresponse.ts +0 -40
  320. package/src/models/components/credituseroperation.ts +0 -133
  321. package/src/models/components/creditwithdrawparams.ts +0 -74
  322. package/src/models/components/debtposition.ts +0 -88
  323. package/src/models/operations/v2creditpositions.ts +0 -50
  324. package/src/sdk/credit.ts +0 -156
@@ -1,74 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
-
8
- /**
9
- * Amount in token units to withdraw.
10
- */
11
- export type CreditWithdrawParamsAmount = number | string;
12
-
13
- /**
14
- * Withdraw collateral from Aave via Credit Account.
15
- */
16
- export type CreditWithdrawParams = {
17
- actionType: "CREDIT_WITHDRAW";
18
- /**
19
- * Collateral token to withdraw from Aave.
20
- */
21
- token: string;
22
- /**
23
- * Amount in token units to withdraw.
24
- */
25
- amount: number | string;
26
- };
27
-
28
- /** @internal */
29
- export type CreditWithdrawParamsAmount$Outbound = number | string;
30
-
31
- /** @internal */
32
- export const CreditWithdrawParamsAmount$outboundSchema: z.ZodType<
33
- CreditWithdrawParamsAmount$Outbound,
34
- z.ZodTypeDef,
35
- CreditWithdrawParamsAmount
36
- > = z.union([z.number(), z.string()]);
37
-
38
- export function creditWithdrawParamsAmountToJSON(
39
- creditWithdrawParamsAmount: CreditWithdrawParamsAmount,
40
- ): string {
41
- return JSON.stringify(
42
- CreditWithdrawParamsAmount$outboundSchema.parse(creditWithdrawParamsAmount),
43
- );
44
- }
45
-
46
- /** @internal */
47
- export type CreditWithdrawParams$Outbound = {
48
- action_type: "CREDIT_WITHDRAW";
49
- token: string;
50
- amount: number | string;
51
- };
52
-
53
- /** @internal */
54
- export const CreditWithdrawParams$outboundSchema: z.ZodType<
55
- CreditWithdrawParams$Outbound,
56
- z.ZodTypeDef,
57
- CreditWithdrawParams
58
- > = z.object({
59
- actionType: z.literal("CREDIT_WITHDRAW"),
60
- token: z.string(),
61
- amount: z.union([z.number(), z.string()]),
62
- }).transform((v) => {
63
- return remap$(v, {
64
- actionType: "action_type",
65
- });
66
- });
67
-
68
- export function creditWithdrawParamsToJSON(
69
- creditWithdrawParams: CreditWithdrawParams,
70
- ): string {
71
- return JSON.stringify(
72
- CreditWithdrawParams$outboundSchema.parse(creditWithdrawParams),
73
- );
74
- }
@@ -1,88 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { CreditEvent, CreditEvent$inboundSchema } from "./creditevent.js";
11
-
12
- /**
13
- * A per-reserve debt position.
14
- */
15
- export type DebtPosition = {
16
- /**
17
- * Address of the borrow token.
18
- */
19
- token: string;
20
- /**
21
- * Symbol of the borrow token (e.g. WETH).
22
- */
23
- symbol: string;
24
- /**
25
- * Current on-chain variable debt balance.
26
- */
27
- amountBorrowed: string | null;
28
- /**
29
- * Debt value in USD.
30
- */
31
- usdValue?: string | null | undefined;
32
- /**
33
- * Current borrow APY in percentage (e.g. 4.5 means 4.5%).
34
- */
35
- borrowApy?: string | null | undefined;
36
- /**
37
- * Total amount borrowed across all borrow events.
38
- */
39
- totalBorrowed?: string | null | undefined;
40
- /**
41
- * Total amount repaid across all repay events.
42
- */
43
- totalRepaid?: string | null | undefined;
44
- /**
45
- * Interest paid on debt: on_chain_balance + total_repaid - total_borrowed.
46
- */
47
- interestPaid?: string | null | undefined;
48
- /**
49
- * All historical events for this debt reserve.
50
- */
51
- events?: Array<CreditEvent> | undefined;
52
- };
53
-
54
- /** @internal */
55
- export const DebtPosition$inboundSchema: z.ZodType<
56
- DebtPosition,
57
- z.ZodTypeDef,
58
- unknown
59
- > = z.object({
60
- token: z.string(),
61
- symbol: z.string(),
62
- amount_borrowed: z.nullable(z.string()),
63
- usd_value: z.nullable(z.string()).optional(),
64
- borrow_apy: z.nullable(z.string()).optional(),
65
- total_borrowed: z.nullable(z.string()).optional(),
66
- total_repaid: z.nullable(z.string()).optional(),
67
- interest_paid: z.nullable(z.string()).optional(),
68
- events: z.array(CreditEvent$inboundSchema).optional(),
69
- }).transform((v) => {
70
- return remap$(v, {
71
- "amount_borrowed": "amountBorrowed",
72
- "usd_value": "usdValue",
73
- "borrow_apy": "borrowApy",
74
- "total_borrowed": "totalBorrowed",
75
- "total_repaid": "totalRepaid",
76
- "interest_paid": "interestPaid",
77
- });
78
- });
79
-
80
- export function debtPositionFromJSON(
81
- jsonString: string,
82
- ): SafeParseResult<DebtPosition, SDKValidationError> {
83
- return safeParse(
84
- jsonString,
85
- (x) => DebtPosition$inboundSchema.parse(JSON.parse(x)),
86
- `Failed to parse 'DebtPosition' from JSON`,
87
- );
88
- }
@@ -1,50 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- export const V2CreditPositionsChain = {
9
- Arbitrum: "arbitrum",
10
- Base: "base",
11
- Ethereum: "ethereum",
12
- } as const;
13
- export type V2CreditPositionsChain = ClosedEnum<typeof V2CreditPositionsChain>;
14
-
15
- export type V2CreditPositionsRequest = {
16
- chain: V2CreditPositionsChain;
17
- /**
18
- * The address of the owner of the credit account to get positions for.
19
- */
20
- owner: string;
21
- };
22
-
23
- /** @internal */
24
- export const V2CreditPositionsChain$outboundSchema: z.ZodNativeEnum<
25
- typeof V2CreditPositionsChain
26
- > = z.nativeEnum(V2CreditPositionsChain);
27
-
28
- /** @internal */
29
- export type V2CreditPositionsRequest$Outbound = {
30
- chain: string;
31
- owner: string;
32
- };
33
-
34
- /** @internal */
35
- export const V2CreditPositionsRequest$outboundSchema: z.ZodType<
36
- V2CreditPositionsRequest$Outbound,
37
- z.ZodTypeDef,
38
- V2CreditPositionsRequest
39
- > = z.object({
40
- chain: V2CreditPositionsChain$outboundSchema,
41
- owner: z.string(),
42
- });
43
-
44
- export function v2CreditPositionsRequestToJSON(
45
- v2CreditPositionsRequest: V2CreditPositionsRequest,
46
- ): string {
47
- return JSON.stringify(
48
- V2CreditPositionsRequest$outboundSchema.parse(v2CreditPositionsRequest),
49
- );
50
- }
package/src/sdk/credit.ts DELETED
@@ -1,156 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { creditCreditBorrow } from "../funcs/creditCreditBorrow.js";
6
- import { creditCreditBundle } from "../funcs/creditCreditBundle.js";
7
- import { creditCreditCreateAccount } from "../funcs/creditCreditCreateAccount.js";
8
- import { creditCreditPositions } from "../funcs/creditCreditPositions.js";
9
- import { creditCreditRepay } from "../funcs/creditCreditRepay.js";
10
- import { creditCreditTransfer } from "../funcs/creditCreditTransfer.js";
11
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
- import * as components from "../models/components/index.js";
13
- import * as operations from "../models/operations/index.js";
14
- import { unwrapAsync } from "../types/fp.js";
15
-
16
- export class Credit extends ClientSDK {
17
- /**
18
- * List credit positions
19
- *
20
- * @remarks
21
- * List all Credit positions for a given owner.
22
- *
23
- * Returns a unified list of positions (collateral and debt) and an account summary
24
- * with health factor and LTV. Each position includes event history.
25
- */
26
- async creditPositions(
27
- request: operations.V2CreditPositionsRequest,
28
- options?: RequestOptions,
29
- ): Promise<components.CreditPositionsResponse> {
30
- return unwrapAsync(creditCreditPositions(
31
- this,
32
- request,
33
- options,
34
- ));
35
- }
36
-
37
- /**
38
- * Create credit account
39
- *
40
- * @remarks
41
- * Create a Credit Account for a wallet address.
42
- *
43
- * Before using credit features, the owner must create a Credit Account. Each wallet address has one Credit Account per chain.
44
- *
45
- * Returns an unsigned transaction to create the account. The `sender` signs and broadcasts this transaction.
46
- *
47
- * **If owner pays gas:** Set `sender` to the owner's address.
48
- *
49
- * **If someone else pays gas:** Set `sender` to the wallet that will sign and broadcast the transaction on behalf of the owner.
50
- */
51
- async creditCreateAccount(
52
- request: components.CreateCreditAccountRequest,
53
- options?: RequestOptions,
54
- ): Promise<components.CreateCreditAccountResponse> {
55
- return unwrapAsync(creditCreditCreateAccount(
56
- this,
57
- request,
58
- options,
59
- ));
60
- }
61
-
62
- /**
63
- * Borrow against collateral
64
- *
65
- * @remarks
66
- * Borrow an asset from Aave using a Credit Account.
67
- *
68
- * Bundles an optional swap, collateral supply, and borrow into a single atomic Safe transaction.
69
- *
70
- * - If `token_in` equals `collateral_token`, the tokens are supplied directly as collateral.
71
- * - If `token_in` differs from `collateral_token`, a swap is performed first via 1inch.
72
- *
73
- * The Credit Account must already be created via `/v2/credit/create_account` and funded with `token_in`.
74
- */
75
- async creditBorrow(
76
- request: components.CreditBorrowRequest,
77
- options?: RequestOptions,
78
- ): Promise<components.CreditBorrowResponse> {
79
- return unwrapAsync(creditCreditBorrow(
80
- this,
81
- request,
82
- options,
83
- ));
84
- }
85
-
86
- /**
87
- * Get Permit2 signature data for Credit Account transfer
88
- *
89
- * @remarks
90
- * Generate Permit2 EIP-712 typed data for transferring tokens from the owner's EOA
91
- * to a Credit Account.
92
- *
93
- * The owner signs the returned EIP-712 data, then includes the signature in a `/v2/credit/borrow`
94
- * or `/v2/credit/repay` request to atomically pull tokens from their EOA as part of the bundle.
95
- *
96
- * **Flow:**
97
- * 1. Call this endpoint to get the Permit2 typed data
98
- * 2. Sign the typed data with the owner's wallet
99
- * 3. Call `/v2/credit/borrow` or `/v2/credit/repay` with the `permit2_signature`, `permit2_nonce`, and `permit2_deadline` fields
100
- */
101
- async creditTransfer(
102
- request: components.CreditTransferRequest,
103
- options?: RequestOptions,
104
- ): Promise<components.CreditTransferResponse> {
105
- return unwrapAsync(creditCreditTransfer(
106
- this,
107
- request,
108
- options,
109
- ));
110
- }
111
-
112
- /**
113
- * Repay debt and withdraw collateral
114
- *
115
- * @remarks
116
- * Repay an Aave debt and withdraw collateral from a Credit Account.
117
- *
118
- * Bundles repayment, collateral withdrawal, and an optional swap into a single atomic Safe transaction.
119
- *
120
- * - If `token_out` is None or equals `withdraw_token`, the withdrawn collateral is kept as-is.
121
- * - If `token_out` differs from `withdraw_token`, a swap is performed after withdrawal via 1inch.
122
- *
123
- * The Credit Account must already have a borrow position created via `/v2/credit/borrow`.
124
- * The repay_token must be available in the Credit Account (or pulled from EOA via Permit2).
125
- */
126
- async creditRepay(
127
- request: components.CreditRepayRequest,
128
- options?: RequestOptions,
129
- ): Promise<components.CreditRepayResponse> {
130
- return unwrapAsync(creditCreditRepay(
131
- this,
132
- request,
133
- options,
134
- ));
135
- }
136
-
137
- /**
138
- * Execute multiple credit actions atomically
139
- *
140
- * @remarks
141
- * Compose individual credit operations (supply, withdraw, borrow, repay, swap, transfer)
142
- * into a single atomic Safe transaction.
143
- *
144
- * The Credit Account must already be created via `/v2/credit/create_account`.
145
- */
146
- async creditBundle(
147
- request: components.CreditBundleRequest,
148
- options?: RequestOptions,
149
- ): Promise<components.CreditBundleResponse> {
150
- return unwrapAsync(creditCreditBundle(
151
- this,
152
- request,
153
- options,
154
- ));
155
- }
156
- }