Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 2.42 KB

bcr-2023-007-envelope-output-desc.md

File metadata and controls

70 lines (46 loc) · 2.42 KB

Gordian Envelope: Bitcoin Output Descriptors (Version 2)

BCR-2023-007

© 2023 Blockchain Commons

Authors: Wolf McNally, Christopher Allen
Date: Aug 30, 2022
Revised: Aug 30, 2023

DEPRECATED: Superseded by Version 3 Output Descriptors

This document has been superseded by Bitcoin Output Descriptors (Version 3).

The content below is now deprecated and of historical interest only. It is not deployed anywhere of which we are aware.

Abstract

This document defines a format for enclosing typed Bitcoin output descriptors in Gordian Envelopes.

Introduction

The primary definition for Bitcoin output descriptors is text-based and defined in BIP-174.

This document defines a method for enclosing Bitcoin output descriptors in Gordian Envelopes, leveraging the existing text-based format and adding an assertion to declare the data type.

Known Values

The two Known Values this protocol uses are defined in the Known Values Registry:

  • OutputDescriptor (class)
  • outputDescriptor (property)
  • hasName (property)
  • note (property)

Note the difference in case of the two known values: OutputDescriptor is a type (class), and outputDescriptor, is a predicate (property).

Format Specification

The subject of a Bitcoin Output Descriptor Envelope is a text string containing a Bitcoin output descriptor.

  • It MUST include an isA: OutputDescriptor assertion to declare its type conforming to this document.
  • It MAY include a hasName assertion, where the object MUST be a non-empty string.
  • It MAY include a note assertion, where the object MUST be a non-empty string.

Example:

"wpkh([37b5eed4/84'/0'/0']xpub6BkU445MSEBXbPjD3g2c2ch6mn8yy1SXXQUM7EwjgYiq6Wt1NDwDZ45npqWcV8uQC5oi2gHuVukoCoZZyT4HKq8EpotPMqGqxdZRuapCQ23/<0;1>/*)" [
    isA: OutputDescriptor
    hasName: "Example"
    note: "This is the note."
]

In an Assertion

A Bitcoin Output Descriptor Envelope MAY be used as the object of an assertion with the outputDescriptor predicate.

Example:

"Example" [
    outputDescriptor: "wpkh([37b5eed4/84'/0'/0']xpub6BkU445MSEBXbPjD3g2c2ch6mn8yy1SXXQUM7EwjgYiq6Wt1NDwDZ45npqWcV8uQC5oi2gHuVukoCoZZyT4HKq8EpotPMqGqxdZRuapCQ23/<0;1>/*)" [
        isA: OutputDescriptor
        hasName: "Example"
        note: "This is the note."
    ]
]