Skip to content

Instantly share code, notes, and snippets.

@samdowd
Created December 5, 2022 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samdowd/68b035fca76a46002f64801d9bcea427 to your computer and use it in GitHub Desktop.
Save samdowd/68b035fca76a46002f64801d9bcea427 to your computer and use it in GitHub Desktop.
Code for loading account from Android KinBase storage into a Kinetic keypair
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