# SignatureEnvelope Types

## `SignatureEnvelope.GetType`

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

### Examples

```ts twoslash
import type { SignatureEnvelope } from 'ox/tempo'

type Type = SignatureEnvelope.GetType<{
  r: `0x${string}`
  s: `0x${string}`
  yParity: number
}>
// @log: 'secp256k1'
```

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Keychain`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.KeychainRpc`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `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](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Multisig`

Native multisig signature (type `0x05`).

Wraps a set of owner approvals (secp256k1, p256, webAuthn, or nested multisig) 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](https://tips.sh/1061)

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.MultisigRpc`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.P256`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.P256Rpc`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Secp256k1`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Secp256k1Flat`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Secp256k1Rpc`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Serialized`

Hex-encoded serialized signature envelope.

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `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](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#signature-types)

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L39)

## `SignatureEnvelope.SignatureEnvelopeRpc`

RPC-formatted signature envelope.

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.Type`

Union type of supported signature types.

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.WebAuthn`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## `SignatureEnvelope.WebAuthnRpc`

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)
