Markdown for LLMs
LDC-E2113 — An external snapshot function missing required items
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E2113 — An external snapshot function missing required items
## What it means
An external snapshot function is a typed boundary to outside data,
and the boundary is only complete with all its pieces: a result type,
the capability it runs under, and a binding path saying where the
snapshot comes from. A missing piece — or a binding that is not a
plain dotted path — leaves the boundary underspecified, and the
compiler names exactly which item is absent.
Supplying each required item, with the binding as a dotted path,
completes the declaration and clears the diagnostic.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Currency;
external snapshot function rate(from: Currency) -> Decimal {
capability "nbk.exchange-rates";
snapshot_from resolve_snapshot();
}
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Currency;
external snapshot function rate(from: Currency) -> Decimal {
capability "nbk.exchange-rates";
snapshot_from context.exchange_rate_snapshot;
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:8:17: error LDC-E2113: external snapshot function "rate": `snapshot_from` must be a dotted binding path, because ExternalDecl.snapshotBinding is a string (§47.2, legal-ir.schema.json)
```
## Related
- [Sources](/constructs/sources/) — where outside data enters a package.