It is a project for Bytom Android SDK,this SDK contains methods for easily interacting with the Bytom wallet at local .
you can relevant dependency to your project:
-
maven:
<dependency> <groupId>com.io.bytom</groupId> <artifactId>wallet</artifactId> <version>1.0.1</version> <type>pom</type> </dependency>
-
android:
implementation 'com.io.bytom:wallet:1.0.1'
This guide will walk you through the basic functions of Bytom-Android-Sdk:
BytomWallet.initWallet(getApplication());
when initializing application, you need to apply the following permission at the same time.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
string
:alias , name of the keystring
:password , passowrld of the key
BytomWallet.createKey(alias, "123");
BytomWallet.listKeys();
string
:alias , name of the keyInteger
: quorum, the default value is 1, threshold of keys that must sign a transaction to spend asset units controlled by the account.string
:xpub, pubkey of the key.
BytomWallet.createAccount(alias, 1, xpub);
BytomWallet.listAccounts();
string
:account_id, id of account.string
:account_alias, alias of account.
BytomWallet.createAccountReceiver(accountId, accountAlias);
string
:account_id, id of account.string
:account_alias, alias of account.
BytomWallet.listAddress(accountId, accountAlias);
BytomWallet.backupWallet();
string
:walletImage, string of walletImage.
BytomWallet.restoreWallet("")
You find more examples at examples . If you find a bug, please submit the issue in Github directly.