Skip to content

accessRuleLiteral

accessRuleLiteral(rule): InstructionArg

Defined in: ootle/src/helpers/cbor-literal.ts:350

CBOR-encode an AccessRule for a template argument, taking the same JSON shape the bindings and the indexer use. Each enum level is minicbor’s [variant_index, [fields]] form.

A rule the engine refuses to store is rejected here, before the transaction is signed: an empty AnyOf/AllOf, and an MOfN whose count is zero, exceeds its requirements, or lists a requirement twice. One case is left to the engine: a CallerComponent/DirectCallerTemplate requirement listed beside the badge it stands for.

AccessRule

InstructionArg

if the rule holds an unrecognised variant, a malformed address, an MOfN count outside u16, or is one the engine rejects.