pub struct IssuerContext { /* private fields */ }Expand description
Runtime issuer context containing issuer identity and PBRSA signing key.
Implementations§
Source§impl IssuerContext
impl IssuerContext
Sourcepub fn generate() -> Result<Self, CredentialsError>
pub fn generate() -> Result<Self, CredentialsError>
Generate an issuer context with fresh Nostr identity and PBRSA key pairs.
Sourcepub fn generate_with_thread_rng() -> Result<Self, CredentialsError>
pub fn generate_with_thread_rng() -> Result<Self, CredentialsError>
Generate an issuer context using a thread-local CSPRNG seeded from the system RNG.
Sourcepub fn generate_with_system_rng() -> Result<Self, CredentialsError>
pub fn generate_with_system_rng() -> Result<Self, CredentialsError>
Generate an issuer context using direct system randomness for each keygen draw.
Build and sign this issuer’s public metadata.
The returned authority binds the issuer’s derived Nostr identity key to the current PBRSA issuance public key and the supplied revocation locations.
Sourcepub fn export_secret_key(&self) -> Result<IssuerSecretKeys, CredentialsError>
pub fn export_secret_key(&self) -> Result<IssuerSecretKeys, CredentialsError>
Export this issuer’s identity and issuance secret keys.
Sourcepub fn import_secret_key(
secret_key: &IssuerSecretKeys,
) -> Result<Self, CredentialsError>
pub fn import_secret_key( secret_key: &IssuerSecretKeys, ) -> Result<Self, CredentialsError>
Import an issuer context from previously exported secret keys.
Sourcepub fn issue_credential(
&self,
info: Value,
request: &IssuanceRequest,
) -> Result<IssuanceResponse, CredentialsError>
pub fn issue_credential( &self, info: Value, request: &IssuanceRequest, ) -> Result<IssuanceResponse, CredentialsError>
Issue a blind signature over a holder issuance request.
Sourcepub fn revoke_credential(
&self,
credential: &SignedCredential,
) -> Result<SignedRevocation, CredentialsError>
pub fn revoke_credential( &self, credential: &SignedCredential, ) -> Result<SignedRevocation, CredentialsError>
Build and sign the revocation for a finalized credential issued by this issuer.
This computes the finalized credential digest and binds it to this issuer identity. It does not publish or transport the revocation; those concerns live outside the core protocol.
Trait Implementations§
Source§impl Clone for IssuerContext
impl Clone for IssuerContext
Source§fn clone(&self) -> IssuerContext
fn clone(&self) -> IssuerContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more