-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# CKMnemonic | ||
An implementation of BIP39 used Swift | ||
|
||
<!--[](https://travis-ci.org/work_cocody@hotmail.com/CKMnemonic)--> | ||
[](http://cocoapods.org/pods/CKMnemonic) | ||
[](http://cocoapods.org/pods/CKMnemonic) | ||
[](http://cocoapods.org/pods/CKMnemonic) | ||
|
||
## Example | ||
|
||
To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
|
||
## Usage | ||
|
||
```Swift | ||
do { | ||
let language: CKMnemonicLanguageType = .chinese | ||
let mnemonic = try CKMnemonic.generateMnemonic(strength: 128, language: language) | ||
print(mnemonic) | ||
let seed = try CKMnemonic.deterministicSeedString(from: mnemonic, passphrase: "Test", language: language) | ||
print(seed) | ||
} catch { | ||
print(error) | ||
} | ||
``` | ||
|
||
## Requirements | ||
Xcode 8.3.2 with Swift 3.0 | ||
|
||
## Installation | ||
|
||
CKMnemonic is available through [CocoaPods](http://cocoapods.org). To install | ||
it, simply add the following line to your Podfile: | ||
|
||
```ruby | ||
pod "CKMnemonic" | ||
``` | ||
|
||
## Author | ||
|
||
work_cocody@hotmail.com, qiuhongyang@askcoin.org | ||
|
||
## License | ||
|
||
CKMnemonic is available under the MIT license. See the LICENSE file for more info. |