derive_proxy_key_pair

Function derive_proxy_key_pair 

Source
pub fn derive_proxy_key_pair(
    b_keys: &KeyPair,
    a_pub: &Point,
    token: &DelegationToken,
) -> Result<ProxyKeyPair>
Expand description

Derive proxy signing key pair from a delegation token

§Arguments

  • b_keys - Proxy’s original key pair
  • a_pub - Original signer’s public key
  • token - Valid delegation token bound to this proxy

§Returns

A ProxyKeyPair that cannot be used to create new delegations (type-safe)

§Errors

Returns InvalidDelegation if token verification fails, ProxyKeyMismatch if the proxy’s public key doesn’t match the bound key