serialization using JSON (see http://pymotw.com/2/json/) transforms a python object into a JSON object
serialization using JSON (see http://pymotw.com/2/json/) transforms a JSON object into a Python object
Get a new block from server
Parameters: | pubkey (coins.PublicKey) – public key of party the reward should be assigned to |
---|---|
Returns: | a new block |
Return type: | coins.Block |
Get wallet (i.e. all the unspent transactions) from server
Parameters: | pubkey (coins.PublicKey) – public key of party |
---|---|
Returns: | the wallet (a list of transaction hash, output number, amount) |
Post a new block to the server
Parameters: | b (coins.Block) – a new block |
---|---|
Returns: | success,msg. success is True if the block was added successfully to the blockchain. If success is False, the msg is set to the error encountered by the server |
Return type: | (bool,str) |
Post a transaction to the server
Parameters: |
|
---|---|
Returns: | success,msg. success is True if the transaction was added successfully to the list of pending transactions. If success is False, the msg is set to the error encountered by the server |
Return type: | (bool,str) |