CHIP 2022-10 BCMR: Bitcoin Cash Metadata Registries

The bcmr v2 open PR has now been merged and the v2 version now marked as draft with a recent change: “Simplified publication output encoding” which incorporated feedback on the IPFS encoding.

The version 2 BCMR standard is already implemented in Cashonize, the webwallet and partly implemented in the Electron Cash pc wallet. Both wallets allow for linking a bcmr in the genesis transaction when creating new CashTokens.

Multiple token projects have already launched on mainnet using the bcmr v2 standard. Currently there is not yet an easy applications which can manage authhead utxos to update tokenmetadata.

There is also now a serious, high-quality metadata registry for CashTokens metadata with the launch of OpenTokenRegistry by @bitjson.

4 Likes

And another important piece of infra supporting the BCMR standard is the blockexplorer by salemkode (explorer.salemkode.com) which has full BCMR support and now also resolves autchains for on-chainmetadata update!

For example this is the tokenId of bitcats nft collection on the blockexplorer.

3 Likes

Today @MathieuG released a video to make it easier for newcomers to get their tokens set up:

3 Likes

Thanks for sharing the introductory video here!

The video explains DNS-Resolved Registries & Chain-Resolved Registries.
I use my Cashonize wallet to demonstrate token creation.
The video also explains why self certified metadata is not considered “verified” and that tokens need to be included on a trusted tokenlist to be considered verified.
I use opentokenregistry as the example and show the well-known uri where the tokenlist is located.
Lastly the concept of authchains for metadata updates is covered.

4 Likes

Two new important pieces of BCMR tooling were recently developed:

  1. There’s now an indexer for on-chain published BCMR data made by Paytaca! The indexer is open-source and they have a publicly available API at bcmr.paytaca.com and its homepage has some general statistics.

the API endpoints are:

  1. /api/tokens/<category-id> → will give specific token metadata for FTs and generic token info for NFTs
  2. /api/tokens/<category-id>/<commitment>/ → will give token metadata for NFT types
  3. /api/registries/<category-id>/latest/ → will give the latest registry record for the given category ID
  1. I built a tool to generate BCMR json files for fungible tokens from an easy fill-in form. You can find it at bcmr-generator.netlify.app
4 Likes

Some extensions for the BCMR standard are also beginning to be used by different projects, here’s an overview:

The Bitcats & Guru collectible NFT project use the extension attributes on specific NFT types and this has already been adopted by different applications (including wallets and an nft marketplace) to display attributes unique about the specific NFT.
Additionally Bitcats uses an image_hash extension for each nft because the nft images are not stored on IPFS.

The “Real Bitcoin Fam” token has used the contact extension that was used as example in the BCMR spec.

Lastly, I want to suggest a new extension, nftNumbering, so projects can use an alternative to the scriptnumbers used by default for NFT Ticker Symbols.

3 Likes

Can we verify a shared registry, like the ones that explorers use?

Here is the scenario:

every single token may publish themselves a BCMR, they can do that on their own location somewhere on the web. But it’s not very useful as users and wallets won’t be able to find them. As such there are places like otc.cash which download those JSONs and provide the data there again. This makes salemkode’s explorer able to find token data.

But here is a problem I noticed yesterday. The bcmr published by a token owner will need to include the “registryIdentity” type and its child-properties. So 100 different tokens have 100 different registryIdentities. Version numbers. Descriptions etc.

But the otc.cash one only has one registryIdentity, its own. Then it just lists the identities copied from the bcmrs it re-hosts.

And this means that it doesn’t host the files ‘as-is’, which then means you can’t use the hash, as published on the blockchain, to verify it is an accurate copy.

1 Like

If somebody still have alternative BCMR indexers and API endpoints / RPC calls. Let me know…

I’m looking for something fast that index and retrieve the data (eg. C++ or Go with a database behind it). I know we are now 2 years later… but I would love to have some performant indexer, similar to Fulcrum but focused on Cash Tokens.

bchexplorer.cash I have has a backend written in Typescript (and the frontend in TS as well), but like I said, it doesn’t have to be TS.

1 Like

My personal solution is bcmr.flowee.cash which solves all problems I’m aware off. It’s currently in need of manual update, but that could be automated if people use it.

Long intro here:
https://x.com/FloweeTheHub/status/1912154694794818028

2 Likes

Thanks, great! I have some feedback however:

  • I want to set Accept and User-Agent headers in my API request from my client, which I think is a good thing. Which would allow you to see which kind of service is contacting your server. By design, this will create an OPTIONS method call, see CORS documentation. However, your server is not responding well on this, giving me: 405 Not Allowed. I strongly recommend implementing CORS support and return just 200 OK for the OPTIONS requests for example. More info as well…
  • What are the possible string values for “trust”? I thus far only saw “high”. Example
  • Could you open-source the project for the longevity of the project and this would also allow me to host my own instance, to avoid your service getting overloaded.

Thanks for checking it out, definitely happy to see someone using it :slight_smile:

The “server” you’re talking to is a basic no-fluff nginx webserver and the urls all resolve to just simple files on the filesystem. I strongly believe in keeping stuff simple. My expectation is that the usecase is a wallet on a private device, though. Not some website.

The project and code is public: Flowee/registry: Tools to make a bitcoin cash metadata registry - registry - BitcoinCash Code

And the trust-levels are described here: registry/documentation/trust.md at master - registry - BitcoinCash Code

1 Like

The only two indexers I’m aware of right now are the Paytaca indexer and the Flowee indexer.

1 Like
  • Thanks for sharing the link with the code! And Flowee indexer so much faster than Paytaca indexer (no offense Joemar, if you are reading this)
  • Got it, so it can be: absent, marginal, good, high or ultimate
  • I fully agree with the simplicity, don’t get met wrong… You still might want to hide the Nginx version though… (please add server_tokens off; to your Nginx configs, for your own security).

I would like to come back again to CORS. Maybe I’m the first user that is using this indexer now from a javascript client (browser client)?
I like to help you by setting an User-Agent header on my side of the request, I do get it working now without it by sending a plain get request.
However, I think its better for you to also set a User-agent string from the client side. Allowing the server-side to identify the requests.

So I didn’t invented CORS, but the moment I would set a User-Agent header, a preflighted request will be done (out of my control). In in your case you can handle the OPTIONS requests and add the access-control-allow headers in the response, which will make the preflight request succeed.

Like you said, there is no “backend” but just a simple Nginx webserver. Which is fine, but that means you can configure CORS on the Nginx level.

I will use the “Basic NGINX CORS Configuration” from: NGINX CORS Configuration: The Complete Guide (2026) in this example, since once again keep it simple stupid (KISS).

I think the only thing I’m missing is this implementation in your Nginx config for your domain: http://bcmr.flowee.cash:


location / {
        [....]

        add_header Access-Control-Allow-Origin "*" always;
        add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
        add_header Access-Control-Allow-Headers "Content-Type, Accept" always;

        if ($request_method = OPTIONS) {
            add_header Access-Control-Allow-Origin "*" always;
            add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
            add_header Access-Control-Allow-Headers "Content-Type, Accept" always;
            add_header Access-Control-Max-Age 86400 always;
            add_header Content-Length 0 always;
            return 204;
        }
}

(Adapt the example I wrote for you to your own needs if you wish)

Thank you for helping. If you really really don’t want to support CORS, that is fine… but this not ideal. I won’t be able to set any HTTP headers.

I already had the Access-Control-Allow-Origin * in my config, assumed that would be enough. Web browser tech is not my expertise, at all :wink:

The snipped you copy pasted for me is now live on both the http and the https ‘sites’, I hope that works for you!

1 Like

Thanks this almost works now!

We where talking about User-Agent headers, one of the main reasons… lol. But I forgot to include it in the allows headers. Meaning it was still failing :smile: .

Change:

        add_header Access-Control-Allow-Headers "Content-Type, Accept" always;

To:

        add_header Access-Control-Allow-Headers "Content-Type, Accept, User-Agent" always;

That would do it (on both blocks). And then I believe no further actions are needed anymore.

ps. Good to see you also took my advice regarding server_tokens off; I see.

Thanks for the changes. I just want to confirm CORS is working now (preflight):

And the actual GET call, notice the user-agent string:

As of Cashonize v0.7.0 release which was released last week, Cashonize is the first wallet which supports the “Parsable BCMR” part of the spec! :tada:

Up to now wallets had only implemented the “sequential” nft part of the spec, which does not require supporting parsing with CashVM bytecode.

Here’s a display of what it looks like:

Thanks to @joemar_taganna and the paytaca team of making some adjustments to their BCMR indexer to serve the “parse” data so Cashonize can use it as a consumer :pray:

5 Likes

Cashonize v0.14 was the BCMR Identities Release: it added a new identities page holds and manages the identities behind your tokens, publishing and verifying their metadata and keeping their UTXOs out of ordinary sends.

Cashonize now is the first wallet to have built-in BCMR identity management. These BCMR Identity features (and some future extensions) were all already envisioned by the BCMR spec but had never been implemented presumably due to the lack of resources and the scope of this integration.

However now with current AI this type of work has because orders of magnitude cheaper, so I’m interested to hear if others find this useful or want to integrate similar things in other wallets. As always, the Cashonize code is open source and can serve as a great reference.

Screenshots of BCMR Identities

2 Likes

With Cashonize v0.18.0 we added user notifies for when user-followed tokens have BCMR metadata updates. This was Cashonize users can be alerted if a token they use changes icons, name or decimal places.

The idea to notify users on token metadata changes was always part of the BCMR spec but has not been attempted by anyone to actually integrate it in reality.

I don’t claim this initial Cashonize approach is perfect, but the goal is to have user-awareness that token metadata and reserved supply can change, and they can see such changes straight in their wallet without external tools.

Also the goal is to get attention to this idea from other wallet developers who may be interested in similar functionality.

Cashonize new “Token Identities” Page

We restructured the page so the two tabs are “identities you follow” and “identities you control”

“identities you control” is the feature introduced in v0.14 but this has now become demoted to a secondary page, as more people will watch identities for updates rather than own and manage token identities.

We removed the “add existing” tab for identities, and made it a button on the new pages instead, which seems like a more natural place to have them.

Screenshot

Identities you follow

The “identities you follow” has two sections

  1. specific tokens you want to watch metadata for but don’t hold in this wallet (maybe you hold the tokens elsewhere or track the tokenmetadata for other reasons)
  2. follow the identities of all tokens in this wallet, with a ON/OFF toggle

For the identities you see the high level info and can click on it to see the details about the last published metadata and a history button to display the full authchain history

Screenshots

Identities you control

How to get to the Identities

You can get to the identities page, either through “Info” on a token in the “Tokens” page, or through the normal "…’ menu navigation

Learn More

The Identities page also has a “Learn More” button/section which attempts to explain the identities concept inside the wallet. Not just with boring text but with an example and a schematic.

Screenshots

3 Likes

BTW, here’s an idea I had and now spent some little time brainstorming with AI.


Idea: decentralize BCMR storage with BitTorrent v2. The protocols compose naturally — both are content-addressed and immutable, so no BCMR specification changes needed, just an extension convention.

Why v2 fits: BEP 52 hashes each file independently (SHA-256 Merkle root over chunks). Clients like libtorrent merge swarms across torrents that share identical file roots. So one mega torrent seeding all BCMR registries can pull pieces from any torrent containing the same file. If projects seed their own small torrents for their own token metadata (which they’re already incentivized to do), the archive gets replication for free, with zero coordination. A wallet fetching only a project’s torrent even becomes an incidental seeder into the archive swarm.

The design:

  • BCMR publications are on-chain and canonically ordered, so the file set is an append-only log derived from the blockchain. Maintain an MMR over it, anchor the root + latest torrent infohash in OP_RETURN every N blocks. Anyone can verify a builder’s file set against the anchor — omission by any curator is detectable.
  • The torrent is deterministically derived from that log: fixed piece length, files named height-txid/<bcmr-hash>.json, no timestamps or variable fields. Multiple independent operators produce byte-identical torrents and the same infohash. Co-maintained, not trusted.
  • Instead of one ever-growing torrent (metadata size limits, swarm churn on every update), close an immutable epoch torrent every N blocks; a small head torrent carries the open epoch. Old epochs keep stable swarms forever; wallets download only epochs they lack. Rebuilding from scratch is milliseconds — bandwidth and swarm continuity are the real resources.
  • Announce both hashes: the BCMR SHA-256 (authoritative verification, transport-agnostic as today) and the pieces root (transport-level dedup). Note they’re not equal — v2 pads to the piece boundary — so the BCMR hash stays the trust anchor.

Spec MUSTs: pure v2 (no hybrid/v1 baggage), piece length = 16384 everywhere (the pieces root depends on piece length, so inconsistent choices break cross-seeding), published test vectors (bytes → pieces root → torrent bytes → infohash) so independent builders can verify determinism.

Infra: own tooling above the wire protocol (chain indexer, deterministic torrent builder, anchoring job, wallet SDK/gateway), libtorrent as the engine — v2 piece verification and swarm merging are nontrivial and already solved there. Optionally, publications carry the project’s own torrent infohash, so wallets can go chain → project torrent directly; the indexer then only bootstraps the archive and covers files nobody self-hosts anymore.

Net effect: a permissionlessly mirrored, chain-verifiable archive of all BCMR registries, where every self-hosting project is automatically a mirror of its own slice. Total data volume is small — seeding incentives are a non-issue; indexer liveness and wallet integration are the actual work.

1 Like