SignDoc
What gets canonical-JSON encoded and SHA-256 hashed before signing.
Definition
class SignDoc(TypedDict):
sender: Addr
gas_limit: int
messages: list[Message]
data: MetadataFields
sender — Addr.
gas_limit — int.
messages — list[Message]. Note: field name is messages, NOT msgs. This differs from UnsignedTx / Tx — a faithful mirror of the Rust types.
data — Metadata.
Notes
Metadata'sexpiryfield is dropped from the canonical bytes whenNone(the chain usesskip_serializing_none).sign_doc_canonical_jsonperforms this stripping.
See also
sign_doc_canonical_json— canonical encodingsign_doc_sha256— 32-byte digestTxandUnsignedTx— wire envelopes