#[non_exhaustive]pub enum DelegateRequest<'a> {
ApplicationMessages {
key: DelegateKey,
params: Parameters<'a>,
inbound: Vec<InboundDelegateMsg<'a>>,
},
RegisterDelegate {
delegate: DelegateContainer,
cipher: [u8; 32],
nonce: [u8; 24],
},
UnregisterDelegate(DelegateKey),
RegisterDelegateWithPredecessors {
delegate: DelegateContainer,
cipher: [u8; 32],
nonce: [u8; 24],
predecessors: Vec<DelegateKey>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ApplicationMessages
RegisterDelegate
UnregisterDelegate(DelegateKey)
RegisterDelegateWithPredecessors
Registers a delegate AND requests a one-shot, node-side copy-forward of
the LOCAL-scope secrets belonging to predecessors into the newly
registered delegate’s own secret namespace.
predecessors are the delegate keys of retired generations of this
delegate. It is a list because a user may skip one or more
generations between the version they last ran and the current one, so
several prior namespaces can need forwarding in a single registration.
The copy-forward is:
- consent-gated on the client side — the node performs NO execution of any old delegate WASM; it only copies the already-sealed LOCAL-scope secret bytes it holds for a predecessor into the successor’s namespace,
- best-effort over unknown predecessors — the server silently ignores any predecessor key it does not hold, and
- idempotent per
(predecessor -> successor)pair — re-registering with the same predecessors copies nothing new.
cipher and nonce mirror DelegateRequest::RegisterDelegate purely
for field-shape parity. The node has ignored both since
freenet-core#4140 (secrets are sealed client-side), so they carry no
behavior here either; they exist only so the two registration variants
stay structurally identical.
Implementations§
Source§impl DelegateRequest<'_>
impl DelegateRequest<'_>
pub fn into_owned(self) -> DelegateRequest<'static>
pub fn key(&self) -> &DelegateKey
Trait Implementations§
Source§impl<'a> Clone for DelegateRequest<'a>
impl<'a> Clone for DelegateRequest<'a>
Source§fn clone(&self) -> DelegateRequest<'a>
fn clone(&self) -> DelegateRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more