Library of Bitcoin

A Classic Repository for On-Chain Knowledge

Not Connected

Reading Room

Query read-only functions from smart contracts

Contract Details

Function Arguments

Query Results

No queries executed yet. Enter contract details and click "Query Contract" to begin reading.

Writing Desk

Execute state-changing functions on smart contracts

Contract Details

Function Arguments

Transaction Status

No transactions submitted yet. Connect your wallet and fill out the contract details to begin writing to the blockchain.

About the Library of Bitcoin

The Library of Bitcoin is a decentralized, free application for storing and retrieving written knowledge on-chain. It is built on the Stacks blockchain and secured by Bitcoin.

Dev: Highroller.btc | @Cryptofronts on X

Reading Room

The reading room lets you query read-only Clarity functions from smart contracts on Stacks. You can retrieve content that has been written on-chain — articles, chapters, notes, metadata — and view it in a clean, book-style layout.

Flip through pages seamlessly. Results are decoded and formatted like text from a digital library.

Writing Desk

The writing desk lets you send transactions to smart contracts on Stacks. This is useful for authors adding books, editors submitting updates, or anyone broadcasting transactions to Stacks.

If you have the contract and function details, you can broadcast data securely using your connected wallet.

Looking to read more about Bitcoin and its history? Check out our Reading List, a hand selected set of books for Bitcoiners. Explore curated Bitcoin literature →

📚 Publish Your Book on Library of Bitcoin:

SP22KATK6MJF40987KB2KSZQ6E027HQ0CPP73C9Y.LibraryOfBitcoin

Function Inputs Returns Description
publish-book title: (string-utf8 64)
description: (string-utf8 256)
(ok uint) Create a book under the caller’s principal.
edit-book-meta book-id: uint
new-title: (string-utf8 64)
new-description: (string-utf8 256)
(ok true) Edit book metadata (only by author).
add-or-edit-page book-id: uint
page-number: uint
content: (string-utf8 2048)
(ok true) Add or update a page's content (author only).
set-chapter book-id: uint
chapter-number: uint
start-page: uint
(ok true) Set chapter's starting page (author only).
get-book-by-id book-id: uint (optional {...}) Returns a book’s metadata.
get-page book-id: uint
page: uint
(optional string) Returns a page’s content.
get-chapter-start-page book-id: uint
chapter: uint
(optional uint) Returns chapter's start page.
get-last-book-id uint Returns the last used book ID.

🧾 MiniML Markup Reference

Syntax Purpose HTML Output
# Text Heading <h2 class="chapter-heading">
*text* Bold <strong>
_text_ Italic <em>
> text Blockquote <blockquote class="indented">
\p Paragraph break </p><p> or <br><br>
\n Line break <br>

Processing...