pub struct BlocktrailEnvelope {
pub id: String,
pub type_: String,
pub profile: String,
pub genesis: String,
pub states: Vec<String>,
pub txo: Vec<BlocktrailTxo>,
}Expand description
The on-disk blocktrails.json envelope — the 4th web-contract layer
(ADR-124 §2.2). The gitmark.json substrate anchors the reducer/state/
ledger layers; blocktrails.json is the trail layer.
Per the reconciliation (C6): this shape is reconstructed from the
webcontracts.org / “Melvo Predicts” reference pattern — it is NOT
byte-verifiable against a fetchable create-agent artefact (the
create-agent repo contains only gitmark.json). Only gitmark.json is
“verbatim”.
Shape: @type "Blocktrail", profile "gitmark" (the anchoring
substrate), a BIP-341 single-use-seal chain expressed as states[]
(the commit SHAs — the ledger states, in order) paired with txo[] (the
UTXO chain that seals them). genesis ties back to the gitmark.json
genesis seal.
Fields§
§id: Stringgitmark:<first-commit-sha>:0 — the genesis seal (shared with the
gitmark.json genesis).
type_: StringAlways "Blocktrail".
profile: StringAnchoring substrate profile — always "gitmark" here.
genesis: Stringgitmark:<first-commit-sha>:0.
states: Vec<String>The ledger states in order — commit SHAs the trail notarises.
txo: Vec<BlocktrailTxo>The BIP-341 single-use-seal UTXO chain sealing states[] (1:1 order).
Implementations§
Source§impl BlocktrailEnvelope
impl BlocktrailEnvelope
Sourcepub fn new_gitmark_profile(
genesis_sha: &str,
states: Vec<String>,
txo: Vec<BlocktrailTxo>,
) -> Self
pub fn new_gitmark_profile( genesis_sha: &str, states: Vec<String>, txo: Vec<BlocktrailTxo>, ) -> Self
Build a Blocktrail over an ordered set of commit SHAs (states)
and their sealing UTXO chain (txo), profiled on the gitmark
substrate (ADR-124 §2.2, C6 reference shape).
genesis_sha is the trail’s first commit SHA; the envelope’s @id
and genesis are both gitmark:<genesis_sha>:0.
Sourcepub fn to_blocktrails_json(&self) -> Result<String, ProvenanceError>
pub fn to_blocktrails_json(&self) -> Result<String, ProvenanceError>
Serialise to the canonical blocktrails.json text.
Trait Implementations§
Source§impl Clone for BlocktrailEnvelope
impl Clone for BlocktrailEnvelope
Source§fn clone(&self) -> BlocktrailEnvelope
fn clone(&self) -> BlocktrailEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlocktrailEnvelope
impl Debug for BlocktrailEnvelope
Source§impl<'de> Deserialize<'de> for BlocktrailEnvelope
impl<'de> Deserialize<'de> for BlocktrailEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for BlocktrailEnvelope
Source§impl PartialEq for BlocktrailEnvelope
impl PartialEq for BlocktrailEnvelope
Source§fn eq(&self, other: &BlocktrailEnvelope) -> bool
fn eq(&self, other: &BlocktrailEnvelope) -> bool
self and other values to be equal, and is used by ==.