-
-
Save samdowd/68b035fca76a46002f64801d9bcea427 to your computer and use it in GitHub Desktop.
Code for loading account from Android KinBase storage into a Kinetic keypair
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val account = environment.storage.getAccount(accountContext.accountId) | |
val seed = account!!.key.value + account.id.value | |
val keypair = Keypair.fromByteArray(seed) | |
// Note that if you are using KinBase and Kinetic as dependencies in the same project, | |
// as in the above snippet, you may need to import Kinetic like this to avoid conflicts: | |
implementation('com.github.kin-labs:kinetic-android-sdk:KINETIC_VERSION') { | |
exclude module: 'protobuf-java' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment