Module: Nis::Endpoint::Chain::LastBlock

Included in:
Nis
Defined in:
lib/nis/endpoint/chain/last_block.rb

Instance Method Summary collapse

Instance Method Details

#chain_last_blockNis::Struct::Block



6
7
8
9
10
11
# File 'lib/nis/endpoint/chain/last_block.rb', line 6

def chain_last_block
  request!(:get, '/chain/last-block') do |res|
    res[:transactions] = res[:transactions].map { |t| Nis::Struct::Transaction.new(t) }
    Nis::Struct::Block.build res
  end
end