@ethereumjs/tx / createBlob4844Tx
createBlob4844Tx(
txData,opts?):Blob4844Tx
Defined in: 4844/constructors.ts:125
Instantiate a Blob4844Tx transaction from a data dictionary.
If blobs are provided the tx will be instantiated in the “Network Wrapper” format, otherwise in the canonical form represented on-chain.
Transaction data object containing:
chainId - Chain ID (will be set automatically if not provided)nonce - Transaction noncemaxPriorityFeePerGas - Maximum priority fee per gas (EIP-1559)maxFeePerGas - Maximum fee per gas (EIP-1559)gasLimit - Gas limit for the transactionto - Recipient address (optional for contract creation)value - Value to transfer in weidata - Transaction dataaccessList - Access list for EIP-2930 (optional)maxFeePerBlobGas - Maximum fee per blob gas (EIP-4844)blobVersionedHashes - Versioned hashes for blob validationv, r, s - Signature components (for signed transactions)blobs - Raw blob data (optional, will derive commitments/proofs)blobsData - Array of strings to construct blobs from (optional)kzgCommitments - KZG commitments (optional, derived from blobs if not provided)kzgProofs - KZG proofs (optional, derived from blobs if not provided)networkWrapperVersion - Network wrapper version (0=EIP-4844, 1=EIP-7594)Transaction options including Common instance with KZG initialized
A new Blob4844Tx instance
If KZG is not initialized in Common
If both blobsData and blobs are provided
Notes:
customCrypto.kzg initializedblobsData and blobs simultaneouslyblobs or blobsData is provided, kzgCommitments, blobVersionedHashes, and kzgProofs will be automatically derived