/BIP39

Pure Swift implementation of Bitcoin BIP39

Primary LanguageSwiftBSD 2-Clause "Simplified" LicenseBSD-2-Clause

BIP39

Build Status codecov

Swift implementation of Bitcoin BIP39. #PureSwift

// Generating the mnemonic, defaults to english wordlist and 128-bits of entropy
let random = Mnemonic()

// Initialize with seed phrase and passphrase
let mnemonic = Mnemonic(phrase: "rally speed budget undo purpose orchard hero news crunch flush wine finger".components(separatedBy: " "), passphrase: "")

// From mnemonic to seed
let seed = mnemonic.seed

License

Code is under the BSD 2-clause "Simplified" License. Documentation is under the Creative Commons Attribution license.