Skip to main content
Direct signing serializes everything as Protocol Buffers binary. This is the default and most compact format.

SignDoc

The bytes that get signed are the Protobuf encoding of a SignDoc:
CosmJS provides helpers to construct these:
makeSignBytes produces the canonical byte representation by encoding the SignDoc with SignDoc.encode().finish(). Standard DirectSecp256k1* wallets hash this output with SHA-256 before ECDSA signing; EVM-compatible DirectEthSecp256k1* wallets hash the same bytes with Keccak-256.

AuthInfo

AuthInfo contains signer metadata and fee information:
Each signer entry includes:
  • pubkey — the signer’s public key, encoded as Any
  • sequence — the account’s current transaction counter
The signMode parameter is a single global setting (not per-signer) that defaults to SIGN_MODE_DIRECT.

TxRaw

After signing, the final transaction is a TxRaw:
These txBytes are what gets broadcast to the chain.