blockchain-ruby
Gives Rubyists the ability to traverse the blockchain in a semantic way.
The following functionality has been implemented:
Addresses
Search for addresses with hash160 or address
returns nil
if not found
a = Blockchain::Address.find('143y8gQbhmgePi4QJyL6QBi8zk4PSM5KQr')
a.hash160
a.address
a.n_tx
a.n_unredeemed
a.total_received
a.total_sent
a.final_balance
a.refresh!
a.to_s
a.first_seen
txs = a.txs
Transactions
Search for transactions with transaction index or hash
returns nil
if not found
t = txs[0]
t.hsh
t.ver
t.vin_sz
t.vout_sz
t.time
t.size
t.result
t.relayed_by
t.double_spend
t.block_height
t.tx_index
t.txtotalbtcoutput
t.txtotalbtcinput
t.txfee
inputs = t.inputs
out = t.out
i = inputs[0]
i.script
i.prev_out
o = out[0]
o.script
o.n
o.value
o.addr
o.tx_index
o.spent
o.type
Blocks
Search for blocks with block index or block hash
returns nil
if not found
b = Blockchain::Block.find(458453)
b.hsh
b.ver
b.prev_block
b.mrkl_root
b.time
b.bits
b.fee
b.nonce
b.n_tx
b.size
b.block_index
b.main_chain
b.height
b.received_time
b.relayed_by
b.tx