Latest 1.2.0
Homepage https://github.com/vitelabs/vite-keystore-ios
License MIT
Platforms ios 10.0
Dependencies BigInt, CryptoSwift, TrezorCryptoEd25519WithBlake2b
Frameworks UIKit, Security
Authors

Build Status
CocoaPods Compatible
Platform

Vite_HDWalletKit is a swift framework that you can create mnemonic words ,bip public key ,address

You can check if the mnemonic generation is working right here.

Features

  • Mnemonic recovery phrease in BIP39
  • BIP32 Root Key
  • BIP32 Extended Private Key, use Ed25519 & Blake2b encrypt
  • BIP32 Extended Public Key, use Ed25519 & Blake2b encrypt
  • Derived Addresses, use Ed25519 & Blake2b encrypt

Installation

CocoaPods

To integrate HDWalletKit into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Vite_HDWalletKit'

How to use

Generate seed and convert it to mnemonic sentence.

let mnemonic = Mnemonic.generator(entropy: entropy)
print(mnemonic)
let seed = Mnemonic.createBIP39Seed(mnemonic: mnemonic)
print(seed.toHexString())

PrivateKey and key derivation (BIP39)

let key = HDBip.masterKey(seed: seed)

for i in 0..<10 {
let path = "(HDBip.viteAccountPrefix)/(i)'"
guard let k = HDBip.deriveForPath(path: path, seed: seed) else { fatalError() }
guard let (seed, address) = k.stringPair() else { fatalError() }
let account = "(path) (seed)  (address)"
}
let masterPrivateKey = PrivateKey(seed: seed, network: .main)

License

Vite_HDWalletKit is released under the MIT License.

Latest podspec

{
    "name": "Vite_HDWalletKit",
    "version": "1.2.0",
    "summary": "Vite App HD wallet kit",
    "homepage": "https://github.com/vitelabs/vite-keystore-ios",
    "description": "Vite wallet is a swift framework that you  can  create mnemonic words ,bip public key ,address",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Water": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vitelabs/vite-keystore-ios.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "Vite-keystore/Classes/**/*",
    "public_header_files": "Vite-keystore/Classes/Core/Crypto/Bit.h",
    "frameworks": [
        "UIKit",
        "Security"
    ],
    "dependencies": {
        "BigInt": [
            "~> 3.0"
        ],
        "CryptoSwift": [
            "~> 0.12.0"
        ],
        "TrezorCryptoEd25519WithBlake2b": [
            "~> 0.0.1"
        ]
    },
    "pod_target_xcconfig": {
        "SWIFT_OPTIMIZATION_LEVEL": "-Owholemodule"
    }
}

Pin It on Pinterest

Share This