Magic Attribute Protocol

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

   Documentation

BMAP - Bitcoin App Strategy

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


Advantages

  • Works well with other protocols
  • Extremely Flexible
  • Easy to Understand and Use
  • Integrates with other Bitcoin apps
  • Specialized BMAP Planaria as a backend

BMAP as a strategy encompasses more than just these two protocols, but BCDMAPAIP... etc is not a very good name.

"BMAP" - A TXO Parser

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

   bmapjs

BMAP Planaria

It'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.

  • Auto transforms TXO records to BMAP objects
  • Pushdata index is no longer important
  • Built in Author Identity verification


Example Query

https://b.map.sv

{
  "v": 3,
  "q": {
    "find": {
      "MAP.app": "tonicpow"
    },
    "limit": 10
  }
}
bmap

Apps Using BMAP

BMAP Creator

Build a Bitcoin App Right Now.


  Inputs
  • B:// Content
  • MAP Attributes
  • Tx Signature
  Outputs
  • BitQuery
  • App Display
  • User Wallet


  B Data

  Specification

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.


text markdown

Markdown Cheatsheet

  MAP Attributes

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".


Key
Value
app
type


  PREVIEW

    
        

  Broadcast Tx

  Wallet
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.


Raw Tx


            Decode
          
          
Fat URI

          

  Specification

 

  Build The App

Successfully Generated Transaction


Here are the code snippets for the main components of your app.

Click "Launch App" below to see a live demo.

BitQuery

Query matching your records. More info

        
        

Planarium AIP

Query the BMAP Planarium (API) for records of this type.


      
        

Real Time Events

Listen for new transactions of this type. More info (Neon Planaria does not include support an SSE connection.)

    
        

Write new Transactions

Generate new transactions of this type with the Satchel BSV wallet library.