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()voidaddAccountDataListener(AccountDataListener listener)Listen to all account data changes.voidcomposeCustodyWithdrawTransaction(java.lang.String fromAccountId, java.lang.String destination, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)Compose custody withdraw transaction from custody account.voidcomposeExchange(java.lang.String debitAccountId, java.lang.String creditAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeExchangeCallback callback)Compose exchange.voidcomposeNominatedTransaction(java.lang.String fromAccountId, java.math.BigDecimal amount, boolean sendMax, ComposeTransactionCallback callback)Compose transaction from user fiat account to user's nominated account.voidcomposeTransaction(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.voidcreateAccount(java.lang.String currencyCode, AccountCallback callback)Create custody or fiat account for specified currency.voidcreateCard(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.voidcreateWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)Create user wallet seeded by provided mnemonic and encrypted with user's password.voidfetchAuthenticationConfig(AuthenticationConfigCallback callback)Fetch Strong Customer Authentication (SCA) config.voidfetchTradingPairs(StringifiedJsonCallback callback)Fetch trading pairs that are currently supported.AccountgetAccount(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.StringgetId()Get user id.java.lang.StringgetIntegratorId()Get user integrator id.voidgetNominatedAccountFiatProperties(java.lang.String accountId, AccountFiatPropertiesCallback callback)Get nominated account details for specified account if it exists.booleanhasWallet()Check if user has walletbooleanisFiatCustomer()Check if user is a registered fiat customer.booleanisRecoveryMnemonic(java.lang.String mnemonic)Check if mnemonic seed phrase corresponds to user's wallet.voidmakeFiatCustomer(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.voidrecoverWallet(java.lang.String mnemonic, java.lang.String password, WalletCallback callback)Recover user wallet with mnemonic seed phrase corresponding to user's wallet.voidremoveAccountDataListener(AccountDataListener listener)Remove listener to account data changes.voidrevealCardDetails(java.lang.String cardId, CardDetailsCallback callback)Reveals sensitive card details.voidrevealMnemonic(java.lang.String password, MnemonicCallback callback)Reveal menmonic seed phrase used to seed user wallet.voidrevealPin(java.lang.String cardId, PinCallback callback)Reveal card PIN.voidsetAuthentication(java.lang.String cardId, java.util.ArrayList<KbaAnswer> knowledgeBase, SuccessCallback callback)Add KBA answers to a card without SCA.voidsetCardStatus(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'.voidsubmitExchange(ComposedExchange composedExchange, SubmitExchangeCallback callback)Submit an exchange.voidsubmitTransaction(ComposedTransaction composedTransaction, java.lang.String toAccountId, java.lang.String metadata, SubmitTransactionCallback callback)Submit a transaction.voidunblockPin(java.lang.String cardId, SuccessCallback callback)Unblock card PIN.voidunlockWallet(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:UserGet user id.
-
getIntegratorId
public java.lang.String getIntegratorId()
Description copied from interface:UserGet user integrator id.- Specified by:
getIntegratorIdin interfaceUser- Returns:
- user integrator id
-
hasWallet
public boolean hasWallet()
Description copied from interface:UserCheck if user has wallet
-
isFiatCustomer
public boolean isFiatCustomer()
Description copied from interface:UserCheck if user is a registered fiat customer.- Specified by:
isFiatCustomerin 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:UserMake user fiat customer by providing user's personal details.- Specified by:
makeFiatCustomerin 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:UserCreate custody or fiat account for specified currency. When creating a fiat account, user must already be fiat customer.- Specified by:
createAccountin 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:UserCompose transaction between custody or fiat accounts in Zumo ecosystem. Refer to Send Transactions guide for usage details.On success
ComposedTransactionis returned via callback.- Specified by:
composeTransactionin interfaceUser- Parameters:
fromAccountId- custody or fiatAccountidentifiertoAccountId- custody or fiatAccountidentifieramount- 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:UserCompose custody withdraw transaction from custody account. Refer to Send Transactions guide for usage details.On success
ComposedTransactionis returned via callback.- Specified by:
composeCustodyWithdrawTransactionin interfaceUser- Parameters:
fromAccountId- custodyAccountidentifierdestination- 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:UserCompose transaction from user fiat account to user's nominated account. Refer to Send Transactions guide for usage details.On success
ComposedTransactionobject is returned via callback.- Specified by:
composeNominatedTransactionin interfaceUser- Parameters:
fromAccountId-Accountidentifieramount- 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:UserSubmit a transaction. Refer to Send Transactions guide for usage details.On success
Transactionobject is returned via callback.- Specified by:
submitTransactionin 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:UserFetch trading pairs that are currently supported.On success stringified JSON containing supported pairs and other details is returned via callback.
- Specified by:
fetchTradingPairsin 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:UserCompose exchange. Refer to Make Exchanges guide for usage details.On success
ComposedExchangeis returned via callback.- Specified by:
composeExchangein interfaceUser- Parameters:
debitAccountId-AccountidentifiercreditAccountId-Accountidentifieramount- 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:UserSubmit an exchange. Make Exchanges guide for usage details.On success
Exchangeobject is returned via callback.- Specified by:
submitExchangein interfaceUser- Parameters:
composedExchange- Composed exchange retrieved as the result ofcomposeExchangemethodcallback- An interface to receive the result or error
-
getNominatedAccountFiatProperties
public void getNominatedAccountFiatProperties(java.lang.String accountId, AccountFiatPropertiesCallback callback)Description copied from interface:UserGet nominated account details for specified account if it exists. Refer to Create Fiat Account for explanation about nominated account.- Specified by:
getNominatedAccountFiatPropertiesin interfaceUser- Parameters:
accountId-Accountidcallback- an interface to receive the result or error- See Also:
AccountFiatProperties
-
fetchAuthenticationConfig
public void fetchAuthenticationConfig(AuthenticationConfigCallback callback)
Description copied from interface:UserFetch Strong Customer Authentication (SCA) config.- Specified by:
fetchAuthenticationConfigin 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:UserCreate 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:
createCardin 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:UserSet 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:
setCardStatusin 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:UserReveals sensitive card details.- Specified by:
revealCardDetailsin 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:UserReveal card PIN.
-
unblockPin
public void unblockPin(java.lang.String cardId, SuccessCallback callback)Description copied from interface:UserUnblock card PIN.- Specified by:
unblockPinin 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:UserAdd 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:
setAuthenticationin 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:UserCreate user wallet seeded by provided mnemonic and encrypted with user's password.Mnemonic can be generated by
generateMnemonicmethod inUtilsclass.- Specified by:
createWalletin 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:UserUnlock user wallet with user's password.- Specified by:
unlockWalletin 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:UserReveal menmonic seed phrase used to seed user wallet.- Specified by:
revealMnemonicin 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:UserCheck if mnemonic seed phrase corresponds to user's wallet. This is useful for validating seed phrase before trying to recover wallet.- Specified by:
isRecoveryMnemonicin 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:UserRecover 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:
recoverWalletin 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:UserGet account in specific currency, on specific network, with specific type.- Specified by:
getAccountin 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:UserGet all user accounts.- Specified by:
getAccountsin interfaceUser- Returns:
- all user accounts
-
addAccountDataListener
public void addAccountDataListener(AccountDataListener listener)
Description copied from interface:UserListen to all account data changes.- Specified by:
addAccountDataListenerin interfaceUser- Parameters:
listener- interface to listen to user changes
-
removeAccountDataListener
public void removeAccountDataListener(AccountDataListener listener)
Description copied from interface:UserRemove listener to account data changes.- Specified by:
removeAccountDataListenerin interfaceUser- Parameters:
listener- interface to listen to user changes
-
-