pub fn signing_message(domain: &str, bcs_bytes: &[u8]) -> Vec<u8> ⓘExpand description
Builds the signing message for an Aptos transaction preimage.
Aptos does not hash the whole domain || bcs_bytes blob into a single
digest. The signing message is the SHA3-256 hash of the domain separator
concatenated with the raw (unhashed) BCS bytes:
SHA3-256(b"APTOS::{domain}") || bcs_bytes
This matches the on-wire construction produced by
crate::transaction::types::RawTransaction::signing_message. Signing a
single hash taken over the concatenation (the previous behaviour of this
helper) yields a message the chain rejects with INVALID_SIGNATURE.