This specification describes Blockchain Links (Blinks) as a method for referencing blockchain-based data such as transactions and blocks.

Introduction

Referencing data in a Blockchain or DLT is useful for a variety of use cases and applications. For example:

Existing methods of referencing Blockchain data are typically specific to a single Blockchain or a few similar ones in a JSON-based structure, such as Chainpoint. Defining a specification for Blinks in a URI format allow it to be used in schema fields that were previously restricted to URI's/URN's as well as opening it up for a variety of encoding mechanisms (such as Concise Binary Object Representation [[RFC7049]]).

Terminology

The following terms are used to describe concepts involved in the referencing of Blockchain Links.

blockchain
A specific type of distributed ledger technology (DLT) that stores ledger entries in blocks of transactions, which are grouped together and hashed into a cryptographic chain. Because this type of DLT was introduced by Bitcoin, the term blockchain is sometimes used to refer specifically to the Bitcoin ledger.
distributed ledger (DLT)
A distributed database in which the various nodes use a consensus protocol to maintain a shared ledger in which each transaction is cryptographically signed and chained to the previous transaction.
Blink scheme
The formal syntax for Blinks. The generic Blink scheme is defined in this specification. Seperate Blink Chain specifications define a specific Blink scheme that works with that specific Blockchain.
Blink chain
A definition of how a specific Blink scheme can be implemented on a specific distributed ledger or network, including parameters specific to that ledger.
transaction
An individual operation that is recorded onto a distributed ledger.
block
In blockchain-based DLT's, a block refers to a batch of valid transactions.
smart contract
Automated, executable code that is stored onto a ledger through the action of a transaction.
Concise Binary Object Representation (CBOR)
A binary data format, as defined by [[RFC7049]].
Uniform Resource Identifier (URI)
An identifier, as defined by [[RFC3986]].
Uniform Resource Names (URN)
A resource identifier, as defined by [[RFC8141]].

Blockchain Links Specification

A Blink MUST adhere to a minimal set of base Blink scheme requirements in order to be a valid. In order to be used with a specific DLT, a Blink chain specification can be implemented to extend the Blink scheme. The Blink specification makes suggestions but does not make requirements or enforcements around how a specific chain is implemented or which chain specification shall be used if multiple are created.

Consider a registry that can be used to find existing chain specifications.

Blink Syntax

The generic Blink scheme is a URI scheme conformant with [[RFC3986]].

The following is the ABNF definition using the syntax in [[RFC5234]], which defines ALPHA and DIGIT. All other rule names not defined in this ABNF are defined in [[RFC3986]].

                blink          = "blink:" chain-name ":" chain-network ":" chain-asset-id
                chain-name     = 1*chain-char
                chain-network  = 1*chain-char
                chain-char     = %x61-7A / DIGIT
                chain-asset-id = *( ":" *idchar ) 1*idchar
                idchar         = ALPHA / DIGIT / "." / "-" / "_"
            
Verify that this ABNF definition is the expectation and inclusive enough for all chains.

Blink Syntax Parameters

chain-name
The value of the chain-name property MUST refer to a specific Blockchain or DLT type. Possible examples include bitcoin, ethereum, or hyperledger-indy.
chain-network
The value of the chain-network property MUST refer to a specific operational network of the preceding chain-name. Possible examples include mainnet, testnet, or ropsten.
chain-asset-id
The value of the chain-asset-id property MUST refer to a specific asset from the preceding chain-network from the preceding chain-name. chain-asset-id SHALL be well defined by a specific Blink chain specification in order to reference available assets. Assets MAY include blocks, transactions, smart contracts, or other available assets depending on the DLT. The necessary information needed to look up a given asset MAY include multiple asset ID's, as seperated by a :. A possible example includes abc123:321cba if looking up transaction 321cba on block abc123.

Examples

Looking up a Bitcoin mainnet transaction from a specific block.

An example Blink chain definition for Bitcoin:

                    blink:bitcoin:[chain-network]:[block]:[transaction]
                

Referencing this transaction:

                    blink:bitcoin:mainnet:000000000000000000010382095b5308881ddf0902b59d0328a1401548383c5a:d7a008c9f9eab701132d394410f4e9d578790fb41848013fc5ba35951acdca24
                

Looking up an Ethereum ropsten transaction where block is not required.

An example Blink chain definition for Ethereum:

                    blink:ethereum:[chain-network]:[optional block]:[transaction]
                

Referencing this transaction:

                    blink:ethereum:ropsten:0xafdcf0708ab37df3eef706ea0c1b985a8fa10b11607fe1c0558022b51f450635