import { type Address, type Hex } from "viem"; import type { Metadata } from "../types"; /** * Adds metadata to a transaction object by concatenating additional * hex-encoded data to the transaction's `data` field. The additional * data may include a timestamp and an origin identifier derived * from the metadata. * * The function ensures that the transaction data is correctly formatted * and includes optional metadata elements if provided. * * @param {Object} tx - The original transaction object. * @param {Hex} tx.data - The existing hex-encoded data for the transaction. * @param {bigint} tx.value - The value to be sent with the transaction. * @param {Address} tx.to - The recipient address of the transaction. * @param {Metadata} metadata - An object containing optional metadata fields * such as `timestamp` and `origin`. * * @returns {Object} - A new transaction object with the modified `data` field * including the concatenated metadata. * * If no `data` is present in the original transaction, the function returns * the transaction unmodified. */ export declare function addTransactionMetadata(tx: { data: Hex; value: bigint; to: Address; }, metadata: Metadata): { data: Hex; value: bigint; to: Address; };