bip44 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bip44.rb +11 -0
  3. data/lib/bip44/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f59ecca05123606e6b613fdaacd87eb1bfcd1d36
4
- data.tar.gz: 42f5a8bf162f406c95daf4c6b868605abd35e694
3
+ metadata.gz: 830fc64f52f041172bd2f34851530903f66c8274
4
+ data.tar.gz: 82791e16e1d5cc0d9b31fbf81352aa5b218907b4
5
5
  SHA512:
6
- metadata.gz: a2ead1ba0ada4ff69192f520c8469fd84949a17d9f500620f5bfac7b46325cb11313e762f29256e0dfe4f26d0fe64303088c437c9c8ca32b901ab819e6b0152a
7
- data.tar.gz: 2f0f3e683e27c669e956b694741f13ab82bd17b07321d5ef0bb0a61b18614c38b78c91b8c3997f83c43697e757aee67277a7a0c48a66edb11d2442f63af88405
6
+ metadata.gz: 06bc9b086c9ba6bd693e325051834e4216473af62e3878c643e04e5bf94f6689283ad7238c1373547318734697db1d572e76b89bfe98397f46e81222c44ac7cd
7
+ data.tar.gz: d6a0816b649af21aa0a39dbb8cb8eeed1e06ee175de56a958bf8e63ccd094c2d72d5fdc58e0be52ff9db6841e68f3b07e9af41b5c1d896973f1833a889397ae6
@@ -15,8 +15,19 @@ module Bip44
15
15
  puts words
16
16
  seed = BipMnemonic.to_seed(mnemonic: words)
17
17
  ethereum_wallet = Bip44::Wallet.from_seed(seed, "m/44'/60'/0'/0")
18
+ puts 'ethereum xprv: ' + ethereum_wallet.xprv
18
19
  puts 'ethereum xpub: ' + ethereum_wallet.xpub
19
20
  bitcoin_wallet = Bip44::Wallet.from_seed(seed, "m/44'/0'/0'/0")
20
21
  puts 'bitcoin xpub: ' + bitcoin_wallet.xpub
21
22
  end
23
+
24
+ def self.from_mnemonic(words)
25
+ seed = BipMnemonic.to_seed(mnemonic: words)
26
+ ethereum_wallet = Bip44::Wallet.from_seed(seed, "m/44'/60'/0'/0")
27
+ puts 'ethereum xprv: ' + ethereum_wallet.xprv
28
+ puts 'ethereum xpub: ' + ethereum_wallet.xpub
29
+ bitcoin_wallet = Bip44::Wallet.from_seed(seed, "m/44'/0'/0'/0")
30
+ puts 'bitcoin xprv: ' + bitcoin_wallet.xprv
31
+ puts 'bitcoin xpub: ' + bitcoin_wallet.xpub
32
+ end
22
33
  end
@@ -1,3 +1,3 @@
1
1
  module Bip44
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bip44
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - wuminzhe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2018-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler