Skip to main content

sign_tx

Function sign_tx 

Source
pub fn sign_tx<T: LighterTx>(
    tx: &T,
    chain_id: u32,
    sk: &PrivateKey,
    k: Scalar,
) -> SignedTx
Expand description

Sign any LighterTx under (sk, k) and return the 80-byte signature alongside the 40-byte tx hash.

k MUST be drawn from a cryptographic RNG and used at most once per key; see PrivateKey::sign for the full nonce contract. The wire signature is laid out as s_le || e_le.