Skip to content

TxEnvelopeEip8141.validate

Returns whether an EIP-8141 envelope satisfies structural constraints.

Imports

Named
import { TxEnvelopeEip8141 } from 'ox'

Examples

Basic Usage

import { Frame, TxEnvelopeEip8141 } from 'ox'
 
const valid = TxEnvelopeEip8141.validate({
  chainId: 1,
  frames: [Frame.from({})],
  sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})

Definition

function validate(
  envelope: PartialBy<TxEnvelopeEip8141, 'type'>,
): boolean

Source: src/core/TxEnvelopeEip8141.ts

Parameters

envelope

  • Type: PartialBy<TxEnvelopeEip8141, 'type'>

The transaction envelope to validate.

Return Type

Whether the envelope is structurally valid.

boolean