import { Blob4844Tx } from './tx.ts'; import type { JSONBlobTxNetworkWrapper, TxOptions } from '../types.ts'; import type { TxData, TxValuesArray } from './tx.ts'; /** * Instantiate a {@link Blob4844Tx} from a plain data object. * * With `blobs` or `blobsData` present the tx is built in network-wrapper form; * otherwise the on-chain canonical form (versioned hashes only) is used. * * Requires `opts.common.customCrypto.kzg`. When blobs are supplied, commitments, * versioned hashes, and proofs are derived automatically. * * @throws If `customCrypto.kzg` is not initialized on {@link TxOptions.common} * @throws If both `blobsData` and `blobs` are provided * @throws If fee or value fields overflow or are non-numeric * @throws If gas limit or nonce exceed EIP bounds */ export declare function createBlob4844Tx(txData: TxData, opts?: TxOptions): Blob4844Tx; /** * Instantiate a {@link Blob4844Tx} from devp2p byte-array encoding (canonical form only). * * For network-wrapper blobs use {@link createBlob4844TxFromSerializedNetworkWrapper}. * * Format: `[chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gasLimit, to, value, data, * accessList, maxFeePerBlobGas, blobVersionedHashes, v, r, s]` * * @throws If `customCrypto.kzg` is not initialized on {@link TxOptions.common} * @throws If the values array length is not 11 (unsigned) or 14 (signed) * @throws If `chainId` or signature fields are nested arrays * @throws If numeric fields contain leading zeroes * @throws If constructor validation fails (see {@link createBlob4844Tx}) */ export declare function createBlob4844TxFromBytesArray(values: TxValuesArray, opts?: TxOptions): Blob4844Tx; /** * Instantiate a {@link Blob4844Tx} from RLP-serialized bytes (canonical form only). * * Format: `0x03 || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, to, value, data, * access_list, max_fee_per_blob_gas, blob_versioned_hashes, y_parity, r, s])` * * @throws If `customCrypto.kzg` is not initialized on {@link TxOptions.common} * @throws If the leading type byte is not `0x03` * @throws If RLP decode result is not an array * @throws If decoded values fail {@link createBlob4844TxFromBytesArray} checks */ export declare function createBlob4844TxFromRLP(serialized: Uint8Array, opts?: TxOptions): Blob4844Tx; /** * Instantiate a {@link Blob4844Tx} from a network-wrapper RLP payload (blobs + KZG proofs). * * EIP-4844: `0x03 || rlp([tx_values, blobs, kzg_commitments, kzg_proofs])` * EIP-7594: `0x03 || rlp([tx_values, network_wrapper_version, blobs, kzg_commitments, kzg_proofs])` * * @throws If {@link TxOptions.common} is missing * @throws If `customCrypto.kzg` is not initialized * @throws If the leading type byte is not `0x03` * @throws If the wrapper has other than 4 or 5 RLP elements * @throws If the decoded tx has no `to` address * @throws If the network wrapper version is invalid * @throws If KZG proof verification fails * @throws If versioned hashes do not match commitments */ export declare function createBlob4844TxFromSerializedNetworkWrapper(serialized: Uint8Array, opts?: TxOptions): Blob4844Tx; /** * Strip blobs and KZG data from a network-wrapper tx for block inclusion. * * @throws If `customCrypto.kzg` is not initialized on {@link TxOptions.common} * @throws If delegated {@link createBlob4844Tx} validation fails */ export declare function createMinimal4844TxFromNetworkWrapper(txData: Blob4844Tx, opts?: TxOptions): Blob4844Tx; /** * Decode a blob network wrapper and return its JSON representation including blobs and proofs. * * @throws If {@link createBlob4844TxFromSerializedNetworkWrapper} validation fails */ export declare function blobTxNetworkWrapperToJSON(serialized: Uint8Array, opts?: TxOptions): JSONBlobTxNetworkWrapper; //# sourceMappingURL=constructors.d.ts.map