Skip to main content

Module capability

Module capability 

Expand description

Capability model for the settlement/tariff protocol (#1399).

These are the JWT scope strings that gate the RPC handlers. The #[authorize] macro on the AGPL service impl references these constants.

Convention: ai.hyprstream.pay.<domain>.<action> — matching the ai.hyprstream.ledger.* lexicon already in use.

Constants§

ALL_SCOPES
All settlement/tariff scopes, for registration with the scope registry.
SCOPE_SETTLEMENT_ISSUE
Scope: invoke SettlementIssuer::issue. This is the purchased-credit issuance path — it requires a verified settlement attestation AND this capability. Neither alone is sufficient.
SCOPE_SETTLEMENT_STATUS
Scope: invoke SettlementIssuer::status (query a prior issuance’s outcome for retry/recovery).
SCOPE_TARIFF_QUOTE
Scope: invoke TariffProvider::quote (get a priced quote for a resource).
SCOPE_TARIFF_RESOLVE
Scope: invoke TariffProvider::resolve_unit (resolve a unit reference for cross-cell federation).