In brief
This page is source-sensitive. Treat application, covenant, proof, and readiness wording as bounded by the listed public sources and Open Questions.
What this page explains#
Declaration macros are teaching aids for common covenant patterns, but their output must still be reviewed against state rules. This page sits in SilverScript, vProgs, And Based Apps. It gives the topic a plain-language handle first, then shows the working idea, the mechanism, the source trail, and any limits that still matter. This category distinguishes tooling convenience from protocol behavior. SilverScript can author or lower scripts, vProgs can organize based-app execution, and settlement/indexer responsibilities remain part of the application design.
The writing follows a simple Kaspa documentation pattern: answer the practical question first, then link outward for details. The closest public sources for this page are TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS, KIP-0020. Local notes can help choose what to explain, but public-facing references resolve to upstream websites, repositories, papers, release pages, or docs.
How to think about it#
The practical model starts by naming the layer that owns the topic: wallet use, node operation, consensus, transaction validation, Toccata script behavior, tooling, or research. From there, the page shows which public source can support the explanation and where the explanation becomes incomplete.
For Declarations And Covenant Macros, the model is built around these anchors: declarations and covenant macros can express binding modes and transition shapes; generated successor validation needs inspection; macro convenience can hide unsafe assumptions; negative tests are review guidance unless backed by a concrete upstream test; source links must separate tooling from protocol. This model is useful, but it does not encode every constant, branch, error type, or edge case. Those details belong in the source path and the source notes.
How it works#
1. declarations and covenant macros can express binding modes and transition shapes. SilverScript pages help readers author and inspect scripts while preserving the protocol boundary. A compiler or macro can generate useful script structure, but generated output still has to be reviewed against txscript, covenant context, pricing, signing, and negative tests.
2. generated successor validation needs inspection. vProgs and settlement pages are application-architecture pages. They have to say who observes ordered activity, who computes state, who produces proofs or attestations, who submits settlement, and how restart or replay recovers evidence. That responsibility map is as important as the success path.
3. macro convenience can hide unsafe assumptions. SilverScript pages help readers author and inspect scripts while preserving the protocol boundary. A compiler or macro can generate useful script structure, but generated output still has to be reviewed against txscript, covenant context, pricing, signing, and negative tests.
4. negative tests are review guidance unless backed by a concrete upstream test. vProgs and settlement pages are application-architecture pages. They have to say who observes ordered activity, who computes state, who produces proofs or attestations, who submits settlement, and how restart or replay recovers evidence. That responsibility map is as important as the success path.
5. source links must separate tooling from protocol. vProgs and settlement pages are application-architecture pages. They have to say who observes ordered activity, who computes state, who produces proofs or attestations, who submits settlement, and how restart or replay recovers evidence. That responsibility map is as important as the success path.
This mechanism section separates authoring tools, runtime organization, proof workflow, indexer replay, and L1 settlement. Tooling convenience does not become protocol behavior without upstream source support.
How to check it#
| Step | Check | Evidence gate |
|---|---|---|
| 1 | Check declarations and covenant macros can express binding modes and transition shapes. | Read TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS; label tooling/runtime behavior separately from L1 settlement or protocol enforcement. |
| 2 | Check generated successor validation needs inspection. | Read TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS; label tooling/runtime behavior separately from L1 settlement or protocol enforcement. |
| 3 | Check macro convenience can hide unsafe assumptions. | Read TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS; label tooling/runtime behavior separately from L1 settlement or protocol enforcement. |
| 4 | Check negative tests are review guidance unless backed by a concrete upstream test. | Read TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS; label tooling/runtime behavior separately from L1 settlement or protocol enforcement. |
| 5 | Check source links must separate tooling from protocol. | Read TOOL-SILVERSCRIPT-DECL, DOC-TOCCATA-COVENANT-STATE, RK-COVENANTS; label tooling/runtime behavior separately from L1 settlement or protocol enforcement. |
When using this page for tooling or based-app work, identify which layer authors scripts, observes ordering, computes state, produces proof material, submits settlement, and recovers after restart. Tool output and runtime architecture need L1 source or settlement evidence before they become protocol claims.
Related Pages#
- silverscript-compiler-and-lowering
- silverscript-vprogs-based-apps
- based-apps