Function declare

Source
pub fn declare<T: Config>(
    payload: AffidavitPayloadOf<T>,
    _signature: T::Signature,
)
Expand description

Submit an affidavit for the upcoming session election.

This extrinsic allows an author to declare their election weights (affidavit) for the next session. It also rotates the author’s signing key for the subsequent affidavit.

§Parameters

  • origin: Must be a signed account corresponding to the author submitting the affidavit.
  • payload: The payload that was signed off-chain representing the affidavit data.
  • signature: The author’s signature of the payload, used for verification.
  • new_key: A new affidavit signing key to replace the current one for the next upcoming session.

§Notes

  • Affidavit submissions are session-specific.
  • Key rotation ensures authors maintain fresh signing keys for security.
  • Only validated and available authors can submit affidavits.

§Errors

Returns a DispatchError if un-privileged to submit an affidavit.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::declare.