module Bip44
Constants
- VERSION
Public Class Methods
create_mnemonic_wallet()
click to toggle source
# File lib/bip44.rb, line 18 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
from_mnemonic(words)
click to toggle source
# File lib/bip44.rb, line 34 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