Sha256: 9acbf792e00547d18d2f3c17ff07d1b4c37b8826f494ff5ffe350f2cdd43db0d

Contents?: true

Size: 384 Bytes

Versions: 5

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

module Bitcoiner
  class AccountHash < Hash
    def initialize(client, balance_hash)
      @client = client
      balance_hash.each_key do |name|
        self[name] = Account.new client, name
      end
    end

    def new(name)
      @client.request 'getnewaddress', name
      self[name] = Account.new @client, name
      self[name]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bitcoiner-0.2.1 lib/bitcoiner/account_hash.rb
bitcoiner-0.2.0 lib/bitcoiner/account_hash.rb
bitcoiner-0.1.4 lib/bitcoiner/account_hash.rb
bitcoiner-0.1.3 lib/bitcoiner/account_hash.rb
bitcoiner-0.1.2 lib/bitcoiner/account_hash.rb