What shorthand macros does Silverscript provide for common covenant patterns?

Silverscript offers two shorthand macros for the most common covenant shapes so developers don't have to write the full parameter list every time. The first, #[covenant.singleton], handles a one-in one-out pattern where the covenant cannot be terminated — useful when a rule must stay in force across every spending step. The second, #[covenant.fanout(to = Y)], handles a one-in many-out pattern, where a single input covenant fans out to multiple outputs. Understanding these shorthands matters because they reveal the two most fundamental covenant topologies on Kaspa: linear chains (singleton) and branching paths (fanout), which together cover a wide range of real-world spending rule designs.

Learn more ›