Skip to content

Instantly share code, notes, and snippets.

@fortmarek
Last active October 29, 2018 09:02
Show Gist options
  • Save fortmarek/34e253aec97b9b41bfc259e3a34e593c to your computer and use it in GitHub Desktop.
Save fortmarek/34e253aec97b9b41bfc259e3a34e593c to your computer and use it in GitHub Desktop.
// Use your own mnemonic sentence
let sentence: Mnemonic.MnemonicSentence = Mnemonic.MnemonicSentence(["truly", "law", "tide", "pony", "media", "degree", "two", "goat", "ignore", "twice", "project", "message", "vanish", "spring", "movie"])
let walletStorage = KeychainStorageStrategy(identifier: "cz.ackee.etherkit.example")
HDKey.Private.create(
with: MnemonicStorageStrategy(walletStorage),
mnemonic: sentence,
network: .main,
path: [
KeyPathNode(at: 44, hardened: true),
KeyPathNode(at: 60, hardened: true),
KeyPathNode(at: 0, hardened: true),
KeyPathNode(at: 0),
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment