Guards are credentials (key hashes or script hashes) that must approve the transaction.

On the wire this is an alternation: a non-empty set of bare key hashes (byte-identical to the legacy required_signers field) or a non-empty ordered set of full credentials. A single instance always uses exactly one of the two forms for all of its elements.

Hierarchy

  • Guards

Constructors

Properties

#credentials: undefined | CredentialSet
#keyHashes: undefined | KeyHashSet

Methods

  • Deserializes guards from a CBOR byte array represented as either an array or a 258 tag.

    Disambiguation mirrors decodeGuards in the ledger Dijkstra TxBody.hs: if the first element is a CBOR array, every element is decoded as a full credential; otherwise every element is decoded as a bare key hash. An empty set decodes as key hash form: the Dijkstra guards rule is non-empty, but pre-Conway required_signers was a plain set and empty sets exist on chain.

    Returns

    The new Guards instance.

    Parameters

    • cbor: HexBlob

      The CBOR encoded guards.

    Returns Serialization.Guards

Generated using TypeDoc