Blockchain Commons Tags TypeScript Library - v1.0.0-alpha.20
    Preparing search index...

    Class ProvenanceMark

    A cryptographically-secured provenance mark.

    Index

    Methods

    • Get the first four bytes of the hash as upper-case ByteWords.

      Parameters

      • prefix: boolean

      Returns string

    • A compact 8-letter identifier derived from the upper-case ByteWords identifier by taking the first and last letter of each ByteWords word (4 words x 2 letters = 8 letters).

      Example: "ABLE ACID ALSO APEX" -> "AEADAOAX" If prefix is true, prepends the provenance mark prefix character.

      Parameters

      • prefix: boolean

      Returns string

    • Get the first four bytes of the hash as Bytemoji.

      Parameters

      • prefix: boolean

      Returns string

    • Check if this mark precedes another mark, throwing on validation errors. Errors carry a structured validationIssue in their details, matching Rust's Error::Validation(ValidationIssue) pattern.

      Parameters

      Returns void

    • Encode as bytewords with the given style.

      Parameters

      • style: BytewordsStyle

      Returns string

    • Convert this provenance mark to a Gordian Envelope.

      Creates a leaf envelope containing the tagged CBOR representation. Matches Rust: Envelope::new(mark.to_cbor()) which creates a CBOR leaf.

      Returns Envelope

    • Extract a ProvenanceMark from a Gordian Envelope.

      Matches Rust: envelope.subject().try_leaf()?.try_into()

      Parameters

      • envelope: Envelope

        The envelope to extract from

      Returns ProvenanceMark

      The extracted provenance mark

      ProvenanceMarkError if extraction fails