class Nano::Wallet
Constants
- VERSION
Attributes
accounts[R]
seed[R]
Public Class Methods
new(seed)
click to toggle source
# File lib/nano/wallet.rb, line 13 def initialize(seed) @seed = seed @accounts = [] end
with_random_seed()
click to toggle source
# File lib/nano/wallet.rb, line 7 def self.with_random_seed self.new(SecureRandom.hex(32)) end
Public Instance Methods
account_at_index(index)
click to toggle source
# File lib/nano/wallet.rb, line 18 def account_at_index(index) Nano::Account.new(@seed, index) end
add_account!()
click to toggle source
# File lib/nano/wallet.rb, line 26 def add_account! account = Nano::Account.new(@seed, @accounts.size) @accounts << account account end
add_accounts!(count)
click to toggle source
# File lib/nano/wallet.rb, line 22 def add_accounts!(count) count.times { add_account! } end