@wirexapp/wpay-baas-sdk 0.1.6 → 0.1.8

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 (343) hide show
  1. package/README.md +32 -2
  2. package/dist/chunk-D2YHFKQI.js +1364 -0
  3. package/dist/chunk-D2YHFKQI.js.map +1 -0
  4. package/dist/chunk-ITBPDXHK.js +5064 -0
  5. package/dist/chunk-ITBPDXHK.js.map +1 -0
  6. package/dist/chunk-YXNNTBO5.js +304 -0
  7. package/dist/chunk-YXNNTBO5.js.map +1 -0
  8. package/dist/core/index.d.ts +32 -8
  9. package/dist/core/index.js +2 -4
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/crypto.module-BsI4pLhf.d.ts +203 -0
  12. package/dist/{core/errors.d.ts → errors-5LpyK95R.d.ts} +10 -9
  13. package/dist/index-3P-X9tLg.d.ts +1715 -0
  14. package/dist/index.d.ts +33 -14
  15. package/dist/index.js +111 -6
  16. package/dist/index.js.map +1 -1
  17. package/dist/modules/api/index.d.ts +4 -7
  18. package/dist/modules/api/index.js +3 -4
  19. package/dist/modules/api/index.js.map +1 -1
  20. package/dist/modules/crypto/index.d.ts +214 -9
  21. package/dist/modules/crypto/index.js +4 -7
  22. package/dist/modules/crypto/index.js.map +1 -1
  23. package/dist/types-_RME4STd.d.ts +179 -0
  24. package/dist/{modules/crypto/interfaces/crypto.interface.d.ts → withdrawal.api-CmRHIoyc.d.ts} +20 -11
  25. package/package.json +37 -9
  26. package/dist/abi/accounts.abi.d.ts +0 -405
  27. package/dist/abi/accounts.abi.d.ts.map +0 -1
  28. package/dist/abi/accounts.abi.js +0 -351
  29. package/dist/abi/accounts.abi.js.map +0 -1
  30. package/dist/abi/contractRegistry.abi.d.ts +0 -220
  31. package/dist/abi/contractRegistry.abi.d.ts.map +0 -1
  32. package/dist/abi/contractRegistry.abi.js +0 -287
  33. package/dist/abi/contractRegistry.abi.js.map +0 -1
  34. package/dist/abi/corporateAccounts.abi.d.ts +0 -42
  35. package/dist/abi/corporateAccounts.abi.d.ts.map +0 -1
  36. package/dist/abi/corporateAccounts.abi.js +0 -34
  37. package/dist/abi/corporateAccounts.abi.js.map +0 -1
  38. package/dist/abi/erc20.abi.d.ts +0 -253
  39. package/dist/abi/erc20.abi.d.ts.map +0 -1
  40. package/dist/abi/erc20.abi.js +0 -98
  41. package/dist/abi/erc20.abi.js.map +0 -1
  42. package/dist/abi/executionDelayPolicy.abi.d.ts +0 -378
  43. package/dist/abi/executionDelayPolicy.abi.d.ts.map +0 -1
  44. package/dist/abi/executionDelayPolicy.abi.js +0 -502
  45. package/dist/abi/executionDelayPolicy.abi.js.map +0 -1
  46. package/dist/abi/fundsManagement.abi.d.ts +0 -54
  47. package/dist/abi/fundsManagement.abi.d.ts.map +0 -1
  48. package/dist/abi/fundsManagement.abi.js +0 -361
  49. package/dist/abi/fundsManagement.abi.js.map +0 -1
  50. package/dist/abi/index.d.ts +0 -11
  51. package/dist/abi/index.d.ts.map +0 -1
  52. package/dist/abi/index.js +0 -11
  53. package/dist/abi/index.js.map +0 -1
  54. package/dist/abi/signer.abi.d.ts +0 -20
  55. package/dist/abi/signer.abi.d.ts.map +0 -1
  56. package/dist/abi/signer.abi.js +0 -13
  57. package/dist/abi/signer.abi.js.map +0 -1
  58. package/dist/abi/synthetic.abi.d.ts +0 -2459
  59. package/dist/abi/synthetic.abi.d.ts.map +0 -1
  60. package/dist/abi/synthetic.abi.js +0 -1739
  61. package/dist/abi/synthetic.abi.js.map +0 -1
  62. package/dist/abi/tokenRegistry.abi.d.ts +0 -209
  63. package/dist/abi/tokenRegistry.abi.d.ts.map +0 -1
  64. package/dist/abi/tokenRegistry.abi.js +0 -117
  65. package/dist/abi/tokenRegistry.abi.js.map +0 -1
  66. package/dist/abi/yieldCalculator.abi.d.ts +0 -327
  67. package/dist/abi/yieldCalculator.abi.d.ts.map +0 -1
  68. package/dist/abi/yieldCalculator.abi.js +0 -2
  69. package/dist/abi/yieldCalculator.abi.js.map +0 -1
  70. package/dist/client.d.ts +0 -23
  71. package/dist/client.d.ts.map +0 -1
  72. package/dist/client.js +0 -98
  73. package/dist/client.js.map +0 -1
  74. package/dist/core/config/config.service.d.ts +0 -19
  75. package/dist/core/config/config.service.d.ts.map +0 -1
  76. package/dist/core/config/config.service.js +0 -83
  77. package/dist/core/config/config.service.js.map +0 -1
  78. package/dist/core/config/index.d.ts +0 -4
  79. package/dist/core/config/index.d.ts.map +0 -1
  80. package/dist/core/config/index.js +0 -3
  81. package/dist/core/config/index.js.map +0 -1
  82. package/dist/core/config/types.d.ts +0 -40
  83. package/dist/core/config/types.d.ts.map +0 -1
  84. package/dist/core/config/types.js +0 -5
  85. package/dist/core/config/types.js.map +0 -1
  86. package/dist/core/errors.d.ts.map +0 -1
  87. package/dist/core/errors.js +0 -63
  88. package/dist/core/errors.js.map +0 -1
  89. package/dist/core/index.d.ts.map +0 -1
  90. package/dist/core/internal/http-client.d.ts +0 -40
  91. package/dist/core/internal/http-client.d.ts.map +0 -1
  92. package/dist/core/internal/http-client.js +0 -113
  93. package/dist/core/internal/http-client.js.map +0 -1
  94. package/dist/core/types.d.ts +0 -93
  95. package/dist/core/types.d.ts.map +0 -1
  96. package/dist/core/types.js +0 -13
  97. package/dist/core/types.js.map +0 -1
  98. package/dist/index.d.ts.map +0 -1
  99. package/dist/modules/api/api.module.d.ts +0 -21
  100. package/dist/modules/api/api.module.d.ts.map +0 -1
  101. package/dist/modules/api/api.module.js +0 -47
  102. package/dist/modules/api/api.module.js.map +0 -1
  103. package/dist/modules/api/baas/activity/activity.service.d.ts +0 -34
  104. package/dist/modules/api/baas/activity/activity.service.d.ts.map +0 -1
  105. package/dist/modules/api/baas/activity/activity.service.js +0 -61
  106. package/dist/modules/api/baas/activity/activity.service.js.map +0 -1
  107. package/dist/modules/api/baas/activity/index.d.ts +0 -3
  108. package/dist/modules/api/baas/activity/index.d.ts.map +0 -1
  109. package/dist/modules/api/baas/activity/index.js +0 -2
  110. package/dist/modules/api/baas/activity/index.js.map +0 -1
  111. package/dist/modules/api/baas/activity/types.d.ts +0 -166
  112. package/dist/modules/api/baas/activity/types.d.ts.map +0 -1
  113. package/dist/modules/api/baas/activity/types.js +0 -5
  114. package/dist/modules/api/baas/activity/types.js.map +0 -1
  115. package/dist/modules/api/baas/baas.module.d.ts +0 -44
  116. package/dist/modules/api/baas/baas.module.d.ts.map +0 -1
  117. package/dist/modules/api/baas/baas.module.js +0 -156
  118. package/dist/modules/api/baas/baas.module.js.map +0 -1
  119. package/dist/modules/api/baas/bank/bank.service.d.ts +0 -42
  120. package/dist/modules/api/baas/bank/bank.service.d.ts.map +0 -1
  121. package/dist/modules/api/baas/bank/bank.service.js +0 -75
  122. package/dist/modules/api/baas/bank/bank.service.js.map +0 -1
  123. package/dist/modules/api/baas/bank/index.d.ts +0 -3
  124. package/dist/modules/api/baas/bank/index.d.ts.map +0 -1
  125. package/dist/modules/api/baas/bank/index.js +0 -2
  126. package/dist/modules/api/baas/bank/index.js.map +0 -1
  127. package/dist/modules/api/baas/bank/types.d.ts +0 -116
  128. package/dist/modules/api/baas/bank/types.d.ts.map +0 -1
  129. package/dist/modules/api/baas/bank/types.js +0 -5
  130. package/dist/modules/api/baas/bank/types.js.map +0 -1
  131. package/dist/modules/api/baas/cards/cards.service.d.ts +0 -118
  132. package/dist/modules/api/baas/cards/cards.service.d.ts.map +0 -1
  133. package/dist/modules/api/baas/cards/cards.service.js +0 -254
  134. package/dist/modules/api/baas/cards/cards.service.js.map +0 -1
  135. package/dist/modules/api/baas/cards/index.d.ts +0 -3
  136. package/dist/modules/api/baas/cards/index.d.ts.map +0 -1
  137. package/dist/modules/api/baas/cards/index.js +0 -2
  138. package/dist/modules/api/baas/cards/index.js.map +0 -1
  139. package/dist/modules/api/baas/cards/types.d.ts +0 -249
  140. package/dist/modules/api/baas/cards/types.d.ts.map +0 -1
  141. package/dist/modules/api/baas/cards/types.js +0 -5
  142. package/dist/modules/api/baas/cards/types.js.map +0 -1
  143. package/dist/modules/api/baas/config/config.service.d.ts +0 -21
  144. package/dist/modules/api/baas/config/config.service.d.ts.map +0 -1
  145. package/dist/modules/api/baas/config/config.service.js +0 -22
  146. package/dist/modules/api/baas/config/config.service.js.map +0 -1
  147. package/dist/modules/api/baas/config/index.d.ts +0 -3
  148. package/dist/modules/api/baas/config/index.d.ts.map +0 -1
  149. package/dist/modules/api/baas/config/index.js +0 -2
  150. package/dist/modules/api/baas/config/index.js.map +0 -1
  151. package/dist/modules/api/baas/config/types.d.ts +0 -42
  152. package/dist/modules/api/baas/config/types.d.ts.map +0 -1
  153. package/dist/modules/api/baas/config/types.js +0 -2
  154. package/dist/modules/api/baas/config/types.js.map +0 -1
  155. package/dist/modules/api/baas/confirmation/confirmation.service.d.ts +0 -30
  156. package/dist/modules/api/baas/confirmation/confirmation.service.d.ts.map +0 -1
  157. package/dist/modules/api/baas/confirmation/confirmation.service.js +0 -39
  158. package/dist/modules/api/baas/confirmation/confirmation.service.js.map +0 -1
  159. package/dist/modules/api/baas/confirmation/index.d.ts +0 -3
  160. package/dist/modules/api/baas/confirmation/index.d.ts.map +0 -1
  161. package/dist/modules/api/baas/confirmation/index.js +0 -2
  162. package/dist/modules/api/baas/confirmation/index.js.map +0 -1
  163. package/dist/modules/api/baas/confirmation/types.d.ts +0 -30
  164. package/dist/modules/api/baas/confirmation/types.d.ts.map +0 -1
  165. package/dist/modules/api/baas/confirmation/types.js +0 -5
  166. package/dist/modules/api/baas/confirmation/types.js.map +0 -1
  167. package/dist/modules/api/baas/index.d.ts +0 -13
  168. package/dist/modules/api/baas/index.d.ts.map +0 -1
  169. package/dist/modules/api/baas/index.js +0 -13
  170. package/dist/modules/api/baas/index.js.map +0 -1
  171. package/dist/modules/api/baas/rates/index.d.ts +0 -3
  172. package/dist/modules/api/baas/rates/index.d.ts.map +0 -1
  173. package/dist/modules/api/baas/rates/index.js +0 -2
  174. package/dist/modules/api/baas/rates/index.js.map +0 -1
  175. package/dist/modules/api/baas/rates/rates.service.d.ts +0 -21
  176. package/dist/modules/api/baas/rates/rates.service.d.ts.map +0 -1
  177. package/dist/modules/api/baas/rates/rates.service.js +0 -25
  178. package/dist/modules/api/baas/rates/rates.service.js.map +0 -1
  179. package/dist/modules/api/baas/rates/types.d.ts +0 -12
  180. package/dist/modules/api/baas/rates/types.d.ts.map +0 -1
  181. package/dist/modules/api/baas/rates/types.js +0 -2
  182. package/dist/modules/api/baas/rates/types.js.map +0 -1
  183. package/dist/modules/api/baas/recipients/index.d.ts +0 -3
  184. package/dist/modules/api/baas/recipients/index.d.ts.map +0 -1
  185. package/dist/modules/api/baas/recipients/index.js +0 -2
  186. package/dist/modules/api/baas/recipients/index.js.map +0 -1
  187. package/dist/modules/api/baas/recipients/recipients.service.d.ts +0 -74
  188. package/dist/modules/api/baas/recipients/recipients.service.d.ts.map +0 -1
  189. package/dist/modules/api/baas/recipients/recipients.service.js +0 -190
  190. package/dist/modules/api/baas/recipients/recipients.service.js.map +0 -1
  191. package/dist/modules/api/baas/recipients/types.d.ts +0 -208
  192. package/dist/modules/api/baas/recipients/types.d.ts.map +0 -1
  193. package/dist/modules/api/baas/recipients/types.js +0 -5
  194. package/dist/modules/api/baas/recipients/types.js.map +0 -1
  195. package/dist/modules/api/baas/swap/index.d.ts +0 -3
  196. package/dist/modules/api/baas/swap/index.d.ts.map +0 -1
  197. package/dist/modules/api/baas/swap/index.js +0 -2
  198. package/dist/modules/api/baas/swap/index.js.map +0 -1
  199. package/dist/modules/api/baas/swap/swap.service.d.ts +0 -28
  200. package/dist/modules/api/baas/swap/swap.service.d.ts.map +0 -1
  201. package/dist/modules/api/baas/swap/swap.service.js +0 -32
  202. package/dist/modules/api/baas/swap/swap.service.js.map +0 -1
  203. package/dist/modules/api/baas/swap/types.d.ts +0 -56
  204. package/dist/modules/api/baas/swap/types.d.ts.map +0 -1
  205. package/dist/modules/api/baas/swap/types.js +0 -6
  206. package/dist/modules/api/baas/swap/types.js.map +0 -1
  207. package/dist/modules/api/baas/token/index.d.ts +0 -3
  208. package/dist/modules/api/baas/token/index.d.ts.map +0 -1
  209. package/dist/modules/api/baas/token/index.js +0 -2
  210. package/dist/modules/api/baas/token/index.js.map +0 -1
  211. package/dist/modules/api/baas/token/token.service.d.ts +0 -21
  212. package/dist/modules/api/baas/token/token.service.d.ts.map +0 -1
  213. package/dist/modules/api/baas/token/token.service.js +0 -22
  214. package/dist/modules/api/baas/token/token.service.js.map +0 -1
  215. package/dist/modules/api/baas/token/types.d.ts +0 -12
  216. package/dist/modules/api/baas/token/types.d.ts.map +0 -1
  217. package/dist/modules/api/baas/token/types.js +0 -2
  218. package/dist/modules/api/baas/token/types.js.map +0 -1
  219. package/dist/modules/api/baas/user/index.d.ts +0 -3
  220. package/dist/modules/api/baas/user/index.d.ts.map +0 -1
  221. package/dist/modules/api/baas/user/index.js +0 -2
  222. package/dist/modules/api/baas/user/index.js.map +0 -1
  223. package/dist/modules/api/baas/user/types.d.ts +0 -145
  224. package/dist/modules/api/baas/user/types.d.ts.map +0 -1
  225. package/dist/modules/api/baas/user/types.js +0 -5
  226. package/dist/modules/api/baas/user/types.js.map +0 -1
  227. package/dist/modules/api/baas/user/user.service.d.ts +0 -73
  228. package/dist/modules/api/baas/user/user.service.d.ts.map +0 -1
  229. package/dist/modules/api/baas/user/user.service.js +0 -140
  230. package/dist/modules/api/baas/user/user.service.js.map +0 -1
  231. package/dist/modules/api/baas/wallet/index.d.ts +0 -3
  232. package/dist/modules/api/baas/wallet/index.d.ts.map +0 -1
  233. package/dist/modules/api/baas/wallet/index.js +0 -2
  234. package/dist/modules/api/baas/wallet/index.js.map +0 -1
  235. package/dist/modules/api/baas/wallet/types.d.ts +0 -26
  236. package/dist/modules/api/baas/wallet/types.d.ts.map +0 -1
  237. package/dist/modules/api/baas/wallet/types.js +0 -5
  238. package/dist/modules/api/baas/wallet/types.js.map +0 -1
  239. package/dist/modules/api/baas/wallet/wallet.service.d.ts +0 -30
  240. package/dist/modules/api/baas/wallet/wallet.service.d.ts.map +0 -1
  241. package/dist/modules/api/baas/wallet/wallet.service.js +0 -43
  242. package/dist/modules/api/baas/wallet/wallet.service.js.map +0 -1
  243. package/dist/modules/api/index.d.ts.map +0 -1
  244. package/dist/modules/api/internal/endpoints/wallets.api.d.ts +0 -8
  245. package/dist/modules/api/internal/endpoints/wallets.api.d.ts.map +0 -1
  246. package/dist/modules/api/internal/endpoints/wallets.api.js +0 -9
  247. package/dist/modules/api/internal/endpoints/wallets.api.js.map +0 -1
  248. package/dist/modules/api/internal/endpoints/withdrawal.api.d.ts +0 -8
  249. package/dist/modules/api/internal/endpoints/withdrawal.api.d.ts.map +0 -1
  250. package/dist/modules/api/internal/endpoints/withdrawal.api.js +0 -10
  251. package/dist/modules/api/internal/endpoints/withdrawal.api.js.map +0 -1
  252. package/dist/modules/api/types/common.types.d.ts +0 -19
  253. package/dist/modules/api/types/common.types.d.ts.map +0 -1
  254. package/dist/modules/api/types/common.types.js +0 -2
  255. package/dist/modules/api/types/common.types.js.map +0 -1
  256. package/dist/modules/api/types/wallets.types.d.ts +0 -12
  257. package/dist/modules/api/types/wallets.types.d.ts.map +0 -1
  258. package/dist/modules/api/types/wallets.types.js +0 -2
  259. package/dist/modules/api/types/wallets.types.js.map +0 -1
  260. package/dist/modules/auth/auth.service.d.ts +0 -32
  261. package/dist/modules/auth/auth.service.d.ts.map +0 -1
  262. package/dist/modules/auth/auth.service.js +0 -182
  263. package/dist/modules/auth/auth.service.js.map +0 -1
  264. package/dist/modules/auth/index.d.ts +0 -3
  265. package/dist/modules/auth/index.d.ts.map +0 -1
  266. package/dist/modules/auth/index.js +0 -2
  267. package/dist/modules/auth/index.js.map +0 -1
  268. package/dist/modules/auth/types.d.ts +0 -82
  269. package/dist/modules/auth/types.d.ts.map +0 -1
  270. package/dist/modules/auth/types.js +0 -2
  271. package/dist/modules/auth/types.js.map +0 -1
  272. package/dist/modules/crypto/chains/base/account-abstraction.service.d.ts +0 -28
  273. package/dist/modules/crypto/chains/base/account-abstraction.service.d.ts.map +0 -1
  274. package/dist/modules/crypto/chains/base/account-abstraction.service.js +0 -173
  275. package/dist/modules/crypto/chains/base/account-abstraction.service.js.map +0 -1
  276. package/dist/modules/crypto/chains/base/account.contract.service.d.ts +0 -26
  277. package/dist/modules/crypto/chains/base/account.contract.service.d.ts.map +0 -1
  278. package/dist/modules/crypto/chains/base/account.contract.service.js +0 -109
  279. package/dist/modules/crypto/chains/base/account.contract.service.js.map +0 -1
  280. package/dist/modules/crypto/chains/base/crypto.service.d.ts +0 -34
  281. package/dist/modules/crypto/chains/base/crypto.service.d.ts.map +0 -1
  282. package/dist/modules/crypto/chains/base/crypto.service.js +0 -289
  283. package/dist/modules/crypto/chains/base/crypto.service.js.map +0 -1
  284. package/dist/modules/crypto/chains/base/index.d.ts +0 -6
  285. package/dist/modules/crypto/chains/base/index.d.ts.map +0 -1
  286. package/dist/modules/crypto/chains/base/index.js +0 -55
  287. package/dist/modules/crypto/chains/base/index.js.map +0 -1
  288. package/dist/modules/crypto/chains/base/wallet.service.d.ts +0 -55
  289. package/dist/modules/crypto/chains/base/wallet.service.d.ts.map +0 -1
  290. package/dist/modules/crypto/chains/base/wallet.service.js +0 -149
  291. package/dist/modules/crypto/chains/base/wallet.service.js.map +0 -1
  292. package/dist/modules/crypto/chains/base/yield.service.d.ts +0 -38
  293. package/dist/modules/crypto/chains/base/yield.service.d.ts.map +0 -1
  294. package/dist/modules/crypto/chains/base/yield.service.js +0 -297
  295. package/dist/modules/crypto/chains/base/yield.service.js.map +0 -1
  296. package/dist/modules/crypto/chains/index.d.ts +0 -5
  297. package/dist/modules/crypto/chains/index.d.ts.map +0 -1
  298. package/dist/modules/crypto/chains/index.js +0 -3
  299. package/dist/modules/crypto/chains/index.js.map +0 -1
  300. package/dist/modules/crypto/chains/registry.d.ts +0 -11
  301. package/dist/modules/crypto/chains/registry.d.ts.map +0 -1
  302. package/dist/modules/crypto/chains/registry.js +0 -19
  303. package/dist/modules/crypto/chains/registry.js.map +0 -1
  304. package/dist/modules/crypto/chains/types.d.ts +0 -39
  305. package/dist/modules/crypto/chains/types.d.ts.map +0 -1
  306. package/dist/modules/crypto/chains/types.js +0 -2
  307. package/dist/modules/crypto/chains/types.js.map +0 -1
  308. package/dist/modules/crypto/crypto.module.d.ts +0 -40
  309. package/dist/modules/crypto/crypto.module.d.ts.map +0 -1
  310. package/dist/modules/crypto/crypto.module.js +0 -134
  311. package/dist/modules/crypto/crypto.module.js.map +0 -1
  312. package/dist/modules/crypto/index.d.ts.map +0 -1
  313. package/dist/modules/crypto/interfaces/account-abstraction.interface.d.ts +0 -8
  314. package/dist/modules/crypto/interfaces/account-abstraction.interface.d.ts.map +0 -1
  315. package/dist/modules/crypto/interfaces/account-abstraction.interface.js +0 -2
  316. package/dist/modules/crypto/interfaces/account-abstraction.interface.js.map +0 -1
  317. package/dist/modules/crypto/interfaces/account-contract.interface.d.ts +0 -8
  318. package/dist/modules/crypto/interfaces/account-contract.interface.d.ts.map +0 -1
  319. package/dist/modules/crypto/interfaces/account-contract.interface.js +0 -2
  320. package/dist/modules/crypto/interfaces/account-contract.interface.js.map +0 -1
  321. package/dist/modules/crypto/interfaces/crypto.interface.d.ts.map +0 -1
  322. package/dist/modules/crypto/interfaces/crypto.interface.js +0 -2
  323. package/dist/modules/crypto/interfaces/crypto.interface.js.map +0 -1
  324. package/dist/modules/crypto/interfaces/index.d.ts +0 -5
  325. package/dist/modules/crypto/interfaces/index.d.ts.map +0 -1
  326. package/dist/modules/crypto/interfaces/index.js +0 -2
  327. package/dist/modules/crypto/interfaces/index.js.map +0 -1
  328. package/dist/modules/crypto/interfaces/yield.interface.d.ts +0 -19
  329. package/dist/modules/crypto/interfaces/yield.interface.d.ts.map +0 -1
  330. package/dist/modules/crypto/interfaces/yield.interface.js +0 -2
  331. package/dist/modules/crypto/interfaces/yield.interface.js.map +0 -1
  332. package/dist/modules/crypto/internal/contract-registry.service.d.ts +0 -14
  333. package/dist/modules/crypto/internal/contract-registry.service.d.ts.map +0 -1
  334. package/dist/modules/crypto/internal/contract-registry.service.js +0 -76
  335. package/dist/modules/crypto/internal/contract-registry.service.js.map +0 -1
  336. package/dist/modules/crypto/internal/smartDepositWallet.service.d.ts +0 -39
  337. package/dist/modules/crypto/internal/smartDepositWallet.service.d.ts.map +0 -1
  338. package/dist/modules/crypto/internal/smartDepositWallet.service.js +0 -183
  339. package/dist/modules/crypto/internal/smartDepositWallet.service.js.map +0 -1
  340. package/dist/modules/crypto/types.d.ts +0 -47
  341. package/dist/modules/crypto/types.d.ts.map +0 -1
  342. package/dist/modules/crypto/types.js +0 -2
  343. package/dist/modules/crypto/types.js.map +0 -1
@@ -0,0 +1,1364 @@
1
+ import { AuthenticationError, ValidationError } from './chunk-YXNNTBO5.js';
2
+
3
+ // src/modules/api/baas/activity/activity.service.ts
4
+ var ActivityService = class {
5
+ constructor(config) {
6
+ this.httpClient = config.httpClient;
7
+ this.authService = config.authService;
8
+ this.logger = config.logger;
9
+ }
10
+ /**
11
+ * Retrieves activity feed with optional pagination and filters.
12
+ */
13
+ async getFeed(request) {
14
+ this.logger?.info("Fetching activity feed...");
15
+ const params = {};
16
+ if (request?.page_number !== void 0) params.page_number = request.page_number;
17
+ if (request?.page_size !== void 0) params.page_size = request.page_size;
18
+ if (request?.sort) params.sort = request.sort;
19
+ if (request?.subject) params.subject = request.subject;
20
+ if (request?.types?.length) params.types = request.types;
21
+ const response = await this.httpClient.get("api/v1/activity/feed", {
22
+ params: Object.keys(params).length ? params : void 0
23
+ });
24
+ this.logger?.info("Activity feed fetched successfully");
25
+ return response;
26
+ }
27
+ /**
28
+ * Retrieves a single activity item by id.
29
+ */
30
+ async getById(request) {
31
+ this.logger?.info("Fetching activity by id...");
32
+ const response = await this.httpClient.get(
33
+ `api/v1/activity/single/${encodeURIComponent(request.id)}`
34
+ );
35
+ this.logger?.info("Activity fetched successfully");
36
+ return response;
37
+ }
38
+ /**
39
+ * Retrieves full statement for the given date range (Unix timestamps).
40
+ */
41
+ async getFullStatement(request) {
42
+ this.logger?.info("Fetching full statement...");
43
+ const response = await this.httpClient.post(
44
+ "api/v1/activity/statement/full",
45
+ request
46
+ );
47
+ this.logger?.info("Full statement fetched successfully");
48
+ return response;
49
+ }
50
+ /**
51
+ * Retrieves requested ERC withdrawals for the authenticated account.
52
+ */
53
+ async getRequestedErcWithdrawals() {
54
+ this.logger?.info("Fetching requested ERC withdrawals...");
55
+ const response = await this.httpClient.get("api/v1/withdrawal/requests");
56
+ this.logger?.info("Requested ERC withdrawals fetched successfully");
57
+ return response;
58
+ }
59
+ };
60
+
61
+ // src/modules/api/baas/bank/bank.service.ts
62
+ var BankService = class {
63
+ constructor(config) {
64
+ this.httpClient = config.httpClient;
65
+ this.authService = config.authService;
66
+ this.logger = config.logger;
67
+ }
68
+ /**
69
+ * Retrieves a list of bank accounts that belong to the user.
70
+ */
71
+ async getAccounts(request) {
72
+ this.logger?.info("Fetching bank accounts...");
73
+ const params = {};
74
+ if (request?.page_number !== void 0) params.page_number = request.page_number;
75
+ if (request?.page_size !== void 0) params.page_size = request.page_size;
76
+ if (request?.sort) params.sort = request.sort;
77
+ const response = await this.httpClient.get("api/v1/bank/accounts", {
78
+ params: Object.keys(params).length ? params : void 0
79
+ });
80
+ this.logger?.info("Bank accounts fetched successfully");
81
+ return response;
82
+ }
83
+ /**
84
+ * Activates bank account details for the specified account type.
85
+ */
86
+ async activateAccount(request) {
87
+ this.logger?.info("Activating bank account...");
88
+ const response = await this.httpClient.post(
89
+ "api/v1/bank/accounts",
90
+ request
91
+ );
92
+ this.logger?.info("Bank account activated successfully");
93
+ return response;
94
+ }
95
+ /**
96
+ * Estimates the amounts that would be charged for a bank transfer according to the current market rates.
97
+ */
98
+ async estimateTransfer(request) {
99
+ this.logger?.info("Estimating bank transfer...");
100
+ const response = await this.httpClient.post(
101
+ "api/v1/bank/transfer/estimate",
102
+ request
103
+ );
104
+ this.logger?.info("Bank transfer estimated successfully");
105
+ return response;
106
+ }
107
+ /**
108
+ * Executes the bank transfer either according to the estimation made previously or using current market rates.
109
+ */
110
+ async executeTransfer(request) {
111
+ this.logger?.info("Executing bank transfer...");
112
+ const response = await this.httpClient.post(
113
+ "api/v1/bank/transfer",
114
+ request
115
+ );
116
+ this.logger?.info("Bank transfer executed successfully");
117
+ return response;
118
+ }
119
+ /**
120
+ * Estimates the amounts for a bank transfer via specified corridor.
121
+ */
122
+ async estimateCorridorTransferV2(corridor, request) {
123
+ this.logger?.info("Estimating corridor transfer...");
124
+ const response = await this.httpClient.post(
125
+ `api/v2/bank/${encodeURIComponent(corridor)}/estimate`,
126
+ request
127
+ );
128
+ this.logger?.info("Corridor transfer estimated successfully");
129
+ return response;
130
+ }
131
+ /**
132
+ * Executes transfer using estimation_id. All recipient details resolved from stored estimation.
133
+ */
134
+ async executeCorridorTransferV2(corridor, request) {
135
+ this.logger?.info("Executing corridor transfer...");
136
+ const response = await this.httpClient.post(
137
+ `api/v2/bank/${encodeURIComponent(corridor)}`,
138
+ request
139
+ );
140
+ this.logger?.info("Corridor transfer executed successfully");
141
+ return response;
142
+ }
143
+ };
144
+
145
+ // src/modules/api/baas/cards/cards.service.ts
146
+ var CardsService = class {
147
+ constructor(config) {
148
+ this.httpClient = config.httpClient;
149
+ this.authService = config.authService;
150
+ this.logger = config.logger;
151
+ }
152
+ /**
153
+ * Retrieves list of cards that belong to the user.
154
+ */
155
+ async getCards(request) {
156
+ this.logger?.info("Fetching cards...");
157
+ const params = {};
158
+ if (request?.page_number !== void 0) params.page_number = request.page_number;
159
+ if (request?.page_size !== void 0) params.page_size = request.page_size;
160
+ if (request?.sort) params.sort = request.sort;
161
+ const response = await this.httpClient.get("api/v1/cards", {
162
+ params: Object.keys(params).length ? params : void 0
163
+ });
164
+ this.logger?.info("Cards fetched successfully");
165
+ return response;
166
+ }
167
+ /**
168
+ * Retrieves a page of card transactions associated with the user.
169
+ */
170
+ async getCardTransactions(request) {
171
+ this.logger?.info("Fetching card transactions...");
172
+ const params = {};
173
+ if (request?.page_number !== void 0) params.page_number = request.page_number;
174
+ if (request?.page_size !== void 0) params.page_size = request.page_size;
175
+ if (request?.sort) params.sort = request.sort;
176
+ const response = await this.httpClient.get("api/v1/transactions/card", {
177
+ params: Object.keys(params).length ? params : void 0
178
+ });
179
+ this.logger?.info("Card transactions fetched successfully");
180
+ return response;
181
+ }
182
+ /**
183
+ * Retrieves single card by its id.
184
+ */
185
+ async getCard(cardId) {
186
+ this.logger?.info("Fetching card...");
187
+ const response = await this.httpClient.get(
188
+ `api/v1/cards/${encodeURIComponent(cardId)}`
189
+ );
190
+ this.logger?.info("Card fetched successfully");
191
+ return response;
192
+ }
193
+ /**
194
+ * Retrieves active 3DS requests that need to be either approved or declined.
195
+ */
196
+ async getActive3dsRequests() {
197
+ this.logger?.info("Fetching active 3DS requests...");
198
+ const response = await this.httpClient.get(
199
+ "api/v1/cards/3ds/requests"
200
+ );
201
+ this.logger?.info("Active 3DS requests fetched successfully");
202
+ return response;
203
+ }
204
+ /**
205
+ * Approves 3DS request allowing the transaction to proceed.
206
+ */
207
+ async approve3dsRequest(transactionId) {
208
+ this.logger?.info("Approving 3DS request...");
209
+ const response = await this.httpClient.post(
210
+ `api/v1/cards/3ds/requests/${encodeURIComponent(transactionId)}/approve`
211
+ );
212
+ this.logger?.info("3DS request approved successfully");
213
+ return response;
214
+ }
215
+ /**
216
+ * Declines 3DS request blocking the transaction from proceeding.
217
+ */
218
+ async decline3dsRequest(transactionId) {
219
+ this.logger?.info("Declining 3DS request...");
220
+ const response = await this.httpClient.post(
221
+ `api/v1/cards/3ds/requests/${encodeURIComponent(transactionId)}/decline`
222
+ );
223
+ this.logger?.info("3DS request declined successfully");
224
+ return response;
225
+ }
226
+ /**
227
+ * Retrieves list of countries where the card can be delivered for the current corporation.
228
+ */
229
+ async getDeliveryCountries() {
230
+ this.logger?.info("Fetching delivery countries...");
231
+ const response = await this.httpClient.get("api/v1/cards/delivery/countries");
232
+ this.logger?.info("Delivery countries fetched successfully");
233
+ return response;
234
+ }
235
+ /**
236
+ * Retrieves list of courier providers that can deliver the card to the specified country.
237
+ */
238
+ async getDeliveryMethods(country) {
239
+ this.logger?.info("Fetching delivery methods...");
240
+ const response = await this.httpClient.get(
241
+ `api/v1/cards/delivery/methods/${encodeURIComponent(country)}`
242
+ );
243
+ this.logger?.info("Delivery methods fetched successfully");
244
+ return response;
245
+ }
246
+ /**
247
+ * Issues a plastic card for the specified user and sends it to the provided address.
248
+ */
249
+ async issuePlasticCard(request) {
250
+ this.logger?.info("Issuing plastic card...");
251
+ const response = await this.httpClient.post("api/v1/cards/plastic", request);
252
+ this.logger?.info("Plastic card issued successfully");
253
+ return response;
254
+ }
255
+ /**
256
+ * Issues a virtual card for the specified user.
257
+ */
258
+ async issueVirtualCard(request) {
259
+ this.logger?.info("Issuing virtual card...");
260
+ const response = await this.httpClient.post("api/v1/cards/virtual", request);
261
+ this.logger?.info("Virtual card issued successfully");
262
+ return response;
263
+ }
264
+ /**
265
+ * Activates a card that has been issued to a user and is currently in NotActivated state.
266
+ */
267
+ async activateCard(cardId, request) {
268
+ this.logger?.info("Activating card...");
269
+ const response = await this.httpClient.put(
270
+ `api/v1/cards/${encodeURIComponent(cardId)}/activate`,
271
+ request
272
+ );
273
+ this.logger?.info("Card activated successfully");
274
+ return response;
275
+ }
276
+ /**
277
+ * Blocks selected card making it impossible to use it for any transactions.
278
+ */
279
+ async blockCard(cardId) {
280
+ this.logger?.info("Blocking card...");
281
+ const response = await this.httpClient.put(
282
+ `api/v1/cards/${encodeURIComponent(cardId)}/block`
283
+ );
284
+ this.logger?.info("Card blocked successfully");
285
+ return response;
286
+ }
287
+ /**
288
+ * Unblocks selected card allowing it to be used for transactions once again.
289
+ */
290
+ async unblockCard(cardId) {
291
+ this.logger?.info("Unblocking card...");
292
+ const response = await this.httpClient.put(
293
+ `api/v1/cards/${encodeURIComponent(cardId)}/unblock`
294
+ );
295
+ this.logger?.info("Card unblocked successfully");
296
+ return response;
297
+ }
298
+ /**
299
+ * Closes the card. This action cannot be undone and the card will be permanently closed.
300
+ */
301
+ async closeCard(cardId) {
302
+ this.logger?.info("Closing card...");
303
+ const response = await this.httpClient.put(
304
+ `api/v1/cards/${encodeURIComponent(cardId)}/close`
305
+ );
306
+ this.logger?.info("Card closed successfully");
307
+ return response;
308
+ }
309
+ /**
310
+ * Retrieves card PAN and expiry date using the action confirmation token.
311
+ */
312
+ async getCardDetails(cardId, request) {
313
+ this.logger?.info("Fetching card details...");
314
+ const response = await this.httpClient.post(
315
+ `api/v1/cards/${encodeURIComponent(cardId)}/details`,
316
+ request
317
+ );
318
+ this.logger?.info("Card details fetched successfully");
319
+ return response;
320
+ }
321
+ /**
322
+ * Retrieves CVV code for the card using the action confirmation token.
323
+ */
324
+ async getCardCvv(cardId, request) {
325
+ this.logger?.info("Fetching card CVV...");
326
+ const response = await this.httpClient.post(
327
+ `api/v1/cards/${encodeURIComponent(cardId)}/cvv`,
328
+ request
329
+ );
330
+ this.logger?.info("Card CVV fetched successfully");
331
+ return response;
332
+ }
333
+ /**
334
+ * Retrieves card Pin code using the action confirmation token.
335
+ */
336
+ async getCardPin(cardId, request) {
337
+ this.logger?.info("Fetching card PIN...");
338
+ const response = await this.httpClient.post(
339
+ `api/v1/cards/${encodeURIComponent(cardId)}/pin`,
340
+ request
341
+ );
342
+ this.logger?.info("Card PIN fetched successfully");
343
+ return response;
344
+ }
345
+ /**
346
+ * Updates maximum amount that can be spent using the card within a day.
347
+ */
348
+ async changeCardLimit(cardId, request) {
349
+ this.logger?.info("Changing card limit...");
350
+ const response = await this.httpClient.put(
351
+ `api/v1/cards/${encodeURIComponent(cardId)}/limit`,
352
+ request
353
+ );
354
+ this.logger?.info("Card limit changed successfully");
355
+ return response;
356
+ }
357
+ /**
358
+ * Updates the display name of the card.
359
+ */
360
+ async changeCardName(cardId, request) {
361
+ this.logger?.info("Changing card name...");
362
+ const response = await this.httpClient.put(
363
+ `api/v1/cards/${encodeURIComponent(cardId)}/name`,
364
+ request
365
+ );
366
+ this.logger?.info("Card name changed successfully");
367
+ return response;
368
+ }
369
+ /**
370
+ * Creates a new card transfer estimation.
371
+ */
372
+ async estimateCardTransfer(request) {
373
+ this.logger?.info("Estimating card transfer...");
374
+ const response = await this.httpClient.post(
375
+ "api/v1/cards/transfer/estimate",
376
+ request
377
+ );
378
+ this.logger?.info("Card transfer estimated successfully");
379
+ return response;
380
+ }
381
+ /**
382
+ * Executes the estimated card transfer request.
383
+ */
384
+ async executeCardTransfer(request) {
385
+ this.logger?.info("Executing card transfer...");
386
+ const response = await this.httpClient.post(
387
+ "api/v1/cards/transfer",
388
+ request
389
+ );
390
+ this.logger?.info("Card transfer executed successfully");
391
+ return response;
392
+ }
393
+ /**
394
+ * Creates a new withdrawal estimation for the card.
395
+ */
396
+ async estimateCardWithdrawal(cardId, request) {
397
+ this.logger?.info("Estimating card withdrawal...");
398
+ const response = await this.httpClient.post(
399
+ `api/v1/cards/${encodeURIComponent(cardId)}/withdraw/estimate`,
400
+ request
401
+ );
402
+ this.logger?.info("Card withdrawal estimated successfully");
403
+ return response;
404
+ }
405
+ /**
406
+ * Executes the estimated withdrawal request for the card.
407
+ */
408
+ async executeCardWithdrawal(cardId, request) {
409
+ this.logger?.info("Executing card withdrawal...");
410
+ const response = await this.httpClient.post(
411
+ `api/v1/cards/${encodeURIComponent(cardId)}/withdraw/execute`,
412
+ request
413
+ );
414
+ this.logger?.info("Card withdrawal executed successfully");
415
+ return response;
416
+ }
417
+ /**
418
+ * Retrieves estimation of fees that should be paid for the card order.
419
+ */
420
+ async getOrderFees(type, country) {
421
+ this.logger?.info("Fetching card order fees...");
422
+ const response = await this.httpClient.get(
423
+ `api/v1/cards/${encodeURIComponent(type)}/fees/${encodeURIComponent(country)}`
424
+ );
425
+ this.logger?.info("Card order fees fetched successfully");
426
+ return response;
427
+ }
428
+ /**
429
+ * Creates an invoice for payment of the card order fees.
430
+ */
431
+ async createOrderFeesInvoice(type, country, request) {
432
+ this.logger?.info("Creating card order fees invoice...");
433
+ const response = await this.httpClient.post(
434
+ `api/v1/cards/${encodeURIComponent(type)}/fees/${encodeURIComponent(country)}/payment`,
435
+ request
436
+ );
437
+ this.logger?.info("Card order fees invoice created successfully");
438
+ return response;
439
+ }
440
+ };
441
+
442
+ // src/modules/api/baas/config/config.service.ts
443
+ var ConfigService = class {
444
+ constructor(config) {
445
+ this.httpClient = config.httpClient;
446
+ this.authService = config.authService;
447
+ this.logger = config.logger;
448
+ }
449
+ /**
450
+ * Retrieves application configuration values for a partner application.
451
+ */
452
+ async getConfig() {
453
+ this.logger?.info("Fetching application configuration...");
454
+ const response = await this.httpClient.get("api/v1/config", {
455
+ requireAuth: false
456
+ });
457
+ this.logger?.info("Application configuration fetched successfully");
458
+ return response;
459
+ }
460
+ };
461
+
462
+ // src/modules/api/baas/confirmation/confirmation.service.ts
463
+ var ConfirmationService = class {
464
+ constructor(config) {
465
+ this.httpClient = config.httpClient;
466
+ this.authService = config.authService;
467
+ this.logger = config.logger;
468
+ }
469
+ /**
470
+ * Exchanges wallet signature for an action token.
471
+ */
472
+ async verifySignature(request) {
473
+ this.logger?.info("Verifying wallet signature...");
474
+ const response = await this.httpClient.post(
475
+ "api/v1/confirmation/signature/verify",
476
+ request
477
+ );
478
+ this.logger?.info("Wallet signature verified successfully");
479
+ return response;
480
+ }
481
+ /**
482
+ * Sends SMS with OTP code to the user.
483
+ */
484
+ async requestSms(request) {
485
+ this.logger?.info("Requesting SMS confirmation...");
486
+ const response = await this.httpClient.post(
487
+ "api/v1/confirmation/sms",
488
+ request
489
+ );
490
+ this.logger?.info("SMS confirmation requested successfully");
491
+ return response;
492
+ }
493
+ /**
494
+ * Exchanges SMS OTP code for an action token.
495
+ */
496
+ async verifySms(request) {
497
+ this.logger?.info("Verifying SMS code...");
498
+ const response = await this.httpClient.post("api/v1/confirmation/sms/verify", request);
499
+ this.logger?.info("SMS code verified successfully");
500
+ return response;
501
+ }
502
+ };
503
+
504
+ // src/modules/api/baas/recipients/recipients.service.ts
505
+ var RecipientsService = class {
506
+ constructor(config) {
507
+ this.httpClient = config.httpClient;
508
+ this.authService = config.authService;
509
+ this.logger = config.logger;
510
+ }
511
+ /**
512
+ * Retrieves all recipients with optional pagination and sorting.
513
+ */
514
+ async getRecipients(request) {
515
+ this.logger?.info("Fetching recipients...");
516
+ const params = {};
517
+ if (request?.page_number !== void 0) params.page_number = request.page_number;
518
+ if (request?.page_size !== void 0) params.page_size = request.page_size;
519
+ if (request?.sort) params.sort = request.sort;
520
+ const response = await this.httpClient.get("api/v1/recipients", {
521
+ params: Object.keys(params).length ? params : void 0
522
+ });
523
+ this.logger?.info("Recipients fetched successfully");
524
+ return response;
525
+ }
526
+ /**
527
+ * Retrieves recipients filtered by catalog index (first letter of full name).
528
+ */
529
+ async getRecipientsByCatalog(request) {
530
+ this.logger?.info("Fetching recipients by catalog...");
531
+ const params = {
532
+ catalog_index: request.catalog_index
533
+ };
534
+ if (request.page_number !== void 0) params.page_number = request.page_number;
535
+ if (request.page_size !== void 0) params.page_size = request.page_size;
536
+ if (request.sort) params.sort = request.sort;
537
+ const response = await this.httpClient.get("api/v1/recipients/filter/catalog", {
538
+ params
539
+ });
540
+ this.logger?.info("Recipients by catalog fetched successfully");
541
+ return response;
542
+ }
543
+ /**
544
+ * Retrieves recipients filtered by currency.
545
+ */
546
+ async getRecipientsByCurrency(request) {
547
+ this.logger?.info("Fetching recipients by currency...");
548
+ const params = {
549
+ currency: request.currency
550
+ };
551
+ if (request.page_number !== void 0) params.page_number = request.page_number;
552
+ if (request.page_size !== void 0) params.page_size = request.page_size;
553
+ if (request.sort) params.sort = request.sort;
554
+ const response = await this.httpClient.get("api/v1/recipients/filter/currency", {
555
+ params
556
+ });
557
+ this.logger?.info("Recipients by currency fetched successfully");
558
+ return response;
559
+ }
560
+ /**
561
+ * Retrieves recipients filtered by name substring.
562
+ */
563
+ async getRecipientsByName(request) {
564
+ this.logger?.info("Fetching recipients by name...");
565
+ const params = {
566
+ name: request.name
567
+ };
568
+ if (request.page_number !== void 0) params.page_number = request.page_number;
569
+ if (request.page_size !== void 0) params.page_size = request.page_size;
570
+ if (request.sort) params.sort = request.sort;
571
+ const response = await this.httpClient.get("api/v1/recipients/filter/name", {
572
+ params
573
+ });
574
+ this.logger?.info("Recipients by name fetched successfully");
575
+ return response;
576
+ }
577
+ /**
578
+ * Retrieves recipients filtered by payment details type.
579
+ */
580
+ async getRecipientsByType(request) {
581
+ this.logger?.info("Fetching recipients by type...");
582
+ const params = {
583
+ type: request.type
584
+ };
585
+ if (request.page_number !== void 0) params.page_number = request.page_number;
586
+ if (request.page_size !== void 0) params.page_size = request.page_size;
587
+ if (request.sort) params.sort = request.sort;
588
+ const response = await this.httpClient.get("api/v1/recipients/filter/type", {
589
+ params
590
+ });
591
+ this.logger?.info("Recipients by type fetched successfully");
592
+ return response;
593
+ }
594
+ /**
595
+ * Creates a new recipient with provided personal information.
596
+ */
597
+ async createRecipient(request) {
598
+ this.logger?.info("Creating recipient...");
599
+ const response = await this.httpClient.post("api/v1/recipients", request);
600
+ this.logger?.info("Recipient created successfully");
601
+ return response;
602
+ }
603
+ /**
604
+ * Creates a recipient with personal info and payment details in a single call.
605
+ */
606
+ async createRecipientV2(request) {
607
+ this.logger?.info("Creating recipient (v2)...");
608
+ const response = await this.httpClient.post("api/v2/recipients", request);
609
+ this.logger?.info("Recipient (v2) created successfully");
610
+ return response;
611
+ }
612
+ /**
613
+ * Retrieves a single recipient by its ID.
614
+ */
615
+ async getRecipientById(recipientId) {
616
+ this.logger?.info("Fetching recipient by id...");
617
+ const response = await this.httpClient.get(
618
+ `api/v1/recipients/${encodeURIComponent(recipientId)}`
619
+ );
620
+ this.logger?.info("Recipient fetched successfully");
621
+ return response;
622
+ }
623
+ /**
624
+ * Updates recipient with provided personal information.
625
+ */
626
+ async updateRecipient(recipientId, request) {
627
+ this.logger?.info("Updating recipient...");
628
+ const response = await this.httpClient.put(
629
+ `api/v1/recipients/${encodeURIComponent(recipientId)}`,
630
+ request
631
+ );
632
+ this.logger?.info("Recipient updated successfully");
633
+ return response;
634
+ }
635
+ /**
636
+ * Deletes selected recipient.
637
+ */
638
+ async deleteRecipient(recipientId) {
639
+ this.logger?.info("Deleting recipient...");
640
+ const response = await this.httpClient.delete(
641
+ `api/v1/recipients/${encodeURIComponent(recipientId)}`
642
+ );
643
+ this.logger?.info("Recipient deleted successfully");
644
+ return response;
645
+ }
646
+ /**
647
+ * Creates new payment details for existing recipient.
648
+ */
649
+ async createRecipientPaymentDetails(recipientId, request) {
650
+ this.logger?.info("Creating recipient payment details...");
651
+ const response = await this.httpClient.post(
652
+ `api/v1/recipients/${encodeURIComponent(recipientId)}/payment_details`,
653
+ request
654
+ );
655
+ this.logger?.info("Recipient payment details created successfully");
656
+ return response;
657
+ }
658
+ /**
659
+ * Updates existing payment details for existing recipient.
660
+ */
661
+ async updateRecipientPaymentDetails(recipientId, paymentDetailsId, request) {
662
+ this.logger?.info("Updating recipient payment details...");
663
+ const response = await this.httpClient.put(
664
+ `api/v1/recipients/${encodeURIComponent(recipientId)}/payment_details/${encodeURIComponent(
665
+ paymentDetailsId
666
+ )}`,
667
+ request
668
+ );
669
+ this.logger?.info("Recipient payment details updated successfully");
670
+ return response;
671
+ }
672
+ /**
673
+ * Deletes payment details from existing recipient.
674
+ */
675
+ async deleteRecipientPaymentDetails(recipientId, paymentDetailsId) {
676
+ this.logger?.info("Deleting recipient payment details...");
677
+ const response = await this.httpClient.delete(
678
+ `api/v1/recipients/${encodeURIComponent(recipientId)}/payment_details/${encodeURIComponent(
679
+ paymentDetailsId
680
+ )}`
681
+ );
682
+ this.logger?.info("Recipient payment details deleted successfully");
683
+ return response;
684
+ }
685
+ /**
686
+ * Increments usage index on specified recipient.
687
+ */
688
+ async incrementRecipientUsage(recipientId) {
689
+ this.logger?.info("Incrementing recipient usage...");
690
+ const response = await this.httpClient.post(
691
+ `api/v1/recipients/${encodeURIComponent(recipientId)}/usage`
692
+ );
693
+ this.logger?.info("Recipient usage incremented successfully");
694
+ return response;
695
+ }
696
+ };
697
+
698
+ // src/modules/api/baas/rates/rates.service.ts
699
+ var RatesService = class {
700
+ constructor(config) {
701
+ this.httpClient = config.httpClient;
702
+ this.authService = config.authService;
703
+ this.logger = config.logger;
704
+ }
705
+ /**
706
+ * Retrieves real-time exchange rates for a list of provided tickers.
707
+ */
708
+ async getRates(request) {
709
+ this.logger?.info("Fetching exchange rates...");
710
+ const query = new URLSearchParams();
711
+ if (request?.tickers?.length) {
712
+ request.tickers.forEach((ticker) => query.append("tickers", ticker));
713
+ }
714
+ const url = query.toString() ? `api/v1/rates?${query.toString()}` : "api/v1/rates";
715
+ const response = await this.httpClient.get(url);
716
+ this.logger?.info("Exchange rates fetched successfully");
717
+ return response;
718
+ }
719
+ };
720
+
721
+ // src/modules/api/baas/swap/swap.service.ts
722
+ var SwapService = class {
723
+ constructor(config) {
724
+ this.httpClient = config.httpClient;
725
+ this.authService = config.authService;
726
+ this.logger = config.logger;
727
+ }
728
+ /**
729
+ * Creates a swap estimation with a deposit address for a Circle FX stablecoin swap.
730
+ * Send exactly one of source_asset_amount / destination_asset_amount.
731
+ */
732
+ async estimate(request) {
733
+ this.logger?.info("Estimating FX swap...");
734
+ const response = await this.httpClient.post("api/v1/fx/estimate", request);
735
+ this.logger?.info("FX swap estimated successfully");
736
+ return response;
737
+ }
738
+ /**
739
+ * Executes the swap after the source tokens have been sent to the deposit address.
740
+ */
741
+ async execute(request) {
742
+ this.logger?.info("Executing FX swap...");
743
+ const response = await this.httpClient.post("api/v1/fx", request);
744
+ this.logger?.info("FX swap executed successfully");
745
+ return response;
746
+ }
747
+ };
748
+
749
+ // src/modules/api/baas/token/token.service.ts
750
+ var TokenService = class {
751
+ constructor(config) {
752
+ this.httpClient = config.httpClient;
753
+ this.authService = config.authService;
754
+ this.logger = config.logger;
755
+ }
756
+ /**
757
+ * Exchanges client credentials for a Wirex Partner access token.
758
+ */
759
+ async getToken(request) {
760
+ this.logger?.info("Requesting OAuth2 token...");
761
+ const response = await this.httpClient.post("api/v1/token", request, {
762
+ requireAuth: false
763
+ });
764
+ this.logger?.info("OAuth2 token obtained successfully");
765
+ return response;
766
+ }
767
+ };
768
+
769
+ // src/modules/auth/auth.service.ts
770
+ var _AuthService = class _AuthService {
771
+ constructor(config) {
772
+ this.state = {
773
+ accessToken: null,
774
+ expiresAt: null,
775
+ userWallet: null
776
+ };
777
+ this.httpClient = config.httpClient;
778
+ this.chainId = config.chainId;
779
+ this.logger = config.logger;
780
+ }
781
+ static initialize(config) {
782
+ if (!_AuthService.instance) {
783
+ _AuthService.instance = new _AuthService(config);
784
+ }
785
+ return _AuthService.instance;
786
+ }
787
+ static getInstance() {
788
+ if (!_AuthService.instance) {
789
+ throw new AuthenticationError("AuthService not initialized. Call initialize() first.");
790
+ }
791
+ return _AuthService.instance;
792
+ }
793
+ static resetInstance() {
794
+ _AuthService.instance = null;
795
+ }
796
+ static buildAuthHeaders(params) {
797
+ if (params.privy) {
798
+ return {
799
+ Authorization: `Bearer ${params.privy.accessToken}`,
800
+ Identity: `Bearer ${params.privy.identityToken}`
801
+ };
802
+ }
803
+ if (params.authorizationToken) {
804
+ return {
805
+ Authorization: `Bearer ${params.authorizationToken}`
806
+ };
807
+ }
808
+ throw new ValidationError("Either privy or authorizationToken must be provided");
809
+ }
810
+ async login(params) {
811
+ this.logger?.info("Logging in user...");
812
+ const authHeaders = _AuthService.buildAuthHeaders(params);
813
+ if (params.userWallet) {
814
+ authHeaders["X-User-Wallet"] = params.userWallet;
815
+ this.state.userWallet = params.userWallet;
816
+ }
817
+ authHeaders["X-Chain-Id"] = String(this.chainId);
818
+ try {
819
+ const response = await this.httpClient.post(
820
+ "api/v1/user/authorize",
821
+ {},
822
+ {
823
+ headers: authHeaders,
824
+ requireAuth: false
825
+ }
826
+ );
827
+ this.setAuthState(response);
828
+ this.logger?.info("User logged in successfully");
829
+ return response;
830
+ } catch (error) {
831
+ this.logger?.error("Login failed:", error?.message);
832
+ throw error;
833
+ }
834
+ }
835
+ async loginCompany(params) {
836
+ this.logger?.info("Logging in company...", { companyAddress: params.companyAddress });
837
+ const authHeaders = _AuthService.buildAuthHeaders(params);
838
+ const body = params.companyAddress ? { corporation_address: params.companyAddress } : void 0;
839
+ const response = await this.httpClient.post(
840
+ "api/v1/corporations/login",
841
+ body,
842
+ {
843
+ headers: authHeaders,
844
+ requireAuth: false
845
+ }
846
+ );
847
+ this.setAuthState(response);
848
+ this.logger?.info("Company logged in successfully");
849
+ return response;
850
+ }
851
+ async registerUser(params) {
852
+ this.logger?.info("Registering user...");
853
+ const authHeaders = _AuthService.buildAuthHeaders(params);
854
+ authHeaders["X-Chain-Id"] = String(this.chainId);
855
+ if (params.privy) {
856
+ if (params.userWallet) {
857
+ authHeaders["X-User-Wallet"] = params.userWallet;
858
+ }
859
+ const response = await this.httpClient.post(
860
+ "api/v1/user/retail",
861
+ { country: params.country },
862
+ {
863
+ headers: authHeaders,
864
+ requireAuth: false
865
+ }
866
+ );
867
+ this.logger?.info("User registered successfully", { userId: response.id });
868
+ return response;
869
+ }
870
+ try {
871
+ const body = { wallet_address: params.userWallet };
872
+ if (params.initialData) {
873
+ body.initial_data = params.initialData;
874
+ }
875
+ const response = await this.httpClient.post(
876
+ "api/v2/user",
877
+ body,
878
+ {
879
+ headers: authHeaders,
880
+ requireAuth: false
881
+ }
882
+ );
883
+ this.logger?.info("User registered successfully", { userId: response.id });
884
+ return response;
885
+ } catch (error) {
886
+ this.logger?.error("User registration failed:", error?.message);
887
+ throw error;
888
+ }
889
+ }
890
+ async registerCompany(params) {
891
+ this.logger?.info("Registering company...", { companyName: params.companyName });
892
+ const authHeaders = _AuthService.buildAuthHeaders(params);
893
+ await this.httpClient.post(
894
+ "api/v1/corporations/register",
895
+ {
896
+ corporation_address: params.companyAddress,
897
+ corporation_name: params.companyName,
898
+ corporation_registration_country: params.registrationCountry,
899
+ corporation_registration_number: params.registrationNumber
900
+ },
901
+ {
902
+ headers: authHeaders,
903
+ requireAuth: false
904
+ }
905
+ );
906
+ this.logger?.info("Company registered successfully");
907
+ }
908
+ setAuthState(response, userWallet) {
909
+ this.state.accessToken = response.access_token;
910
+ this.state.expiresAt = response.expires_at;
911
+ if (userWallet) {
912
+ this.state.userWallet = userWallet;
913
+ }
914
+ }
915
+ setUserWallet(wallet) {
916
+ this.state.userWallet = wallet;
917
+ }
918
+ getAccessToken() {
919
+ if (!this.state.accessToken) {
920
+ return null;
921
+ }
922
+ if (this.isTokenExpired()) {
923
+ this.logger?.warn("Access token has expired");
924
+ this.clearAuth();
925
+ return null;
926
+ }
927
+ return this.state.accessToken;
928
+ }
929
+ isAuthenticated() {
930
+ return this.getAccessToken() !== null;
931
+ }
932
+ getUserWallet() {
933
+ return this.state.userWallet;
934
+ }
935
+ isTokenExpired() {
936
+ if (!this.state.expiresAt) {
937
+ return true;
938
+ }
939
+ const now = Math.floor(Date.now() / 1e3);
940
+ return this.state.expiresAt < now;
941
+ }
942
+ clearAuth() {
943
+ this.state = {
944
+ accessToken: null,
945
+ expiresAt: null,
946
+ userWallet: null
947
+ };
948
+ this.logger?.info("Auth state cleared");
949
+ }
950
+ ensureAuthenticated() {
951
+ if (!this.isAuthenticated()) {
952
+ throw new AuthenticationError("User is not authenticated. Please login first.");
953
+ }
954
+ }
955
+ getAuthHeaders() {
956
+ const headers = {};
957
+ const token = this.getAccessToken();
958
+ if (token) {
959
+ headers["Authorization"] = `Bearer ${token}`;
960
+ }
961
+ if (this.state.userWallet) {
962
+ headers["X-User-Wallet"] = this.state.userWallet;
963
+ }
964
+ return headers;
965
+ }
966
+ };
967
+ _AuthService.instance = null;
968
+ var AuthService = _AuthService;
969
+
970
+ // src/modules/api/baas/user/user.service.ts
971
+ var UserService = class {
972
+ constructor(config) {
973
+ this.httpClient = config.httpClient;
974
+ this.authService = config.authService;
975
+ this.logger = config.logger;
976
+ }
977
+ /**
978
+ * Initiates a phone number update for the authenticated user.
979
+ */
980
+ async updatePhoneNumber(request) {
981
+ this.logger?.info("Updating phone number...");
982
+ await this.httpClient.put("api/v1/user/phone-number", request);
983
+ this.logger?.info("Phone number updated successfully");
984
+ }
985
+ /**
986
+ * Confirms and completes the phone number update with SMS verification code.
987
+ */
988
+ async confirmPhoneNumber(request) {
989
+ this.logger?.info("Confirming phone number...");
990
+ await this.httpClient.put("api/v1/user/phone-number/confirm", request);
991
+ this.logger?.info("Phone number confirmed successfully");
992
+ }
993
+ /**
994
+ * Uploads a KYC verification document using multipart/form-data.
995
+ */
996
+ async uploadDocument(formData) {
997
+ this.logger?.info("Uploading document...");
998
+ await this.httpClient.post("api/v1/user/documents", formData, {
999
+ headers: { "Content-Type": void 0 }
1000
+ });
1001
+ this.logger?.info("Document uploaded successfully");
1002
+ }
1003
+ /**
1004
+ * Fetches the complete profile for the authenticated user (V1).
1005
+ */
1006
+ async getUser() {
1007
+ this.logger?.info("Fetching user details...");
1008
+ const response = await this.httpClient.get("api/v1/user");
1009
+ this.logger?.info("User details fetched successfully");
1010
+ return response;
1011
+ }
1012
+ /**
1013
+ * Associates a Freshdesk customer ID with the user's account.
1014
+ */
1015
+ async updateFreshdeskId(request) {
1016
+ this.logger?.info("Updating Freshdesk ID...");
1017
+ await this.httpClient.put("api/v1/user/freshdesk-id", request);
1018
+ this.logger?.info("Freshdesk ID updated successfully");
1019
+ }
1020
+ /**
1021
+ * Generates a temporary token for secure user data sharing with SumSub.
1022
+ */
1023
+ async getSharingToken(request) {
1024
+ this.logger?.info("Generating sharing token...");
1025
+ const response = await this.httpClient.get(
1026
+ `api/v1/user/sharing-token?sumsub_client_id=${encodeURIComponent(request.sumsub_client_id)}`
1027
+ );
1028
+ this.logger?.info("Sharing token generated successfully");
1029
+ return response;
1030
+ }
1031
+ /**
1032
+ * Generates an access token for SumSub KYC identity verification.
1033
+ */
1034
+ async getVerificationToken() {
1035
+ this.logger?.info("Getting verification token...");
1036
+ const response = await this.httpClient.post(
1037
+ "api/v1/user/verification-token",
1038
+ {}
1039
+ );
1040
+ this.logger?.info("Verification token retrieved successfully");
1041
+ return response;
1042
+ }
1043
+ async createUser(request) {
1044
+ this.logger?.info("Creating user...");
1045
+ const response = await this.httpClient.post("api/v1/user", request);
1046
+ this.logger?.info("User created successfully");
1047
+ return response;
1048
+ }
1049
+ /**
1050
+ * Sets a KYC sharing token to ingest user data from SumSub.
1051
+ */
1052
+ async setSharingToken(request) {
1053
+ this.logger?.info("Setting sharing token...");
1054
+ const response = await this.httpClient.post(
1055
+ "api/v1/user/sharing-token",
1056
+ request
1057
+ );
1058
+ this.logger?.info("Sharing token set successfully");
1059
+ return response;
1060
+ }
1061
+ /**
1062
+ * Creates a new retail user in the Wirex system using client-side Privy SDK authorization.
1063
+ */
1064
+ async createRetailUser(request) {
1065
+ this.logger?.info("Creating retail user...");
1066
+ const response = await this.httpClient.post(
1067
+ "api/v1/user/retail",
1068
+ request
1069
+ );
1070
+ this.logger?.info("Retail user created successfully");
1071
+ return response;
1072
+ }
1073
+ /**
1074
+ * Validates a retail user in the Wirex system using client-side Privy SDK authorization.
1075
+ */
1076
+ async validateRetailUser() {
1077
+ this.logger?.info("Validating retail user...");
1078
+ const response = await this.httpClient.post(
1079
+ "api/v1/user/retail/validate",
1080
+ {}
1081
+ );
1082
+ this.logger?.info("Retail user validated successfully");
1083
+ return response;
1084
+ }
1085
+ /**
1086
+ * Generates a verification link for the user to complete KYC via SumSub.
1087
+ */
1088
+ async getVerificationLink() {
1089
+ this.logger?.info("Getting verification link...");
1090
+ const response = await this.httpClient.post(
1091
+ "api/v1/user/verification-link",
1092
+ {}
1093
+ );
1094
+ this.logger?.info("Verification link retrieved successfully");
1095
+ return response;
1096
+ }
1097
+ /**
1098
+ * Retrieves an access token for a specific user to interact with all other APIs on their behalf.
1099
+ */
1100
+ async authorizeUser(params) {
1101
+ this.logger?.info("Authorizing user...");
1102
+ const headers = AuthService.buildAuthHeaders(params);
1103
+ const response = await this.httpClient.post(
1104
+ "api/v1/user/authorize",
1105
+ {},
1106
+ {
1107
+ headers,
1108
+ requireAuth: false
1109
+ }
1110
+ );
1111
+ this.authService.setAuthState(response);
1112
+ this.logger?.info("User authorized successfully");
1113
+ return response;
1114
+ }
1115
+ /**
1116
+ * Retrieves extended user account information (V2).
1117
+ */
1118
+ async getUserV2() {
1119
+ this.logger?.info("Fetching user details (v2)...");
1120
+ const response = await this.httpClient.get("api/v2/user");
1121
+ this.logger?.info("User details (v2) fetched successfully");
1122
+ return response;
1123
+ }
1124
+ };
1125
+
1126
+ // src/modules/api/baas/wallet/wallet.service.ts
1127
+ var WalletService = class {
1128
+ constructor(config) {
1129
+ this.httpClient = config.httpClient;
1130
+ this.authService = config.authService;
1131
+ this.logger = config.logger;
1132
+ }
1133
+ /**
1134
+ * Retrieves a wallet and its balances. Optionally filtered by wallet address.
1135
+ */
1136
+ async getWallet(request) {
1137
+ this.logger?.info("Fetching wallet...");
1138
+ const params = {};
1139
+ if (request?.wallet_address !== void 0) params.wallet_address = request.wallet_address;
1140
+ const response = await this.httpClient.get("api/v1/wallet", {
1141
+ params: Object.keys(params).length ? params : void 0
1142
+ });
1143
+ this.logger?.info("Wallet fetched successfully");
1144
+ return response;
1145
+ }
1146
+ /**
1147
+ * Retrieves user wallets and their balances.
1148
+ */
1149
+ async getWallets() {
1150
+ this.logger?.info("Fetching wallets...");
1151
+ const response = await this.httpClient.get("api/v1/wallets");
1152
+ this.logger?.info("Wallets fetched successfully");
1153
+ return response;
1154
+ }
1155
+ /**
1156
+ * Creates a global wallet for the user account.
1157
+ */
1158
+ async createGlobalWallet(request) {
1159
+ this.logger?.info("Creating global wallet...");
1160
+ const response = await this.httpClient.post("api/v1/wallets/global", request);
1161
+ this.logger?.info("Global wallet created successfully");
1162
+ return response;
1163
+ }
1164
+ };
1165
+
1166
+ // src/modules/api/baas/baas.module.ts
1167
+ var BaasModule = class {
1168
+ constructor(context) {
1169
+ this.name = "baas";
1170
+ this._initialized = false;
1171
+ this.context = context;
1172
+ this.logger = context.logger;
1173
+ }
1174
+ async initialize() {
1175
+ if (this._initialized) {
1176
+ this.logger.warn("BaasModule already initialized");
1177
+ return;
1178
+ }
1179
+ this.logger.info("Initializing BaasModule...");
1180
+ const httpClient = this.context.httpClient;
1181
+ const authService = AuthService.getInstance();
1182
+ this._userService = new UserService({
1183
+ httpClient,
1184
+ authService,
1185
+ logger: this.logger
1186
+ });
1187
+ this._activityService = new ActivityService({
1188
+ httpClient,
1189
+ authService,
1190
+ logger: this.logger
1191
+ });
1192
+ this._bankService = new BankService({
1193
+ httpClient,
1194
+ authService,
1195
+ logger: this.logger
1196
+ });
1197
+ this._cardsService = new CardsService({
1198
+ httpClient,
1199
+ authService,
1200
+ logger: this.logger
1201
+ });
1202
+ this._configService = new ConfigService({
1203
+ httpClient,
1204
+ authService,
1205
+ logger: this.logger
1206
+ });
1207
+ this._confirmationService = new ConfirmationService({
1208
+ httpClient,
1209
+ authService,
1210
+ logger: this.logger
1211
+ });
1212
+ this._recipientsService = new RecipientsService({
1213
+ httpClient,
1214
+ authService,
1215
+ logger: this.logger
1216
+ });
1217
+ this._ratesService = new RatesService({
1218
+ httpClient,
1219
+ authService,
1220
+ logger: this.logger
1221
+ });
1222
+ this._swapService = new SwapService({
1223
+ httpClient,
1224
+ authService,
1225
+ logger: this.logger
1226
+ });
1227
+ this._tokenService = new TokenService({
1228
+ httpClient,
1229
+ authService,
1230
+ logger: this.logger
1231
+ });
1232
+ this._walletService = new WalletService({
1233
+ httpClient,
1234
+ authService,
1235
+ logger: this.logger
1236
+ });
1237
+ this._initialized = true;
1238
+ this.logger.info("BaasModule initialized successfully");
1239
+ }
1240
+ isInitialized() {
1241
+ return this._initialized;
1242
+ }
1243
+ get user() {
1244
+ if (!this._userService) {
1245
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1246
+ }
1247
+ return this._userService;
1248
+ }
1249
+ get activity() {
1250
+ if (!this._activityService) {
1251
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1252
+ }
1253
+ return this._activityService;
1254
+ }
1255
+ get bank() {
1256
+ if (!this._bankService) {
1257
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1258
+ }
1259
+ return this._bankService;
1260
+ }
1261
+ get cards() {
1262
+ if (!this._cardsService) {
1263
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1264
+ }
1265
+ return this._cardsService;
1266
+ }
1267
+ get config() {
1268
+ if (!this._configService) {
1269
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1270
+ }
1271
+ return this._configService;
1272
+ }
1273
+ get confirmation() {
1274
+ if (!this._confirmationService) {
1275
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1276
+ }
1277
+ return this._confirmationService;
1278
+ }
1279
+ get recipients() {
1280
+ if (!this._recipientsService) {
1281
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1282
+ }
1283
+ return this._recipientsService;
1284
+ }
1285
+ get rates() {
1286
+ if (!this._ratesService) {
1287
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1288
+ }
1289
+ return this._ratesService;
1290
+ }
1291
+ get swap() {
1292
+ if (!this._swapService) {
1293
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1294
+ }
1295
+ return this._swapService;
1296
+ }
1297
+ get token() {
1298
+ if (!this._tokenService) {
1299
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1300
+ }
1301
+ return this._tokenService;
1302
+ }
1303
+ get wallet() {
1304
+ if (!this._walletService) {
1305
+ throw new Error("BaasModule not initialized. Call initialize() first.");
1306
+ }
1307
+ return this._walletService;
1308
+ }
1309
+ };
1310
+
1311
+ // src/modules/api/internal/endpoints/withdrawal.api.ts
1312
+ var WithdrawalApi = class {
1313
+ constructor(httpClient) {
1314
+ this.httpClient = httpClient;
1315
+ }
1316
+ async getWithdrawalRequests() {
1317
+ const response = await this.httpClient.get(
1318
+ "api/v1/withdrawal/requests"
1319
+ );
1320
+ return response.data ?? [];
1321
+ }
1322
+ };
1323
+
1324
+ // src/modules/api/api.module.ts
1325
+ var ApiModule = class {
1326
+ constructor(context) {
1327
+ this.name = "api";
1328
+ this._initialized = false;
1329
+ this.context = context;
1330
+ this.logger = context.logger;
1331
+ this.httpClient = context.httpClient;
1332
+ }
1333
+ async initialize() {
1334
+ if (this._initialized) {
1335
+ this.logger.warn("API module already initialized");
1336
+ return;
1337
+ }
1338
+ this.logger.info("Initializing API module...");
1339
+ this._withdrawal = new WithdrawalApi(this.httpClient);
1340
+ this._baas = new BaasModule(this.context);
1341
+ await this._baas.initialize();
1342
+ this._initialized = true;
1343
+ this.logger.info("API module initialized successfully");
1344
+ }
1345
+ isInitialized() {
1346
+ return this._initialized;
1347
+ }
1348
+ get baas() {
1349
+ if (!this._baas) {
1350
+ throw new Error("API module not initialized");
1351
+ }
1352
+ return this._baas;
1353
+ }
1354
+ get withdrawal() {
1355
+ if (!this._withdrawal) {
1356
+ throw new Error("API module not initialized");
1357
+ }
1358
+ return this._withdrawal;
1359
+ }
1360
+ };
1361
+
1362
+ export { ActivityService, ApiModule, AuthService, BaasModule, BankService, CardsService, ConfigService, ConfirmationService, RatesService, RecipientsService, SwapService, TokenService, UserService, WalletService, WithdrawalApi };
1363
+ //# sourceMappingURL=chunk-D2YHFKQI.js.map
1364
+ //# sourceMappingURL=chunk-D2YHFKQI.js.map