Skip to main content

Device & Accounts Info

Get Device Info

Get the information about the current connected DCENT biometric wallet device using getDeviceInfo() function.

Parameters

None

Returns

DeviceInfo - the current connected DCENT biometric wallet device Information

class DeviceInfo

NameTypeDescription
labelStringLabel of connected device
deviceIdStringDevice Identifier of connected device
fwVersionStringFirmware version of connected device
ksmVersionStringKSM version of connected device
stateStateState of connected device
DCENT biometric wallet's state values are as follows.
- init, ready, secure, locked_fp, locked_pin
Only "secure" state dongle can be used.
coinListList<CoinType>Supported coin list of connected device

Example

DeviceInfo mDeviceInfo = mDcentmanager.getDeviceInfo();

Set Device Label

Set the label name to the DCENT biometric wallet using setDeviceLabel() function.(If you reboot your DCENT, you can see the label name.)

Parameters

ParameterTypeDescription
labelStringthe label name of DCENT biometric wallet.

Returns

None

Example

mDcentmanager.setDeviceLabel("newLabel");

Get Account Info

Get the list of current accounts in the DCENT biometric wallet using getAccountInfo() function.

Parameters

None

Returns

List<Account> - current account list in DCENT biometric wallet.

Example

List<Account> accountList = mDcentmanager.getAccountInfo()

Create & Sync Account

Create or update accounts on the device.

If the account of the specified key path already exists, the syncAccount() method does not create an account, it just syncs the account information. For example, if you want to change the label of account or modify the balance, you can use the syncAccount() method.

(※ As of firmware version 2.9.2 or later, the DCENT biometric wallet device does not support updating the balance.)

Parameters

ParameterTypeDescription
accountsList<SyncAccount> | SyncAccountaccount list or account to be synced.

Returns

boolean - sync result. true if you sync completely otherwise false.

Example

String labelOfAccount = "bitcoin_1" ; // account label
String balanceOfAccount = "0 BTC" ; // balance of account. This string will be displayed on device.
String keyPath = "m/44'/0'/0'/0/0/"; // key path of the account

/*
Bitcoin account will be created.
if bitcoin account is already created, the bitcoin account label and balance will be just modified.
*/
SyncAccount syncAccount = new SyncAccount(CoinType.BITCOIN.getCoinGroup(),
CoinType.BITCOIN.name(),
labelOfAccount,
balanceOfAccount,
keyPath);
mDcentmanager.syncAccount(syncAccount);