Skip to content

SignatureEnvelope Types

SignatureEnvelope.GetType

Statically determines the signature type of an envelope at compile time.

Examples

import type { SignatureEnvelope } from 'ox/tempo'
 
type Type = SignatureEnvelope.GetType<{ r: bigint; s: bigint; yParity: number }>
'secp256k1'

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Keychain

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.KeychainRpc

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.KeychainVersion

Keychain signature version.

  • 'v1': Legacy format. Inner signature signs the raw sig_hash directly. Deprecated at T1C. - 'v2': Inner signature signs keccak256(sig_hash || user_address), binding the signature to the specific user account.

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Multisig

Native multisig signature (type 0x05).

Wraps a set of primitive owner approvals (secp256k1, p256, or webAuthn) over the multisig owner approval digest. The transaction sender is the derived account, authorized once the recovered owner weights meet the configured threshold.

TIP-1061

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.MultisigRpc

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.P256

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.P256Rpc

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Secp256k1

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Secp256k1Flat

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Secp256k1Rpc

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Serialized

Hex-encoded serialized signature envelope.

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.SignatureEnvelope

Represents a signature envelope that can contain different signature types.

Tempo transactions support multiple signature types, each with different wire formats:

  • secp256k1 (no type prefix, 65 bytes): Standard Ethereum ECDSA signature. The sender address is recovered via ecrecover. Base transaction cost: 21,000 gas.

  • p256 (type 0x01, 130 bytes): P256/secp256r1 curve signature for passkey accounts. Includes embedded public key (64 bytes) and prehash flag. Enables native WebCrypto key support. Additional gas cost: +5,000 gas over secp256k1.

  • webAuthn (type 0x02, 129-2049 bytes): WebAuthn signature with authenticator data and clientDataJSON. Enables browser passkey authentication. The signature is also charged as calldata (16 gas/non-zero byte, 4 gas/zero byte).

  • keychain (type 0x03 V1, 0x04 V2): Access key signature that wraps an inner signature (secp256k1, p256, or webAuthn). Format: type byte + user_address (20 bytes) + inner signature. V2 binds the signature to the user account via keccak256(sigHash || userAddress). The protocol validates the access key authorization via the AccountKeychain precompile.

Signature Types Specification

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.SignatureEnvelopeRpc

RPC-formatted signature envelope.

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.Type

Union type of supported signature types.

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.WebAuthn

Source: src/tempo/SignatureEnvelope.ts

SignatureEnvelope.WebAuthnRpc

Source: src/tempo/SignatureEnvelope.ts