Skip to main content

sign_encode_and_broadcast

Function sign_encode_and_broadcast 

Source
pub fn sign_encode_and_broadcast(
    private_key: &[u8],
    chain: &str,
    tx_bytes: &[u8],
    rpc_url: Option<&str>,
) -> Result<SendResult, OwsLibError>
Expand description

Sign, encode, and broadcast a transaction using an already-resolved private key.

This is the shared core of the send-transaction flow. Both the library’s sign_and_send (which resolves keys from the vault) and the CLI (which resolves keys via env vars / stdin prompts) delegate here so the sign → encode → broadcast pipeline is never duplicated.