Skip to main content

BlocktrailEnvelope

Type Alias BlocktrailEnvelope 

Source
pub type BlocktrailEnvelope = Blocktrail;
Expand description

The on-disk blocktrails.json envelope: the trail layer beside the gitmark.json substrate (ADR-124 §2.2).

Now the shared Blocktrail type, in the shape blocktrails/spec’s gitmark profile §5.2 gives and blocktrails/git-mark writes (@type, version, profile, pubkeyBase, chain, states, txo as TXO URIs). Files in the earlier shape this alias named (@id, genesis, txo entries of the form {outpoint, blockheight}) still parse, and serialise back as read.

Aliased Type§

pub struct BlocktrailEnvelope {
    pub id: Option<String>,
    pub type_: String,
    pub version: Option<String>,
    pub profile: Option<String>,
    pub pubkey_base: Option<String>,
    pub chain: Option<String>,
    pub genesis: Option<String>,
    pub states: Vec<Value>,
    pub txo: Vec<BlocktrailTxo>,
}

Fields§

§id: Option<String>

The earlier shape’s @id (gitmark:<first-commit>:0); None in the §5.2 shape.

§type_: String§version: Option<String>

The schema version (BLOCKTRAIL_VERSION for a trail built here).

§profile: Option<String>

The profile (gitmark, or a plain profile id); a trail with none is read as DEFAULT_PROFILE.

§pubkey_base: Option<String>

The base key as a full compressed point (02/03 + x).

§chain: Option<String>

The chain token the marks live on (tbtc4, mainnet, gitmark, …).

§genesis: Option<String>

The earlier shape’s genesis (gitmark:<first-commit>:0); None in the §5.2 shape.

§states: Vec<Value>

One state per mark, in order.

§txo: Vec<BlocktrailTxo>

The marks, in order.