@riocrypto/common-server 1.0.506

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 (349) hide show
  1. package/build/clients/bitstamp-client.d.ts +16 -0
  2. package/build/clients/bitstamp-client.js +83 -0
  3. package/build/clients/ccxt-client.d.ts +48 -0
  4. package/build/clients/ccxt-client.js +201 -0
  5. package/build/clients/etherscan-client.d.ts +6 -0
  6. package/build/clients/etherscan-client.js +24 -0
  7. package/build/clients/fireblocks-client.d.ts +15 -0
  8. package/build/clients/fireblocks-client.js +140 -0
  9. package/build/clients/fixer-client.d.ts +8 -0
  10. package/build/clients/fixer-client.js +34 -0
  11. package/build/clients/gueno-client.d.ts +10 -0
  12. package/build/clients/gueno-client.js +44 -0
  13. package/build/clients/kapstar-client.d.ts +6 -0
  14. package/build/clients/kapstar-client.js +26 -0
  15. package/build/clients/kushki-client.d.ts +14 -0
  16. package/build/clients/kushki-client.js +150 -0
  17. package/build/clients/rio-client.d.ts +82 -0
  18. package/build/clients/rio-client.js +315 -0
  19. package/build/clients/slack-client.d.ts +7 -0
  20. package/build/clients/slack-client.js +34 -0
  21. package/build/errors/address-check-failed-error.d.ts +8 -0
  22. package/build/errors/address-check-failed-error.js +15 -0
  23. package/build/errors/admin-already-exists-error.d.ts +8 -0
  24. package/build/errors/admin-already-exists-error.js +15 -0
  25. package/build/errors/admin-not-found-error.d.ts +8 -0
  26. package/build/errors/admin-not-found-error.js +15 -0
  27. package/build/errors/admin-only-error.d.ts +8 -0
  28. package/build/errors/admin-only-error.js +15 -0
  29. package/build/errors/api-key-not-found-error.d.ts +8 -0
  30. package/build/errors/api-key-not-found-error.js +15 -0
  31. package/build/errors/auth-already-exists-error.d.ts +8 -0
  32. package/build/errors/auth-already-exists-error.js +15 -0
  33. package/build/errors/auth-not-found-error.d.ts +8 -0
  34. package/build/errors/auth-not-found-error.js +15 -0
  35. package/build/errors/authorization-failed-error.d.ts +8 -0
  36. package/build/errors/authorization-failed-error.js +15 -0
  37. package/build/errors/custom-error.d.ts +8 -0
  38. package/build/errors/custom-error.js +10 -0
  39. package/build/errors/database-connection-error.d.ts +9 -0
  40. package/build/errors/database-connection-error.js +16 -0
  41. package/build/errors/insufficient-liquidity-error.d.ts +8 -0
  42. package/build/errors/insufficient-liquidity-error.js +19 -0
  43. package/build/errors/invalid-order-size-error.d.ts +8 -0
  44. package/build/errors/invalid-order-size-error.js +15 -0
  45. package/build/errors/message-failed-error.d.ts +8 -0
  46. package/build/errors/message-failed-error.js +15 -0
  47. package/build/errors/missing-kyc-approval-error.d.ts +8 -0
  48. package/build/errors/missing-kyc-approval-error.js +15 -0
  49. package/build/errors/missing-password-error.d.ts +8 -0
  50. package/build/errors/missing-password-error.js +15 -0
  51. package/build/errors/missing-security-question-error.d.ts +8 -0
  52. package/build/errors/missing-security-question-error.js +15 -0
  53. package/build/errors/missing-user-error.d.ts +8 -0
  54. package/build/errors/missing-user-error.js +15 -0
  55. package/build/errors/not-authorized-error.d.ts +8 -0
  56. package/build/errors/not-authorized-error.js +15 -0
  57. package/build/errors/not-broker-error.d.ts +8 -0
  58. package/build/errors/not-broker-error.js +17 -0
  59. package/build/errors/not-found-error.d.ts +8 -0
  60. package/build/errors/not-found-error.js +15 -0
  61. package/build/errors/partner-already-exists-error.d.ts +8 -0
  62. package/build/errors/partner-already-exists-error.js +15 -0
  63. package/build/errors/partner-not-found-error.d.ts +8 -0
  64. package/build/errors/partner-not-found-error.js +15 -0
  65. package/build/errors/password-already-used-error.d.ts +8 -0
  66. package/build/errors/password-already-used-error.js +15 -0
  67. package/build/errors/request-validation-error.d.ts +11 -0
  68. package/build/errors/request-validation-error.js +18 -0
  69. package/build/errors/rio-settings-already-exists-error.d.ts +8 -0
  70. package/build/errors/rio-settings-already-exists-error.js +15 -0
  71. package/build/errors/rio-settings-not-found-error.d.ts +8 -0
  72. package/build/errors/rio-settings-not-found-error.js +15 -0
  73. package/build/errors/user-already-exists-error.d.ts +8 -0
  74. package/build/errors/user-already-exists-error.js +15 -0
  75. package/build/errors/verification-failed-error.d.ts +8 -0
  76. package/build/errors/verification-failed-error.js +15 -0
  77. package/build/errors/wrong-order-state-error.d.ts +8 -0
  78. package/build/errors/wrong-order-state-error.js +17 -0
  79. package/build/errors/wrong-password-error.d.ts +8 -0
  80. package/build/errors/wrong-password-error.js +15 -0
  81. package/build/errors/wrong-processor-error.d.ts +8 -0
  82. package/build/errors/wrong-processor-error.js +15 -0
  83. package/build/errors/wrong-security-answer-error.d.ts +8 -0
  84. package/build/errors/wrong-security-answer-error.js +15 -0
  85. package/build/events/admin-created-event.d.ts +8 -0
  86. package/build/events/admin-created-event.js +2 -0
  87. package/build/events/admin-deleted-event.d.ts +7 -0
  88. package/build/events/admin-deleted-event.js +2 -0
  89. package/build/events/bank-payout-initialized-event.d.ts +12 -0
  90. package/build/events/bank-payout-initialized-event.js +2 -0
  91. package/build/events/base-listener.d.ts +18 -0
  92. package/build/events/base-listener.js +30 -0
  93. package/build/events/base-publisher.d.ts +13 -0
  94. package/build/events/base-publisher.js +20 -0
  95. package/build/events/business-kyc-failed-event.d.ts +7 -0
  96. package/build/events/business-kyc-failed-event.js +2 -0
  97. package/build/events/business-kyc-passed-event.d.ts +7 -0
  98. package/build/events/business-kyc-passed-event.js +2 -0
  99. package/build/events/checked-address-created-event.d.ts +11 -0
  100. package/build/events/checked-address-created-event.js +2 -0
  101. package/build/events/checked-address-updated-event.d.ts +10 -0
  102. package/build/events/checked-address-updated-event.js +2 -0
  103. package/build/events/clip-card-payment-created-event.d.ts +8 -0
  104. package/build/events/clip-card-payment-created-event.js +2 -0
  105. package/build/events/clip-card-payment-failed-event.d.ts +7 -0
  106. package/build/events/clip-card-payment-failed-event.js +2 -0
  107. package/build/events/deposit-address-created-event.d.ts +8 -0
  108. package/build/events/deposit-address-created-event.js +2 -0
  109. package/build/events/deposit-address-failed-event.d.ts +7 -0
  110. package/build/events/deposit-address-failed-event.js +2 -0
  111. package/build/events/deposit-completed-event.d.ts +9 -0
  112. package/build/events/deposit-completed-event.js +2 -0
  113. package/build/events/deposit-registered-event.d.ts +9 -0
  114. package/build/events/deposit-registered-event.js +2 -0
  115. package/build/events/dlocal-bank-payment-created-event.d.ts +9 -0
  116. package/build/events/dlocal-bank-payment-created-event.js +2 -0
  117. package/build/events/dlocal-bank-payment-failed-event.d.ts +7 -0
  118. package/build/events/dlocal-bank-payment-failed-event.js +2 -0
  119. package/build/events/fees-failed-event.d.ts +7 -0
  120. package/build/events/fees-failed-event.js +2 -0
  121. package/build/events/kyc-failed-event.d.ts +7 -0
  122. package/build/events/kyc-failed-event.js +2 -0
  123. package/build/events/kyc-passed-event.d.ts +7 -0
  124. package/build/events/kyc-passed-event.js +2 -0
  125. package/build/events/liquidity-fill-failed-event.d.ts +7 -0
  126. package/build/events/liquidity-fill-failed-event.js +2 -0
  127. package/build/events/liquidity-filled-event.d.ts +11 -0
  128. package/build/events/liquidity-filled-event.js +2 -0
  129. package/build/events/liquidity-routed-event.d.ts +9 -0
  130. package/build/events/liquidity-routed-event.js +2 -0
  131. package/build/events/liquidity-routing-failed-event.d.ts +7 -0
  132. package/build/events/liquidity-routing-failed-event.js +2 -0
  133. package/build/events/liquidity-transfer-failed-event.d.ts +7 -0
  134. package/build/events/liquidity-transfer-failed-event.js +2 -0
  135. package/build/events/liquidity-transfered-event.d.ts +9 -0
  136. package/build/events/liquidity-transfered-event.js +2 -0
  137. package/build/events/order-created-event.d.ts +39 -0
  138. package/build/events/order-created-event.js +2 -0
  139. package/build/events/order-deleted-event.d.ts +7 -0
  140. package/build/events/order-deleted-event.js +2 -0
  141. package/build/events/order-updated-event.d.ts +37 -0
  142. package/build/events/order-updated-event.js +2 -0
  143. package/build/events/partner-created-event.d.ts +14 -0
  144. package/build/events/partner-created-event.js +2 -0
  145. package/build/events/partner-updated-event.d.ts +19 -0
  146. package/build/events/partner-updated-event.js +2 -0
  147. package/build/events/payment-complete-event.d.ts +9 -0
  148. package/build/events/payment-complete-event.js +2 -0
  149. package/build/events/payment-created-event.d.ts +8 -0
  150. package/build/events/payment-created-event.js +2 -0
  151. package/build/events/payment-failed-event.d.ts +7 -0
  152. package/build/events/payment-failed-event.js +2 -0
  153. package/build/events/processor-routed-event.d.ts +9 -0
  154. package/build/events/processor-routed-event.js +2 -0
  155. package/build/events/processor-routing-failed-event.d.ts +7 -0
  156. package/build/events/processor-routing-failed-event.js +2 -0
  157. package/build/events/quote-failed-event.d.ts +7 -0
  158. package/build/events/quote-failed-event.js +2 -0
  159. package/build/events/rio-settings-created-event.d.ts +8 -0
  160. package/build/events/rio-settings-created-event.js +2 -0
  161. package/build/events/rio-settings-updated-event.d.ts +8 -0
  162. package/build/events/rio-settings-updated-event.js +2 -0
  163. package/build/events/subjects.d.ts +60 -0
  164. package/build/events/subjects.js +64 -0
  165. package/build/events/user-created-event.d.ts +25 -0
  166. package/build/events/user-created-event.js +2 -0
  167. package/build/events/user-deleted-event.d.ts +7 -0
  168. package/build/events/user-deleted-event.js +2 -0
  169. package/build/events/user-disabled-event.d.ts +7 -0
  170. package/build/events/user-disabled-event.js +2 -0
  171. package/build/events/user-updated-event.d.ts +23 -0
  172. package/build/events/user-updated-event.js +2 -0
  173. package/build/events/wyre-ach-payment-created-event.d.ts +9 -0
  174. package/build/events/wyre-ach-payment-created-event.js +2 -0
  175. package/build/events/wyre-payment-method-created-event.d.ts +11 -0
  176. package/build/events/wyre-payment-method-created-event.js +2 -0
  177. package/build/events/wyre-transfer-completed-event.d.ts +9 -0
  178. package/build/events/wyre-transfer-completed-event.js +2 -0
  179. package/build/events/wyre-transfer-created-event.d.ts +9 -0
  180. package/build/events/wyre-transfer-created-event.js +2 -0
  181. package/build/events/wyre-transfer-failed-event.d.ts +9 -0
  182. package/build/events/wyre-transfer-failed-event.js +2 -0
  183. package/build/events/wyre-user-created-event.d.ts +9 -0
  184. package/build/events/wyre-user-created-event.js +2 -0
  185. package/build/helpers/get-user-helper.d.ts +4 -0
  186. package/build/helpers/get-user-helper.js +35 -0
  187. package/build/index.d.ts +91 -0
  188. package/build/index.js +107 -0
  189. package/build/middlewares/authorize.d.ts +28 -0
  190. package/build/middlewares/authorize.js +195 -0
  191. package/build/middlewares/current-admin-auth.d.ts +15 -0
  192. package/build/middlewares/current-admin-auth.js +20 -0
  193. package/build/middlewares/current-auth.d.ts +16 -0
  194. package/build/middlewares/current-auth.js +20 -0
  195. package/build/middlewares/error-handler.d.ts +2 -0
  196. package/build/middlewares/error-handler.js +14 -0
  197. package/build/middlewares/get-order.d.ts +11 -0
  198. package/build/middlewares/get-order.js +57 -0
  199. package/build/middlewares/get-partner.d.ts +10 -0
  200. package/build/middlewares/get-partner.js +41 -0
  201. package/build/middlewares/get-user.d.ts +12 -0
  202. package/build/middlewares/get-user.js +45 -0
  203. package/build/middlewares/require-admin-api-key.d.ts +2 -0
  204. package/build/middlewares/require-admin-api-key.js +11 -0
  205. package/build/middlewares/require-auth.d.ts +2 -0
  206. package/build/middlewares/require-auth.js +11 -0
  207. package/build/middlewares/require-priveleges.d.ts +2 -0
  208. package/build/middlewares/require-priveleges.js +15 -0
  209. package/build/middlewares/validate-auth.d.ts +2 -0
  210. package/build/middlewares/validate-auth.js +30 -0
  211. package/build/middlewares/validate-kyc.d.ts +2 -0
  212. package/build/middlewares/validate-kyc.js +30 -0
  213. package/build/middlewares/validate-order.d.ts +0 -0
  214. package/build/middlewares/validate-order.js +20 -0
  215. package/build/middlewares/validate-request.d.ts +2 -0
  216. package/build/middlewares/validate-request.js +13 -0
  217. package/build/middlewares/verify-admin-api-key.d.ts +9 -0
  218. package/build/middlewares/verify-admin-api-key.js +11 -0
  219. package/build/models/admin-auth.d.ts +16 -0
  220. package/build/models/admin-auth.js +59 -0
  221. package/build/models/auth.d.ts +24 -0
  222. package/build/models/auth.js +83 -0
  223. package/build/models/bank-payout.d.ts +20 -0
  224. package/build/models/bank-payout.js +44 -0
  225. package/build/models/business-user.d.ts +57 -0
  226. package/build/models/business-user.js +111 -0
  227. package/build/models/ccxt-order.d.ts +16 -0
  228. package/build/models/ccxt-order.js +37 -0
  229. package/build/models/checked-address.d.ts +17 -0
  230. package/build/models/checked-address.js +37 -0
  231. package/build/models/kushki-payment.d.ts +16 -0
  232. package/build/models/kushki-payment.js +37 -0
  233. package/build/models/kyc.d.ts +20 -0
  234. package/build/models/kyc.js +45 -0
  235. package/build/models/order.d.ts +67 -0
  236. package/build/models/order.js +123 -0
  237. package/build/models/partner.d.ts +35 -0
  238. package/build/models/partner.js +69 -0
  239. package/build/models/rio-settings.d.ts +12 -0
  240. package/build/models/rio-settings.js +29 -0
  241. package/build/models/user.d.ts +53 -0
  242. package/build/models/user.js +94 -0
  243. package/build/services/apiKey.d.ts +3 -0
  244. package/build/services/apiKey.js +24 -0
  245. package/build/services/password.d.ts +4 -0
  246. package/build/services/password.js +32 -0
  247. package/build/services/s3.d.ts +5 -0
  248. package/build/services/s3.js +21 -0
  249. package/build/types/address-check-result.d.ts +4 -0
  250. package/build/types/address-check-result.js +8 -0
  251. package/build/types/admin.d.ts +4 -0
  252. package/build/types/admin.js +2 -0
  253. package/build/types/api-key.d.ts +5 -0
  254. package/build/types/api-key.js +2 -0
  255. package/build/types/auth-update.d.ts +8 -0
  256. package/build/types/auth-update.js +2 -0
  257. package/build/types/auth.d.ts +6 -0
  258. package/build/types/auth.js +2 -0
  259. package/build/types/authorization-type.d.ts +8 -0
  260. package/build/types/authorization-type.js +12 -0
  261. package/build/types/bank-payout.d.ts +7 -0
  262. package/build/types/bank-payout.js +2 -0
  263. package/build/types/business-user-input.d.ts +27 -0
  264. package/build/types/business-user-input.js +2 -0
  265. package/build/types/business-user-update.d.ts +26 -0
  266. package/build/types/business-user-update.js +2 -0
  267. package/build/types/business-user.d.ts +30 -0
  268. package/build/types/business-user.js +2 -0
  269. package/build/types/ccxt-liquidity-provider.d.ts +5 -0
  270. package/build/types/ccxt-liquidity-provider.js +9 -0
  271. package/build/types/checked-address.d.ts +7 -0
  272. package/build/types/checked-address.js +2 -0
  273. package/build/types/clip-payment-status.d.ts +3 -0
  274. package/build/types/clip-payment-status.js +7 -0
  275. package/build/types/country.d.ts +57 -0
  276. package/build/types/country.js +256 -0
  277. package/build/types/crypto.d.ts +6 -0
  278. package/build/types/crypto.js +38 -0
  279. package/build/types/dlocal-payment-method.d.ts +4 -0
  280. package/build/types/dlocal-payment-method.js +8 -0
  281. package/build/types/fees.d.ts +9 -0
  282. package/build/types/fees.js +2 -0
  283. package/build/types/fiat.d.ts +6 -0
  284. package/build/types/fiat.js +45 -0
  285. package/build/types/kyc-status.d.ts +7 -0
  286. package/build/types/kyc-status.js +11 -0
  287. package/build/types/language.d.ts +6 -0
  288. package/build/types/language.js +10 -0
  289. package/build/types/liquidity-provider.d.ts +9 -0
  290. package/build/types/liquidity-provider.js +13 -0
  291. package/build/types/order-input.d.ts +31 -0
  292. package/build/types/order-input.js +2 -0
  293. package/build/types/order-status.d.ts +21 -0
  294. package/build/types/order-status.js +51 -0
  295. package/build/types/order.d.ts +37 -0
  296. package/build/types/order.js +2 -0
  297. package/build/types/partner-auth.d.ts +5 -0
  298. package/build/types/partner-auth.js +2 -0
  299. package/build/types/partner-stats.d.ts +5 -0
  300. package/build/types/partner-stats.js +2 -0
  301. package/build/types/partner-status.d.ts +6 -0
  302. package/build/types/partner-status.js +10 -0
  303. package/build/types/partner-update.d.ts +10 -0
  304. package/build/types/partner-update.js +2 -0
  305. package/build/types/partner.d.ts +15 -0
  306. package/build/types/partner.js +2 -0
  307. package/build/types/payment-method.d.ts +5 -0
  308. package/build/types/payment-method.js +9 -0
  309. package/build/types/payout-method.d.ts +3 -0
  310. package/build/types/payout-method.js +7 -0
  311. package/build/types/platform-fee-range.d.ts +5 -0
  312. package/build/types/platform-fee-range.js +2 -0
  313. package/build/types/processor.d.ts +12 -0
  314. package/build/types/processor.js +16 -0
  315. package/build/types/quote.d.ts +21 -0
  316. package/build/types/quote.js +2 -0
  317. package/build/types/rio-env.d.ts +6 -0
  318. package/build/types/rio-env.js +10 -0
  319. package/build/types/rio-settings-update.d.ts +4 -0
  320. package/build/types/rio-settings-update.js +2 -0
  321. package/build/types/rio-settings.d.ts +4 -0
  322. package/build/types/rio-settings.js +2 -0
  323. package/build/types/security-question.d.ts +7 -0
  324. package/build/types/security-question.js +11 -0
  325. package/build/types/side.d.ts +4 -0
  326. package/build/types/side.js +8 -0
  327. package/build/types/us-state.d.ts +61 -0
  328. package/build/types/us-state.js +65 -0
  329. package/build/types/user-attribute.d.ts +10 -0
  330. package/build/types/user-attribute.js +14 -0
  331. package/build/types/user-input.d.ts +26 -0
  332. package/build/types/user-input.js +2 -0
  333. package/build/types/user-type.d.ts +4 -0
  334. package/build/types/user-type.js +8 -0
  335. package/build/types/user-update.d.ts +25 -0
  336. package/build/types/user-update.js +2 -0
  337. package/build/types/user.d.ts +30 -0
  338. package/build/types/user.js +2 -0
  339. package/build/types/users-stats.d.ts +3 -0
  340. package/build/types/users-stats.js +2 -0
  341. package/build/types/wyre-address.d.ts +9 -0
  342. package/build/types/wyre-address.js +2 -0
  343. package/build/types/wyre-order-status.d.ts +7 -0
  344. package/build/types/wyre-order-status.js +11 -0
  345. package/build/types/wyre-payment-method.d.ts +40 -0
  346. package/build/types/wyre-payment-method.js +2 -0
  347. package/build/types/wyre-webhook-notification.d.ts +12 -0
  348. package/build/types/wyre-webhook-notification.js +2 -0
  349. package/package.json +36 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Password = void 0;
13
+ const crypto_1 = require("crypto");
14
+ const util_1 = require("util");
15
+ const scryptAsync = (0, util_1.promisify)(crypto_1.scrypt);
16
+ class Password {
17
+ static toHash(password) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ const salt = (0, crypto_1.randomBytes)(8).toString("hex");
20
+ const buf = (yield scryptAsync(password, salt, 64));
21
+ return `${buf.toString("hex")}.${salt}`;
22
+ });
23
+ }
24
+ static compare(storedPassword, suppliedPassword) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const [hashedPassword, salt] = storedPassword.split(".");
27
+ const buf = (yield scryptAsync(suppliedPassword, salt, 64));
28
+ return buf.toString("hex") === hashedPassword;
29
+ });
30
+ }
31
+ }
32
+ exports.Password = Password;
@@ -0,0 +1,5 @@
1
+ export declare class s3 {
2
+ _client: any;
3
+ constructor();
4
+ get client(): any;
5
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.s3 = void 0;
4
+ const client_s3_1 = require("@aws-sdk/client-s3");
5
+ class s3 {
6
+ constructor() {
7
+ this._client = new client_s3_1.S3Client({
8
+ endpoint: process.env.S3_ENDPOINT,
9
+ forcePathStyle: false,
10
+ region: process.env.S3_REGION,
11
+ credentials: {
12
+ accessKeyId: process.env.S3_ACCESS_KEY,
13
+ secretAccessKey: process.env.S3_SECRET_KEY, // Secret access key defined through an environment variable.
14
+ },
15
+ });
16
+ }
17
+ get client() {
18
+ return this._client;
19
+ }
20
+ }
21
+ exports.s3 = s3;
@@ -0,0 +1,4 @@
1
+ export declare enum AddressCheckResult {
2
+ Passed = "passed",
3
+ Failed = "failed"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddressCheckResult = void 0;
4
+ var AddressCheckResult;
5
+ (function (AddressCheckResult) {
6
+ AddressCheckResult["Passed"] = "passed";
7
+ AddressCheckResult["Failed"] = "failed";
8
+ })(AddressCheckResult = exports.AddressCheckResult || (exports.AddressCheckResult = {}));
@@ -0,0 +1,4 @@
1
+ export interface Admin {
2
+ id: string;
3
+ email: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface APIKey {
2
+ id: string;
3
+ value: string;
4
+ label: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { SecurityQuestion } from "./security-question";
2
+ export interface AuthUpdate {
3
+ phoneNumber?: string;
4
+ password?: string;
5
+ newPassword?: string;
6
+ securityQuestion?: SecurityQuestion;
7
+ securityAnswer?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { SecurityQuestion } from "./security-question";
2
+ export interface Auth {
3
+ id: string;
4
+ phoneNumber: string;
5
+ securityQuestion?: SecurityQuestion;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export declare enum AuthorizationType {
2
+ UserNoKYC = "newUserNoKYC",
3
+ User = "user",
4
+ Broker = "broker",
5
+ Admin = "admin",
6
+ Partner = "partner",
7
+ Auth = "auth"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthorizationType = void 0;
4
+ var AuthorizationType;
5
+ (function (AuthorizationType) {
6
+ AuthorizationType["UserNoKYC"] = "newUserNoKYC";
7
+ AuthorizationType["User"] = "user";
8
+ AuthorizationType["Broker"] = "broker";
9
+ AuthorizationType["Admin"] = "admin";
10
+ AuthorizationType["Partner"] = "partner";
11
+ AuthorizationType["Auth"] = "auth";
12
+ })(AuthorizationType = exports.AuthorizationType || (exports.AuthorizationType = {}));
@@ -0,0 +1,7 @@
1
+ export interface BankPayout {
2
+ orderId: string;
3
+ originBank: string;
4
+ accountNumber: string;
5
+ status: string;
6
+ destinationBank?: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { Country } from "./country";
2
+ import { KYCStatus } from "./kyc-status";
3
+ import { Language } from "./language";
4
+ import { PlatformFeeRange } from "./platform-fee-range";
5
+ import { USState } from "./us-state";
6
+ import { UserAttribute } from "./user-attribute";
7
+ export interface BusinessUserInput {
8
+ authId?: string;
9
+ companyName: string;
10
+ legalRepresentative: string;
11
+ phoneNumber?: string;
12
+ email: string;
13
+ street1: string;
14
+ street2?: string;
15
+ city: string;
16
+ state: USState | string;
17
+ postalCode: string;
18
+ country: Country;
19
+ language: Language;
20
+ cpf?: string;
21
+ kycStatus?: KYCStatus;
22
+ COIFile?: string;
23
+ KYCReportFile?: string;
24
+ attributes?: UserAttribute[];
25
+ brokerId?: string;
26
+ platformFeeRanges?: PlatformFeeRange[];
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { Country } from "./country";
2
+ import { KYCStatus } from "./kyc-status";
3
+ import { Language } from "./language";
4
+ import { PlatformFeeRange } from "./platform-fee-range";
5
+ import { UserAttribute } from "./user-attribute";
6
+ export interface BusinessUserUpdate {
7
+ authId?: string;
8
+ companyName?: string;
9
+ legalRepresentative?: string;
10
+ phoneNumber?: string;
11
+ email?: string;
12
+ street1?: string;
13
+ street2?: string;
14
+ city?: string;
15
+ state?: string;
16
+ postalCode?: string;
17
+ cpf?: string;
18
+ country?: Country;
19
+ kycStatus?: KYCStatus;
20
+ language?: Language;
21
+ COIFile?: string;
22
+ KYCReportFile?: string;
23
+ attributes?: UserAttribute[];
24
+ brokerId?: string;
25
+ platformFeeRanges?: PlatformFeeRange[];
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ import { Country } from "./country";
2
+ import { KYCStatus } from "./kyc-status";
3
+ import { Language } from "./language";
4
+ import { PlatformFeeRange } from "./platform-fee-range";
5
+ import { USState } from "./us-state";
6
+ import { UserAttribute } from "./user-attribute";
7
+ import { UserType } from "./user-type";
8
+ export interface BusinessUser {
9
+ id: string;
10
+ authId?: string;
11
+ type: UserType;
12
+ companyName: string;
13
+ legalRepresentative: string;
14
+ phoneNumber: string;
15
+ email: string;
16
+ street1: string;
17
+ street2?: string;
18
+ city: string;
19
+ state: USState | string;
20
+ postalCode: string;
21
+ country: Country;
22
+ kycStatus: KYCStatus;
23
+ cpf?: string;
24
+ language?: Language;
25
+ COIFile?: string;
26
+ KYCReportFile?: string;
27
+ attributes?: UserAttribute[];
28
+ brokerId?: string;
29
+ platformFeeRanges?: PlatformFeeRange[];
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export declare enum CCXTLiquidityProvider {
2
+ Kraken = "kraken",
3
+ Gemini = "gemini",
4
+ Bitstamp = "bitstamp"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CCXTLiquidityProvider = void 0;
4
+ var CCXTLiquidityProvider;
5
+ (function (CCXTLiquidityProvider) {
6
+ CCXTLiquidityProvider["Kraken"] = "kraken";
7
+ CCXTLiquidityProvider["Gemini"] = "gemini";
8
+ CCXTLiquidityProvider["Bitstamp"] = "bitstamp";
9
+ })(CCXTLiquidityProvider = exports.CCXTLiquidityProvider || (exports.CCXTLiquidityProvider = {}));
@@ -0,0 +1,7 @@
1
+ import { AddressCheckResult } from "./address-check-result";
2
+ export interface CheckedAddress {
3
+ id: string;
4
+ address: string;
5
+ result: AddressCheckResult;
6
+ lastChecked: Date;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export declare enum ClipPaymentStatus {
2
+ paid = "PAID"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClipPaymentStatus = void 0;
4
+ var ClipPaymentStatus;
5
+ (function (ClipPaymentStatus) {
6
+ ClipPaymentStatus["paid"] = "PAID";
7
+ })(ClipPaymentStatus = exports.ClipPaymentStatus || (exports.ClipPaymentStatus = {}));
@@ -0,0 +1,57 @@
1
+ export declare enum Country {
2
+ Algeria = "DZ",
3
+ Argentina = "AR",
4
+ Australia = "AU",
5
+ Austria = "AT",
6
+ Belgium = "BE",
7
+ Bolivia = "BO",
8
+ Brazil = "BR",
9
+ Canada = "CA",
10
+ Chile = "CL",
11
+ Colombia = "CO",
12
+ CostaRica = "CR",
13
+ Cyprus = "CY",
14
+ CzechRepublic = "CZ",
15
+ Denmark = "DK",
16
+ DominicanRepublic = "DO",
17
+ Estonia = "EE",
18
+ Fiji = "FJ",
19
+ France = "FR",
20
+ Germany = "DE",
21
+ Greece = "GR",
22
+ HongKong = "HK",
23
+ Iceland = "IS",
24
+ India = "IN",
25
+ Indonesia = "ID",
26
+ Ireland = "IE",
27
+ Israel = "IL",
28
+ Italy = "IT",
29
+ Japan = "JP",
30
+ Korea = "KR",
31
+ Latvia = "LV",
32
+ Lithuania = "LT",
33
+ Luxembourg = "LU",
34
+ Malaysia = "MY",
35
+ Mexico = "MX",
36
+ Nepal = "NP",
37
+ Netherlands = "NL",
38
+ NewZealand = "NZ",
39
+ Norway = "NO",
40
+ Paraguay = "PY",
41
+ Peru = "PE",
42
+ Philippines = "PH",
43
+ Poland = "PL",
44
+ Portugal = "PT",
45
+ Singapore = "SG",
46
+ Slovakia = "SK",
47
+ Slovenia = "SI",
48
+ SouthAfrica = "ZA",
49
+ Spain = "ES",
50
+ Sweden = "SE",
51
+ Switzerland = "CH",
52
+ Tanzania = "TZ",
53
+ Thailand = "TH",
54
+ Turkey = "TR",
55
+ UnitedKingdom = "GB",
56
+ Vietnam = "VN"
57
+ }
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+ // Currently only has countries supported
3
+ // by Wyre
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Country = void 0;
6
+ var Country;
7
+ (function (Country) {
8
+ // Afghanistan = "AF",
9
+ // AlandIslands = "AX",
10
+ // Albania = "AL",
11
+ Country["Algeria"] = "DZ";
12
+ // AmericanSamoa = "AS",
13
+ // Andorra = "AD",
14
+ // Angola = "AO",
15
+ // Anguilla = "AI",
16
+ // Antarctica = "AQ",
17
+ // AntiguaAndBarbuda = "AG",
18
+ Country["Argentina"] = "AR";
19
+ // Armenia = "AM",
20
+ // Aruba = "AW",
21
+ Country["Australia"] = "AU";
22
+ Country["Austria"] = "AT";
23
+ // Azerbaijan = "AZ",
24
+ // Bahamas = "BS",
25
+ // Bahrain = "BH",
26
+ // Bangladesh = "BD",
27
+ // Barbados = "BB",
28
+ // Belarus = "BY",
29
+ Country["Belgium"] = "BE";
30
+ // Belize = "BZ",
31
+ // Benin = "BJ",
32
+ // Bermuda = "BM",
33
+ // Bhutan = "BT",
34
+ Country["Bolivia"] = "BO";
35
+ // BonaireSintEustatiusSaba = "BQ",
36
+ // BosniaAndHerzegovina = "BA",
37
+ // Botswana = "BW",
38
+ // BouvetIsland = "BV",
39
+ Country["Brazil"] = "BR";
40
+ // BritishIndianOceanTerritory = "IO",
41
+ // BruneiDarussalam = "BN",
42
+ // Bulgaria = "BG",
43
+ // BurkinaFaso = "BF",
44
+ // Burundi = "BI",
45
+ // Cambodia = "KH",
46
+ // Cameroon = "CM",
47
+ Country["Canada"] = "CA";
48
+ // CapeVerde = "CV",
49
+ // CaymanIslands = "KY",
50
+ // CentralAfricanRepublic = "CF",
51
+ // Chad = "TD",
52
+ Country["Chile"] = "CL";
53
+ // China = "CN",
54
+ // ChristmasIsland = "CX",
55
+ // CocosKeelingIslands = "CC",
56
+ Country["Colombia"] = "CO";
57
+ // Comoros = "KM",
58
+ // Congo = "CG",
59
+ // CongoDemocraticRepublic = "CD",
60
+ // CookIslands = "CK",
61
+ Country["CostaRica"] = "CR";
62
+ // CoteDIvoire = "CI",
63
+ // Croatia = "HR",
64
+ // Cuba = "CU",
65
+ // Curaçao = "CW",
66
+ Country["Cyprus"] = "CY";
67
+ Country["CzechRepublic"] = "CZ";
68
+ Country["Denmark"] = "DK";
69
+ // Djibouti = "DJ",
70
+ // Dominica = "DM",
71
+ Country["DominicanRepublic"] = "DO";
72
+ // Ecuador = "EC",
73
+ // Egypt = "EG",
74
+ // ElSalvador = "SV",
75
+ // EquatorialGuinea = "GQ",
76
+ // Eritrea = "ER",
77
+ Country["Estonia"] = "EE";
78
+ // Ethiopia = "ET",
79
+ // FalklandIslands = "FK",
80
+ // FaroeIslands = "FO",
81
+ Country["Fiji"] = "FJ";
82
+ // Finland = "FI",
83
+ Country["France"] = "FR";
84
+ // FrenchGuiana = "GF",
85
+ // FrenchPolynesia = "PF",
86
+ // FrenchSouthernTerritories = "TF",
87
+ // Gabon = "GA",
88
+ // Gambia = "GM",
89
+ // Georgia = "GE",
90
+ Country["Germany"] = "DE";
91
+ // Ghana = "GH",
92
+ // Gibraltar = "GI",
93
+ Country["Greece"] = "GR";
94
+ // Greenland = "GL",
95
+ // Grenada = "GD",
96
+ // Guadeloupe = "GP",
97
+ // Guam = "GU",
98
+ // Guatemala = "GT",
99
+ // Guernsey = "GG",
100
+ // Guinea = "GN",
101
+ // GuineaBissau = "GW",
102
+ // Guyana = "GY",
103
+ // Haiti = "HT",
104
+ // HeardIslandMcdonaldIslands = "HM",
105
+ // HolySeeVaticanCityState = "VA",
106
+ // Honduras = "HN",
107
+ Country["HongKong"] = "HK";
108
+ // Hungary = "HU",
109
+ Country["Iceland"] = "IS";
110
+ Country["India"] = "IN";
111
+ Country["Indonesia"] = "ID";
112
+ // Iran = "IR",
113
+ // Iraq = "IQ",
114
+ Country["Ireland"] = "IE";
115
+ // IsleOfMan = "IM",
116
+ Country["Israel"] = "IL";
117
+ Country["Italy"] = "IT";
118
+ // Jamaica = "JM",
119
+ Country["Japan"] = "JP";
120
+ // Jersey = "JE",
121
+ // Jordan = "JO",
122
+ // Kazakhstan = "KZ",
123
+ // Kenya = "KE",
124
+ // Kiribati = "KI",
125
+ Country["Korea"] = "KR";
126
+ // KoreaDemocraticPeoplesRepublic = "KP",
127
+ // Kuwait = "KW",
128
+ // Kyrgyzstan = "KG",
129
+ // LaoPeoplesDemocraticRepublic = "LA",
130
+ Country["Latvia"] = "LV";
131
+ // Lebanon = "LB",
132
+ // Lesotho = "LS",
133
+ // Liberia = "LR",
134
+ // LibyanArabJamahiriya = "LY",
135
+ // Liechtenstein = "LI",
136
+ Country["Lithuania"] = "LT";
137
+ Country["Luxembourg"] = "LU";
138
+ // Macao = "MO",
139
+ // Macedonia = "MK",
140
+ // Madagascar = "MG",
141
+ // Malawi = "MW",
142
+ Country["Malaysia"] = "MY";
143
+ // Maldives = "MV",
144
+ // Mali = "ML",
145
+ // Malta = "MT",
146
+ // MarshallIslands = "MH",
147
+ // Martinique = "MQ",
148
+ // Mauritania = "MR",
149
+ // Mauritius = "MU",
150
+ // Mayotte = "YT",
151
+ Country["Mexico"] = "MX";
152
+ // Micronesia = "FM",
153
+ // Moldova = "MD",
154
+ // Monaco = "MC",
155
+ // Mongolia = "MN",
156
+ // Montenegro = "ME",
157
+ // Montserrat = "MS",
158
+ // Morocco = "MA",
159
+ // Mozambique = "MZ",
160
+ // Myanmar = "MM",
161
+ // Namibia = "NA",
162
+ // Nauru = "NR",
163
+ Country["Nepal"] = "NP";
164
+ Country["Netherlands"] = "NL";
165
+ // NewCaledonia = "NC",
166
+ Country["NewZealand"] = "NZ";
167
+ // Nicaragua = "NI",
168
+ // Niger = "NE",
169
+ // Nigeria = "NG",
170
+ // Niue = "NU",
171
+ // NorfolkIsland = "NF",
172
+ // NorthernMarianaIslands = "MP",
173
+ Country["Norway"] = "NO";
174
+ // Oman = "OM",
175
+ // Pakistan = "PK",
176
+ // Palau = "PW",
177
+ // PalestinianTerritory = "PS",
178
+ // Panama = "PA",
179
+ // PapuaNewGuinea = "PG",
180
+ Country["Paraguay"] = "PY";
181
+ Country["Peru"] = "PE";
182
+ Country["Philippines"] = "PH";
183
+ // Pitcairn = "PN",
184
+ Country["Poland"] = "PL";
185
+ Country["Portugal"] = "PT";
186
+ // PuertoRico = "PR",
187
+ // Qatar = "QA",
188
+ // Reunion = "RE",
189
+ // Romania = "RO",
190
+ // RussianFederation = "RU",
191
+ // Rwanda = "RW",
192
+ // SaintBarthelemy = "BL",
193
+ // SaintHelena = "SH",
194
+ // SaintKittsAndNevis = "KN",
195
+ // SaintLucia = "LC",
196
+ // SaintMartin = "MF",
197
+ // SaintPierreAndMiquelon = "PM",
198
+ // SaintVincentAndGrenadines = "VC",
199
+ // Samoa = "WS",
200
+ // SanMarino = "SM",
201
+ // SaoTomeAndPrincipe = "ST",
202
+ // SaudiArabia = "SA",
203
+ // Senegal = "SN",
204
+ // Serbia = "RS",
205
+ // Seychelles = "SC",
206
+ // SierraLeone = "SL",
207
+ Country["Singapore"] = "SG";
208
+ // SintMaarten = "SX",
209
+ Country["Slovakia"] = "SK";
210
+ Country["Slovenia"] = "SI";
211
+ // SolomonIslands = "SB",
212
+ // Somalia = "SO",
213
+ Country["SouthAfrica"] = "ZA";
214
+ // SouthGeorgiaAndSandwichIsl = "GS",
215
+ // SouthSudan = "SS",
216
+ Country["Spain"] = "ES";
217
+ // SriLanka = "LK",
218
+ // Sudan = "SD",
219
+ // Suriname = "SR",
220
+ // SvalbardAndJanMayen = "SJ",
221
+ // Swaziland = "SZ",
222
+ Country["Sweden"] = "SE";
223
+ Country["Switzerland"] = "CH";
224
+ // SyrianArabRepublic = "SY",
225
+ // Taiwan = "TW",
226
+ // Tajikistan = "TJ",
227
+ Country["Tanzania"] = "TZ";
228
+ Country["Thailand"] = "TH";
229
+ // TimorLeste = "TL",
230
+ // Togo = "TG",
231
+ // Tokelau = "TK",
232
+ // Tonga = "TO",
233
+ // TrinidadAndTobago = "TT",
234
+ // Tunisia = "TN",
235
+ Country["Turkey"] = "TR";
236
+ // Turkmenistan = "TM",
237
+ // TurksAndCaicosIslands = "TC",
238
+ // Tuvalu = "TV",
239
+ // Uganda = "UG",
240
+ // Ukraine = "UA",
241
+ // UnitedArabEmirates = "AE",
242
+ Country["UnitedKingdom"] = "GB";
243
+ // UnitedStatesOutlyingIslands = "UM",
244
+ // Uruguay = "UY",
245
+ // Uzbekistan = "UZ",
246
+ // Vanuatu = "VU",
247
+ // Venezuela = "VE",
248
+ Country["Vietnam"] = "VN";
249
+ // VirginIslandsBritish = "VG",
250
+ // VirginIslandsUS = "VI",
251
+ // WallisAndFutuna = "WF",
252
+ // WesternSahara = "EH",
253
+ // Yemen = "YE",
254
+ // Zambia = "ZM",
255
+ // Zimbabwe = "ZW",
256
+ })(Country = exports.Country || (exports.Country = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum Crypto {
2
+ BTC = "BTC",
3
+ ETH = "ETH",
4
+ USDC = "USDC",
5
+ USDCPolygon = "USDC_POLYGON"
6
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ // Currently only has cryptos supported
3
+ // by Wyre
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Crypto = void 0;
6
+ var Crypto;
7
+ (function (Crypto) {
8
+ Crypto["BTC"] = "BTC";
9
+ Crypto["ETH"] = "ETH";
10
+ Crypto["USDC"] = "USDC";
11
+ Crypto["USDCPolygon"] = "USDC_POLYGON";
12
+ // XLM = "XLM",
13
+ // sUSDC = "sUSDC",
14
+ // AVAX = "AVAX",
15
+ // AVAX = "AVAX",
16
+ // AVAXCUSDC = "AVAXCUSDC",
17
+ // DAI = "DAI",
18
+ // mUSDC = "mUSDC",
19
+ // MATIC = "MATIC",
20
+ // USDT = "USDT",
21
+ // BUSD = "BUSD",
22
+ // GUSD = "GUSD",
23
+ // PAX = "PAX",
24
+ // AAVE = "AAVE",
25
+ // COMP = "COMP",
26
+ // LINK = "LINK",
27
+ // WBTC = "WBTC",
28
+ // WETH = "WETH",
29
+ // BAT = "BAT",
30
+ // CRV = "CRV",
31
+ // MKR = "MKR",
32
+ // SNX = "SNX",
33
+ // UNI = "UNI",
34
+ // YFI = "YFI",
35
+ // ALGO = "ALGO",
36
+ // AUSDC = "AUSDC",
37
+ // AUSDT = "AUSDT",
38
+ })(Crypto = exports.Crypto || (exports.Crypto = {}));