Class User.CppProxy
- java.lang.Object
-
- money.zumo.zumokit.User.CppProxy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface money.zumo.zumokit.User
User.CppProxy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_djinni_private_destroy()
void
addAccountDataListener(AccountDataListener listener)
Listen to all account data changes.void
composeCustodyWithdrawTransaction(java.lang.String fromAccountId, java.lang.String destination, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Compose custody withdraw transaction from custody account.void
composeExchange(java.lang.String debitAccountId, java.lang.String creditAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeExchangeCallback callback)
Compose exchange.void
composeNominatedTransaction(java.lang.String fromAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Compose transaction from user fiat account to user's nominated account.void
composeTransaction(java.lang.String fromAccountId, java.lang.String toAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Compose transaction between custody or fiat accounts in Zumo ecosystem.void
createAccount(java.lang.String currencyCode, AccountCallback callback)
Create custody or fiat account for specified currency.void
createCard(java.lang.String fiatAccountId, java.lang.String cardType, java.lang.String mobileNumber, java.util.ArrayList<KbaAnswer> knowledgeBase, CardCallback callback)
Create card for a fiat account.void
createWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)
Create user wallet seeded by provided mnemonic and encrypted with user's password.void
fetchAuthenticationConfig(AuthenticationConfigCallback callback)
Fetch Strong Customer Authentication (SCA) config.void
fetchTradingPairs(StringifiedJsonCallback callback)
Fetch trading pairs that are currently supported.Account
getAccount(java.lang.String currencyCode, java.lang.String network, java.lang.String type, java.lang.String custodyType)
Get account in specific currency, on specific network, with specific type.java.util.ArrayList<Account>
getAccounts()
Get all user accounts.java.lang.String
getId()
Get user id.java.lang.String
getIntegratorId()
Get user integrator id.void
getNominatedAccountFiatProperties(java.lang.String accountId, AccountFiatPropertiesCallback callback)
Get nominated account details for specified account if it exists.boolean
hasWallet()
Check if user has walletboolean
isFiatCustomer()
Check if user is a registered fiat customer.boolean
isRecoveryMnemonic(java.lang.String mnemonic)
Check if mnemonic seed phrase corresponds to user's wallet.void
makeFiatCustomer(java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String dateOfBirth, java.lang.String email, java.lang.String phone, Address address, SuccessCallback callback)
Make user fiat customer by providing user's personal details.void
recoverWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)
Recover user wallet with mnemonic seed phrase corresponding to user's wallet.void
removeAccountDataListener(AccountDataListener listener)
Remove listener to account data changes.void
revealCardDetails(java.lang.String cardId, CardDetailsCallback callback)
Reveals sensitive card details.void
revealMnemonic(java.lang.String password, MnemonicCallback callback)
Reveal menmonic seed phrase used to seed user wallet.void
revealPin(java.lang.String cardId, PinCallback callback)
Reveal card PIN.void
setAuthentication(java.lang.String cardId, java.util.ArrayList<KbaAnswer> knowledgeBase, SuccessCallback callback)
Add KBA answers to a card without SCA.void
setCardStatus(java.lang.String cardId, java.lang.String cardStatus, java.lang.String pan, java.lang.String cvv2, SuccessCallback callback)
Set card status to 'ACTIVE', 'BLOCKED' or 'CANCELLED'.void
submitExchange(ComposedExchange composedExchange, SubmitExchangeCallback callback)
Submit an exchange.void
submitTransaction(ComposedTransaction composedTransaction, java.lang.String toAccountId, java.lang.String metadata, SubmitTransactionCallback callback)
Submit a transaction.void
unblockPin(java.lang.String cardId, SuccessCallback callback)
Unblock card PIN.void
unlockWallet(java.lang.String password, WalletCallback callback)
Unlock user wallet with user's password.
-
-
-
Method Detail
-
_djinni_private_destroy
public void _djinni_private_destroy()
-
getId
public java.lang.String getId()
Description copied from interface:User
Get user id.
-
getIntegratorId
public java.lang.String getIntegratorId()
Description copied from interface:User
Get user integrator id.- Specified by:
getIntegratorId
in interfaceUser
- Returns:
- user integrator id
-
hasWallet
public boolean hasWallet()
Description copied from interface:User
Check if user has wallet
-
isFiatCustomer
public boolean isFiatCustomer()
Description copied from interface:User
Check if user is a registered fiat customer.- Specified by:
isFiatCustomer
in interfaceUser
- Returns:
- true if user is a registered fiat customer.
-
makeFiatCustomer
public void makeFiatCustomer(java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String dateOfBirth, java.lang.String email, java.lang.String phone, Address address, SuccessCallback callback)
Description copied from interface:User
Make user fiat customer by providing user's personal details.- Specified by:
makeFiatCustomer
in interfaceUser
- Parameters:
firstName
- first namemiddleName
- middle name or nulllastName
- last namedateOfBirth
- date of birth in ISO 8601 format, e.g '2020-08-12'email
- emailphone
- phone numberaddress
- home addresscallback
- an interface to receive the result or error
-
createAccount
public void createAccount(java.lang.String currencyCode, AccountCallback callback)
Description copied from interface:User
Create custody or fiat account for specified currency. When creating a fiat account, user must already be fiat customer.- Specified by:
createAccount
in interfaceUser
- Parameters:
currencyCode
- country code, e.g. 'GBP', 'BTC', 'ETH'callback
- an interface to receive the result or error- See Also:
Account
-
composeTransaction
public void composeTransaction(java.lang.String fromAccountId, java.lang.String toAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Description copied from interface:User
Compose transaction between custody or fiat accounts in Zumo ecosystem. Refer to Send Transactions guide for usage details.On success
ComposedTransaction
is returned via callback.- Specified by:
composeTransaction
in interfaceUser
- Parameters:
fromAccountId
- custody or fiatAccount
identifiertoAccountId
- custody or fiatAccount
identifieramount
- amount in source account currencysendMax
- send maximum possible funds to destinationcallback
- an interface to receive the result or error
-
composeCustodyWithdrawTransaction
public void composeCustodyWithdrawTransaction(java.lang.String fromAccountId, java.lang.String destination, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Description copied from interface:User
Compose custody withdraw transaction from custody account. Refer to Send Transactions guide for usage details.On success
ComposedTransaction
is returned via callback.- Specified by:
composeCustodyWithdrawTransaction
in interfaceUser
- Parameters:
fromAccountId
- custodyAccount
identifierdestination
- destination address or non-custodial account identifieramount
- amount in source account currencysendMax
- send maximum possible funds to destinationcallback
- an interface to receive the result or error
-
composeNominatedTransaction
public void composeNominatedTransaction(java.lang.String fromAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)
Description copied from interface:User
Compose transaction from user fiat account to user's nominated account. Refer to Send Transactions guide for usage details.On success
ComposedTransaction
object is returned via callback.- Specified by:
composeNominatedTransaction
in interfaceUser
- Parameters:
fromAccountId
-Account
identifieramount
- amount in source account currencysendMax
- send maximum possible funds to destinationcallback
- an interface to receive the result or error
-
submitTransaction
public void submitTransaction(ComposedTransaction composedTransaction, java.lang.String toAccountId, java.lang.String metadata, SubmitTransactionCallback callback)
Description copied from interface:User
Submit a transaction. Refer to Send Transactions guide for usage details.On success
Transaction
object is returned via callback.- Specified by:
submitTransaction
in interfaceUser
- Parameters:
composedTransaction
- Composed transaction retrieved as a result of one of the compose transaction methodstoAccountId
- Debit account id override, only applicable to direct custody deposits. In case no account id is specified senders custody account will be debited.metadata
- Optional metadata (stringified JSON) that will be attached to transactioncallback
- An interface to receive the result or error
-
fetchTradingPairs
public void fetchTradingPairs(StringifiedJsonCallback callback)
Description copied from interface:User
Fetch trading pairs that are currently supported.On success stringified JSON containing supported pairs and other details is returned via callback.
- Specified by:
fetchTradingPairs
in interfaceUser
-
composeExchange
public void composeExchange(java.lang.String debitAccountId, java.lang.String creditAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeExchangeCallback callback)
Description copied from interface:User
Compose exchange. Refer to Make Exchanges guide for usage details.On success
ComposedExchange
is returned via callback.- Specified by:
composeExchange
in interfaceUser
- Parameters:
debitAccountId
-Account
identifiercreditAccountId
-Account
identifieramount
- amount in deposit account currencysendMax
- exchange maximum possible fundscallback
- an interface to receive the result or error
-
submitExchange
public void submitExchange(ComposedExchange composedExchange, SubmitExchangeCallback callback)
Description copied from interface:User
Submit an exchange. Make Exchanges guide for usage details.On success
Exchange
object is returned via callback.- Specified by:
submitExchange
in interfaceUser
- Parameters:
composedExchange
- Composed exchange retrieved as the result ofcomposeExchange
methodcallback
- An interface to receive the result or error
-
getNominatedAccountFiatProperties
public void getNominatedAccountFiatProperties(java.lang.String accountId, AccountFiatPropertiesCallback callback)
Description copied from interface:User
Get nominated account details for specified account if it exists. Refer to Create Fiat Account for explanation about nominated account.- Specified by:
getNominatedAccountFiatProperties
in interfaceUser
- Parameters:
accountId
-Account
idcallback
- an interface to receive the result or error- See Also:
AccountFiatProperties
-
fetchAuthenticationConfig
public void fetchAuthenticationConfig(AuthenticationConfigCallback callback)
Description copied from interface:User
Fetch Strong Customer Authentication (SCA) config.- Specified by:
fetchAuthenticationConfig
in interfaceUser
- Parameters:
callback
- an interface to receive the result or error
-
createCard
public void createCard(java.lang.String fiatAccountId, java.lang.String cardType, java.lang.String mobileNumber, java.util.ArrayList<KbaAnswer> knowledgeBase, CardCallback callback)
Description copied from interface:User
Create card for a fiat account.At least one Knowled-Based Authentication (KBA) answer should be defined, answers are limited to 256 characters and cannot be null or empty and only one answer per question type should be provided.
- Specified by:
createCard
in interfaceUser
- Parameters:
fiatAccountId
- fiat account idcardType
- 'VIRTUAL' or 'PHYSICAL'mobileNumber
- card holder mobile number, starting with a '+', followed by the country code and then the mobile numberknowledgeBase
- list of KBA answerscallback
- an interface to receive the result or error- See Also:
Card
,CardType
-
setCardStatus
public void setCardStatus(java.lang.String cardId, java.lang.String cardStatus, java.lang.String pan, java.lang.String cvv2, SuccessCallback callback)
Description copied from interface:User
Set card status to 'ACTIVE', 'BLOCKED' or 'CANCELLED'. - To block card, set card status to 'BLOCKED'. - To activate a physical card, set card status to 'ACTIVE' and provide PAN and CVV2 fields. - To cancel a card, set card status to 'CANCELLED'. - To unblock a card, set card status to 'ACTIVE.'.- Specified by:
setCardStatus
in interfaceUser
- Parameters:
cardId
- card idcardStatus
- new card statuspan
- PAN when activating a physical card, null otherwisecvv2
- CVV2 when activating a physical card, null otherwisecallback
- an interface to receive the result or error- See Also:
CardStatus
-
revealCardDetails
public void revealCardDetails(java.lang.String cardId, CardDetailsCallback callback)
Description copied from interface:User
Reveals sensitive card details.- Specified by:
revealCardDetails
in interfaceUser
- Parameters:
cardId
- card idcallback
- an interface to receive the result or error- See Also:
CardDetails
-
revealPin
public void revealPin(java.lang.String cardId, PinCallback callback)
Description copied from interface:User
Reveal card PIN.
-
unblockPin
public void unblockPin(java.lang.String cardId, SuccessCallback callback)
Description copied from interface:User
Unblock card PIN.- Specified by:
unblockPin
in interfaceUser
- Parameters:
cardId
- card idcallback
- an interface to receive the result or error
-
setAuthentication
public void setAuthentication(java.lang.String cardId, java.util.ArrayList<KbaAnswer> knowledgeBase, SuccessCallback callback)
Description copied from interface:User
Add KBA answers to a card without SCA.This endpoint is used to set Knowledge-Based Authentication (KBA) answers to a card without Strong Customer Authentication (SCA). Once it is set SCA flag on corresponding card is set to true.
At least one answer should be defined, answers are limited to 256 characters and cannot be null or empty and only one answer per question type should be provided.
- Specified by:
setAuthentication
in interfaceUser
- Parameters:
cardId
- card idknowledgeBase
- list of KBA answerscallback
- an interface to receive the result or error
-
createWallet
public void createWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)
Description copied from interface:User
Create user wallet seeded by provided mnemonic and encrypted with user's password.Mnemonic can be generated by
generateMnemonic
method inUtils
class.- Specified by:
createWallet
in interfaceUser
- Parameters:
mnemonic
- mnemonic seed phrasepassword
- user provided passwordcallback
- an interface to receive the result or error- See Also:
Wallet
-
unlockWallet
public void unlockWallet(java.lang.String password, WalletCallback callback)
Description copied from interface:User
Unlock user wallet with user's password.- Specified by:
unlockWallet
in interfaceUser
- Parameters:
password
- user provided passwordcallback
- an interface to receive the result or error- See Also:
Wallet
-
revealMnemonic
public void revealMnemonic(java.lang.String password, MnemonicCallback callback)
Description copied from interface:User
Reveal menmonic seed phrase used to seed user wallet.- Specified by:
revealMnemonic
in interfaceUser
- Parameters:
password
- user provided passwordcallback
- an interface to receive the result or error
-
isRecoveryMnemonic
public boolean isRecoveryMnemonic(java.lang.String mnemonic)
Description copied from interface:User
Check if mnemonic seed phrase corresponds to user's wallet. This is useful for validating seed phrase before trying to recover wallet.- Specified by:
isRecoveryMnemonic
in interfaceUser
- Parameters:
mnemonic
- mnemonic seed phrase- Returns:
- true if mnemonic seed phrase corresponds to user's wallet
-
recoverWallet
public void recoverWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)
Description copied from interface:User
Recover user wallet with mnemonic seed phrase corresponding to user's wallet. This can be used if user forgets his password or wants to change his wallet password.- Specified by:
recoverWallet
in interfaceUser
- Parameters:
mnemonic
- mnemonic seed phrase corresponding to user's walletpassword
- user provided passwordcallback
- an interface to receive the result or error
-
getAccount
public Account getAccount(java.lang.String currencyCode, java.lang.String network, java.lang.String type, java.lang.String custodyType)
Description copied from interface:User
Get account in specific currency, on specific network, with specific type.- Specified by:
getAccount
in interfaceUser
- Parameters:
currencyCode
- currency code, e.g. 'BTC', 'ETH' or 'GBP'network
- network type, e.g. 'MAINNET', 'TESTNET' or 'RINKEBY'type
- account type, e.g. 'STANDARD', 'COMPATIBILITY' or 'SEGWIT'custodyType
- custdoy type, i.e. 'CUSTODY' or 'NON-CUSTODY'- Returns:
- account with selected parameters if it exists, null otherwise
- See Also:
CurrencyCode
,NetworkType
,AccountType
,CustodyType
-
getAccounts
public java.util.ArrayList<Account> getAccounts()
Description copied from interface:User
Get all user accounts.- Specified by:
getAccounts
in interfaceUser
- Returns:
- all user accounts
-
addAccountDataListener
public void addAccountDataListener(AccountDataListener listener)
Description copied from interface:User
Listen to all account data changes.- Specified by:
addAccountDataListener
in interfaceUser
- Parameters:
listener
- interface to listen to user changes
-
removeAccountDataListener
public void removeAccountDataListener(AccountDataListener listener)
Description copied from interface:User
Remove listener to account data changes.- Specified by:
removeAccountDataListener
in interfaceUser
- Parameters:
listener
- interface to listen to user changes
-
-