Latest 1.2.0
License MIT
Platforms ios 8.0, osx 10.10
Dependencies CryptoSwift

MnemonicKit     Build Status     codecov

An implementation of BIP39 in Swift. MnemonicKit supports both English and Chinese mnemonics.

This library is a fork of (CKMnemonic)[]. This fork provides several conveniences over the original library, namely:

  • Converting throwing APIs to non-throwing nullable APIs
  • Additional helper methods
  • Code clarity and documentation
  • Additional Testing
  • Support on OSX



TezosKit supports installation via CocoaPods. You can depened on MnemonicKit by adding the following to your Podfile:

pod "MnemonicKit"


Generate a Mnemonic

  let englishMnemonic = Mnemonic.generateMnemonic(strength: 64, language: .english)
  let chineseMnemonic = Mnemonic.generateMnemonic(strength: 128, language: .chinese)

Generate a Mnemonic from a Hex Representation

  let hexRepresentation: String = ...
  let mnemonic = Mnemonic.mnemonicString(from: hexRepresentation)
  print("Mnemonic: (mnemonic)nFrom hex string: (hexRepresentation)")

Generate a Seed String

  let englishMnemonic = Mnemonic.generateMnemonic(strength: 64, language: .english)
  let passphrase: String = ...
  let deterministicSeedString = Mnemonic.deterministicSeedString(from: mnemonicString,
                                                                 passphrase: passphrase,
                                                                 language: .english)
  print("Deterministic Seed String: (deterministicSeedString)")


I am happy to accept pull requests. If anyone is able to reach the original authors of CKMnemonic, I am happy to merge this library upstream with them.



Latest podspec

    "name": "MnemonicKit",
    "version": "1.2.0",
    "summary": "MnemonicKit provides a Swift implementation of BIP39",
    "description": "MnemonicKit provides a Swift implementation of BIP39. nnThis library is originally forked from CKMnemonic: Modifications are made for non-throwing APIs and support on OSX as well as iOS. Credit for most of this work is given to [email protected], [email protected]",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Keefer Taylor": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.2.0"
    "exclude_files": "Sources/App/*.swift",
    "source_files": [
    "swift_version": "4.2",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    "dependencies": {
        "CryptoSwift": [
    "testspecs": [
            "name": "Tests",
            "test_type": "unit",
            "source_files": "MnemonicKitTests/*.swift",
            "resources": [

Pin It on Pinterest

Share This