Skip to main content

ReceiptSigner

Struct ReceiptSigner 

Source
pub struct ReceiptSigner { /* private fields */ }
Expand description

Registry-side receipt minting identity: the signing key plus the DID URL it is published under in the registry’s own DID document.

Lifecycle rule (RFC-ACDP-0010, normative): retired receipt keys MUST remain in the registry DID document’s verificationMethod indefinitely — rotation removes them from assertionMethod only (stops new receipts, keeps every previously minted receipt verifiable). Deleting an old key bricks every receipt it signed.

Implementations§

Source§

impl ReceiptSigner

Source

pub fn new( key: impl Into<AcdpSigningKey>, registry_did: impl Into<String>, key_id: impl Into<String>, ) -> Result<Self, AcdpError>

Create a signer. key_id’s DID portion MUST equal registry_did, which MUST be the did:web form of the registry’s serving authority.

Source

pub fn registry_did(&self) -> &str

The registry DID this signer mints under.

Source

pub fn mint( &self, ctx_id: &CtxId, lineage_id: &LineageId, origin_registry: &str, created_at: DateTime<Utc>, content_hash: &ContentHash, producer_key_fingerprint: &str, ) -> Result<RegistryReceipt, AcdpError>

Mint a signed receipt for an accepted publication.

producer_key_fingerprint MUST be the fingerprint of the key the validator actually used for producer-signature verification — not re-resolved later (that is the whole historical-validity guarantee).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.