#[non_exhaustive]pub enum GhostkeyRequest {
Show 18 variants
ImportGhostKey {
certificate_pem: String,
signing_key_pem: String,
master_verifying_key_pem: Option<String>,
},
ListGhostKeys,
GetGhostKey {
fingerprint: String,
},
GetCertificate {
fingerprint: String,
},
DeleteGhostKey {
fingerprint: String,
},
SetLabel {
fingerprint: String,
label: String,
},
SignMessage {
fingerprint: String,
message: Vec<u8>,
},
SignWithDefault {
message: Vec<u8>,
},
SetDefaultKey {
fingerprint: String,
},
GetDefaultKey,
VerifySignedMessage {
signed_message: Vec<u8>,
},
ExportGhostKey {
fingerprint: String,
},
ExportAllGhostKeys,
GrantPermission {
fingerprint: String,
requestor: SignatureRequestor,
},
RevokePermission {
fingerprint: String,
requestor: SignatureRequestor,
},
ListPermissions {
fingerprint: String,
},
TestPermissionPrompt {
fingerprint: String,
},
RequestAnyAccess,
}Expand description
Requests from UI or other delegates to the ghostkey delegate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ImportGhostKey
Import a ghostkey from PEM-armored certificate and signing key. If master_verifying_key_pem is None, uses the hardcoded Freenet master key.
ListGhostKeys
List all stored ghostkeys.
GetGhostKey
Get details for a specific ghostkey.
GetCertificate
Get just the public certificate (for sharing with counterparties).
DeleteGhostKey
Delete a stored ghostkey.
SetLabel
Set a user-friendly label.
SignMessage
Sign a message with a specific ghostkey. The delegate scopes the signature to the requestor.
SignWithDefault
Sign a message with the user’s default ghostkey (highest-tier key, or user-overridden via SetDefaultKey). Apps should prefer this over SignMessage – it avoids needing to know about specific fingerprints.
SetDefaultKey
Set which ghostkey is the default for signing.
GetDefaultKey
Get the current default ghostkey fingerprint.
VerifySignedMessage
Verify a signed message produced by this delegate.
ExportGhostKey
Export a ghostkey’s certificate and signing key for backup. Security-sensitive: returns the private signing key.
ExportAllGhostKeys
Export all ghostkeys for backup.
GrantPermission
Grant an application or delegate permission to use a ghostkey.
RevokePermission
Revoke a previously granted permission.
ListPermissions
List permissions for a ghostkey.
TestPermissionPrompt
Debug: force a permission prompt regardless of existing permissions.
RequestAnyAccess
A third-party app asks for any one of the user’s ghostkeys. The
delegate emits a user prompt that lets the user pick a key (or
deny). On approval the delegate grants {ReadPublic, Sign} to
the requesting app for the chosen fingerprint and replies with a
single-element GhostKeyList containing that key.
The request takes no fields on purpose: the only identifier the user sees in the prompt is the runtime-attested requestor (a truncated contract id). Letting the app supply free text would open a phishing surface (a hostile app could write text designed to look like Freenet UI chrome). Apps that want to communicate purpose to the user should do so in their own UI before this flow runs.
Trait Implementations§
Source§impl Clone for GhostkeyRequest
impl Clone for GhostkeyRequest
Source§fn clone(&self) -> GhostkeyRequest
fn clone(&self) -> GhostkeyRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more