module TezosClient::RpcInterface::Blocks
Public Instance Methods
block(block_hash = "head")
click to toggle source
# File lib/tezos_client/rpc_interface/blocks.rb, line 6 def block(block_hash = "head") get "chains/main/blocks/#{block_hash}" end
block_header(block_hash = "head")
click to toggle source
# File lib/tezos_client/rpc_interface/blocks.rb, line 21 def block_header(block_hash = "head") get "chains/main/blocks/#{block_hash}/header" end
block_operation_hashes(block_hash = "head")
click to toggle source
# File lib/tezos_client/rpc_interface/blocks.rb, line 29 def block_operation_hashes(block_hash = "head") get "chains/main/blocks/#{block_hash}/operation_hashes" end
block_operations(block_hash = "head")
click to toggle source
# File lib/tezos_client/rpc_interface/blocks.rb, line 25 def block_operations(block_hash = "head") get "chains/main/blocks/#{block_hash}/operations" end
blocks(length: 50, head: nil, min_date: nil)
click to toggle source
# File lib/tezos_client/rpc_interface/blocks.rb, line 10 def blocks(length: 50, head: nil, min_date: nil) query = { length: length, head: head, min_date: min_date&.to_i }.compact res = get "chains/main/blocks/", query: query res[0] end