Format for Bitcoin Outpoints

Ty Everett (ty@projectbabbage.com)

Abstract

This document specifies the standard format for representing spendable Unspent Transaction Outputs (UTXOs) and the associated information required for spending or sharing them with other parties. The goal is to provide a baseline UTXO storage format that encapsulates the minimal set of requirements, promotes compatibility and interoperability between different implementations, and reduces fragmentation within the Bitcoin ecosystem. This standard allows for extensions or deviations to be defined as part of other standards.

Motivation

The development of the BRC-36 standard is motivated by the need for a unified and standardized format for storing UTXOs, which are fundamental to Bitcoin and facilitate tokenization, as well as define the mechanism by which value is represented and conveyed within the system. With many different storage formats in use by various applications and implementations around the ecosystem, the lack of a standard format has led to compatibility issues and fragmentation. By providing a clear, standardized format for UTXO storage, we aim to enhance compatibility, facilitate sharing and spending of UTXOs among different parties, and simplify the implementation of Bitcoin-related services and applications.

Specification

The JSON representation of the UTXO storage format is specified as an object with the following fields:

FieldDescription

txid

The transaction ID, represented as a hex string, of the transaction that contains the UTXO.

vout

The output index in the transaction (where 0 is the first output) where the UTXO is found.

outputScript

A BRC-14 hex string representation of the Bitcoin output script associated with the UTXO.

satoshis

The number of satoshis contained in the UTXO.

rawTx

The raw transaction (BRC-12 hex format) that encompasses the UTXO.

inputs, mapiResponses, and/or proof

The other envelope fields, as defined by BRC-8.

Implementation

In order to implement a compatible UTXO storage system, developers should adhere to the following guidelines:

  • Ensure that the UTXO storage object includes all the required fields, as specified.

  • Store the BRC-8 transaction envelope associated with the encompassing transaction alongside the UTXO, providing information about either the merkle proof on such a transaction or its associated input transactions and their SPV information.

  • Implement the ability to serialize and deserialize UTXOs using the JSON format specified in this standard, allowing for easy sharing and spending of UTXOs between parties.

  • When extending or deviating from the BRC-36 standard, make sure to define these changes as part of other standards or specifications to maintain compatibility and avoid further fragmentation.

Example

Here are some examples of UTXO storage objects in JSON format:

{
  "txid": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "vout": 0,
  "outputScript": "76a9140123456789abcdef0123456789abcdef0123456789abcdef88ac",
  "satoshis": 310033,
  "rawTx": "0100000001...",
  "inputs": {...},
  "mapiResponses": [...],
  "proof": {...}
}
{
  "txid":"7001295a287fee8e7ad5de58ed30bd61923977ddc9b7a44830ebb9a68b12dc39",
  "vout":0,"outputScript":"4104ca0a8ce950bf2bc85115bd68818455ae2f187efc96c7527dfad98b69531ae65d13cff3e6f07263dcc64c8ccfd03884983a896b0c5887f2ec5bfd7ad739b76119ac213155485250596e4d4850755135546762334146384a5871774b6b6d5a56793568472231485438347a7272467645594658567a6b5343436f6968706d33437754586a74726b200c613f338ad70e228eaee180f65c34d72a63bdf4c9e167dd5bf70a61539e80a8096164766572746973654468747470733a2f2f73746167696e672d6e616e6f73746f72652e626162626167652e73797374656d732f63646e2f54436f5a366269715743634b574b4d6e5065695854620a31383338383430313032043834303046304402205da55600d8f260d760b37491bc3286b9faacd0d408c187e69119ddc1d98bf3fe02207996fda8d6aba1b7494d7fe8a9b7e5111ea492348f11162bc898b3f7ab2ebf486d6d6d6d",
  "topic":"UHRP",
  "satoshis":500,
  "rawTx":"0100000001e09afc3f6ed8842e3f231aac29d325c0f90137a5441bf861c7a9ee7499fafc9a020000006b483045022100cfef7385daedeb6f54a68c1188bf7d9061774f88eb391e132daea49cfcb883c60220010ba950bbb2952a1d4ace35c6721a254774c6370be75e804334be13544e4f3c412102dc35718aeb818a6075a926e8f68bd6656e5fa007a083d8f5b6193b7b1c34e3f7ffffffff03f401000000000000fd53014104ca0a8ce950bf2bc85115bd68818455ae2f187efc96c7527dfad98b69531ae65d13cff3e6f07263dcc64c8ccfd03884983a896b0c5887f2ec5bfd7ad739b76119ac213155485250596e4d4850755135546762334146384a5871774b6b6d5a56793568472231485438347a7272467645594658567a6b5343436f6968706d33437754586a74726b200c613f338ad70e228eaee180f65c34d72a63bdf4c9e167dd5bf70a61539e80a8096164766572746973654468747470733a2f2f73746167696e672d6e616e6f73746f72652e626162626167652e73797374656d732f63646e2f54436f5a366269715743634b574b4d6e5065695854620a31383338383430313032043834303046304402205da55600d8f260d760b37491bc3286b9faacd0d408c187e69119ddc1d98bf3fe02207996fda8d6aba1b7494d7fe8a9b7e5111ea492348f11162bc898b3f7ab2ebf486d6d6d6dc8000000000000001976a9148055582669432149141abcf887fced6881f7404288ac207c1202000000001976a9146a1a5f00deb78b2ef39e9a80d3e3ea2c97d0710c88ac00000000",
  "proof":null,
  "inputs":"{\"9afcfa9974eea9c761f81b44a53701f9c025d329ac1a233f2e84d86e3ffc9ae0\":{\"proof\":{\"flags\":2,\"index\":3,\"txOrId\":\"9afcfa9974eea9c761f81b44a53701f9c025d329ac1a233f2e84d86e3ffc9ae0\",\"target\":\"c99dfb20991b131142a915b086eb6413d78fb472477c31ef06495c7d712dc4e4\",\"nodes\":[\"5206842a42c144617bee40869bd73b0f65ecf6d19c75e73c7106ee2f5b271308\",\"624c68a9e2c8e83df9e55c0bc4b3a560924d6cb027285e6d6499f6445149e4ac\",\"4c02bfcd6098e40ecebab74783e1bd14d8495bccb02e4b5447057de31ed485d6\"],\"targetType\":\"merkleRoot\"},\"rawTx\":\"010000000166dee27f6d4ca528dbd664c1b6a686f9a3b18336ca396bcead7f2065ec0f07ac020000006b483045022100effd3358e1a602898e2a80b0d45b3a01bb36dfc9148b0766bc6e8185f4cf3c0c02203c3d6c6ff180d395b1300b89f96056d9ec915d6cfbf02c7cff2d6f4bb9611d1941210228ec497f7097a26ea1049ef732931d5abc40335e7693cac56d4534f15ff60aefffffffff03204e0000000000001976a9145b296c72cbec349171445808df953c2edaa3a1d388acc8000000000000001976a914d013936b4177bcbb0d934c6348b0d9ec3cc05dac88ac1e7f1202000000001976a914b281d7f257d79aebb910a5ba2c8e787f7ea635ab88ac00000000\"}}",
  "mapiResponses":"[{\"payload\":\"{\\\"apiVersion\\\":\\\"1.5.0\\\",\\\"timestamp\\\":\\\"2023-04-10T20:55:03.2794204Z\\\",\\\"txid\\\":\\\"7001295a287fee8e7ad5de58ed30bd61923977ddc9b7a44830ebb9a68b12dc39\\\",\\\"returnResult\\\":\\\"success\\\",\\\"resultDescription\\\":\\\"\\\",\\\"minerId\\\":\\\"030d1fe5c1b560efe196ba40540ce9017c20daa9504c4c4cec6184fc702d9f274e\\\",\\\"currentHighestBlockHash\\\":\\\"00000000000004863e21305bc8cee6dd66b80a443416f14ccc5c74895fdefcac\\\",\\\"currentHighestBlockHeight\\\":1546251,\\\"txSecondMempoolExpiry\\\":0,\\\"warnings\\\":[],\\\"failureRetryable\\\":false}\",\"publicKey\":\"030d1fe5c1b560efe196ba40540ce9017c20daa9504c4c4cec6184fc702d9f274e\",\"signature\":\"304402205cd7c1b8f64de17c5824fec87549ecf46d69f122ed96971878562795d432a00702202097e309da4db38876bcaecafdd9f6234fcee999113a5fd54c909383d223a24f\"}]"
}

Last updated