Protocol Specification

"Books" are tied to a cash addresses, which cannot be re-used. In the event that someone accidentally sends duplicates of the same chunk, each client implementation must use the first transaction detected (or if applicable, mined). If multiple 03 actions (edits) are detected, the newest one should always take priority. Edits must not be made 1,008 blocks after the book is marked as complete, and when a successful change is made all previous reviews/curations must be invalidated.

BookChain abides by the Terab 4-byte prefix guideline, so OP_RETURN transactions will be in the format 0x0000B006 {action} {value} {value}.

0X - Book-specific actions

  • 01 - Explorer - This action specifies the title and the author of a article. 0x0000B006 01 {Author} {Title}
  • 02 - Explorer - This action sets the content of a article, and the order of which it is shown starting from 0. 0x0000B006 02 {ChunkID} {Content}
  • 03 - Soon - This action updates the content of a article, and specifies the chunk of which to edit. 0x0000B006 03 {ChunkID} {Content}
  • 04 - Soon - This action sets various metadata keys such as ISBN tags so that the implementations (if they want to) can look up reviews, or create custom actions and information without interferring reserved actions (05-09)
  • 04 - Expanding on the metadata tag

    These are the 04 metadata tags supported by the bookchain and myself.cash websites. Other client implementations may add or subtract from this list at will.

  • set_format - html/bbcode/plaintext/markdown (the format the client should parse the text in)
  • set_isbn - {isbn_code} (in case you want to look up reviews, or automatically fetch information about a book)
  • set_status - complete/complete_editable (books will not be displayed unless marked as complete or set_final_chunk is set
  • set_final_chunk - {final chunk id} (this will automatically mark the book as complete assuming set_status is not set
  • set_encrypt - {algorithm} (client will pop up a window where you'll enter the decryption code)
  • set_category - fiction/philosophy/whatever (if no isbn is available, manually set category)
  • set_date - {date} (if no isbn is available, manually set published date)
  • 1X - User-specific actions

  • 11 - Soon - This action sets the donation address for any cryptocurrency of the author's choice. 0x0000B006 11 {Coin} {Address}
  • 12 - Soon - Curate posts (todo) 0x0000B006 12 {value} {value}

  • Examples

    Prefix Action Value Value Explanation
    0x0000B006 01 Ayn Rand The ​Virtue Of Selfishness {protocol} {01 = header} {author} {title}
    0x0000B006 02 241 It was a bright warm day in April [...] {protocol} {02 = content} {number = chunk} {text}
    0x0000B006 03 241 It was a bright cold day in April [...] {protocol} {03 = update} {number = chunk} {updated text}
    0x0000B006 04 set_isbn 978-1-56619-909-4 {protocol} {04 = metadata} {metadata_key} {metadata_value}
    0x0000B006 11 Bitcoin Cash qp020sjg7cvc372gsq [...] {protocol} {11 = donation address} {coin} {address}
    0x0000B006 12 {value} {value} {protocol} {12 = curate} {value} {value}