Private constructorOptional keyHashes: KeyHashSetOptional credentials: CredentialSetPrivate #credentialsPrivate #keyGets the guards as core credentials if this instance uses the credential form.
The credentials, or undefined for key hash form guards.
Gets the guards as core key hashes if this instance uses the key hash form.
The key hashes, or undefined for credential form guards.
Gets the wire representation this instance encodes to.
The guards kind.
Static fromDeserializes 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.
The new Guards instance.
The CBOR encoded guards.
Static fromCreates credential form guards from the given core credentials. Element order is preserved.
The new Guards instance.
The credentials of the guards.
Static fromCreates key hash form guards from the given core key hashes. Element order is preserved.
The new Guards instance.
The key hashes of the guards.
Generated using TypeDoc
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.