Skip to main content

sign_data

Function sign_data 

Source
pub fn sign_data(
    underlay_bytes: &[u8],
    overlay: &SwarmAddress,
    network_id: NetworkId,
    nonce: &Nonce,
    timestamp: Timestamp,
    chequebook: Option<&Address>,
) -> Vec<u8> 
Expand description

Build the canonical sign-data buffer for a BzzAddress.

underlay_bytes is the wire-encoded multiaddr list (caller-defined format). chequebook is None for nodes without a chequebook; the byte layout pads with 20 zero bytes either way, matching bee’s common.Address{}.Bytes() behaviour (so None and Some(Address::ZERO) produce byte-identical sign-data - verified by the test suite).