Skip to content
Max Kaye edited this page Jun 22, 2014 · 7 revisions

RPC Draft

Goals

The RPC spec put forward here should function as an effective subset for all coins produced with the cryptonet.standard blocks. For example, it shouldn't deal with markets, but should be a strict subset of the RPC spec that does deal with markets.

Spec

method payload response
push_tx serialised, hexlified cryptonet.standard.SuperTx {'success':<bool>}
get_ledger - {<int:pubkey_x>: <int:balance>}
get_balance <int:pubkey_x> {'balance':<int>}
get_info - {'top_block hash': <int>, 'top_block_height': <int>, 'difficulty': <int>}

Examples with python3

super_tx_serialised = hexlify(super_tx.serialize()).decode()

super_tx = SuperTx.make(unhexlify(super_tx_serialised))