From fb0fcf9f89f3951ef7a92549a8245ee8e154b378 Mon Sep 17 00:00:00 2001 From: yuzushioh Date: Fri, 16 Feb 2018 01:17:01 +0900 Subject: [PATCH] update readme --- README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2a5571b..75b0d03 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # EthereumKit -EthereumKit is a Swift framework that enables you to create Ethereum wallet and use it in your app. +EthereumKit is a Swift framework that enables you to create Ethereum wallet and use it in your app. Architectures are highly inspired by [WalletKit](https://github.com/yuzushioh/WalletKit) and [BitcoinKit](https://github.com/kishikawakatsumi/BitcoinKit) 🚨 __EthereumKit is currently under development. not ready for the production use__ 🚨 @@ -19,7 +19,7 @@ let entropy = Data(hex: "000102030405060708090a0b0c0d0e0f") let mnemonic = Mnemonic.create(entropy: entropy) print(mnemonic) // abandon amount liar amount expire adjust cage candy arch gather drum buyer - + let seed = Mnemonic.createSeed(mnemonic: mnemonic) print(seed.toHexString()) ``` @@ -53,15 +53,22 @@ print(firstPrivateKey.publicKey.address) // It generates master key pair from the seed provided. let wallet = Wallet(seed: seed, network: .main) -let firstAddress = wallet.generateAddress(at: 0) -print(firstAddress) - -let secondAddress = wallet.generateAddress(at: 1) -print(secondAddress) - -let thirdAddress = wallet.generateAddress(at: 2) -print(thirdAddress) +let firstAddress = wallet.receiveAddress(at: 0) +// 0x83f1caAdaBeEC2945b73087F803d404F054Cc2B7 + +let secondAddress = wallet.receiveAddress(at: 1) +// 0xb3c3D923CFc4d551b38Db8A86BbA42B623D063cE + +let thirdAddress = wallet.receiveAddress(at: 2) +// 0x82e35B34CfBEB9704E51Eb17f8263d919786E66a + ``` +## Installation +#### [Carthage](https://github.com/Carthage/Carthage) + +- Insert `github "yuzushioh/EthereumKit"` to your Cartfile. +- Run `carthage update --platform ios`. + ## License EthereumKit is released under the [MIT License](LICENSE.md).