Skip to main content

Crate rialo_two_step_authority

Crate rialo_two_step_authority 

Source
Expand description

A reusable two-step authority-transfer primitive for governance domains.

Governance NORTHSTAR §2.3 requires that transfer of a sole signing authority be two-step — the holder proposes a successor and the successor explicitly accepts — so that a transfer to an unusable key cannot strand the domain. Several programs need exactly this handshake (feature management, consensus-committee governance, …); this crate factors the state machine out so each program embeds one field and delegates rather than re-implementing the guards.

The type is pure and SVM-independent: it holds no accounts and does no signature checking against a runtime. A consumer extracts the transaction signer, passes it in as caller, and maps AuthorityTransferError onto its own program error. The caller is checked against the authority (or pending) key inside each method, so a consumer may rely on that check as its authorization, or verify the signer upstream and pass the verified key through.

Structs§

TwoStepAuthority
A current authority plus an optional pending successor, implementing the two-step transfer handshake.

Enums§

AuthorityTransferError
Why a two-step transfer operation was rejected.