Latest 0.1.2
Homepage https://github.com/OnerootProject/EthereumKit
License Apache 2.0
Platforms ios 8.0, requires ARC
Authors

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'

Latest podspec

{
    "name": "EthereumKit",
    "version": "0.1.2",
    "summary": "Ethereum protocol toolkit for Swift",
    "description": "EthereumKit implements Ethereum protocol in Swift. It is an implementation of the Ethereum SPV protocol written (almost) entirely in swift.n```",
    "homepage": "https://github.com/OnerootProject/EthereumKit",
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Liu Pengpeng": "[email protected]"
    },
    "social_media_url": "https://twitter.com/pengpengliu",
    "requires_arc": true,
    "source": {
        "git": "https://github.com/OnerootProject/EthereumKit.git",
        "tag": "v0.1.2"
    },
    "source_files": "EthereumKit/**/*.{h,m,swift}",
    "module_map": "EthereumKit/EthereumKit.modulemap",
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "pod_target_xcconfig": {
        "SWIFT_WHOLE_MODULE_OPTIMIZATION": "YES",
        "APPLICATION_EXTENSION_API_ONLY": "YES",
        "SWIFT_INCLUDE_PATHS": "${PODS_ROOT}/EthereumKit/Libraries",
        "HEADER_SEARCH_PATHS": ""${PODS_ROOT}/EthereumKit/Libraries/openssl/include" "${PODS_ROOT}/EthereumKit/Libraries/secp256k1/include"",
        "LIBRARY_SEARCH_PATHS": ""${PODS_ROOT}/EthereumKit/Libraries/openssl/lib" "${PODS_ROOT}/EthereumKit/Libraries/secp256k1/lib""
    },
    "preserve_paths": [
        "setup",
        "Libraries"
    ],
    "prepare_command": "sh setup/build_libraries.sh"
}

Pin It on Pinterest

Share This