Brave-browser: Add support for b:// protocol

Created on 3 Feb 2019  路  5Comments  路  Source: brave/brave-browser

Could Brave add support for the b:// Bitcoin simple storage protocol?

It's a new protocol developed by @unwriter:
https://github.com/unwriter/B

What would it take to get this done?

closeinvalid closewontfix

Most helpful comment

(Ignore my comment above -- do not use the "solutions" above)

Actually, on further thought and comments by "Rob" we should link directly to the bitcoin SV p2p mining network and fetch the transaction directly via SPV.

This cuts out the intermediary providers completely and reduces the points of failure.

I've kept my comment above for historical purposes, but the true solution should use SPV to fetch and resolve the transaction contents directly for a b://.... link

All 5 comments

+1

This would be a huge boon for decentralization, user control and building out a powerful ecosystem for server-less applications on top of Bitcoin and Brave

Additional background information:

b:// links are rendered by sites like https://b.bitdb.network (which started it all), www.bitcoinfiles.org, www.bitpaste.app, www.bico.media, www.svblox.com, www.whatsonchain.com, www.pagereturn.com and more.

At a high level any URL like b://transaction-id-uri is a reference to a file on the Bitcoin SV blockchain stored in a transaction defined by the b:// protocol.

Idea & Method 1) User Chooses their b:// Provider Settings

This is basically a method for dynamically replacing all URLs in memory (DOM rendering and JS AJAX execution) of URLs of the form b://.... with a provider that serves the content directly from the blockchain.

One way to handle b://.... URLs is to provide the user with an option to "Choose their b:// provider" like one of the sites above (Shameless plug) such as: https://static.bitcoinfiles.org/a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e

We can see that the b:// link here can be converted....b://a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e?foo=bar into:

https://static.bitcoinfiles.org/a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e?foo=bar

...by merely replacing the b:// part with https://static.bitcoinfiles.org/

HTML example:

<html>
<body>
<img src="b://a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e">
</body>
</html>

Can become:

<html>
<body>
<img src="https://static.bitcoinfiles.org/a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e">
</body>
</html>

or another provider such as

<html>
<body>
<img src="https://bico.media/a5712a1de9811bde1785fbc8359cc2bfd9c20914d0c3c7e1a5ca15c419720f7e">
</body>
</html>

This direct simple replacement works because the b:// is a file hosting protocol and provides the mime type and encoding of the data when retrieving the file. JS, CSS, and any asset can be hosted and used in this manner like all web assets!

Idea & Method 2) User Choose their Bitdb provider and then uses preset rule for handling b:// links.

https://bitdb.network/ is a standard way of aggregating, indexing, and querying Bitcoin data. Bitdb is created and maintained by Unwriter and provides a standard way of interacting with the Bitcoin SV network. It has emerged as the "standard way" to build server-less Bitcoin applications.

This opens up unique possibilities and very complex interactions in the future. It is more work up front, but can be worth it long term.

In this method, what can be done is that User can "Configure Bitdb Provider" to use a URL (such as https://babel.bitdb.network).

Then... preset rules can be chosen for how to handle b:// links. For instance, we can specify that when the browser sees a b:// link, that it calls the https://babel.bitdb.network endpoint and performs a custom Bitdb query to fetch and parse the b:// protocol format! (Link: Bitdb Query Explorer for convenience)

In this manner, the user can configure which public Bitdb provider they wish to use and also specify their rules (preset in this case for convenience) for being able to handle these types of links.

...

The above is not meant to be an 'implementation guide', but just an overview of 2 possible ideas on how to accomplish this. If anyone would like to take it on, then I'm happy to help with implementation and expanding on more details to help make this happen.

(Ignore my comment above -- do not use the "solutions" above)

Actually, on further thought and comments by "Rob" we should link directly to the bitcoin SV p2p mining network and fetch the transaction directly via SPV.

This cuts out the intermediary providers completely and reduces the points of failure.

I've kept my comment above for historical purposes, but the true solution should use SPV to fetch and resolve the transaction contents directly for a b://.... link

Chrome extension that allows you to browse b://protocol directly approved: https://twitter.com/prayer0000/status/1106008944898646016

Sounds like this can be done in an extension.

A standalone browser has also been developed: https://twitter.com/_unwriter/status/1108761025388728320

Was this page helpful?
0 / 5 - 0 ratings