pub struct ClientBinding {
pub ethereum_address: [u8; 20],
pub binding_signature: Vec<u8>,
}Expand description
Off-chain ephemeral client identity binding (ADR 003 §Off-Chain Ephemeral
Binding), carried inside StreamRequestExt. The address and its attesting
signature are paired so neither can appear without the other.
Fields§
§ethereum_address: [u8; 20]Ephemeral client Ethereum address (20 bytes) issuing vouchers for an off-chain (unregistered) client.
binding_signature: Vec<u8>EIP-712 BindNodeId(nodeId, nonce=0) signature attesting the
NodeId↔ethereum_address mapping for the connection’s lifetime. Exactly
BINDING_SIG_LEN bytes; verified by decdn_incentive via ecrecover.
Implementations§
Source§impl ClientBinding
impl ClientBinding
Sourcepub const fn validate(&self) -> Result<(), MessageValidationError>
pub const fn validate(&self) -> Result<(), MessageValidationError>
Validate the wire-level binding_signature length (BINDING_SIG_LEN).
The cryptographic attestation check (ecrecover over the BindNodeId
typed data) happens in decdn_incentive.
§Errors
MessageValidationError::InvalidBindingSigLen if the signature is not
exactly BINDING_SIG_LEN bytes.