Client – Pool protocol

Binary requests

Post /transaction

Those fields will appear on every binary request

  1. Sender signature – 64 bytes, the signature sign the fields 3 to 6 inclusive
  2. Message length – MBI the length of the remaining message
  3. Sender id – 32 bytes, full sender id
  4. Type – MBI, the type of the list
  5. Block-hash – 32 bytes, The hash of the last known block
  6. The rest of the message – bytes

If amount value is 0, then ALL_AMOUNT feature will be used for the transaction, 0 amount will be encoded with 8 bytes

1 to 1 transactions

  1. Receiver id – 32 bytes
  2. Amount – 8 bytes floating point
  3. Transaction fees – MBI

JSON requests

Those fields will appear on every JSON request

  • Signature: Base58 string header
  • publicKey: Base58 string URL param

Those fields will appear on every JSON response

  • Signature: Base58 string header

Get /status

Request: only the default fields
Response:
{
“balance”={Balance double value},
“blockHash”={32 bytes}
}

Get /work

Request

  • blob – Optional long url param that solves the block
  • minedDate – Optional long url param when the block mined
  • workId – Optional int linking to the assigned work by the pool

Response

{
“workId”={int work id},
“shareErrorMessage”={String error message in case the share was rejected}
“blockHash”={32 bytes hash of mining process step 3 – The header and transactions},
“difficulty”={32 bytes pool difficulty},
}