Sha256: fe41a25444ae3e676963da9829cdc1e253e68f0e2d74a5aaf76a9528bcb7336e
Contents?: true
Size: 1.54 KB
Versions: 4
Compression:
Stored size: 1.54 KB
Contents
require "bip44/version" require 'ecdsa' require 'digest/sha3' require 'rlp' require 'money-tree' require 'bip_mnemonic' require 'eth' require 'bip44/utils' require 'bip44/bitcoin' require 'bip44/ethereum' require 'bip44/litecoin' require 'bip44/bitcoin_cash' require 'bip44/zcoin' require 'bip44/wallet' module Bip44 def self.create_mnemonic_wallet words = BipMnemonic.to_mnemonic(bits: 128) puts words seed = BipMnemonic.to_seed(mnemonic: words) puts "seed: #{seed}" ethereum_wallet = Bip44::Wallet.from_seed(seed, "m/44'/60'/0'/0") puts 'ethereum xprv: ' + ethereum_wallet.xprv puts 'ethereum xpub: ' + ethereum_wallet.xpub bitcoin_wallet = Bip44::Wallet.from_seed(seed, "m/44'/0'/0'/0") puts 'bitcoin xprv: ' + bitcoin_wallet.xprv puts 'bitcoin xpub: ' + bitcoin_wallet.xpub dash_wallet = Bip44::Wallet.from_seed(seed, "m/44'/5'/0'/0") puts 'dash xprv: ' + dash_wallet.xprv puts 'dash xpub: ' + dash_wallet.xpub end def self.from_mnemonic(words) seed = BipMnemonic.to_seed(mnemonic: words) puts "seed: #{seed}" ethereum_wallet = Bip44::Wallet.from_seed(seed, "m/44'/60'/0'/0") puts 'ethereum xprv: ' + ethereum_wallet.xprv puts 'ethereum xpub: ' + ethereum_wallet.xpub bitcoin_wallet = Bip44::Wallet.from_seed(seed, "m/44'/0'/0'/0") puts 'bitcoin xprv: ' + bitcoin_wallet.xprv puts 'bitcoin xpub: ' + bitcoin_wallet.xpub dash_wallet = Bip44::Wallet.from_seed(seed, "m/44'/5'/0'/0") puts 'dash xprv: ' + dash_wallet.xprv puts 'dash xpub: ' + dash_wallet.xpub end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
bip44-extended-0.2.25 | lib/bip44.rb |
bip44-extended-0.2.24 | lib/bip44.rb |
bip44-extended-0.2.23 | lib/bip44.rb |
bip44-extended-0.2.22 | lib/bip44.rb |