Skip to content

OnerootProject/EthereumKit

Repository files navigation

EthereumKit

Build Status codecov Carthage Compatible

Rebuild application program interface based on BitcoinKit.

Usage

Generate mnemonic

let mnemonic = try Mnemonic.generate()

let seed = Mnemonic.seed(mnemonic: mnemonic)

Get ethereum xPrivKey/xPubKey

let keychain = HDKeychain(seed: seed, network: .mainnet)

let xPrivKey = try! keychain.derivedKey(path: "m/44'/60'/0'/")
let xPubKey = xPrivKey.getHDPublicKey()

Generate ethereum privateKey

let privateKey = try! keychain.derivedKey(path: "m/44'/60'/0'/0/0")

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.3+
  • Swift 3.1+

Installation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate EthereumKit into your Xcode project using Carthage, specify it in your Cartfile:

github "OnerootProject/EthereumKit"

Run carthage update to build the framework and drag the built EthereumKit.framework into your Xcode project.

CocoaPods

EthereumKit is available through CocoaPods. To install it, simply add the following lines to your Podfile:

use_frameworks!
pod 'EthereumKit'

About

Rebuild application program interface based on BitcoinKit

Resources

License

Stars

Watchers

Forks

Packages

No packages published