B
Store and reference data on the Bitcoin SV blockchain
Install / Use
/learn @unwriter/BREADME
B://
Bitcoin Data Protocol
b://6c784b78cff5ee4f469f783adc0e957265f467d3a0dae2b2b1ecbc84a1bd1fb6
Store and reference data on the Bitcoin blockchain.


Intro
B is an OP_RETURN protocol to store and reference arbitrary data on Bitcoin.
The design goal:
- The simplest protocol to upload arbitrary media to the blockchain
- A protocol to reference previously uploaded media from another on-chain media.
Protocol
- The prefix for B is 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut, generated using Bitcom
Here's an example of what POST transactions look like:
OP_RETURN
19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut
[Data]
[Media Type]
[Encoding]
[Filename]
The order is deliberately data, media type, and encoding, filename, in the order of significance (With future extensibility through adding additional push data).
- Data: data to store
- Media Type: As listed at https://www.iana.org/assignments/media-types/media-types.xhtml
- Encoding: As listed at https://www.iana.org/assignments/character-sets/character-sets.xhtml (The default is
binary) - Filename: a filename to store the blob as (the default has no filename and just stored as a blob, identified simply by the txid)
Example: HTML
OP_RETURN 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut <html><body>hello world</body></html> text/html UTF-8 hello.html
<br>
Note
B:// is NOT a protocol for handling authenticated and encrypted media (That would be a much more complex problem). The main design goal of B is:
- Public: Public assets
- Simple: Simple to implement
- Versatile: Easily pluggable to any application in any context
- Extensible: Future extensibility with additional push data support
Demo
Try it here: https://b.bitdb.network
<br>Usage
1. Uploading Large Media
Let's upload an image.
You can try it here (up to 100KB)
When you select a file, it directly writes the binary (ArrayBuffer) into Bitcoin pushdata (instead of base64 string). The resulting OP_RETURN would look something like this:
OP_RETURN 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut [ArrayBuffer from the file] image/png binary duck.png
By default, the encoding is binary, so you could just do (if you don't care about file names):
OP_RETURN 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut [ArrayBuffer from the file] image/png
Another example:
OP_RETURN 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut [ArrayBuffer from the file] text/html UTF-8 index.html
<br>
2. Referencing Media
Once uploaded, this media can be referenced from ANY other transactions using a transaction hash. For example, let's say the media hash for an image uploaded this way was 46e1ca555622e73708a065f92df0af2cc0fe00ed1dd352d5fb8510365050347c.
You can reference it in another HTML file like this:
<html>
<body>
<img src="b://46e1ca555622e73708a065f92df0af2cc0fe00ed1dd352d5fb8510365050347c">
</body>
</html>
Of course, to upload this HTML file itself, you would do this:
OP_RETURN
19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut
<html><body><img src="b://46e1ca555622e73708a065f92df0af2cc0fe00ed1dd352d5fb8510365050347c"></body></html>
text/html
UTF-8
example.html
Once this HTML file is uploaded to Bitcoin, and the tx hash is e2be88f33d98074f778ddd94c13fe500cb1f5a4dfb3ed958391c95f431c20549, you can link it from another HTML, like this:
<html>
<body>
Check out <a href="b://e2be88f33d98074f778ddd94c13fe500cb1f5a4dfb3ed958391c95f431c20549">my website!</a>
</body>
</html>
You can use it in a markdown too:
[Here](b://e2be88f33d98074f778ddd94c13fe500cb1f5a4dfb3ed958391c95f431c20549) is a website, which contains the following image:

Of course, you will upload it like this:
OP_RETURN
19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut
[Here](b://e2be88f33d98074f778ddd94c13fe500cb1f5a4dfb3ed958391c95f431c20549) is a website, which contains the following image:\n
text/markdown
UTF-8
README.md
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Security Score
Audited on Mar 25, 2026
