@wirexapp/wpay-baas-sdk 0.1.4 → 0.1.7
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.
- package/README.md +95 -7
- package/dist/chunk-BN5Q2YHP.js +4945 -0
- package/dist/chunk-BN5Q2YHP.js.map +1 -0
- package/dist/chunk-C4OR7ZVY.js +303 -0
- package/dist/chunk-C4OR7ZVY.js.map +1 -0
- package/dist/chunk-Y7TGKAUA.js +1364 -0
- package/dist/chunk-Y7TGKAUA.js.map +1 -0
- package/dist/core/index.d.ts +32 -8
- package/dist/core/index.js +2 -4
- package/dist/core/index.js.map +1 -1
- package/dist/{core/errors.d.ts → errors-5LpyK95R.d.ts} +10 -9
- package/dist/index-DETvmzdr.d.ts +1715 -0
- package/dist/index.d.ts +33 -14
- package/dist/index.js +111 -6
- package/dist/index.js.map +1 -1
- package/dist/modules/api/index.d.ts +4 -7
- package/dist/modules/api/index.js +3 -4
- package/dist/modules/api/index.js.map +1 -1
- package/dist/modules/crypto/index.d.ts +192 -9
- package/dist/modules/crypto/index.js +4 -7
- package/dist/modules/crypto/index.js.map +1 -1
- package/dist/types-IKGr4nyf.d.ts +179 -0
- package/dist/types-_VJ4UPM4.d.ts +185 -0
- package/dist/withdrawal.api-DsvQPbRN.d.ts +81 -0
- package/package.json +38 -10
- package/dist/abi/accounts.abi.d.ts +0 -405
- package/dist/abi/accounts.abi.d.ts.map +0 -1
- package/dist/abi/accounts.abi.js +0 -351
- package/dist/abi/accounts.abi.js.map +0 -1
- package/dist/abi/contractRegistry.abi.d.ts +0 -220
- package/dist/abi/contractRegistry.abi.d.ts.map +0 -1
- package/dist/abi/contractRegistry.abi.js +0 -287
- package/dist/abi/contractRegistry.abi.js.map +0 -1
- package/dist/abi/corporateAccounts.abi.d.ts +0 -42
- package/dist/abi/corporateAccounts.abi.d.ts.map +0 -1
- package/dist/abi/corporateAccounts.abi.js +0 -34
- package/dist/abi/corporateAccounts.abi.js.map +0 -1
- package/dist/abi/erc20.abi.d.ts +0 -253
- package/dist/abi/erc20.abi.d.ts.map +0 -1
- package/dist/abi/erc20.abi.js +0 -98
- package/dist/abi/erc20.abi.js.map +0 -1
- package/dist/abi/executionDelayPolicy.abi.d.ts +0 -378
- package/dist/abi/executionDelayPolicy.abi.d.ts.map +0 -1
- package/dist/abi/executionDelayPolicy.abi.js +0 -502
- package/dist/abi/executionDelayPolicy.abi.js.map +0 -1
- package/dist/abi/fundsManagement.abi.d.ts +0 -54
- package/dist/abi/fundsManagement.abi.d.ts.map +0 -1
- package/dist/abi/fundsManagement.abi.js +0 -361
- package/dist/abi/fundsManagement.abi.js.map +0 -1
- package/dist/abi/index.d.ts +0 -11
- package/dist/abi/index.d.ts.map +0 -1
- package/dist/abi/index.js +0 -11
- package/dist/abi/index.js.map +0 -1
- package/dist/abi/signer.abi.d.ts +0 -20
- package/dist/abi/signer.abi.d.ts.map +0 -1
- package/dist/abi/signer.abi.js +0 -13
- package/dist/abi/signer.abi.js.map +0 -1
- package/dist/abi/synthetic.abi.d.ts +0 -2459
- package/dist/abi/synthetic.abi.d.ts.map +0 -1
- package/dist/abi/synthetic.abi.js +0 -1739
- package/dist/abi/synthetic.abi.js.map +0 -1
- package/dist/abi/tokenRegistry.abi.d.ts +0 -209
- package/dist/abi/tokenRegistry.abi.d.ts.map +0 -1
- package/dist/abi/tokenRegistry.abi.js +0 -117
- package/dist/abi/tokenRegistry.abi.js.map +0 -1
- package/dist/abi/yieldCalculator.abi.d.ts +0 -327
- package/dist/abi/yieldCalculator.abi.d.ts.map +0 -1
- package/dist/abi/yieldCalculator.abi.js +0 -2
- package/dist/abi/yieldCalculator.abi.js.map +0 -1
- package/dist/client.d.ts +0 -23
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -97
- package/dist/client.js.map +0 -1
- package/dist/core/config/config.service.d.ts +0 -18
- package/dist/core/config/config.service.d.ts.map +0 -1
- package/dist/core/config/config.service.js +0 -78
- package/dist/core/config/config.service.js.map +0 -1
- package/dist/core/config/index.d.ts +0 -4
- package/dist/core/config/index.d.ts.map +0 -1
- package/dist/core/config/index.js +0 -3
- package/dist/core/config/index.js.map +0 -1
- package/dist/core/config/types.d.ts +0 -40
- package/dist/core/config/types.d.ts.map +0 -1
- package/dist/core/config/types.js +0 -5
- package/dist/core/config/types.js.map +0 -1
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -63
- package/dist/core/errors.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/internal/http-client.d.ts +0 -40
- package/dist/core/internal/http-client.d.ts.map +0 -1
- package/dist/core/internal/http-client.js +0 -113
- package/dist/core/internal/http-client.js.map +0 -1
- package/dist/core/types.d.ts +0 -82
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -13
- package/dist/core/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/modules/api/api.module.d.ts +0 -21
- package/dist/modules/api/api.module.d.ts.map +0 -1
- package/dist/modules/api/api.module.js +0 -47
- package/dist/modules/api/api.module.js.map +0 -1
- package/dist/modules/api/baas/activity/activity.service.d.ts +0 -34
- package/dist/modules/api/baas/activity/activity.service.d.ts.map +0 -1
- package/dist/modules/api/baas/activity/activity.service.js +0 -61
- package/dist/modules/api/baas/activity/activity.service.js.map +0 -1
- package/dist/modules/api/baas/activity/index.d.ts +0 -3
- package/dist/modules/api/baas/activity/index.d.ts.map +0 -1
- package/dist/modules/api/baas/activity/index.js +0 -2
- package/dist/modules/api/baas/activity/index.js.map +0 -1
- package/dist/modules/api/baas/activity/types.d.ts +0 -166
- package/dist/modules/api/baas/activity/types.d.ts.map +0 -1
- package/dist/modules/api/baas/activity/types.js +0 -5
- package/dist/modules/api/baas/activity/types.js.map +0 -1
- package/dist/modules/api/baas/baas.module.d.ts +0 -41
- package/dist/modules/api/baas/baas.module.d.ts.map +0 -1
- package/dist/modules/api/baas/baas.module.js +0 -144
- package/dist/modules/api/baas/baas.module.js.map +0 -1
- package/dist/modules/api/baas/bank/bank.service.d.ts +0 -42
- package/dist/modules/api/baas/bank/bank.service.d.ts.map +0 -1
- package/dist/modules/api/baas/bank/bank.service.js +0 -75
- package/dist/modules/api/baas/bank/bank.service.js.map +0 -1
- package/dist/modules/api/baas/bank/index.d.ts +0 -3
- package/dist/modules/api/baas/bank/index.d.ts.map +0 -1
- package/dist/modules/api/baas/bank/index.js +0 -2
- package/dist/modules/api/baas/bank/index.js.map +0 -1
- package/dist/modules/api/baas/bank/types.d.ts +0 -116
- package/dist/modules/api/baas/bank/types.d.ts.map +0 -1
- package/dist/modules/api/baas/bank/types.js +0 -5
- package/dist/modules/api/baas/bank/types.js.map +0 -1
- package/dist/modules/api/baas/cards/cards.service.d.ts +0 -118
- package/dist/modules/api/baas/cards/cards.service.d.ts.map +0 -1
- package/dist/modules/api/baas/cards/cards.service.js +0 -254
- package/dist/modules/api/baas/cards/cards.service.js.map +0 -1
- package/dist/modules/api/baas/cards/index.d.ts +0 -3
- package/dist/modules/api/baas/cards/index.d.ts.map +0 -1
- package/dist/modules/api/baas/cards/index.js +0 -2
- package/dist/modules/api/baas/cards/index.js.map +0 -1
- package/dist/modules/api/baas/cards/types.d.ts +0 -249
- package/dist/modules/api/baas/cards/types.d.ts.map +0 -1
- package/dist/modules/api/baas/cards/types.js +0 -5
- package/dist/modules/api/baas/cards/types.js.map +0 -1
- package/dist/modules/api/baas/config/config.service.d.ts +0 -21
- package/dist/modules/api/baas/config/config.service.d.ts.map +0 -1
- package/dist/modules/api/baas/config/config.service.js +0 -22
- package/dist/modules/api/baas/config/config.service.js.map +0 -1
- package/dist/modules/api/baas/config/index.d.ts +0 -3
- package/dist/modules/api/baas/config/index.d.ts.map +0 -1
- package/dist/modules/api/baas/config/index.js +0 -2
- package/dist/modules/api/baas/config/index.js.map +0 -1
- package/dist/modules/api/baas/config/types.d.ts +0 -42
- package/dist/modules/api/baas/config/types.d.ts.map +0 -1
- package/dist/modules/api/baas/config/types.js +0 -2
- package/dist/modules/api/baas/config/types.js.map +0 -1
- package/dist/modules/api/baas/confirmation/confirmation.service.d.ts +0 -30
- package/dist/modules/api/baas/confirmation/confirmation.service.d.ts.map +0 -1
- package/dist/modules/api/baas/confirmation/confirmation.service.js +0 -39
- package/dist/modules/api/baas/confirmation/confirmation.service.js.map +0 -1
- package/dist/modules/api/baas/confirmation/index.d.ts +0 -3
- package/dist/modules/api/baas/confirmation/index.d.ts.map +0 -1
- package/dist/modules/api/baas/confirmation/index.js +0 -2
- package/dist/modules/api/baas/confirmation/index.js.map +0 -1
- package/dist/modules/api/baas/confirmation/types.d.ts +0 -30
- package/dist/modules/api/baas/confirmation/types.d.ts.map +0 -1
- package/dist/modules/api/baas/confirmation/types.js +0 -5
- package/dist/modules/api/baas/confirmation/types.js.map +0 -1
- package/dist/modules/api/baas/index.d.ts +0 -12
- package/dist/modules/api/baas/index.d.ts.map +0 -1
- package/dist/modules/api/baas/index.js +0 -12
- package/dist/modules/api/baas/index.js.map +0 -1
- package/dist/modules/api/baas/rates/index.d.ts +0 -3
- package/dist/modules/api/baas/rates/index.d.ts.map +0 -1
- package/dist/modules/api/baas/rates/index.js +0 -2
- package/dist/modules/api/baas/rates/index.js.map +0 -1
- package/dist/modules/api/baas/rates/rates.service.d.ts +0 -21
- package/dist/modules/api/baas/rates/rates.service.d.ts.map +0 -1
- package/dist/modules/api/baas/rates/rates.service.js +0 -25
- package/dist/modules/api/baas/rates/rates.service.js.map +0 -1
- package/dist/modules/api/baas/rates/types.d.ts +0 -12
- package/dist/modules/api/baas/rates/types.d.ts.map +0 -1
- package/dist/modules/api/baas/rates/types.js +0 -2
- package/dist/modules/api/baas/rates/types.js.map +0 -1
- package/dist/modules/api/baas/recipients/index.d.ts +0 -3
- package/dist/modules/api/baas/recipients/index.d.ts.map +0 -1
- package/dist/modules/api/baas/recipients/index.js +0 -2
- package/dist/modules/api/baas/recipients/index.js.map +0 -1
- package/dist/modules/api/baas/recipients/recipients.service.d.ts +0 -74
- package/dist/modules/api/baas/recipients/recipients.service.d.ts.map +0 -1
- package/dist/modules/api/baas/recipients/recipients.service.js +0 -190
- package/dist/modules/api/baas/recipients/recipients.service.js.map +0 -1
- package/dist/modules/api/baas/recipients/types.d.ts +0 -208
- package/dist/modules/api/baas/recipients/types.d.ts.map +0 -1
- package/dist/modules/api/baas/recipients/types.js +0 -5
- package/dist/modules/api/baas/recipients/types.js.map +0 -1
- package/dist/modules/api/baas/token/index.d.ts +0 -3
- package/dist/modules/api/baas/token/index.d.ts.map +0 -1
- package/dist/modules/api/baas/token/index.js +0 -2
- package/dist/modules/api/baas/token/index.js.map +0 -1
- package/dist/modules/api/baas/token/token.service.d.ts +0 -21
- package/dist/modules/api/baas/token/token.service.d.ts.map +0 -1
- package/dist/modules/api/baas/token/token.service.js +0 -22
- package/dist/modules/api/baas/token/token.service.js.map +0 -1
- package/dist/modules/api/baas/token/types.d.ts +0 -12
- package/dist/modules/api/baas/token/types.d.ts.map +0 -1
- package/dist/modules/api/baas/token/types.js +0 -2
- package/dist/modules/api/baas/token/types.js.map +0 -1
- package/dist/modules/api/baas/user/index.d.ts +0 -3
- package/dist/modules/api/baas/user/index.d.ts.map +0 -1
- package/dist/modules/api/baas/user/index.js +0 -2
- package/dist/modules/api/baas/user/index.js.map +0 -1
- package/dist/modules/api/baas/user/types.d.ts +0 -145
- package/dist/modules/api/baas/user/types.d.ts.map +0 -1
- package/dist/modules/api/baas/user/types.js +0 -5
- package/dist/modules/api/baas/user/types.js.map +0 -1
- package/dist/modules/api/baas/user/user.service.d.ts +0 -73
- package/dist/modules/api/baas/user/user.service.d.ts.map +0 -1
- package/dist/modules/api/baas/user/user.service.js +0 -140
- package/dist/modules/api/baas/user/user.service.js.map +0 -1
- package/dist/modules/api/baas/wallet/index.d.ts +0 -3
- package/dist/modules/api/baas/wallet/index.d.ts.map +0 -1
- package/dist/modules/api/baas/wallet/index.js +0 -2
- package/dist/modules/api/baas/wallet/index.js.map +0 -1
- package/dist/modules/api/baas/wallet/types.d.ts +0 -26
- package/dist/modules/api/baas/wallet/types.d.ts.map +0 -1
- package/dist/modules/api/baas/wallet/types.js +0 -5
- package/dist/modules/api/baas/wallet/types.js.map +0 -1
- package/dist/modules/api/baas/wallet/wallet.service.d.ts +0 -30
- package/dist/modules/api/baas/wallet/wallet.service.d.ts.map +0 -1
- package/dist/modules/api/baas/wallet/wallet.service.js +0 -43
- package/dist/modules/api/baas/wallet/wallet.service.js.map +0 -1
- package/dist/modules/api/index.d.ts.map +0 -1
- package/dist/modules/api/internal/endpoints/wallets.api.d.ts +0 -8
- package/dist/modules/api/internal/endpoints/wallets.api.d.ts.map +0 -1
- package/dist/modules/api/internal/endpoints/wallets.api.js +0 -9
- package/dist/modules/api/internal/endpoints/wallets.api.js.map +0 -1
- package/dist/modules/api/internal/endpoints/withdrawal.api.d.ts +0 -8
- package/dist/modules/api/internal/endpoints/withdrawal.api.d.ts.map +0 -1
- package/dist/modules/api/internal/endpoints/withdrawal.api.js +0 -10
- package/dist/modules/api/internal/endpoints/withdrawal.api.js.map +0 -1
- package/dist/modules/api/types/common.types.d.ts +0 -19
- package/dist/modules/api/types/common.types.d.ts.map +0 -1
- package/dist/modules/api/types/common.types.js +0 -2
- package/dist/modules/api/types/common.types.js.map +0 -1
- package/dist/modules/api/types/wallets.types.d.ts +0 -12
- package/dist/modules/api/types/wallets.types.d.ts.map +0 -1
- package/dist/modules/api/types/wallets.types.js +0 -2
- package/dist/modules/api/types/wallets.types.js.map +0 -1
- package/dist/modules/auth/auth.service.d.ts +0 -32
- package/dist/modules/auth/auth.service.d.ts.map +0 -1
- package/dist/modules/auth/auth.service.js +0 -182
- package/dist/modules/auth/auth.service.js.map +0 -1
- package/dist/modules/auth/index.d.ts +0 -3
- package/dist/modules/auth/index.d.ts.map +0 -1
- package/dist/modules/auth/index.js +0 -2
- package/dist/modules/auth/index.js.map +0 -1
- package/dist/modules/auth/types.d.ts +0 -82
- package/dist/modules/auth/types.d.ts.map +0 -1
- package/dist/modules/auth/types.js +0 -2
- package/dist/modules/auth/types.js.map +0 -1
- package/dist/modules/crypto/chains/base/account-abstraction.service.d.ts +0 -28
- package/dist/modules/crypto/chains/base/account-abstraction.service.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/account-abstraction.service.js +0 -173
- package/dist/modules/crypto/chains/base/account-abstraction.service.js.map +0 -1
- package/dist/modules/crypto/chains/base/account.contract.service.d.ts +0 -26
- package/dist/modules/crypto/chains/base/account.contract.service.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/account.contract.service.js +0 -109
- package/dist/modules/crypto/chains/base/account.contract.service.js.map +0 -1
- package/dist/modules/crypto/chains/base/crypto.service.d.ts +0 -32
- package/dist/modules/crypto/chains/base/crypto.service.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/crypto.service.js +0 -211
- package/dist/modules/crypto/chains/base/crypto.service.js.map +0 -1
- package/dist/modules/crypto/chains/base/index.d.ts +0 -6
- package/dist/modules/crypto/chains/base/index.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/index.js +0 -54
- package/dist/modules/crypto/chains/base/index.js.map +0 -1
- package/dist/modules/crypto/chains/base/wallet.service.d.ts +0 -53
- package/dist/modules/crypto/chains/base/wallet.service.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/wallet.service.js +0 -142
- package/dist/modules/crypto/chains/base/wallet.service.js.map +0 -1
- package/dist/modules/crypto/chains/base/yield.service.d.ts +0 -38
- package/dist/modules/crypto/chains/base/yield.service.d.ts.map +0 -1
- package/dist/modules/crypto/chains/base/yield.service.js +0 -297
- package/dist/modules/crypto/chains/base/yield.service.js.map +0 -1
- package/dist/modules/crypto/chains/index.d.ts +0 -5
- package/dist/modules/crypto/chains/index.d.ts.map +0 -1
- package/dist/modules/crypto/chains/index.js +0 -3
- package/dist/modules/crypto/chains/index.js.map +0 -1
- package/dist/modules/crypto/chains/registry.d.ts +0 -11
- package/dist/modules/crypto/chains/registry.d.ts.map +0 -1
- package/dist/modules/crypto/chains/registry.js +0 -19
- package/dist/modules/crypto/chains/registry.js.map +0 -1
- package/dist/modules/crypto/chains/types.d.ts +0 -37
- package/dist/modules/crypto/chains/types.d.ts.map +0 -1
- package/dist/modules/crypto/chains/types.js +0 -2
- package/dist/modules/crypto/chains/types.js.map +0 -1
- package/dist/modules/crypto/crypto.module.d.ts +0 -40
- package/dist/modules/crypto/crypto.module.d.ts.map +0 -1
- package/dist/modules/crypto/crypto.module.js +0 -127
- package/dist/modules/crypto/crypto.module.js.map +0 -1
- package/dist/modules/crypto/index.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/account-abstraction.interface.d.ts +0 -8
- package/dist/modules/crypto/interfaces/account-abstraction.interface.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/account-abstraction.interface.js +0 -2
- package/dist/modules/crypto/interfaces/account-abstraction.interface.js.map +0 -1
- package/dist/modules/crypto/interfaces/account-contract.interface.d.ts +0 -8
- package/dist/modules/crypto/interfaces/account-contract.interface.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/account-contract.interface.js +0 -2
- package/dist/modules/crypto/interfaces/account-contract.interface.js.map +0 -1
- package/dist/modules/crypto/interfaces/crypto.interface.d.ts +0 -50
- package/dist/modules/crypto/interfaces/crypto.interface.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/crypto.interface.js +0 -2
- package/dist/modules/crypto/interfaces/crypto.interface.js.map +0 -1
- package/dist/modules/crypto/interfaces/index.d.ts +0 -5
- package/dist/modules/crypto/interfaces/index.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/index.js +0 -2
- package/dist/modules/crypto/interfaces/index.js.map +0 -1
- package/dist/modules/crypto/interfaces/yield.interface.d.ts +0 -19
- package/dist/modules/crypto/interfaces/yield.interface.d.ts.map +0 -1
- package/dist/modules/crypto/interfaces/yield.interface.js +0 -2
- package/dist/modules/crypto/interfaces/yield.interface.js.map +0 -1
- package/dist/modules/crypto/internal/contract-registry.service.d.ts +0 -14
- package/dist/modules/crypto/internal/contract-registry.service.d.ts.map +0 -1
- package/dist/modules/crypto/internal/contract-registry.service.js +0 -76
- package/dist/modules/crypto/internal/contract-registry.service.js.map +0 -1
- package/dist/modules/crypto/internal/smartDepositWallet.service.d.ts +0 -39
- package/dist/modules/crypto/internal/smartDepositWallet.service.d.ts.map +0 -1
- package/dist/modules/crypto/internal/smartDepositWallet.service.js +0 -183
- package/dist/modules/crypto/internal/smartDepositWallet.service.js.map +0 -1
- package/dist/modules/crypto/types.d.ts +0 -47
- package/dist/modules/crypto/types.d.ts.map +0 -1
- package/dist/modules/crypto/types.js +0 -2
- package/dist/modules/crypto/types.js.map +0 -1
|
@@ -0,0 +1,1715 @@
|
|
|
1
|
+
import { c as HttpClient, L as Logger, i as SDKModule, e as ModuleContext } from './types-IKGr4nyf.js';
|
|
2
|
+
import { W as WithdrawalApi } from './withdrawal.api-DsvQPbRN.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Activity Feed endpoints - Types match API spec
|
|
6
|
+
*/
|
|
7
|
+
type ActivityType = 'Deposit' | 'Withdrawal' | 'Exchange' | 'Sepa' | 'FasterPayment' | 'AchPull' | 'AchPush' | 'Swift' | 'CardTransaction' | 'ExternalCardTransaction' | 'Crypto' | 'Spei' | 'CardFeesPayment' | 'YieldClaim' | 'CardTransfer' | 'Pix' | 'FpsHk' | 'Imps' | 'Instapay' | 'BiFast' | 'Nip' | 'Ipp' | 'Pse';
|
|
8
|
+
type ActivitySortOrder = 'name' | 'usage';
|
|
9
|
+
type ActivityStatus = 'Pending' | 'Completed' | 'Failed';
|
|
10
|
+
type ActivityDirection = 'Inbound' | 'Outbound' | 'Internal';
|
|
11
|
+
type ActivityStepType = 'Initiated' | 'CryptoIn' | 'CryptoOut' | 'BankIn' | 'BankOut' | 'CardIn' | 'CardOut' | 'Review' | 'Reversal' | 'Completed' | 'SyntheticWrap' | 'SyntheticUnwrap';
|
|
12
|
+
type ActivitySubjectType = 'Wallet' | 'Cards' | 'Merchant' | 'SepaBankAccount' | 'FasterPaymentBankAccount' | 'AchBankAccount' | 'SwiftBankAccount' | 'SpeiBankAccount' | 'ExternalCard' | 'ExternalWallet';
|
|
13
|
+
type ActivityRewardType = 'Cashback' | 'Bonus';
|
|
14
|
+
interface ActivityAmount {
|
|
15
|
+
amount: number;
|
|
16
|
+
currency?: string;
|
|
17
|
+
token_symbol?: string;
|
|
18
|
+
token_address?: string;
|
|
19
|
+
}
|
|
20
|
+
interface ActivityRate {
|
|
21
|
+
ticker: string;
|
|
22
|
+
rate: number;
|
|
23
|
+
}
|
|
24
|
+
interface ActivitySubjectWallet {
|
|
25
|
+
address: string;
|
|
26
|
+
}
|
|
27
|
+
interface ActivitySubjectCard {
|
|
28
|
+
id?: string;
|
|
29
|
+
pan_last?: string;
|
|
30
|
+
payment_system?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ActivitySubjectMerchant {
|
|
33
|
+
id?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
logo_url?: string;
|
|
36
|
+
website_url?: string;
|
|
37
|
+
phone_number?: string;
|
|
38
|
+
full_address?: string;
|
|
39
|
+
latitude?: string;
|
|
40
|
+
longitude?: string;
|
|
41
|
+
category?: string;
|
|
42
|
+
}
|
|
43
|
+
interface ActivitySubjectBankAccount {
|
|
44
|
+
account_number?: string;
|
|
45
|
+
sort_code?: string;
|
|
46
|
+
routing_number?: string;
|
|
47
|
+
iban?: string;
|
|
48
|
+
bic?: string;
|
|
49
|
+
owner_name?: string;
|
|
50
|
+
is_business?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface ActivitySubject {
|
|
53
|
+
type?: ActivitySubjectType;
|
|
54
|
+
wallet?: ActivitySubjectWallet;
|
|
55
|
+
card?: ActivitySubjectCard;
|
|
56
|
+
merchant?: ActivitySubjectMerchant;
|
|
57
|
+
bank_account?: ActivitySubjectBankAccount;
|
|
58
|
+
}
|
|
59
|
+
interface ActivityStep {
|
|
60
|
+
created_at: string;
|
|
61
|
+
completed_at?: string;
|
|
62
|
+
status: ActivityStatus;
|
|
63
|
+
status_reason?: string;
|
|
64
|
+
type: ActivityStepType;
|
|
65
|
+
}
|
|
66
|
+
interface ActivityRecipient {
|
|
67
|
+
id?: string;
|
|
68
|
+
name: string;
|
|
69
|
+
}
|
|
70
|
+
interface ActivityReward {
|
|
71
|
+
id?: string;
|
|
72
|
+
amount?: ActivityAmount;
|
|
73
|
+
destination?: ActivitySubject;
|
|
74
|
+
status?: string;
|
|
75
|
+
type?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ActivityOperation {
|
|
78
|
+
hash: string;
|
|
79
|
+
operation_amount: ActivityAmount;
|
|
80
|
+
transaction_amount: ActivityAmount;
|
|
81
|
+
rate?: ActivityRate;
|
|
82
|
+
}
|
|
83
|
+
interface ActivityItem {
|
|
84
|
+
id: string;
|
|
85
|
+
created_at: string;
|
|
86
|
+
user_address?: string;
|
|
87
|
+
source: ActivitySubject;
|
|
88
|
+
destination: ActivitySubject;
|
|
89
|
+
source_amount?: ActivityAmount;
|
|
90
|
+
destination_amount?: ActivityAmount;
|
|
91
|
+
direction: ActivityDirection;
|
|
92
|
+
status: ActivityStatus;
|
|
93
|
+
status_reason?: string;
|
|
94
|
+
sub_type?: string;
|
|
95
|
+
type: ActivityType;
|
|
96
|
+
rate?: ActivityRate;
|
|
97
|
+
reference?: string;
|
|
98
|
+
activity_steps?: ActivityStep[];
|
|
99
|
+
operations?: ActivityOperation[];
|
|
100
|
+
recipient?: ActivityRecipient;
|
|
101
|
+
reward?: ActivityReward;
|
|
102
|
+
}
|
|
103
|
+
interface StatementBalance {
|
|
104
|
+
opening?: number;
|
|
105
|
+
closing?: number;
|
|
106
|
+
debit?: number;
|
|
107
|
+
credit?: number;
|
|
108
|
+
currency?: string;
|
|
109
|
+
}
|
|
110
|
+
interface StatementPeriod {
|
|
111
|
+
start: number;
|
|
112
|
+
end: number;
|
|
113
|
+
}
|
|
114
|
+
interface StatementTransaction {
|
|
115
|
+
amount?: number;
|
|
116
|
+
created_at?: number;
|
|
117
|
+
[key: string]: unknown;
|
|
118
|
+
}
|
|
119
|
+
interface StatementUserData {
|
|
120
|
+
legal_name?: string;
|
|
121
|
+
residence_address?: string;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
interface StatementBankAccountsResponse {
|
|
125
|
+
data?: unknown[];
|
|
126
|
+
}
|
|
127
|
+
interface GetActivityFeedRequest {
|
|
128
|
+
page_number?: number;
|
|
129
|
+
page_size?: number;
|
|
130
|
+
sort?: ActivitySortOrder;
|
|
131
|
+
/** Filter by subject (wallet address, card ID, or account reference). Do not use together with types. */
|
|
132
|
+
subject?: string;
|
|
133
|
+
/** Filter by activity types. Do not use together with subject. */
|
|
134
|
+
types?: ActivityType[];
|
|
135
|
+
}
|
|
136
|
+
interface GetActivityByIdRequest {
|
|
137
|
+
id: string;
|
|
138
|
+
}
|
|
139
|
+
interface GetFullStatementRequest {
|
|
140
|
+
start: number;
|
|
141
|
+
end: number;
|
|
142
|
+
}
|
|
143
|
+
interface ActivityFeedResponse {
|
|
144
|
+
data: ActivityItem[];
|
|
145
|
+
}
|
|
146
|
+
interface ActivityFullStatementResponse {
|
|
147
|
+
balances?: StatementBalance[];
|
|
148
|
+
chain_id?: number;
|
|
149
|
+
created_at?: number;
|
|
150
|
+
owner?: string;
|
|
151
|
+
period?: StatementPeriod;
|
|
152
|
+
transactions?: StatementTransaction[];
|
|
153
|
+
user_bank_accounts?: StatementBankAccountsResponse;
|
|
154
|
+
user_data?: StatementUserData;
|
|
155
|
+
}
|
|
156
|
+
interface RequestedErcWithdrawalResponse {
|
|
157
|
+
account_address: string;
|
|
158
|
+
amount: number;
|
|
159
|
+
call_data: string;
|
|
160
|
+
hash: string;
|
|
161
|
+
to_address: string;
|
|
162
|
+
token_address: string;
|
|
163
|
+
valid_after: string;
|
|
164
|
+
valid_before: string;
|
|
165
|
+
}
|
|
166
|
+
interface RequestedErcWithdrawalsResponse {
|
|
167
|
+
data: RequestedErcWithdrawalResponse[];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface PrivyAuth {
|
|
171
|
+
accessToken: string;
|
|
172
|
+
identityToken: string;
|
|
173
|
+
}
|
|
174
|
+
interface LoginUserParams {
|
|
175
|
+
privy?: PrivyAuth;
|
|
176
|
+
authorizationToken?: string;
|
|
177
|
+
userWallet?: string;
|
|
178
|
+
}
|
|
179
|
+
interface LoginCompanyParams {
|
|
180
|
+
privy?: PrivyAuth;
|
|
181
|
+
authorizationToken?: string;
|
|
182
|
+
/** Required for Privy auth. Optional for partner token auth. */
|
|
183
|
+
companyAddress?: string;
|
|
184
|
+
}
|
|
185
|
+
interface UserProfile {
|
|
186
|
+
date_of_birth: string;
|
|
187
|
+
email: string;
|
|
188
|
+
first_name: string;
|
|
189
|
+
last_name: string;
|
|
190
|
+
nationality: string;
|
|
191
|
+
phone_number: string;
|
|
192
|
+
}
|
|
193
|
+
interface ResidenceAddress {
|
|
194
|
+
city: string;
|
|
195
|
+
country: string;
|
|
196
|
+
line1: string;
|
|
197
|
+
line2?: string;
|
|
198
|
+
post_code: string;
|
|
199
|
+
state?: string;
|
|
200
|
+
}
|
|
201
|
+
interface InitialData {
|
|
202
|
+
profile: UserProfile;
|
|
203
|
+
residence_address: ResidenceAddress;
|
|
204
|
+
}
|
|
205
|
+
interface RegisterUserParams {
|
|
206
|
+
privy?: PrivyAuth;
|
|
207
|
+
authorizationToken?: string;
|
|
208
|
+
userWallet?: string;
|
|
209
|
+
country: string;
|
|
210
|
+
initialData?: InitialData;
|
|
211
|
+
}
|
|
212
|
+
interface RegisterCompanyParams {
|
|
213
|
+
privy?: PrivyAuth;
|
|
214
|
+
authorizationToken?: string;
|
|
215
|
+
companyAddress: string;
|
|
216
|
+
companyName: string;
|
|
217
|
+
registrationCountry: string;
|
|
218
|
+
registrationNumber: string;
|
|
219
|
+
}
|
|
220
|
+
interface AuthResponse {
|
|
221
|
+
access_token: string;
|
|
222
|
+
expires_at: number;
|
|
223
|
+
}
|
|
224
|
+
interface RegisterUserResponse {
|
|
225
|
+
id: string;
|
|
226
|
+
}
|
|
227
|
+
interface ValidateUserParams {
|
|
228
|
+
privy: PrivyAuth;
|
|
229
|
+
email?: string;
|
|
230
|
+
phoneNumber?: string;
|
|
231
|
+
}
|
|
232
|
+
interface ValidateUserResponse {
|
|
233
|
+
valid: boolean;
|
|
234
|
+
errors?: string[];
|
|
235
|
+
}
|
|
236
|
+
interface SendVerificationLinkRequest {
|
|
237
|
+
email: string;
|
|
238
|
+
}
|
|
239
|
+
interface VerifyTokenRequest {
|
|
240
|
+
token: string;
|
|
241
|
+
}
|
|
242
|
+
interface VerifyTokenResponse {
|
|
243
|
+
valid: boolean;
|
|
244
|
+
userId?: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare class AuthService {
|
|
248
|
+
private static instance;
|
|
249
|
+
private readonly httpClient;
|
|
250
|
+
private readonly logger?;
|
|
251
|
+
private readonly chainId;
|
|
252
|
+
private state;
|
|
253
|
+
private constructor();
|
|
254
|
+
static initialize(config: {
|
|
255
|
+
httpClient: HttpClient;
|
|
256
|
+
chainId: number;
|
|
257
|
+
logger?: Logger;
|
|
258
|
+
}): AuthService;
|
|
259
|
+
static getInstance(): AuthService;
|
|
260
|
+
static resetInstance(): void;
|
|
261
|
+
static buildAuthHeaders(params: LoginUserParams): Record<string, string>;
|
|
262
|
+
login(params: LoginUserParams): Promise<AuthResponse>;
|
|
263
|
+
loginCompany(params: LoginCompanyParams): Promise<AuthResponse>;
|
|
264
|
+
registerUser(params: RegisterUserParams): Promise<RegisterUserResponse>;
|
|
265
|
+
registerCompany(params: RegisterCompanyParams): Promise<void>;
|
|
266
|
+
setAuthState(response: AuthResponse, userWallet?: string): void;
|
|
267
|
+
setUserWallet(wallet: string): void;
|
|
268
|
+
getAccessToken(): string | null;
|
|
269
|
+
isAuthenticated(): boolean;
|
|
270
|
+
getUserWallet(): string | null;
|
|
271
|
+
private isTokenExpired;
|
|
272
|
+
clearAuth(): void;
|
|
273
|
+
ensureAuthenticated(): void;
|
|
274
|
+
getAuthHeaders(): Record<string, string>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Activity Service – activity feed and statement endpoints.
|
|
279
|
+
* Auth is handled by HttpClient (no per-call auth or headers).
|
|
280
|
+
*/
|
|
281
|
+
declare class ActivityService {
|
|
282
|
+
private readonly httpClient;
|
|
283
|
+
private readonly authService;
|
|
284
|
+
private readonly logger?;
|
|
285
|
+
constructor(config: {
|
|
286
|
+
httpClient: HttpClient;
|
|
287
|
+
authService: AuthService;
|
|
288
|
+
logger?: Logger;
|
|
289
|
+
});
|
|
290
|
+
/**
|
|
291
|
+
* Retrieves activity feed with optional pagination and filters.
|
|
292
|
+
*/
|
|
293
|
+
getFeed(request?: GetActivityFeedRequest): Promise<ActivityFeedResponse>;
|
|
294
|
+
/**
|
|
295
|
+
* Retrieves a single activity item by id.
|
|
296
|
+
*/
|
|
297
|
+
getById(request: GetActivityByIdRequest): Promise<ActivityItem>;
|
|
298
|
+
/**
|
|
299
|
+
* Retrieves full statement for the given date range (Unix timestamps).
|
|
300
|
+
*/
|
|
301
|
+
getFullStatement(request: GetFullStatementRequest): Promise<ActivityFullStatementResponse>;
|
|
302
|
+
/**
|
|
303
|
+
* Retrieves requested ERC withdrawals for the authenticated account.
|
|
304
|
+
*/
|
|
305
|
+
getRequestedErcWithdrawals(): Promise<RequestedErcWithdrawalsResponse>;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Bank endpoints - Types match API spec
|
|
310
|
+
*/
|
|
311
|
+
type BankAccountType = 'Sepa' | 'Swift' | 'FasterPayment' | 'Ach' | 'Spei';
|
|
312
|
+
type BankAccountStatus = 'Active' | 'Pending' | 'Blocked' | 'Closed';
|
|
313
|
+
type BankSortOrder = 'name' | 'usage';
|
|
314
|
+
interface LegalAddress {
|
|
315
|
+
city: string;
|
|
316
|
+
country: string;
|
|
317
|
+
line1: string;
|
|
318
|
+
line2?: string;
|
|
319
|
+
state?: string;
|
|
320
|
+
zip_code: string;
|
|
321
|
+
}
|
|
322
|
+
interface RecipientInfo {
|
|
323
|
+
first_name?: string;
|
|
324
|
+
last_name?: string;
|
|
325
|
+
company_name?: string;
|
|
326
|
+
}
|
|
327
|
+
interface RecipientAccount {
|
|
328
|
+
account_number?: string;
|
|
329
|
+
sort_code?: string;
|
|
330
|
+
routing_number?: string;
|
|
331
|
+
iban?: string;
|
|
332
|
+
bic?: string;
|
|
333
|
+
clabe?: string;
|
|
334
|
+
bank_name?: string;
|
|
335
|
+
legal_address?: LegalAddress;
|
|
336
|
+
}
|
|
337
|
+
interface BankAccountDetails {
|
|
338
|
+
account_number?: string;
|
|
339
|
+
sort_code?: string;
|
|
340
|
+
routing_number?: string;
|
|
341
|
+
iban?: string;
|
|
342
|
+
bic?: string;
|
|
343
|
+
clabe?: string;
|
|
344
|
+
mandatory_reference?: string;
|
|
345
|
+
}
|
|
346
|
+
interface EstimatedAmount {
|
|
347
|
+
amount: number;
|
|
348
|
+
precise_amount: string;
|
|
349
|
+
token_address: string;
|
|
350
|
+
token_symbol: string;
|
|
351
|
+
rate: number;
|
|
352
|
+
}
|
|
353
|
+
interface GetBankAccountsRequest {
|
|
354
|
+
page_number?: number;
|
|
355
|
+
page_size?: number;
|
|
356
|
+
sort?: BankSortOrder;
|
|
357
|
+
}
|
|
358
|
+
interface ActivateBankAccountRequest {
|
|
359
|
+
account_type: BankAccountType;
|
|
360
|
+
}
|
|
361
|
+
interface EstimateTransferRequest {
|
|
362
|
+
account_id: string;
|
|
363
|
+
amount: number;
|
|
364
|
+
tokens?: string[];
|
|
365
|
+
}
|
|
366
|
+
interface ExecuteTransferRequest {
|
|
367
|
+
account_id: string;
|
|
368
|
+
token_address: string;
|
|
369
|
+
recipient: RecipientInfo;
|
|
370
|
+
recipient_account: RecipientAccount;
|
|
371
|
+
reference?: string;
|
|
372
|
+
amount?: number;
|
|
373
|
+
estimation_id?: string;
|
|
374
|
+
}
|
|
375
|
+
interface CorridorEstimateRequest {
|
|
376
|
+
account_id?: string;
|
|
377
|
+
corridor: string;
|
|
378
|
+
destination_amount: number;
|
|
379
|
+
destination_currency?: string;
|
|
380
|
+
recipient_id: string;
|
|
381
|
+
recipient_payment_details_id: string;
|
|
382
|
+
source_tokens?: string[];
|
|
383
|
+
}
|
|
384
|
+
interface CorridorTransferRequest {
|
|
385
|
+
corridor: string;
|
|
386
|
+
estimation_id: string;
|
|
387
|
+
sourceTokenAddress: string;
|
|
388
|
+
}
|
|
389
|
+
interface BankAccount {
|
|
390
|
+
id: string;
|
|
391
|
+
currency: string;
|
|
392
|
+
status: BankAccountStatus;
|
|
393
|
+
account_holder?: string;
|
|
394
|
+
account_type: BankAccountType;
|
|
395
|
+
details?: BankAccountDetails;
|
|
396
|
+
}
|
|
397
|
+
interface BankAccountsResponse {
|
|
398
|
+
data: BankAccount[];
|
|
399
|
+
}
|
|
400
|
+
interface ActivateBankAccountResponse {
|
|
401
|
+
details_id: string;
|
|
402
|
+
}
|
|
403
|
+
interface EstimateTransferResponse {
|
|
404
|
+
id: string;
|
|
405
|
+
expires_at: number;
|
|
406
|
+
amount: number;
|
|
407
|
+
currency: string;
|
|
408
|
+
estimated_amounts: EstimatedAmount[];
|
|
409
|
+
}
|
|
410
|
+
interface ExecuteTransferResponse {
|
|
411
|
+
id: string;
|
|
412
|
+
}
|
|
413
|
+
interface BankCorridorEstimateResponse {
|
|
414
|
+
amount: number;
|
|
415
|
+
currency: string;
|
|
416
|
+
estimated_amounts: EstimatedAmount[];
|
|
417
|
+
expires_at: number;
|
|
418
|
+
id: string;
|
|
419
|
+
}
|
|
420
|
+
interface BankCorridorExecuteResponse {
|
|
421
|
+
id: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Bank Service – bank accounts and transfer endpoints.
|
|
426
|
+
* Auth is handled by HttpClient (no per-call auth or headers).
|
|
427
|
+
*/
|
|
428
|
+
declare class BankService {
|
|
429
|
+
private readonly httpClient;
|
|
430
|
+
private readonly authService;
|
|
431
|
+
private readonly logger?;
|
|
432
|
+
constructor(config: {
|
|
433
|
+
httpClient: HttpClient;
|
|
434
|
+
authService: AuthService;
|
|
435
|
+
logger?: Logger;
|
|
436
|
+
});
|
|
437
|
+
/**
|
|
438
|
+
* Retrieves a list of bank accounts that belong to the user.
|
|
439
|
+
*/
|
|
440
|
+
getAccounts(request?: GetBankAccountsRequest): Promise<BankAccountsResponse>;
|
|
441
|
+
/**
|
|
442
|
+
* Activates bank account details for the specified account type.
|
|
443
|
+
*/
|
|
444
|
+
activateAccount(request: ActivateBankAccountRequest): Promise<ActivateBankAccountResponse>;
|
|
445
|
+
/**
|
|
446
|
+
* Estimates the amounts that would be charged for a bank transfer according to the current market rates.
|
|
447
|
+
*/
|
|
448
|
+
estimateTransfer(request: EstimateTransferRequest): Promise<EstimateTransferResponse>;
|
|
449
|
+
/**
|
|
450
|
+
* Executes the bank transfer either according to the estimation made previously or using current market rates.
|
|
451
|
+
*/
|
|
452
|
+
executeTransfer(request: ExecuteTransferRequest): Promise<ExecuteTransferResponse>;
|
|
453
|
+
/**
|
|
454
|
+
* Estimates the amounts for a bank transfer via specified corridor.
|
|
455
|
+
*/
|
|
456
|
+
estimateCorridorTransferV2(corridor: string, request: CorridorEstimateRequest): Promise<BankCorridorEstimateResponse>;
|
|
457
|
+
/**
|
|
458
|
+
* Executes transfer using estimation_id. All recipient details resolved from stored estimation.
|
|
459
|
+
*/
|
|
460
|
+
executeCorridorTransferV2(corridor: string, request: CorridorTransferRequest): Promise<BankCorridorExecuteResponse>;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Cards endpoints - Types match API spec
|
|
465
|
+
*/
|
|
466
|
+
type CardSortOrder = 'name' | 'usage';
|
|
467
|
+
type CardActionType = 'Activate' | 'Block' | 'Unblock' | 'Close' | 'SetLimit' | 'GetDetails' | 'GetCvv' | 'GetPin' | 'SetActiveBalance';
|
|
468
|
+
type CardFormat = 'Plastic' | 'Virtual' | 'Metal';
|
|
469
|
+
type CardGeneration = 'Gen1' | 'Gen2';
|
|
470
|
+
type CardPaymentSystem = 'Visa' | 'MasterCard';
|
|
471
|
+
type CardProvider = 'Wirex' | 'Bridge';
|
|
472
|
+
type CardStatus = 'Requested' | 'NotActivated' | 'Active' | 'Closed' | 'Blocked';
|
|
473
|
+
type CardTransactionDirection = 'Inbound' | 'Outbound';
|
|
474
|
+
type CardTransactionStatus = 'Pending' | 'Completed' | 'Failed';
|
|
475
|
+
type CardTransactionType = 'POS' | 'ePOS' | 'ATM';
|
|
476
|
+
interface GetCardsRequest {
|
|
477
|
+
page_number?: number;
|
|
478
|
+
page_size?: number;
|
|
479
|
+
sort?: CardSortOrder;
|
|
480
|
+
}
|
|
481
|
+
interface GetCardTransactionsRequest {
|
|
482
|
+
page_number?: number;
|
|
483
|
+
page_size?: number;
|
|
484
|
+
sort?: CardSortOrder;
|
|
485
|
+
}
|
|
486
|
+
interface CardActivateRequestBody {
|
|
487
|
+
card_number_last4: string;
|
|
488
|
+
expiry_date: string;
|
|
489
|
+
}
|
|
490
|
+
interface CardDeliveryAddress {
|
|
491
|
+
city: string;
|
|
492
|
+
country: string;
|
|
493
|
+
line1: string;
|
|
494
|
+
line2?: string;
|
|
495
|
+
state?: string;
|
|
496
|
+
zip_code: string;
|
|
497
|
+
}
|
|
498
|
+
interface CardDetailsGetCvvRequestBody {
|
|
499
|
+
action_token: string;
|
|
500
|
+
}
|
|
501
|
+
interface CardDetailsGetDetailsRequestBody {
|
|
502
|
+
action_token: string;
|
|
503
|
+
}
|
|
504
|
+
interface CardDetailsGetPinRequestBody {
|
|
505
|
+
action_token: string;
|
|
506
|
+
}
|
|
507
|
+
interface CardFeesCreateInvoiceRequestBody {
|
|
508
|
+
/**
|
|
509
|
+
* Courier type that should be used to deliver the card
|
|
510
|
+
* MUST be present if card type IS NOT Virtual
|
|
511
|
+
*/
|
|
512
|
+
delivery_provider?: string;
|
|
513
|
+
token_address: string;
|
|
514
|
+
}
|
|
515
|
+
interface CardIssuePlasticRequest {
|
|
516
|
+
card_name?: string;
|
|
517
|
+
delivery_address: CardDeliveryAddress;
|
|
518
|
+
delivery_provider?: string;
|
|
519
|
+
name_on_card?: string;
|
|
520
|
+
/**
|
|
521
|
+
* Transaction hash in bounds of which the card issuance fees were paid
|
|
522
|
+
* MUST be provided in case order/delivery fees are in place
|
|
523
|
+
*/
|
|
524
|
+
payment_transaction_hash?: string;
|
|
525
|
+
}
|
|
526
|
+
interface CardIssueVirtualRequest {
|
|
527
|
+
card_name?: string;
|
|
528
|
+
name_on_card?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Transaction hash in bounds of which the card issuance fees were paid
|
|
531
|
+
* MUST be provided in case order/delivery fees are in place
|
|
532
|
+
*/
|
|
533
|
+
payment_transaction_hash?: string;
|
|
534
|
+
}
|
|
535
|
+
interface CardLimitChangeRequestBody {
|
|
536
|
+
limit: number;
|
|
537
|
+
}
|
|
538
|
+
interface CardNameChangeRequestBody {
|
|
539
|
+
name: string;
|
|
540
|
+
}
|
|
541
|
+
interface CardTransferEstimateRequest {
|
|
542
|
+
amount: number;
|
|
543
|
+
currency?: string;
|
|
544
|
+
external_card_id: string;
|
|
545
|
+
tokens: string[];
|
|
546
|
+
}
|
|
547
|
+
interface CardTransferExecuteRequest {
|
|
548
|
+
estimation_id: string;
|
|
549
|
+
token_address: string;
|
|
550
|
+
}
|
|
551
|
+
interface CardWithdrawalEstimateRequestBody {
|
|
552
|
+
amount: number;
|
|
553
|
+
correlation_id: string;
|
|
554
|
+
currency: string;
|
|
555
|
+
destinationAddress: string;
|
|
556
|
+
}
|
|
557
|
+
interface CardWithdrawalExecuteRequestBody {
|
|
558
|
+
estimation_id: string;
|
|
559
|
+
}
|
|
560
|
+
interface CardAction {
|
|
561
|
+
relative_path: string;
|
|
562
|
+
type: CardActionType;
|
|
563
|
+
}
|
|
564
|
+
interface CardBalance {
|
|
565
|
+
balance: number;
|
|
566
|
+
is_active: boolean;
|
|
567
|
+
reference_balance: number;
|
|
568
|
+
reference_currency: string;
|
|
569
|
+
token_address: string;
|
|
570
|
+
token_symbol: string;
|
|
571
|
+
}
|
|
572
|
+
interface CardData {
|
|
573
|
+
card_name: string;
|
|
574
|
+
card_number_first_4?: string;
|
|
575
|
+
card_number_last_4?: string;
|
|
576
|
+
expiry_date?: string;
|
|
577
|
+
format: CardFormat;
|
|
578
|
+
name_on_card: string;
|
|
579
|
+
payment_system: CardPaymentSystem;
|
|
580
|
+
}
|
|
581
|
+
interface DeliveryAddress {
|
|
582
|
+
city: string;
|
|
583
|
+
country: string;
|
|
584
|
+
line1: string;
|
|
585
|
+
line2?: string;
|
|
586
|
+
state?: string;
|
|
587
|
+
zip_code: string;
|
|
588
|
+
}
|
|
589
|
+
interface CardLimit {
|
|
590
|
+
currency: string;
|
|
591
|
+
daily_limit: number;
|
|
592
|
+
daily_usage: number;
|
|
593
|
+
}
|
|
594
|
+
interface EstimatedAmountResponse {
|
|
595
|
+
amount: number;
|
|
596
|
+
precise_amount: string;
|
|
597
|
+
rate: number;
|
|
598
|
+
token_address: string;
|
|
599
|
+
token_symbol: string;
|
|
600
|
+
}
|
|
601
|
+
interface CardResponse {
|
|
602
|
+
allowed_actions: CardAction[];
|
|
603
|
+
balances?: CardBalance[];
|
|
604
|
+
card_data: CardData;
|
|
605
|
+
card_wallet_address: string;
|
|
606
|
+
created_at: string;
|
|
607
|
+
delivery_address?: DeliveryAddress;
|
|
608
|
+
generation: CardGeneration;
|
|
609
|
+
id: string;
|
|
610
|
+
limit?: CardLimit;
|
|
611
|
+
previous_status?: CardStatus;
|
|
612
|
+
provider: CardProvider;
|
|
613
|
+
status: CardStatus;
|
|
614
|
+
status_reason?: string;
|
|
615
|
+
updated_at?: string;
|
|
616
|
+
}
|
|
617
|
+
interface CardsResponse {
|
|
618
|
+
data: CardResponse[];
|
|
619
|
+
}
|
|
620
|
+
interface CardDeliveryMethod {
|
|
621
|
+
currency: string;
|
|
622
|
+
estimated_payment_amounts?: EstimatedAmountResponse[];
|
|
623
|
+
fee: number;
|
|
624
|
+
provider: string;
|
|
625
|
+
}
|
|
626
|
+
interface CardDetailsCvvResponse {
|
|
627
|
+
cvv: string;
|
|
628
|
+
}
|
|
629
|
+
interface CardDetailsPanExpiryResponse {
|
|
630
|
+
card_number: string;
|
|
631
|
+
expiry_date: string;
|
|
632
|
+
}
|
|
633
|
+
interface CardDetailsPinResponse {
|
|
634
|
+
pin: string;
|
|
635
|
+
}
|
|
636
|
+
interface CardFeesInvoiceResponse {
|
|
637
|
+
payment_amount: EstimatedAmountResponse;
|
|
638
|
+
recipient_address: string;
|
|
639
|
+
}
|
|
640
|
+
interface CardFeesOrderResponse {
|
|
641
|
+
currency: string;
|
|
642
|
+
estimated_payment_amounts?: EstimatedAmountResponse[];
|
|
643
|
+
order_fee: number;
|
|
644
|
+
}
|
|
645
|
+
interface CardIssueResponse {
|
|
646
|
+
id: string;
|
|
647
|
+
}
|
|
648
|
+
interface CardTransactionConfirmationResponse {
|
|
649
|
+
amount: string;
|
|
650
|
+
card_id: string;
|
|
651
|
+
card_last_4: string;
|
|
652
|
+
currency: string;
|
|
653
|
+
merchant_name: string;
|
|
654
|
+
owner: string;
|
|
655
|
+
transaction_id: string;
|
|
656
|
+
}
|
|
657
|
+
interface CardTransactionResponseCardAmount {
|
|
658
|
+
amount: number;
|
|
659
|
+
currency: string;
|
|
660
|
+
}
|
|
661
|
+
interface CardTransactionResponseMerchantAmount {
|
|
662
|
+
amount: number;
|
|
663
|
+
currency: string;
|
|
664
|
+
}
|
|
665
|
+
interface CardTransactionResponseMerchantDetails {
|
|
666
|
+
full_address?: string;
|
|
667
|
+
latitude?: string;
|
|
668
|
+
logo_url?: string;
|
|
669
|
+
longitude?: string;
|
|
670
|
+
name: string;
|
|
671
|
+
website?: string;
|
|
672
|
+
}
|
|
673
|
+
interface CardTransactionResponse {
|
|
674
|
+
card_amount?: CardTransactionResponseCardAmount;
|
|
675
|
+
card_id: string;
|
|
676
|
+
comment?: string;
|
|
677
|
+
created_at: string;
|
|
678
|
+
direction: CardTransactionDirection;
|
|
679
|
+
id: string;
|
|
680
|
+
merchant_amount?: CardTransactionResponseMerchantAmount;
|
|
681
|
+
merchant_details?: CardTransactionResponseMerchantDetails;
|
|
682
|
+
status: CardTransactionStatus;
|
|
683
|
+
status_reason?: string;
|
|
684
|
+
type: CardTransactionType;
|
|
685
|
+
updated_at?: string;
|
|
686
|
+
}
|
|
687
|
+
interface CardTransactionsResponse {
|
|
688
|
+
data: CardTransactionResponse[];
|
|
689
|
+
}
|
|
690
|
+
interface CardTransferEstimateResponse {
|
|
691
|
+
amount: number;
|
|
692
|
+
currency: string;
|
|
693
|
+
estimated_amounts: EstimatedAmountResponse[];
|
|
694
|
+
estimation_id: string;
|
|
695
|
+
expires_at: number;
|
|
696
|
+
fee_amount: number;
|
|
697
|
+
}
|
|
698
|
+
interface CardTransferExecuteResponse {
|
|
699
|
+
id: string;
|
|
700
|
+
}
|
|
701
|
+
interface CardWithdrawalEstimateResponse {
|
|
702
|
+
amount: number;
|
|
703
|
+
currency: string;
|
|
704
|
+
estimation_id: string;
|
|
705
|
+
expires_at: number;
|
|
706
|
+
fee_amount: number;
|
|
707
|
+
}
|
|
708
|
+
interface CardWithdrawalExecuteResponse {
|
|
709
|
+
id: string;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
interface ApiResponse<T> {
|
|
713
|
+
data: T;
|
|
714
|
+
success: boolean;
|
|
715
|
+
message?: string;
|
|
716
|
+
}
|
|
717
|
+
interface PaginatedResponse<T> {
|
|
718
|
+
data: T[];
|
|
719
|
+
total: number;
|
|
720
|
+
page: number;
|
|
721
|
+
limit: number;
|
|
722
|
+
hasMore: boolean;
|
|
723
|
+
}
|
|
724
|
+
interface ApiError {
|
|
725
|
+
code: string;
|
|
726
|
+
message: string;
|
|
727
|
+
details?: Record<string, unknown>;
|
|
728
|
+
}
|
|
729
|
+
type EmptyResponse = Record<string, never>;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Cards Service – card issuance, management, and transfers.
|
|
733
|
+
*/
|
|
734
|
+
declare class CardsService {
|
|
735
|
+
private readonly httpClient;
|
|
736
|
+
private readonly authService;
|
|
737
|
+
private readonly logger?;
|
|
738
|
+
constructor(config: {
|
|
739
|
+
httpClient: HttpClient;
|
|
740
|
+
authService: AuthService;
|
|
741
|
+
logger?: Logger;
|
|
742
|
+
});
|
|
743
|
+
/**
|
|
744
|
+
* Retrieves list of cards that belong to the user.
|
|
745
|
+
*/
|
|
746
|
+
getCards(request?: GetCardsRequest): Promise<CardsResponse>;
|
|
747
|
+
/**
|
|
748
|
+
* Retrieves a page of card transactions associated with the user.
|
|
749
|
+
*/
|
|
750
|
+
getCardTransactions(request?: GetCardTransactionsRequest): Promise<CardTransactionsResponse>;
|
|
751
|
+
/**
|
|
752
|
+
* Retrieves single card by its id.
|
|
753
|
+
*/
|
|
754
|
+
getCard(cardId: string): Promise<CardResponse>;
|
|
755
|
+
/**
|
|
756
|
+
* Retrieves active 3DS requests that need to be either approved or declined.
|
|
757
|
+
*/
|
|
758
|
+
getActive3dsRequests(): Promise<CardTransactionConfirmationResponse[]>;
|
|
759
|
+
/**
|
|
760
|
+
* Approves 3DS request allowing the transaction to proceed.
|
|
761
|
+
*/
|
|
762
|
+
approve3dsRequest(transactionId: string): Promise<EmptyResponse>;
|
|
763
|
+
/**
|
|
764
|
+
* Declines 3DS request blocking the transaction from proceeding.
|
|
765
|
+
*/
|
|
766
|
+
decline3dsRequest(transactionId: string): Promise<EmptyResponse>;
|
|
767
|
+
/**
|
|
768
|
+
* Retrieves list of countries where the card can be delivered for the current corporation.
|
|
769
|
+
*/
|
|
770
|
+
getDeliveryCountries(): Promise<string[]>;
|
|
771
|
+
/**
|
|
772
|
+
* Retrieves list of courier providers that can deliver the card to the specified country.
|
|
773
|
+
*/
|
|
774
|
+
getDeliveryMethods(country: string): Promise<CardDeliveryMethod[]>;
|
|
775
|
+
/**
|
|
776
|
+
* Issues a plastic card for the specified user and sends it to the provided address.
|
|
777
|
+
*/
|
|
778
|
+
issuePlasticCard(request: CardIssuePlasticRequest): Promise<CardIssueResponse>;
|
|
779
|
+
/**
|
|
780
|
+
* Issues a virtual card for the specified user.
|
|
781
|
+
*/
|
|
782
|
+
issueVirtualCard(request: CardIssueVirtualRequest): Promise<CardIssueResponse>;
|
|
783
|
+
/**
|
|
784
|
+
* Activates a card that has been issued to a user and is currently in NotActivated state.
|
|
785
|
+
*/
|
|
786
|
+
activateCard(cardId: string, request: CardActivateRequestBody): Promise<EmptyResponse>;
|
|
787
|
+
/**
|
|
788
|
+
* Blocks selected card making it impossible to use it for any transactions.
|
|
789
|
+
*/
|
|
790
|
+
blockCard(cardId: string): Promise<EmptyResponse>;
|
|
791
|
+
/**
|
|
792
|
+
* Unblocks selected card allowing it to be used for transactions once again.
|
|
793
|
+
*/
|
|
794
|
+
unblockCard(cardId: string): Promise<EmptyResponse>;
|
|
795
|
+
/**
|
|
796
|
+
* Closes the card. This action cannot be undone and the card will be permanently closed.
|
|
797
|
+
*/
|
|
798
|
+
closeCard(cardId: string): Promise<EmptyResponse>;
|
|
799
|
+
/**
|
|
800
|
+
* Retrieves card PAN and expiry date using the action confirmation token.
|
|
801
|
+
*/
|
|
802
|
+
getCardDetails(cardId: string, request: CardDetailsGetDetailsRequestBody): Promise<CardDetailsPanExpiryResponse>;
|
|
803
|
+
/**
|
|
804
|
+
* Retrieves CVV code for the card using the action confirmation token.
|
|
805
|
+
*/
|
|
806
|
+
getCardCvv(cardId: string, request: CardDetailsGetCvvRequestBody): Promise<CardDetailsCvvResponse>;
|
|
807
|
+
/**
|
|
808
|
+
* Retrieves card Pin code using the action confirmation token.
|
|
809
|
+
*/
|
|
810
|
+
getCardPin(cardId: string, request: CardDetailsGetPinRequestBody): Promise<CardDetailsPinResponse>;
|
|
811
|
+
/**
|
|
812
|
+
* Updates maximum amount that can be spent using the card within a day.
|
|
813
|
+
*/
|
|
814
|
+
changeCardLimit(cardId: string, request: CardLimitChangeRequestBody): Promise<EmptyResponse>;
|
|
815
|
+
/**
|
|
816
|
+
* Updates the display name of the card.
|
|
817
|
+
*/
|
|
818
|
+
changeCardName(cardId: string, request: CardNameChangeRequestBody): Promise<EmptyResponse>;
|
|
819
|
+
/**
|
|
820
|
+
* Creates a new card transfer estimation.
|
|
821
|
+
*/
|
|
822
|
+
estimateCardTransfer(request: CardTransferEstimateRequest): Promise<CardTransferEstimateResponse>;
|
|
823
|
+
/**
|
|
824
|
+
* Executes the estimated card transfer request.
|
|
825
|
+
*/
|
|
826
|
+
executeCardTransfer(request: CardTransferExecuteRequest): Promise<CardTransferExecuteResponse>;
|
|
827
|
+
/**
|
|
828
|
+
* Creates a new withdrawal estimation for the card.
|
|
829
|
+
*/
|
|
830
|
+
estimateCardWithdrawal(cardId: string, request: CardWithdrawalEstimateRequestBody): Promise<CardWithdrawalEstimateResponse>;
|
|
831
|
+
/**
|
|
832
|
+
* Executes the estimated withdrawal request for the card.
|
|
833
|
+
*/
|
|
834
|
+
executeCardWithdrawal(cardId: string, request: CardWithdrawalExecuteRequestBody): Promise<CardWithdrawalExecuteResponse>;
|
|
835
|
+
/**
|
|
836
|
+
* Retrieves estimation of fees that should be paid for the card order.
|
|
837
|
+
*/
|
|
838
|
+
getOrderFees(type: CardFormat, country: string): Promise<CardFeesOrderResponse>;
|
|
839
|
+
/**
|
|
840
|
+
* Creates an invoice for payment of the card order fees.
|
|
841
|
+
*/
|
|
842
|
+
createOrderFeesInvoice(type: CardFormat, country: string, request: CardFeesCreateInvoiceRequestBody): Promise<CardFeesInvoiceResponse>;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
interface ConfigAnalytics {
|
|
846
|
+
amplitudeApiKey?: string;
|
|
847
|
+
googleAnalyticsId?: string;
|
|
848
|
+
googleTagManagerId?: string;
|
|
849
|
+
}
|
|
850
|
+
interface ConfigApi {
|
|
851
|
+
apiUrl?: string;
|
|
852
|
+
socketIo?: string;
|
|
853
|
+
}
|
|
854
|
+
interface ConfigAuth {
|
|
855
|
+
crossmintApiKey?: string;
|
|
856
|
+
crossmintAppId?: string;
|
|
857
|
+
googleApiKey?: string;
|
|
858
|
+
privyAppId?: string;
|
|
859
|
+
privyClientId?: string;
|
|
860
|
+
rhinoApiKey?: string;
|
|
861
|
+
}
|
|
862
|
+
interface ConfigChain {
|
|
863
|
+
id?: number;
|
|
864
|
+
name?: string;
|
|
865
|
+
rpcUrl?: string;
|
|
866
|
+
rpcWsUrl?: string;
|
|
867
|
+
blockExplorerUrl?: string;
|
|
868
|
+
bridgeUrl?: string;
|
|
869
|
+
bundlerUrl?: string;
|
|
870
|
+
paymasterUrl?: string;
|
|
871
|
+
contractRegistry?: string;
|
|
872
|
+
}
|
|
873
|
+
interface ConfigSupport {
|
|
874
|
+
chatUrl?: string;
|
|
875
|
+
widgetId?: string;
|
|
876
|
+
}
|
|
877
|
+
interface ClientAppConfig {
|
|
878
|
+
analytics?: ConfigAnalytics;
|
|
879
|
+
api?: ConfigApi;
|
|
880
|
+
auth?: ConfigAuth;
|
|
881
|
+
chains?: Record<string, ConfigChain>;
|
|
882
|
+
defaultChain?: ConfigChain;
|
|
883
|
+
defaultCompanyId?: string;
|
|
884
|
+
support?: ConfigSupport;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Config Service - application configuration endpoints.
|
|
889
|
+
*/
|
|
890
|
+
declare class ConfigService {
|
|
891
|
+
private readonly httpClient;
|
|
892
|
+
private readonly authService;
|
|
893
|
+
private readonly logger?;
|
|
894
|
+
constructor(config: {
|
|
895
|
+
httpClient: HttpClient;
|
|
896
|
+
authService: AuthService;
|
|
897
|
+
logger?: Logger;
|
|
898
|
+
});
|
|
899
|
+
/**
|
|
900
|
+
* Retrieves application configuration values for a partner application.
|
|
901
|
+
*/
|
|
902
|
+
getConfig(): Promise<ClientAppConfig>;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Confirmation endpoints - Types match API spec
|
|
907
|
+
*/
|
|
908
|
+
type ConfirmationActionType = 'GetCardDetails' | '3dsChallenge' | 'VerifyPhone';
|
|
909
|
+
interface ActionConfirmationCreateSmsRequest {
|
|
910
|
+
action_type: ConfirmationActionType;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Payload for exchanging a wallet signature for an action-confirmation token
|
|
914
|
+
* (`POST api/v1/confirmation/signature/verify`).
|
|
915
|
+
*
|
|
916
|
+
* The signed message must follow the canonical template:
|
|
917
|
+
* `By signing this I confirm that I am executing action {action_type} at {nonce}`
|
|
918
|
+
*/
|
|
919
|
+
interface ActionConfirmationCreateTokenRequest {
|
|
920
|
+
action_type: ConfirmationActionType;
|
|
921
|
+
/**
|
|
922
|
+
* Signature of the canonical payload, produced with the user's main-wallet
|
|
923
|
+
* private key:
|
|
924
|
+
* `By signing this I confirm that I am executing action {action_type} at {nonce}`
|
|
925
|
+
*/
|
|
926
|
+
message_signature: string;
|
|
927
|
+
/** Unix timestamp in **seconds** used when forming the signed payload. */
|
|
928
|
+
nonce: number;
|
|
929
|
+
}
|
|
930
|
+
interface ActionConfirmationVerifySmsRequest {
|
|
931
|
+
code: string;
|
|
932
|
+
session_id: string;
|
|
933
|
+
}
|
|
934
|
+
interface ActionConfirmationSmsSessionResponse {
|
|
935
|
+
attempts_left: number;
|
|
936
|
+
code_length: number;
|
|
937
|
+
expires_at: string;
|
|
938
|
+
resend_at: string;
|
|
939
|
+
session_id: string;
|
|
940
|
+
}
|
|
941
|
+
interface ActionTokenResponse {
|
|
942
|
+
/**
|
|
943
|
+
* Signed JWT used to confirm the requested action. The token's expiry
|
|
944
|
+
* (TTL, ~5 min) is encoded inside the JWT itself — the backend does not
|
|
945
|
+
* return a separate `expires_at` field.
|
|
946
|
+
*/
|
|
947
|
+
action_token: string;
|
|
948
|
+
}
|
|
949
|
+
interface TokenResponse {
|
|
950
|
+
token: string;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Confirmation Service - action confirmation endpoints.
|
|
955
|
+
* Auth is handled by HttpClient (no per-call auth or headers).
|
|
956
|
+
*/
|
|
957
|
+
declare class ConfirmationService {
|
|
958
|
+
private readonly httpClient;
|
|
959
|
+
private readonly authService;
|
|
960
|
+
private readonly logger?;
|
|
961
|
+
constructor(config: {
|
|
962
|
+
httpClient: HttpClient;
|
|
963
|
+
authService: AuthService;
|
|
964
|
+
logger?: Logger;
|
|
965
|
+
});
|
|
966
|
+
/**
|
|
967
|
+
* Exchanges wallet signature for an action token.
|
|
968
|
+
*/
|
|
969
|
+
verifySignature(request: ActionConfirmationCreateTokenRequest): Promise<ActionTokenResponse>;
|
|
970
|
+
/**
|
|
971
|
+
* Sends SMS with OTP code to the user.
|
|
972
|
+
*/
|
|
973
|
+
requestSms(request: ActionConfirmationCreateSmsRequest): Promise<ActionConfirmationSmsSessionResponse>;
|
|
974
|
+
/**
|
|
975
|
+
* Exchanges SMS OTP code for an action token.
|
|
976
|
+
*/
|
|
977
|
+
verifySms(request: ActionConfirmationVerifySmsRequest): Promise<TokenResponse>;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Recipients endpoints - Types match API spec
|
|
982
|
+
*/
|
|
983
|
+
type RecipientSortOrder = 'name' | 'usage';
|
|
984
|
+
type RecipientDetailsType = 'Crypto' | 'Sepa' | 'FasterPayment' | 'Ach' | 'Swift' | 'Spei' | 'Card' | 'Pix' | 'FpsHk' | 'Imps' | 'Instapay' | 'BiFast' | 'Nip' | 'Ipp' | 'Pse';
|
|
985
|
+
interface GetRecipientsRequest {
|
|
986
|
+
page_number?: number;
|
|
987
|
+
page_size?: number;
|
|
988
|
+
sort?: RecipientSortOrder;
|
|
989
|
+
}
|
|
990
|
+
interface GetRecipientsByCatalogRequest extends GetRecipientsRequest {
|
|
991
|
+
catalog_index: string;
|
|
992
|
+
}
|
|
993
|
+
interface GetRecipientsByCurrencyRequest extends GetRecipientsRequest {
|
|
994
|
+
currency: string;
|
|
995
|
+
}
|
|
996
|
+
interface GetRecipientsByNameRequest extends GetRecipientsRequest {
|
|
997
|
+
name: string;
|
|
998
|
+
}
|
|
999
|
+
interface GetRecipientsByTypeRequest extends GetRecipientsRequest {
|
|
1000
|
+
type: RecipientDetailsType;
|
|
1001
|
+
}
|
|
1002
|
+
interface RecipientCreateRequest {
|
|
1003
|
+
first_name?: string;
|
|
1004
|
+
last_name?: string;
|
|
1005
|
+
company_name?: string;
|
|
1006
|
+
is_business: boolean;
|
|
1007
|
+
nick_name?: string;
|
|
1008
|
+
}
|
|
1009
|
+
interface RecipientCreateRequestV2 {
|
|
1010
|
+
first_name?: string;
|
|
1011
|
+
last_name?: string;
|
|
1012
|
+
company_name?: string;
|
|
1013
|
+
is_business: boolean;
|
|
1014
|
+
nick_name?: string;
|
|
1015
|
+
type: RecipientDetailsType;
|
|
1016
|
+
currencies: string[];
|
|
1017
|
+
ach?: RecipientPaymentDetailsAch;
|
|
1018
|
+
bi_fast?: RecipientPaymentDetailsBiFast;
|
|
1019
|
+
card?: RecipientPaymentDetailsCard;
|
|
1020
|
+
crypto?: RecipientPaymentDetailsCrypto;
|
|
1021
|
+
faster_payments?: RecipientPaymentDetailsFasterPayment;
|
|
1022
|
+
fps_hk?: RecipientPaymentDetailsFpsHk;
|
|
1023
|
+
imps?: RecipientPaymentDetailsImps;
|
|
1024
|
+
instapay?: RecipientPaymentDetailsInstapay;
|
|
1025
|
+
ipp?: RecipientPaymentDetailsIpp;
|
|
1026
|
+
nip?: RecipientPaymentDetailsNip;
|
|
1027
|
+
pix?: RecipientPaymentDetailsPix;
|
|
1028
|
+
pse?: RecipientPaymentDetailsPse;
|
|
1029
|
+
sepa?: RecipientPaymentDetailsSepa;
|
|
1030
|
+
spei?: RecipientPaymentDetailsSpei;
|
|
1031
|
+
swift?: RecipientPaymentDetailsSwift;
|
|
1032
|
+
}
|
|
1033
|
+
interface RecipientUpdateRequestBody {
|
|
1034
|
+
first_name?: string;
|
|
1035
|
+
last_name?: string;
|
|
1036
|
+
company_name?: string;
|
|
1037
|
+
is_business: boolean;
|
|
1038
|
+
nick_name?: string;
|
|
1039
|
+
}
|
|
1040
|
+
interface RecipientPaymentDetailsLegalAddress {
|
|
1041
|
+
city: string;
|
|
1042
|
+
country: string;
|
|
1043
|
+
line1: string;
|
|
1044
|
+
line2?: string;
|
|
1045
|
+
state?: string;
|
|
1046
|
+
zip_code: string;
|
|
1047
|
+
}
|
|
1048
|
+
interface RecipientPaymentDetailsAch {
|
|
1049
|
+
account_number: string;
|
|
1050
|
+
bank_name?: string;
|
|
1051
|
+
legal_address: RecipientPaymentDetailsLegalAddress;
|
|
1052
|
+
routing_number: string;
|
|
1053
|
+
}
|
|
1054
|
+
interface RecipientPaymentDetailsBiFast {
|
|
1055
|
+
account_number: string;
|
|
1056
|
+
bank_code: string;
|
|
1057
|
+
bank_name?: string;
|
|
1058
|
+
destination_country: string;
|
|
1059
|
+
recipient_name: string;
|
|
1060
|
+
}
|
|
1061
|
+
interface RecipientPaymentDetailsCard {
|
|
1062
|
+
card_id: string;
|
|
1063
|
+
card_pan_last: string;
|
|
1064
|
+
}
|
|
1065
|
+
interface RecipientPaymentDetailsCrypto {
|
|
1066
|
+
address: string;
|
|
1067
|
+
network: string;
|
|
1068
|
+
}
|
|
1069
|
+
interface RecipientPaymentDetailsFasterPayment {
|
|
1070
|
+
account_number: string;
|
|
1071
|
+
sort_code: string;
|
|
1072
|
+
}
|
|
1073
|
+
interface RecipientPaymentDetailsFpsHk {
|
|
1074
|
+
bank_code: string;
|
|
1075
|
+
fps_id: string;
|
|
1076
|
+
fps_id_type: string;
|
|
1077
|
+
recipient_name: string;
|
|
1078
|
+
}
|
|
1079
|
+
interface RecipientPaymentDetailsImps {
|
|
1080
|
+
account_number: string;
|
|
1081
|
+
bank_name?: string;
|
|
1082
|
+
destination_country: string;
|
|
1083
|
+
ifsc_code: string;
|
|
1084
|
+
recipient_name: string;
|
|
1085
|
+
}
|
|
1086
|
+
interface RecipientPaymentDetailsInstapay {
|
|
1087
|
+
account_number: string;
|
|
1088
|
+
bank_code: string;
|
|
1089
|
+
bank_name?: string;
|
|
1090
|
+
destination_country: string;
|
|
1091
|
+
recipient_name: string;
|
|
1092
|
+
}
|
|
1093
|
+
interface RecipientPaymentDetailsIpp {
|
|
1094
|
+
bank_name?: string;
|
|
1095
|
+
destination_country: string;
|
|
1096
|
+
iban: string;
|
|
1097
|
+
recipient_name: string;
|
|
1098
|
+
}
|
|
1099
|
+
interface RecipientPaymentDetailsNip {
|
|
1100
|
+
account_number: string;
|
|
1101
|
+
bank_code: string;
|
|
1102
|
+
bank_name?: string;
|
|
1103
|
+
destination_country: string;
|
|
1104
|
+
recipient_name: string;
|
|
1105
|
+
}
|
|
1106
|
+
interface RecipientPaymentDetailsPix {
|
|
1107
|
+
pix_key: string;
|
|
1108
|
+
pix_key_type: string;
|
|
1109
|
+
recipient_name: string;
|
|
1110
|
+
}
|
|
1111
|
+
interface RecipientPaymentDetailsPse {
|
|
1112
|
+
account_number: string;
|
|
1113
|
+
account_type: string;
|
|
1114
|
+
bank_code: string;
|
|
1115
|
+
destination_country: string;
|
|
1116
|
+
document_number: string;
|
|
1117
|
+
document_type: string;
|
|
1118
|
+
recipient_name: string;
|
|
1119
|
+
}
|
|
1120
|
+
interface RecipientPaymentDetailsSepa {
|
|
1121
|
+
bic: string;
|
|
1122
|
+
iban: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface RecipientPaymentDetailsSpei {
|
|
1125
|
+
clabe: string;
|
|
1126
|
+
}
|
|
1127
|
+
interface RecipientPaymentDetailsSwift {
|
|
1128
|
+
bic: string;
|
|
1129
|
+
iban: string;
|
|
1130
|
+
legal_address: RecipientPaymentDetailsLegalAddress;
|
|
1131
|
+
}
|
|
1132
|
+
interface RecipientCreateDetailsRequestBody {
|
|
1133
|
+
type: RecipientDetailsType;
|
|
1134
|
+
currencies: string[];
|
|
1135
|
+
ach?: RecipientPaymentDetailsAch;
|
|
1136
|
+
bi_fast?: RecipientPaymentDetailsBiFast;
|
|
1137
|
+
card?: RecipientPaymentDetailsCard;
|
|
1138
|
+
crypto?: RecipientPaymentDetailsCrypto;
|
|
1139
|
+
faster_payments?: RecipientPaymentDetailsFasterPayment;
|
|
1140
|
+
fps_hk?: RecipientPaymentDetailsFpsHk;
|
|
1141
|
+
imps?: RecipientPaymentDetailsImps;
|
|
1142
|
+
instapay?: RecipientPaymentDetailsInstapay;
|
|
1143
|
+
ipp?: RecipientPaymentDetailsIpp;
|
|
1144
|
+
nip?: RecipientPaymentDetailsNip;
|
|
1145
|
+
pix?: RecipientPaymentDetailsPix;
|
|
1146
|
+
pse?: RecipientPaymentDetailsPse;
|
|
1147
|
+
sepa?: RecipientPaymentDetailsSepa;
|
|
1148
|
+
spei?: RecipientPaymentDetailsSpei;
|
|
1149
|
+
swift?: RecipientPaymentDetailsSwift;
|
|
1150
|
+
}
|
|
1151
|
+
type RecipientUpdateDetailsRequestBody = RecipientCreateDetailsRequestBody;
|
|
1152
|
+
interface RecipientPersonalInfo {
|
|
1153
|
+
first_name?: string;
|
|
1154
|
+
last_name?: string;
|
|
1155
|
+
company_name?: string;
|
|
1156
|
+
is_business: boolean;
|
|
1157
|
+
nick_name?: string;
|
|
1158
|
+
}
|
|
1159
|
+
interface RecipientPaymentDetailsResponse {
|
|
1160
|
+
id: string;
|
|
1161
|
+
type: RecipientDetailsType;
|
|
1162
|
+
currencies: string[];
|
|
1163
|
+
ach?: RecipientPaymentDetailsAch;
|
|
1164
|
+
bi_fast?: RecipientPaymentDetailsBiFast;
|
|
1165
|
+
card?: RecipientPaymentDetailsCard;
|
|
1166
|
+
crypto?: RecipientPaymentDetailsCrypto;
|
|
1167
|
+
faster_payment?: RecipientPaymentDetailsFasterPayment;
|
|
1168
|
+
fps_hk?: RecipientPaymentDetailsFpsHk;
|
|
1169
|
+
imps?: RecipientPaymentDetailsImps;
|
|
1170
|
+
instapay?: RecipientPaymentDetailsInstapay;
|
|
1171
|
+
ipp?: RecipientPaymentDetailsIpp;
|
|
1172
|
+
nip?: RecipientPaymentDetailsNip;
|
|
1173
|
+
pix?: RecipientPaymentDetailsPix;
|
|
1174
|
+
pse?: RecipientPaymentDetailsPse;
|
|
1175
|
+
sepa?: RecipientPaymentDetailsSepa;
|
|
1176
|
+
spei?: RecipientPaymentDetailsSpei;
|
|
1177
|
+
swift?: RecipientPaymentDetailsSwift;
|
|
1178
|
+
}
|
|
1179
|
+
interface RecipientResponse {
|
|
1180
|
+
id: string;
|
|
1181
|
+
personal_info: RecipientPersonalInfo;
|
|
1182
|
+
payment_details?: RecipientPaymentDetailsResponse[];
|
|
1183
|
+
}
|
|
1184
|
+
interface RecipientsResponse {
|
|
1185
|
+
data: RecipientResponse[];
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Recipients Service – recipients and payment details endpoints.
|
|
1190
|
+
*/
|
|
1191
|
+
declare class RecipientsService {
|
|
1192
|
+
private readonly httpClient;
|
|
1193
|
+
private readonly authService;
|
|
1194
|
+
private readonly logger?;
|
|
1195
|
+
constructor(config: {
|
|
1196
|
+
httpClient: HttpClient;
|
|
1197
|
+
authService: AuthService;
|
|
1198
|
+
logger?: Logger;
|
|
1199
|
+
});
|
|
1200
|
+
/**
|
|
1201
|
+
* Retrieves all recipients with optional pagination and sorting.
|
|
1202
|
+
*/
|
|
1203
|
+
getRecipients(request?: GetRecipientsRequest): Promise<RecipientsResponse>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Retrieves recipients filtered by catalog index (first letter of full name).
|
|
1206
|
+
*/
|
|
1207
|
+
getRecipientsByCatalog(request: GetRecipientsByCatalogRequest): Promise<RecipientsResponse>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Retrieves recipients filtered by currency.
|
|
1210
|
+
*/
|
|
1211
|
+
getRecipientsByCurrency(request: GetRecipientsByCurrencyRequest): Promise<RecipientsResponse>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Retrieves recipients filtered by name substring.
|
|
1214
|
+
*/
|
|
1215
|
+
getRecipientsByName(request: GetRecipientsByNameRequest): Promise<RecipientsResponse>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Retrieves recipients filtered by payment details type.
|
|
1218
|
+
*/
|
|
1219
|
+
getRecipientsByType(request: GetRecipientsByTypeRequest): Promise<RecipientsResponse>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Creates a new recipient with provided personal information.
|
|
1222
|
+
*/
|
|
1223
|
+
createRecipient(request: RecipientCreateRequest): Promise<RecipientResponse>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Creates a recipient with personal info and payment details in a single call.
|
|
1226
|
+
*/
|
|
1227
|
+
createRecipientV2(request: RecipientCreateRequestV2): Promise<RecipientResponse>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Retrieves a single recipient by its ID.
|
|
1230
|
+
*/
|
|
1231
|
+
getRecipientById(recipientId: string): Promise<RecipientResponse>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Updates recipient with provided personal information.
|
|
1234
|
+
*/
|
|
1235
|
+
updateRecipient(recipientId: string, request: RecipientUpdateRequestBody): Promise<EmptyResponse>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Deletes selected recipient.
|
|
1238
|
+
*/
|
|
1239
|
+
deleteRecipient(recipientId: string): Promise<EmptyResponse>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Creates new payment details for existing recipient.
|
|
1242
|
+
*/
|
|
1243
|
+
createRecipientPaymentDetails(recipientId: string, request: RecipientCreateDetailsRequestBody): Promise<RecipientPaymentDetailsResponse>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Updates existing payment details for existing recipient.
|
|
1246
|
+
*/
|
|
1247
|
+
updateRecipientPaymentDetails(recipientId: string, paymentDetailsId: string, request: RecipientUpdateDetailsRequestBody): Promise<EmptyResponse>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Deletes payment details from existing recipient.
|
|
1250
|
+
*/
|
|
1251
|
+
deleteRecipientPaymentDetails(recipientId: string, paymentDetailsId: string): Promise<EmptyResponse>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Increments usage index on specified recipient.
|
|
1254
|
+
*/
|
|
1255
|
+
incrementRecipientUsage(recipientId: string): Promise<EmptyResponse>;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
interface GetRatesRequest {
|
|
1259
|
+
tickers: string[];
|
|
1260
|
+
}
|
|
1261
|
+
interface Rate {
|
|
1262
|
+
ticker: string;
|
|
1263
|
+
ask: number;
|
|
1264
|
+
bid: number;
|
|
1265
|
+
}
|
|
1266
|
+
interface RatesResponse {
|
|
1267
|
+
data: Rate[];
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Rates Service - exchange rates endpoints.
|
|
1272
|
+
*/
|
|
1273
|
+
declare class RatesService {
|
|
1274
|
+
private readonly httpClient;
|
|
1275
|
+
private readonly authService;
|
|
1276
|
+
private readonly logger?;
|
|
1277
|
+
constructor(config: {
|
|
1278
|
+
httpClient: HttpClient;
|
|
1279
|
+
authService: AuthService;
|
|
1280
|
+
logger?: Logger;
|
|
1281
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* Retrieves real-time exchange rates for a list of provided tickers.
|
|
1284
|
+
*/
|
|
1285
|
+
getRates(request: GetRatesRequest): Promise<RatesResponse>;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* FX (swap) endpoints - Types match API spec.
|
|
1290
|
+
* Powered by Circle FX stablecoin swaps: estimate (issues a deposit address) → execute.
|
|
1291
|
+
*/
|
|
1292
|
+
interface SwapEstimateRequestBase {
|
|
1293
|
+
/** Contract address of the token to swap from (e.g. USDC). */
|
|
1294
|
+
source_asset_address: string;
|
|
1295
|
+
/** Contract address of the token to receive (e.g. EURC). */
|
|
1296
|
+
destination_asset_address: string;
|
|
1297
|
+
/** Optional client-provided identifier for tracking the request. */
|
|
1298
|
+
correlation_id?: string;
|
|
1299
|
+
}
|
|
1300
|
+
interface SwapEstimateRequestBySourceAmount extends SwapEstimateRequestBase {
|
|
1301
|
+
/** Amount of source token to swap. Mutually exclusive with destination_asset_amount. */
|
|
1302
|
+
source_asset_amount: string;
|
|
1303
|
+
destination_asset_amount?: never;
|
|
1304
|
+
}
|
|
1305
|
+
interface SwapEstimateRequestByDestinationAmount extends SwapEstimateRequestBase {
|
|
1306
|
+
/** Desired amount of destination token. Mutually exclusive with source_asset_amount. */
|
|
1307
|
+
destination_asset_amount: string;
|
|
1308
|
+
source_asset_amount?: never;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Send exactly one of source_asset_amount / destination_asset_amount.
|
|
1312
|
+
*/
|
|
1313
|
+
type SwapEstimateRequest = SwapEstimateRequestBySourceAmount | SwapEstimateRequestByDestinationAmount;
|
|
1314
|
+
interface SwapExecuteRequest {
|
|
1315
|
+
/** Estimation id returned by the estimate endpoint. */
|
|
1316
|
+
estimation_id: string;
|
|
1317
|
+
/** Blockchain transaction hash of the payment sent to the deposit address. */
|
|
1318
|
+
payment_transaction_hash: string;
|
|
1319
|
+
}
|
|
1320
|
+
interface SwapEstimateResponse {
|
|
1321
|
+
/** Unique identifier for this estimation, used when executing the swap. */
|
|
1322
|
+
estimation_id: string;
|
|
1323
|
+
/** Address where the client must send the source tokens. Preferred field. */
|
|
1324
|
+
destination_address: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* @deprecated Mirrors destination_address for backward compatibility. Read destination_address.
|
|
1327
|
+
*/
|
|
1328
|
+
deposit_address: string;
|
|
1329
|
+
source_asset_address: string;
|
|
1330
|
+
source_asset_amount: string;
|
|
1331
|
+
destination_asset_address: string;
|
|
1332
|
+
destination_asset_amount: string;
|
|
1333
|
+
/** Exchange rate applied to the swap. */
|
|
1334
|
+
trade_rate: string;
|
|
1335
|
+
/** RFC3339 timestamp after which this estimation expires. */
|
|
1336
|
+
expiration_time: string;
|
|
1337
|
+
}
|
|
1338
|
+
interface SwapExecuteResponse {
|
|
1339
|
+
/** Unique identifier for the executed trade. */
|
|
1340
|
+
trade_id: string;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Swap Service – Circle FX stablecoin swaps.
|
|
1345
|
+
* Two-step flow: estimate (issues a deposit address) → on-chain payment → execute.
|
|
1346
|
+
* Auth is handled by HttpClient (no per-call auth or headers).
|
|
1347
|
+
*/
|
|
1348
|
+
declare class SwapService {
|
|
1349
|
+
private readonly httpClient;
|
|
1350
|
+
private readonly authService;
|
|
1351
|
+
private readonly logger?;
|
|
1352
|
+
constructor(config: {
|
|
1353
|
+
httpClient: HttpClient;
|
|
1354
|
+
authService: AuthService;
|
|
1355
|
+
logger?: Logger;
|
|
1356
|
+
});
|
|
1357
|
+
/**
|
|
1358
|
+
* Creates a swap estimation with a deposit address for a Circle FX stablecoin swap.
|
|
1359
|
+
* Send exactly one of source_asset_amount / destination_asset_amount.
|
|
1360
|
+
*/
|
|
1361
|
+
estimate(request: SwapEstimateRequest): Promise<SwapEstimateResponse>;
|
|
1362
|
+
/**
|
|
1363
|
+
* Executes the swap after the source tokens have been sent to the deposit address.
|
|
1364
|
+
*/
|
|
1365
|
+
execute(request: SwapExecuteRequest): Promise<SwapExecuteResponse>;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
interface OAuth2TokenRequest {
|
|
1369
|
+
grant_type: string;
|
|
1370
|
+
client_id: string;
|
|
1371
|
+
client_secret: string;
|
|
1372
|
+
audience?: string;
|
|
1373
|
+
}
|
|
1374
|
+
interface OAuth2TokenResponse {
|
|
1375
|
+
access_token: string;
|
|
1376
|
+
expires_at: number;
|
|
1377
|
+
token_type: string;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Token Service - OAuth2 token endpoint.
|
|
1382
|
+
*/
|
|
1383
|
+
declare class TokenService {
|
|
1384
|
+
private readonly httpClient;
|
|
1385
|
+
private readonly authService;
|
|
1386
|
+
private readonly logger?;
|
|
1387
|
+
constructor(config: {
|
|
1388
|
+
httpClient: HttpClient;
|
|
1389
|
+
authService: AuthService;
|
|
1390
|
+
logger?: Logger;
|
|
1391
|
+
});
|
|
1392
|
+
/**
|
|
1393
|
+
* Exchanges client credentials for a Wirex Partner access token.
|
|
1394
|
+
*/
|
|
1395
|
+
getToken(request: OAuth2TokenRequest): Promise<OAuth2TokenResponse>;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* User Management endpoints - Types match API spec
|
|
1400
|
+
*/
|
|
1401
|
+
type UserVerificationStatus = 'None' | 'Pending' | 'Approved' | 'Rejected' | 'Canceled' | 'Applied' | 'InReview';
|
|
1402
|
+
type UserStatus = 'Active' | 'Blocked' | 'Deleted' | 'Pending';
|
|
1403
|
+
type VerificationLevel = 'N/A' | 'BDD' | 'SDD' | 'EDD';
|
|
1404
|
+
type CapabilityStatus = 'Active' | 'Inactive' | 'Pending' | string;
|
|
1405
|
+
type CapabilityType = 'SepaAccount' | 'AchAccount' | 'FasterPaymentsAccount' | 'SpeiAccount' | string;
|
|
1406
|
+
interface Capability {
|
|
1407
|
+
type?: CapabilityType;
|
|
1408
|
+
status?: CapabilityStatus;
|
|
1409
|
+
status_reason?: string;
|
|
1410
|
+
prerequisites?: CapabilityType[];
|
|
1411
|
+
}
|
|
1412
|
+
type UserActionType = 'ConfirmPhone' | 'IssuePlasticCard' | 'IssueVirtualCard' | 'Verify' | 'SendAchTransfer' | 'ReceiveAchDeposit' | string;
|
|
1413
|
+
interface UserPersonalInfo {
|
|
1414
|
+
first_name?: string;
|
|
1415
|
+
last_name?: string;
|
|
1416
|
+
nationality?: string;
|
|
1417
|
+
}
|
|
1418
|
+
interface UserPhoneNumberData {
|
|
1419
|
+
phone_number?: string;
|
|
1420
|
+
is_confirmed?: boolean;
|
|
1421
|
+
}
|
|
1422
|
+
interface UserResidenceAddress {
|
|
1423
|
+
city?: string;
|
|
1424
|
+
country?: string;
|
|
1425
|
+
line1?: string;
|
|
1426
|
+
line2?: string;
|
|
1427
|
+
state?: string;
|
|
1428
|
+
zip_code?: string;
|
|
1429
|
+
}
|
|
1430
|
+
interface UserAction {
|
|
1431
|
+
relative_path: string;
|
|
1432
|
+
type: UserActionType;
|
|
1433
|
+
}
|
|
1434
|
+
/** V1 User response from GET /api/v1/user */
|
|
1435
|
+
interface User {
|
|
1436
|
+
id?: string;
|
|
1437
|
+
email?: string;
|
|
1438
|
+
freshdesk_id?: string;
|
|
1439
|
+
capabilities?: Capability[];
|
|
1440
|
+
personal_info?: UserPersonalInfo;
|
|
1441
|
+
phone_number_data?: UserPhoneNumberData;
|
|
1442
|
+
residence_address?: UserResidenceAddress;
|
|
1443
|
+
user_actions?: UserAction[];
|
|
1444
|
+
user_status?: UserStatus;
|
|
1445
|
+
verification_status?: UserVerificationStatus;
|
|
1446
|
+
}
|
|
1447
|
+
interface UpdatePhoneNumberRequest {
|
|
1448
|
+
phone_number: string;
|
|
1449
|
+
}
|
|
1450
|
+
interface ConfirmPhoneNumberRequest {
|
|
1451
|
+
/**
|
|
1452
|
+
* Action token obtained from the Confirmation SMS OTP flow
|
|
1453
|
+
* (`confirmation.requestSms` → `confirmation.verifySms`), not the raw SMS code.
|
|
1454
|
+
*/
|
|
1455
|
+
action_token: string;
|
|
1456
|
+
}
|
|
1457
|
+
interface GetSharingTokenRequest {
|
|
1458
|
+
sumsub_client_id: string;
|
|
1459
|
+
}
|
|
1460
|
+
interface GetSharingTokenResponse {
|
|
1461
|
+
token: string;
|
|
1462
|
+
}
|
|
1463
|
+
interface UpdateFreshdeskIdRequest {
|
|
1464
|
+
freshdesk_id: string;
|
|
1465
|
+
}
|
|
1466
|
+
interface GetVerificationTokenResponse {
|
|
1467
|
+
token: string;
|
|
1468
|
+
}
|
|
1469
|
+
interface CreateUserRequest {
|
|
1470
|
+
country: string;
|
|
1471
|
+
email: string;
|
|
1472
|
+
wallet_address: string;
|
|
1473
|
+
}
|
|
1474
|
+
interface CreateUserResponse {
|
|
1475
|
+
id: string;
|
|
1476
|
+
}
|
|
1477
|
+
interface SetSharingTokenRequest {
|
|
1478
|
+
sharing_token: string;
|
|
1479
|
+
}
|
|
1480
|
+
interface SetSharingTokenResponse {
|
|
1481
|
+
token: string;
|
|
1482
|
+
}
|
|
1483
|
+
interface CreateRetailUserRequest {
|
|
1484
|
+
country: string;
|
|
1485
|
+
}
|
|
1486
|
+
interface CreateRetailUserResponse {
|
|
1487
|
+
id: string;
|
|
1488
|
+
}
|
|
1489
|
+
interface UserDescriptor {
|
|
1490
|
+
email: string;
|
|
1491
|
+
id: string;
|
|
1492
|
+
wallet_address?: string;
|
|
1493
|
+
}
|
|
1494
|
+
interface ValidateRetailUserResponse {
|
|
1495
|
+
users: UserDescriptor[];
|
|
1496
|
+
}
|
|
1497
|
+
interface GetVerificationLinkResponse {
|
|
1498
|
+
redirect_uri: string;
|
|
1499
|
+
}
|
|
1500
|
+
interface AuthorizeUserResponse {
|
|
1501
|
+
access_token: string;
|
|
1502
|
+
expires_at: number;
|
|
1503
|
+
}
|
|
1504
|
+
interface UserProfileV2 {
|
|
1505
|
+
email?: string;
|
|
1506
|
+
first_name?: string;
|
|
1507
|
+
last_name?: string;
|
|
1508
|
+
date_of_birth?: string;
|
|
1509
|
+
nationality?: string;
|
|
1510
|
+
phone_number?: string;
|
|
1511
|
+
}
|
|
1512
|
+
interface UserResidenceAddressV2 extends Omit<UserResidenceAddress, 'zip_code'> {
|
|
1513
|
+
post_code?: string;
|
|
1514
|
+
}
|
|
1515
|
+
interface UserDocumentV2 {
|
|
1516
|
+
id?: string;
|
|
1517
|
+
type?: string;
|
|
1518
|
+
file_type?: string;
|
|
1519
|
+
added_date?: string;
|
|
1520
|
+
}
|
|
1521
|
+
interface UserVerificationLevelV2 {
|
|
1522
|
+
type?: VerificationLevel;
|
|
1523
|
+
name?: string;
|
|
1524
|
+
status?: UserVerificationStatus;
|
|
1525
|
+
}
|
|
1526
|
+
interface UserVerificationV2 {
|
|
1527
|
+
status?: UserVerificationStatus;
|
|
1528
|
+
levels?: UserVerificationLevelV2[];
|
|
1529
|
+
documents?: UserDocumentV2[];
|
|
1530
|
+
}
|
|
1531
|
+
interface UserExternalProviderV2 {
|
|
1532
|
+
type?: string;
|
|
1533
|
+
account_id?: string;
|
|
1534
|
+
}
|
|
1535
|
+
/** V2 User response from GET /api/v2/user */
|
|
1536
|
+
interface UserV2 {
|
|
1537
|
+
id?: string;
|
|
1538
|
+
owner?: string;
|
|
1539
|
+
chain_id?: number;
|
|
1540
|
+
profile?: UserProfileV2;
|
|
1541
|
+
residence_address?: UserResidenceAddressV2;
|
|
1542
|
+
verification?: UserVerificationV2;
|
|
1543
|
+
capabilities?: Capability[];
|
|
1544
|
+
external_providers?: UserExternalProviderV2[];
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* User Service - User Management
|
|
1549
|
+
*
|
|
1550
|
+
* Handles user management operations with automatic authentication
|
|
1551
|
+
*/
|
|
1552
|
+
declare class UserService {
|
|
1553
|
+
private readonly httpClient;
|
|
1554
|
+
private readonly authService;
|
|
1555
|
+
private readonly logger?;
|
|
1556
|
+
constructor(config: {
|
|
1557
|
+
httpClient: HttpClient;
|
|
1558
|
+
authService: AuthService;
|
|
1559
|
+
logger?: Logger;
|
|
1560
|
+
});
|
|
1561
|
+
/**
|
|
1562
|
+
* Initiates a phone number update for the authenticated user.
|
|
1563
|
+
*/
|
|
1564
|
+
updatePhoneNumber(request: UpdatePhoneNumberRequest): Promise<void>;
|
|
1565
|
+
/**
|
|
1566
|
+
* Confirms and completes the phone number update with SMS verification code.
|
|
1567
|
+
*/
|
|
1568
|
+
confirmPhoneNumber(request: ConfirmPhoneNumberRequest): Promise<void>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Uploads a KYC verification document using multipart/form-data.
|
|
1571
|
+
*/
|
|
1572
|
+
uploadDocument(formData: FormData): Promise<void>;
|
|
1573
|
+
/**
|
|
1574
|
+
* Fetches the complete profile for the authenticated user (V1).
|
|
1575
|
+
*/
|
|
1576
|
+
getUser(): Promise<User>;
|
|
1577
|
+
/**
|
|
1578
|
+
* Associates a Freshdesk customer ID with the user's account.
|
|
1579
|
+
*/
|
|
1580
|
+
updateFreshdeskId(request: UpdateFreshdeskIdRequest): Promise<void>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Generates a temporary token for secure user data sharing with SumSub.
|
|
1583
|
+
*/
|
|
1584
|
+
getSharingToken(request: GetSharingTokenRequest): Promise<GetSharingTokenResponse>;
|
|
1585
|
+
/**
|
|
1586
|
+
* Generates an access token for SumSub KYC identity verification.
|
|
1587
|
+
*/
|
|
1588
|
+
getVerificationToken(): Promise<GetVerificationTokenResponse>;
|
|
1589
|
+
createUser(request: CreateUserRequest): Promise<CreateUserResponse>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Sets a KYC sharing token to ingest user data from SumSub.
|
|
1592
|
+
*/
|
|
1593
|
+
setSharingToken(request: SetSharingTokenRequest): Promise<SetSharingTokenResponse>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Creates a new retail user in the Wirex system using client-side Privy SDK authorization.
|
|
1596
|
+
*/
|
|
1597
|
+
createRetailUser(request: CreateRetailUserRequest): Promise<CreateRetailUserResponse>;
|
|
1598
|
+
/**
|
|
1599
|
+
* Validates a retail user in the Wirex system using client-side Privy SDK authorization.
|
|
1600
|
+
*/
|
|
1601
|
+
validateRetailUser(): Promise<ValidateRetailUserResponse>;
|
|
1602
|
+
/**
|
|
1603
|
+
* Generates a verification link for the user to complete KYC via SumSub.
|
|
1604
|
+
*/
|
|
1605
|
+
getVerificationLink(): Promise<GetVerificationLinkResponse>;
|
|
1606
|
+
/**
|
|
1607
|
+
* Retrieves an access token for a specific user to interact with all other APIs on their behalf.
|
|
1608
|
+
*/
|
|
1609
|
+
authorizeUser(params: LoginUserParams): Promise<AuthorizeUserResponse>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Retrieves extended user account information (V2).
|
|
1612
|
+
*/
|
|
1613
|
+
getUserV2(): Promise<UserV2>;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Wallet endpoints - Types match API spec
|
|
1618
|
+
*/
|
|
1619
|
+
type WalletStatus = 'Unknown' | 'Confirmed' | 'Rejected';
|
|
1620
|
+
type WalletType = 'Primary' | 'Secondary' | 'Global' | 'Card';
|
|
1621
|
+
interface GetWalletRequest {
|
|
1622
|
+
wallet_address?: string;
|
|
1623
|
+
}
|
|
1624
|
+
interface WalletCreateGlobalRequest {
|
|
1625
|
+
wallet_address: string;
|
|
1626
|
+
}
|
|
1627
|
+
interface WalletBalance {
|
|
1628
|
+
balance?: number;
|
|
1629
|
+
reference_balance?: number;
|
|
1630
|
+
reference_currency?: string;
|
|
1631
|
+
token_address?: string;
|
|
1632
|
+
token_symbol?: string;
|
|
1633
|
+
}
|
|
1634
|
+
interface WalletResponse {
|
|
1635
|
+
wallet_address: string;
|
|
1636
|
+
wallet_name?: string;
|
|
1637
|
+
wallet_status?: WalletStatus;
|
|
1638
|
+
wallet_type?: WalletType;
|
|
1639
|
+
balances?: WalletBalance[];
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Wallet Service – wallet endpoints.
|
|
1644
|
+
*/
|
|
1645
|
+
declare class WalletService {
|
|
1646
|
+
private readonly httpClient;
|
|
1647
|
+
private readonly authService;
|
|
1648
|
+
private readonly logger?;
|
|
1649
|
+
constructor(config: {
|
|
1650
|
+
httpClient: HttpClient;
|
|
1651
|
+
authService: AuthService;
|
|
1652
|
+
logger?: Logger;
|
|
1653
|
+
});
|
|
1654
|
+
/**
|
|
1655
|
+
* Retrieves a wallet and its balances. Optionally filtered by wallet address.
|
|
1656
|
+
*/
|
|
1657
|
+
getWallet(request?: GetWalletRequest): Promise<WalletResponse>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Retrieves user wallets and their balances.
|
|
1660
|
+
*/
|
|
1661
|
+
getWallets(): Promise<WalletResponse>;
|
|
1662
|
+
/**
|
|
1663
|
+
* Creates a global wallet for the user account.
|
|
1664
|
+
*/
|
|
1665
|
+
createGlobalWallet(request: WalletCreateGlobalRequest): Promise<EmptyResponse>;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
declare class BaasModule implements SDKModule {
|
|
1669
|
+
readonly name = "baas";
|
|
1670
|
+
private readonly context;
|
|
1671
|
+
private readonly logger;
|
|
1672
|
+
private _userService?;
|
|
1673
|
+
private _activityService?;
|
|
1674
|
+
private _bankService?;
|
|
1675
|
+
private _cardsService?;
|
|
1676
|
+
private _configService?;
|
|
1677
|
+
private _confirmationService?;
|
|
1678
|
+
private _recipientsService?;
|
|
1679
|
+
private _ratesService?;
|
|
1680
|
+
private _swapService?;
|
|
1681
|
+
private _tokenService?;
|
|
1682
|
+
private _walletService?;
|
|
1683
|
+
private _initialized;
|
|
1684
|
+
constructor(context: ModuleContext);
|
|
1685
|
+
initialize(): Promise<void>;
|
|
1686
|
+
isInitialized(): boolean;
|
|
1687
|
+
get user(): UserService;
|
|
1688
|
+
get activity(): ActivityService;
|
|
1689
|
+
get bank(): BankService;
|
|
1690
|
+
get cards(): CardsService;
|
|
1691
|
+
get config(): ConfigService;
|
|
1692
|
+
get confirmation(): ConfirmationService;
|
|
1693
|
+
get recipients(): RecipientsService;
|
|
1694
|
+
get rates(): RatesService;
|
|
1695
|
+
get swap(): SwapService;
|
|
1696
|
+
get token(): TokenService;
|
|
1697
|
+
get wallet(): WalletService;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
declare class ApiModule implements SDKModule {
|
|
1701
|
+
readonly name = "api";
|
|
1702
|
+
private readonly context;
|
|
1703
|
+
private readonly logger;
|
|
1704
|
+
private readonly httpClient;
|
|
1705
|
+
private _withdrawal?;
|
|
1706
|
+
private _baas?;
|
|
1707
|
+
private _initialized;
|
|
1708
|
+
constructor(context: ModuleContext);
|
|
1709
|
+
initialize(): Promise<void>;
|
|
1710
|
+
isInitialized(): boolean;
|
|
1711
|
+
get baas(): BaasModule;
|
|
1712
|
+
get withdrawal(): WithdrawalApi;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
export { type OAuth2TokenResponse as $, ApiModule as A, BaasModule as B, type CardActivateRequestBody as C, type CorridorTransferRequest as D, type CreateUserRequest as E, type EstimateTransferRequest as F, type ExecuteTransferRequest as G, type GetActivityByIdRequest as H, type GetActivityFeedRequest as I, type GetBankAccountsRequest as J, type GetCardTransactionsRequest as K, type GetCardsRequest as L, type GetFullStatementRequest as M, type GetRatesRequest as N, type GetRecipientsByCatalogRequest as O, type GetRecipientsByCurrencyRequest as P, type GetRecipientsByNameRequest as Q, type GetRecipientsByTypeRequest as R, type GetRecipientsRequest as S, type GetSharingTokenResponse as T, type GetVerificationTokenResponse as U, type GetWalletRequest as V, type WalletBalance as W, type InitialData as X, type LoginCompanyParams as Y, type LoginUserParams as Z, type OAuth2TokenRequest as _, AuthService as a, type ActivityRecipient as a$, type PrivyAuth as a0, type RatesResponse as a1, type RecipientCreateDetailsRequestBody as a2, type RecipientCreateRequest as a3, type RecipientCreateRequestV2 as a4, type RecipientDetailsType as a5, type RecipientPaymentDetailsAch as a6, type RecipientPaymentDetailsBiFast as a7, type RecipientPaymentDetailsCard as a8, type RecipientPaymentDetailsCrypto as a9, type SwapEstimateRequest as aA, type SwapEstimateRequestByDestinationAmount as aB, type SwapEstimateRequestBySourceAmount as aC, type SwapEstimateResponse as aD, type SwapExecuteRequest as aE, type SwapExecuteResponse as aF, type TokenResponse as aG, type UpdateFreshdeskIdRequest as aH, type UpdatePhoneNumberRequest as aI, type UserDescriptor as aJ, type UserProfile as aK, type ValidateUserParams as aL, type ValidateUserResponse as aM, type VerifyTokenRequest as aN, type VerifyTokenResponse as aO, type WalletCreateGlobalRequest as aP, type WalletResponse as aQ, type WalletStatus as aR, type WalletType as aS, type ActivateBankAccountResponse as aT, type ActivityAmount as aU, type ActivityDirection as aV, type ActivityFeedResponse as aW, type ActivityFullStatementResponse as aX, type ActivityItem as aY, type ActivityOperation as aZ, type ActivityRate as a_, type RecipientPaymentDetailsFasterPayment as aa, type RecipientPaymentDetailsFpsHk as ab, type RecipientPaymentDetailsImps as ac, type RecipientPaymentDetailsInstapay as ad, type RecipientPaymentDetailsIpp as ae, type RecipientPaymentDetailsLegalAddress as af, type RecipientPaymentDetailsNip as ag, type RecipientPaymentDetailsPix as ah, type RecipientPaymentDetailsPse as ai, type RecipientPaymentDetailsResponse as aj, type RecipientPaymentDetailsSepa as ak, type RecipientPaymentDetailsSpei as al, type RecipientPaymentDetailsSwift as am, type RecipientPersonalInfo as an, type RecipientResponse as ao, type RecipientSortOrder as ap, type RecipientUpdateDetailsRequestBody as aq, type RecipientUpdateRequestBody as ar, type RecipientsResponse as as, type RegisterCompanyParams as at, type RegisterUserParams as au, type RegisterUserResponse as av, type RequestedErcWithdrawalResponse as aw, type RequestedErcWithdrawalsResponse as ax, type ResidenceAddress as ay, type SendVerificationLinkRequest as az, type ActionConfirmationCreateSmsRequest as b, type ConfigApi as b$, type ActivityReward as b0, type ActivityRewardType as b1, ActivityService as b2, type ActivitySortOrder as b3, type ActivityStatus as b4, type ActivityStep as b5, type ActivityStepType as b6, type ActivitySubject as b7, type ActivitySubjectBankAccount as b8, type ActivitySubjectCard as b9, type CardDetailsPinResponse as bA, type CardFeesInvoiceResponse as bB, type CardFeesOrderResponse as bC, type CardFormat as bD, type CardGeneration as bE, type CardIssueResponse as bF, type CardLimit as bG, type CardPaymentSystem as bH, type CardProvider as bI, type CardResponse as bJ, type CardSortOrder as bK, type CardStatus as bL, type CardTransactionConfirmationResponse as bM, type CardTransactionDirection as bN, type CardTransactionResponseCardAmount as bO, type CardTransactionResponseMerchantAmount as bP, type CardTransactionResponseMerchantDetails as bQ, type CardTransactionStatus as bR, type CardTransactionType as bS, type CardTransferEstimateResponse as bT, type CardTransferExecuteResponse as bU, type CardWithdrawalEstimateResponse as bV, type CardWithdrawalExecuteResponse as bW, type CardsResponse as bX, CardsService as bY, type ClientAppConfig as bZ, type ConfigAnalytics as b_, type ActivitySubjectMerchant as ba, type ActivitySubjectType as bb, type ActivitySubjectWallet as bc, type ActivityType as bd, type ApiError as be, type ApiResponse as bf, type BankAccount as bg, type BankAccountDetails as bh, type BankAccountStatus as bi, type BankAccountType as bj, type BankAccountsResponse as bk, type BankCorridorEstimateResponse as bl, type BankCorridorExecuteResponse as bm, BankService as bn, type BankSortOrder as bo, type Capability as bp, type CapabilityStatus as bq, type CapabilityType as br, type CardAction as bs, type CardActionType as bt, type CardBalance as bu, type CardData as bv, type CardDeliveryAddress as bw, type CardDeliveryMethod as bx, type CardDetailsCvvResponse as by, type CardDetailsPanExpiryResponse as bz, type ActionConfirmationCreateTokenRequest as c, type ConfigAuth as c0, type ConfigChain as c1, ConfigService as c2, type ConfigSupport as c3, ConfirmationService as c4, type CreateRetailUserRequest as c5, type CreateRetailUserResponse as c6, type CreateUserResponse as c7, type DeliveryAddress as c8, type EstimateTransferResponse as c9, type UserPersonalInfo as cA, type UserPhoneNumberData as cB, type UserProfileV2 as cC, type UserResidenceAddress as cD, type UserResidenceAddressV2 as cE, UserService as cF, type UserStatus as cG, type UserV2 as cH, type UserVerificationLevelV2 as cI, type UserVerificationStatus as cJ, type UserVerificationV2 as cK, type ValidateRetailUserResponse as cL, type VerificationLevel as cM, WalletService as cN, type EstimatedAmount as ca, type EstimatedAmountResponse as cb, type ExecuteTransferResponse as cc, type GetSharingTokenRequest as cd, type GetVerificationLinkResponse as ce, type LegalAddress as cf, type PaginatedResponse as cg, type Rate as ch, RatesService as ci, type RecipientAccount as cj, type RecipientInfo as ck, RecipientsService as cl, type SetSharingTokenRequest as cm, type SetSharingTokenResponse as cn, type StatementBalance as co, type StatementBankAccountsResponse as cp, type StatementPeriod as cq, type StatementTransaction as cr, type StatementUserData as cs, SwapService as ct, TokenService as cu, type User as cv, type UserAction as cw, type UserActionType as cx, type UserDocumentV2 as cy, type UserExternalProviderV2 as cz, type ActionConfirmationSmsSessionResponse as d, type ActionConfirmationVerifySmsRequest as e, type ActionTokenResponse as f, type ActivateBankAccountRequest as g, type AuthResponse as h, type AuthorizeUserResponse as i, type CardDetailsGetCvvRequestBody as j, type CardDetailsGetDetailsRequestBody as k, type CardDetailsGetPinRequestBody as l, type CardFeesCreateInvoiceRequestBody as m, type CardIssuePlasticRequest as n, type CardIssueVirtualRequest as o, type CardLimitChangeRequestBody as p, type CardNameChangeRequestBody as q, type CardTransactionResponse as r, type CardTransactionsResponse as s, type CardTransferEstimateRequest as t, type CardTransferExecuteRequest as u, type CardWithdrawalEstimateRequestBody as v, type CardWithdrawalExecuteRequestBody as w, type ConfirmPhoneNumberRequest as x, type ConfirmationActionType as y, type CorridorEstimateRequest as z };
|