MAP is a Bitcoin OP_RETURN protocol for associating key -> value pairs. Keys are like field names in a database, and the "value" is the data being inserted / deleted / updated.
OP_RETURN | input MAP SET | DELETE key value
BMAP is a technique for working with OP_RETURN data within Bitcoin transactions. The goal is to make Bitcoin app development fast, easy, and encourage sharing data between BMAP apps.
This is an alternative approach to registering a new Bitcom protocol prefix. There are several existing protocols that can be combined to create almost anything. In most cases a new protocol is not needed, and can make standardization less automatic.
The name comes from combining B protocol with MAP using OP_RETURN protocol pipelining:
OP_RETURN | B | MAP
BMAP as a strategy encompasses more than just these two protocols, but BCDMAPAIP... etc is not a very good name.
Because MAP is a variable width protocol, and is designed to be used with other protocols within the same tx, transactions often have more pushdatas than many Bitcom protocols. With this TXO parser, TXO formatted transaction data can be transformed into an easy to work with, human readable version.
npm install bmapjs require('bmapjs')
Supports
bmapjsIt's easy to get started building BMAP applications. You can use our public planaria as a backend for your app and be up and running in just minutes.
To get started, use the transaction creator to put your app's first transaction on-chain.
Then, we can generate some code to kick-start your app development.
{ "v": 3, "q": { "find": { "MAP.app": "tonicpow" }, "limit": 10 } }
B protocol provides a standard for storing specific data within your Bitcoin record.
This is often used as the "body" of your tx, but can also be an attachment.
Any valid Media Type can be included here.
The "app" and "type" keys are required. Set the "app" key to a unique namespace for your application, and set "type" to differentiate between different actions within your app, such as "comment" or "vote".
Address:
Balance:
Fund this address to generate a Tx
To generate a real transaction with your data, sign in with a wif, or create a new wallet.
You can skip this step, but the demo app will be an empty page if no Bitcoin txs match these MAP keys.
Here are the code snippets for the main components of your app.
Click "Launch App" below to see a live demo.
Query the BMAP Planarium (API) for records of this type.