{"version":3,"file":"chains.cjs","sources":["../node_modules/viem/_esm/utils/chain/defineChain.js","../node_modules/viem/_esm/errors/version.js","../node_modules/viem/_esm/errors/base.js","../node_modules/viem/_esm/errors/encoding.js","../node_modules/viem/_esm/utils/data/isHex.js","../node_modules/viem/_esm/utils/data/size.js","../node_modules/viem/_esm/utils/data/trim.js","../node_modules/viem/_esm/errors/data.js","../node_modules/viem/_esm/utils/data/pad.js","../node_modules/viem/_esm/utils/encoding/toHex.js","../node_modules/viem/_esm/utils/encoding/toBytes.js","../node_modules/viem/_esm/utils/encoding/fromHex.js","../node_modules/viem/_esm/utils/formatters/formatter.js","../node_modules/viem/_esm/utils/formatters/transaction.js","../node_modules/viem/_esm/utils/formatters/block.js","../node_modules/viem/_esm/utils/formatters/log.js","../node_modules/viem/_esm/utils/formatters/transactionReceipt.js","../node_modules/viem/_esm/constants/number.js","../node_modules/viem/_esm/utils/data/concat.js","../node_modules/viem/_esm/errors/cursor.js","../node_modules/viem/_esm/utils/cursor.js","../node_modules/viem/_esm/utils/encoding/toRlp.js","../node_modules/viem/_esm/constants/unit.js","../node_modules/viem/_esm/utils/unit/formatUnits.js","../node_modules/viem/_esm/utils/unit/formatGwei.js","../node_modules/viem/_esm/errors/transaction.js","../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js","../node_modules/viem/_esm/utils/blob/blobsToCommitments.js","../node_modules/viem/_esm/utils/blob/blobsToProofs.js","../node_modules/@noble/hashes/esm/_assert.js","../node_modules/@noble/hashes/esm/utils.js","../node_modules/@noble/hashes/esm/_md.js","../node_modules/@noble/hashes/esm/sha256.js","../node_modules/viem/_esm/utils/hash/sha256.js","../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js","../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js","../node_modules/viem/_esm/constants/blob.js","../node_modules/viem/_esm/constants/kzg.js","../node_modules/viem/_esm/errors/blob.js","../node_modules/viem/_esm/utils/blob/toBlobs.js","../node_modules/viem/_esm/utils/blob/toBlobSidecars.js","../node_modules/viem/_esm/errors/address.js","../node_modules/viem/_esm/errors/chain.js","../node_modules/viem/_esm/errors/node.js","../node_modules/viem/_esm/utils/lru.js","../node_modules/@noble/hashes/esm/_u64.js","../node_modules/@noble/hashes/esm/sha3.js","../node_modules/viem/_esm/utils/hash/keccak256.js","../node_modules/viem/_esm/utils/address/getAddress.js","../node_modules/viem/_esm/utils/address/isAddress.js","../node_modules/viem/_esm/utils/data/slice.js","../node_modules/viem/_esm/utils/transaction/assertTransaction.js","../node_modules/viem/_esm/utils/transaction/getTransactionType.js","../node_modules/viem/_esm/utils/transaction/serializeAccessList.js","../node_modules/viem/_esm/utils/transaction/serializeTransaction.js","../node_modules/viem/_esm/op-stack/contracts.js","../node_modules/viem/_esm/op-stack/formatters.js","../node_modules/viem/_esm/op-stack/serializers.js","../node_modules/viem/_esm/op-stack/chainConfig.js","../node_modules/viem/_esm/chains/definitions/base.js","../node_modules/viem/_esm/chains/definitions/bsc.js","../node_modules/viem/_esm/chains/definitions/bscTestnet.js","../node_modules/viem/_esm/chains/definitions/mainnet.js","../node_modules/viem/_esm/chains/definitions/unichainSepolia.js","../src/chains/types.ts","../src/chains/eth.ts","../src/chains/solana.ts","../src/chains/ton.ts","../src/chains/sui.ts","../src/chains/index.ts"],"sourcesContent":["export function defineChain(chain) {\n    return {\n        formatters: undefined,\n        fees: undefined,\n        serializers: undefined,\n        ...chain,\n    };\n}\n//# sourceMappingURL=defineChain.js.map","export const version = '2.28.1';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nlet errorConfig = {\n    getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath\n        ? `${docsBaseUrl ?? 'https://viem.sh'}${docsPath}${docsSlug ? `#${docsSlug}` : ''}`\n        : undefined,\n    version: `viem@${version}`,\n};\nexport function setErrorConfig(config) {\n    errorConfig = config;\n}\nexport class BaseError extends Error {\n    constructor(shortMessage, args = {}) {\n        const details = (() => {\n            if (args.cause instanceof BaseError)\n                return args.cause.details;\n            if (args.cause?.message)\n                return args.cause.message;\n            return args.details;\n        })();\n        const docsPath = (() => {\n            if (args.cause instanceof BaseError)\n                return args.cause.docsPath || args.docsPath;\n            return args.docsPath;\n        })();\n        const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });\n        const message = [\n            shortMessage || 'An error occurred.',\n            '',\n            ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n            ...(docsUrl ? [`Docs: ${docsUrl}`] : []),\n            ...(details ? [`Details: ${details}`] : []),\n            ...(errorConfig.version ? [`Version: ${errorConfig.version}`] : []),\n        ].join('\\n');\n        super(message, args.cause ? { cause: args.cause } : undefined);\n        Object.defineProperty(this, \"details\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"docsPath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"metaMessages\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"shortMessage\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"version\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'BaseError'\n        });\n        this.details = details;\n        this.docsPath = docsPath;\n        this.metaMessages = args.metaMessages;\n        this.name = args.name ?? this.name;\n        this.shortMessage = shortMessage;\n        this.version = version;\n    }\n    walk(fn) {\n        return walk(this, fn);\n    }\n}\nfunction walk(err, fn) {\n    if (fn?.(err))\n        return err;\n    if (err &&\n        typeof err === 'object' &&\n        'cause' in err &&\n        err.cause !== undefined)\n        return walk(err.cause, fn);\n    return fn ? null : err;\n}\n//# sourceMappingURL=base.js.map","import { BaseError } from './base.js';\nexport class IntegerOutOfRangeError extends BaseError {\n    constructor({ max, min, signed, size, value, }) {\n        super(`Number \"${value}\" is not in safe ${size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: 'IntegerOutOfRangeError' });\n    }\n}\nexport class InvalidBytesBooleanError extends BaseError {\n    constructor(bytes) {\n        super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n            name: 'InvalidBytesBooleanError',\n        });\n    }\n}\nexport class InvalidHexBooleanError extends BaseError {\n    constructor(hex) {\n        super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: 'InvalidHexBooleanError' });\n    }\n}\nexport class InvalidHexValueError extends BaseError {\n    constructor(value) {\n        super(`Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`, { name: 'InvalidHexValueError' });\n    }\n}\nexport class SizeOverflowError extends BaseError {\n    constructor({ givenSize, maxSize }) {\n        super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: 'SizeOverflowError' });\n    }\n}\n//# sourceMappingURL=encoding.js.map","export function isHex(value, { strict = true } = {}) {\n    if (!value)\n        return false;\n    if (typeof value !== 'string')\n        return false;\n    return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n//# sourceMappingURL=isHex.js.map","import { isHex } from './isHex.js';\n/**\n * @description Retrieves the size of the value (in bytes).\n *\n * @param value The value (hex or byte array) to retrieve the size of.\n * @returns The size of the value (in bytes).\n */\nexport function size(value) {\n    if (isHex(value, { strict: false }))\n        return Math.ceil((value.length - 2) / 2);\n    return value.length;\n}\n//# sourceMappingURL=size.js.map","export function trim(hexOrBytes, { dir = 'left' } = {}) {\n    let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;\n    let sliceLength = 0;\n    for (let i = 0; i < data.length - 1; i++) {\n        if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n            sliceLength++;\n        else\n            break;\n    }\n    data =\n        dir === 'left'\n            ? data.slice(sliceLength)\n            : data.slice(0, data.length - sliceLength);\n    if (typeof hexOrBytes === 'string') {\n        if (data.length === 1 && dir === 'right')\n            data = `${data}0`;\n        return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n    }\n    return data;\n}\n//# sourceMappingURL=trim.js.map","import { BaseError } from './base.js';\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n    constructor({ offset, position, size, }) {\n        super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \"${offset}\" is out-of-bounds (size: ${size}).`, { name: 'SliceOffsetOutOfBoundsError' });\n    }\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n    constructor({ size, targetSize, type, }) {\n        super(`${type.charAt(0).toUpperCase()}${type\n            .slice(1)\n            .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`, { name: 'SizeExceedsPaddingSizeError' });\n    }\n}\nexport class InvalidBytesLengthError extends BaseError {\n    constructor({ size, targetSize, type, }) {\n        super(`${type.charAt(0).toUpperCase()}${type\n            .slice(1)\n            .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`, { name: 'InvalidBytesLengthError' });\n    }\n}\n//# sourceMappingURL=data.js.map","import { SizeExceedsPaddingSizeError, } from '../../errors/data.js';\nexport function pad(hexOrBytes, { dir, size = 32 } = {}) {\n    if (typeof hexOrBytes === 'string')\n        return padHex(hexOrBytes, { dir, size });\n    return padBytes(hexOrBytes, { dir, size });\n}\nexport function padHex(hex_, { dir, size = 32 } = {}) {\n    if (size === null)\n        return hex_;\n    const hex = hex_.replace('0x', '');\n    if (hex.length > size * 2)\n        throw new SizeExceedsPaddingSizeError({\n            size: Math.ceil(hex.length / 2),\n            targetSize: size,\n            type: 'hex',\n        });\n    return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\nexport function padBytes(bytes, { dir, size = 32 } = {}) {\n    if (size === null)\n        return bytes;\n    if (bytes.length > size)\n        throw new SizeExceedsPaddingSizeError({\n            size: bytes.length,\n            targetSize: size,\n            type: 'bytes',\n        });\n    const paddedBytes = new Uint8Array(size);\n    for (let i = 0; i < size; i++) {\n        const padEnd = dir === 'right';\n        paddedBytes[padEnd ? i : size - i - 1] =\n            bytes[padEnd ? i : bytes.length - i - 1];\n    }\n    return paddedBytes;\n}\n//# sourceMappingURL=pad.js.map","import { IntegerOutOfRangeError, } from '../../errors/encoding.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Encodes a string, number, bigint, or ByteArray into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex\n * - Example: https://viem.sh/docs/utilities/toHex#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world')\n * // '0x48656c6c6f20776f726c6421'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex(420)\n * // '0x1a4'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world', { size: 32 })\n * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'\n */\nexport function toHex(value, opts = {}) {\n    if (typeof value === 'number' || typeof value === 'bigint')\n        return numberToHex(value, opts);\n    if (typeof value === 'string') {\n        return stringToHex(value, opts);\n    }\n    if (typeof value === 'boolean')\n        return boolToHex(value, opts);\n    return bytesToHex(value, opts);\n}\n/**\n * Encodes a boolean into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#booltohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true)\n * // '0x1'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(false)\n * // '0x0'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true, { size: 32 })\n * // '0x0000000000000000000000000000000000000000000000000000000000000001'\n */\nexport function boolToHex(value, opts = {}) {\n    const hex = `0x${Number(value)}`;\n    if (typeof opts.size === 'number') {\n        assertSize(hex, { size: opts.size });\n        return pad(hex, { size: opts.size });\n    }\n    return hex;\n}\n/**\n * Encodes a bytes array into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#bytestohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function bytesToHex(value, opts = {}) {\n    let string = '';\n    for (let i = 0; i < value.length; i++) {\n        string += hexes[value[i]];\n    }\n    const hex = `0x${string}`;\n    if (typeof opts.size === 'number') {\n        assertSize(hex, { size: opts.size });\n        return pad(hex, { dir: 'right', size: opts.size });\n    }\n    return hex;\n}\n/**\n * Encodes a number or bigint into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#numbertohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420)\n * // '0x1a4'\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420, { size: 32 })\n * // '0x00000000000000000000000000000000000000000000000000000000000001a4'\n */\nexport function numberToHex(value_, opts = {}) {\n    const { signed, size } = opts;\n    const value = BigInt(value_);\n    let maxValue;\n    if (size) {\n        if (signed)\n            maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n        else\n            maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n    }\n    else if (typeof value_ === 'number') {\n        maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n    }\n    const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n    if ((maxValue && value > maxValue) || value < minValue) {\n        const suffix = typeof value_ === 'bigint' ? 'n' : '';\n        throw new IntegerOutOfRangeError({\n            max: maxValue ? `${maxValue}${suffix}` : undefined,\n            min: `${minValue}${suffix}`,\n            signed,\n            size,\n            value: `${value_}${suffix}`,\n        });\n    }\n    const hex = `0x${(signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value).toString(16)}`;\n    if (size)\n        return pad(hex, { size });\n    return hex;\n}\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#stringtohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function stringToHex(value_, opts = {}) {\n    const value = encoder.encode(value_);\n    return bytesToHex(value, opts);\n}\n//# sourceMappingURL=toHex.js.map","import { BaseError } from '../../errors/base.js';\nimport { isHex } from '../data/isHex.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nimport { numberToHex, } from './toHex.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes\n * - Example: https://viem.sh/docs/utilities/toBytes#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes('Hello world')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function toBytes(value, opts = {}) {\n    if (typeof value === 'number' || typeof value === 'bigint')\n        return numberToBytes(value, opts);\n    if (typeof value === 'boolean')\n        return boolToBytes(value, opts);\n    if (isHex(value))\n        return hexToBytes(value, opts);\n    return stringToBytes(value, opts);\n}\n/**\n * Encodes a boolean into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes\n *\n * @param value Boolean value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true)\n * // Uint8Array([1])\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true, { size: 32 })\n * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n */\nexport function boolToBytes(value, opts = {}) {\n    const bytes = new Uint8Array(1);\n    bytes[0] = Number(value);\n    if (typeof opts.size === 'number') {\n        assertSize(bytes, { size: opts.size });\n        return pad(bytes, { size: opts.size });\n    }\n    return bytes;\n}\n// We use very optimized technique to convert hex string to byte array\nconst charCodeMap = {\n    zero: 48,\n    nine: 57,\n    A: 65,\n    F: 70,\n    a: 97,\n    f: 102,\n};\nfunction charCodeToBase16(char) {\n    if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n        return char - charCodeMap.zero;\n    if (char >= charCodeMap.A && char <= charCodeMap.F)\n        return char - (charCodeMap.A - 10);\n    if (char >= charCodeMap.a && char <= charCodeMap.f)\n        return char - (charCodeMap.a - 10);\n    return undefined;\n}\n/**\n * Encodes a hex string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes\n *\n * @param hex Hex string to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function hexToBytes(hex_, opts = {}) {\n    let hex = hex_;\n    if (opts.size) {\n        assertSize(hex, { size: opts.size });\n        hex = pad(hex, { dir: 'right', size: opts.size });\n    }\n    let hexString = hex.slice(2);\n    if (hexString.length % 2)\n        hexString = `0${hexString}`;\n    const length = hexString.length / 2;\n    const bytes = new Uint8Array(length);\n    for (let index = 0, j = 0; index < length; index++) {\n        const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));\n        const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));\n        if (nibbleLeft === undefined || nibbleRight === undefined) {\n            throw new BaseError(`Invalid byte sequence (\"${hexString[j - 2]}${hexString[j - 1]}\" in \"${hexString}\").`);\n        }\n        bytes[index] = nibbleLeft * 16 + nibbleRight;\n    }\n    return bytes;\n}\n/**\n * Encodes a number into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes\n *\n * @param value Number to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function numberToBytes(value, opts) {\n    const hex = numberToHex(value, opts);\n    return hexToBytes(hex);\n}\n/**\n * Encodes a UTF-8 string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes\n *\n * @param value String to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function stringToBytes(value, opts = {}) {\n    const bytes = encoder.encode(value);\n    if (typeof opts.size === 'number') {\n        assertSize(bytes, { size: opts.size });\n        return pad(bytes, { dir: 'right', size: opts.size });\n    }\n    return bytes;\n}\n//# sourceMappingURL=toBytes.js.map","import { InvalidHexBooleanError, SizeOverflowError, } from '../../errors/encoding.js';\nimport { size as size_ } from '../data/size.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBytes } from './toBytes.js';\nexport function assertSize(hexOrBytes, { size }) {\n    if (size_(hexOrBytes) > size)\n        throw new SizeOverflowError({\n            givenSize: size_(hexOrBytes),\n            maxSize: size,\n        });\n}\n/**\n * Decodes a hex string into a string, number, bigint, boolean, or byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex\n * - Example: https://viem.sh/docs/utilities/fromHex#usage\n *\n * @param hex Hex string to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x1a4', 'number')\n * // 420\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c6421', 'string')\n * // 'Hello world'\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n *   size: 32,\n *   to: 'string'\n * })\n * // 'Hello world'\n */\nexport function fromHex(hex, toOrOpts) {\n    const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n    const to = opts.to;\n    if (to === 'number')\n        return hexToNumber(hex, opts);\n    if (to === 'bigint')\n        return hexToBigInt(hex, opts);\n    if (to === 'string')\n        return hexToString(hex, opts);\n    if (to === 'boolean')\n        return hexToBool(hex, opts);\n    return hexToBytes(hex, opts);\n}\n/**\n * Decodes a hex value into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x1a4', { signed: true })\n * // 420n\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420n\n */\nexport function hexToBigInt(hex, opts = {}) {\n    const { signed } = opts;\n    if (opts.size)\n        assertSize(hex, { size: opts.size });\n    const value = BigInt(hex);\n    if (!signed)\n        return value;\n    const size = (hex.length - 2) / 2;\n    const max = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n    if (value <= max)\n        return value;\n    return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;\n}\n/**\n * Decodes a hex value into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobool\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x01')\n * // true\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // true\n */\nexport function hexToBool(hex_, opts = {}) {\n    let hex = hex_;\n    if (opts.size) {\n        assertSize(hex, { size: opts.size });\n        hex = trim(hex);\n    }\n    if (trim(hex) === '0x00')\n        return false;\n    if (trim(hex) === '0x01')\n        return true;\n    throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a hex string into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x1a4')\n * // 420\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420\n */\nexport function hexToNumber(hex, opts = {}) {\n    return Number(hexToBigInt(hex, opts));\n}\n/**\n * Decodes a hex value into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextostring\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c6421')\n * // 'Hello world!'\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n *  size: 32,\n * })\n * // 'Hello world'\n */\nexport function hexToString(hex, opts = {}) {\n    let bytes = hexToBytes(hex);\n    if (opts.size) {\n        assertSize(bytes, { size: opts.size });\n        bytes = trim(bytes, { dir: 'right' });\n    }\n    return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromHex.js.map","export function defineFormatter(type, format) {\n    return ({ exclude, format: overrides, }) => {\n        return {\n            exclude,\n            format: (args) => {\n                const formatted = format(args);\n                if (exclude) {\n                    for (const key of exclude) {\n                        delete formatted[key];\n                    }\n                }\n                return {\n                    ...formatted,\n                    ...overrides(args),\n                };\n            },\n            type,\n        };\n    };\n}\n//# sourceMappingURL=formatter.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n    '0x0': 'legacy',\n    '0x1': 'eip2930',\n    '0x2': 'eip1559',\n    '0x3': 'eip4844',\n    '0x4': 'eip7702',\n};\nexport function formatTransaction(transaction) {\n    const transaction_ = {\n        ...transaction,\n        blockHash: transaction.blockHash ? transaction.blockHash : null,\n        blockNumber: transaction.blockNumber\n            ? BigInt(transaction.blockNumber)\n            : null,\n        chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n        gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n        gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n        maxFeePerBlobGas: transaction.maxFeePerBlobGas\n            ? BigInt(transaction.maxFeePerBlobGas)\n            : undefined,\n        maxFeePerGas: transaction.maxFeePerGas\n            ? BigInt(transaction.maxFeePerGas)\n            : undefined,\n        maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n            ? BigInt(transaction.maxPriorityFeePerGas)\n            : undefined,\n        nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n        to: transaction.to ? transaction.to : null,\n        transactionIndex: transaction.transactionIndex\n            ? Number(transaction.transactionIndex)\n            : null,\n        type: transaction.type\n            ? transactionType[transaction.type]\n            : undefined,\n        typeHex: transaction.type ? transaction.type : undefined,\n        value: transaction.value ? BigInt(transaction.value) : undefined,\n        v: transaction.v ? BigInt(transaction.v) : undefined,\n    };\n    if (transaction.authorizationList)\n        transaction_.authorizationList = formatAuthorizationList(transaction.authorizationList);\n    transaction_.yParity = (() => {\n        // If `yParity` is provided, we will use it.\n        if (transaction.yParity)\n            return Number(transaction.yParity);\n        // If no `yParity` provided, try derive from `v`.\n        if (typeof transaction_.v === 'bigint') {\n            if (transaction_.v === 0n || transaction_.v === 27n)\n                return 0;\n            if (transaction_.v === 1n || transaction_.v === 28n)\n                return 1;\n            if (transaction_.v >= 35n)\n                return transaction_.v % 2n === 0n ? 1 : 0;\n        }\n        return undefined;\n    })();\n    if (transaction_.type === 'legacy') {\n        delete transaction_.accessList;\n        delete transaction_.maxFeePerBlobGas;\n        delete transaction_.maxFeePerGas;\n        delete transaction_.maxPriorityFeePerGas;\n        delete transaction_.yParity;\n    }\n    if (transaction_.type === 'eip2930') {\n        delete transaction_.maxFeePerBlobGas;\n        delete transaction_.maxFeePerGas;\n        delete transaction_.maxPriorityFeePerGas;\n    }\n    if (transaction_.type === 'eip1559') {\n        delete transaction_.maxFeePerBlobGas;\n    }\n    return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n    return authorizationList.map((authorization) => ({\n        address: authorization.address,\n        chainId: Number(authorization.chainId),\n        nonce: Number(authorization.nonce),\n        r: authorization.r,\n        s: authorization.s,\n        yParity: Number(authorization.yParity),\n    }));\n}\n//# sourceMappingURL=transaction.js.map","import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block) {\n    const transactions = (block.transactions ?? []).map((transaction) => {\n        if (typeof transaction === 'string')\n            return transaction;\n        return formatTransaction(transaction);\n    });\n    return {\n        ...block,\n        baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n        blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : undefined,\n        difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n        excessBlobGas: block.excessBlobGas\n            ? BigInt(block.excessBlobGas)\n            : undefined,\n        gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n        gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n        hash: block.hash ? block.hash : null,\n        logsBloom: block.logsBloom ? block.logsBloom : null,\n        nonce: block.nonce ? block.nonce : null,\n        number: block.number ? BigInt(block.number) : null,\n        size: block.size ? BigInt(block.size) : undefined,\n        timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n        transactions,\n        totalDifficulty: block.totalDifficulty\n            ? BigInt(block.totalDifficulty)\n            : null,\n    };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map","export function formatLog(log, { args, eventName, } = {}) {\n    return {\n        ...log,\n        blockHash: log.blockHash ? log.blockHash : null,\n        blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n        logIndex: log.logIndex ? Number(log.logIndex) : null,\n        transactionHash: log.transactionHash ? log.transactionHash : null,\n        transactionIndex: log.transactionIndex\n            ? Number(log.transactionIndex)\n            : null,\n        ...(eventName ? { args, eventName } : {}),\n    };\n}\n//# sourceMappingURL=log.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nimport { formatLog } from './log.js';\nimport { transactionType } from './transaction.js';\nexport const receiptStatuses = {\n    '0x0': 'reverted',\n    '0x1': 'success',\n};\nexport function formatTransactionReceipt(transactionReceipt) {\n    const receipt = {\n        ...transactionReceipt,\n        blockNumber: transactionReceipt.blockNumber\n            ? BigInt(transactionReceipt.blockNumber)\n            : null,\n        contractAddress: transactionReceipt.contractAddress\n            ? transactionReceipt.contractAddress\n            : null,\n        cumulativeGasUsed: transactionReceipt.cumulativeGasUsed\n            ? BigInt(transactionReceipt.cumulativeGasUsed)\n            : null,\n        effectiveGasPrice: transactionReceipt.effectiveGasPrice\n            ? BigInt(transactionReceipt.effectiveGasPrice)\n            : null,\n        gasUsed: transactionReceipt.gasUsed\n            ? BigInt(transactionReceipt.gasUsed)\n            : null,\n        logs: transactionReceipt.logs\n            ? transactionReceipt.logs.map((log) => formatLog(log))\n            : null,\n        to: transactionReceipt.to ? transactionReceipt.to : null,\n        transactionIndex: transactionReceipt.transactionIndex\n            ? hexToNumber(transactionReceipt.transactionIndex)\n            : null,\n        status: transactionReceipt.status\n            ? receiptStatuses[transactionReceipt.status]\n            : null,\n        type: transactionReceipt.type\n            ? transactionType[transactionReceipt.type] || transactionReceipt.type\n            : null,\n    };\n    if (transactionReceipt.blobGasPrice)\n        receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n    if (transactionReceipt.blobGasUsed)\n        receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n    return receipt;\n}\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter('transactionReceipt', formatTransactionReceipt);\n//# sourceMappingURL=transactionReceipt.js.map","export const maxInt8 = 2n ** (8n - 1n) - 1n;\nexport const maxInt16 = 2n ** (16n - 1n) - 1n;\nexport const maxInt24 = 2n ** (24n - 1n) - 1n;\nexport const maxInt32 = 2n ** (32n - 1n) - 1n;\nexport const maxInt40 = 2n ** (40n - 1n) - 1n;\nexport const maxInt48 = 2n ** (48n - 1n) - 1n;\nexport const maxInt56 = 2n ** (56n - 1n) - 1n;\nexport const maxInt64 = 2n ** (64n - 1n) - 1n;\nexport const maxInt72 = 2n ** (72n - 1n) - 1n;\nexport const maxInt80 = 2n ** (80n - 1n) - 1n;\nexport const maxInt88 = 2n ** (88n - 1n) - 1n;\nexport const maxInt96 = 2n ** (96n - 1n) - 1n;\nexport const maxInt104 = 2n ** (104n - 1n) - 1n;\nexport const maxInt112 = 2n ** (112n - 1n) - 1n;\nexport const maxInt120 = 2n ** (120n - 1n) - 1n;\nexport const maxInt128 = 2n ** (128n - 1n) - 1n;\nexport const maxInt136 = 2n ** (136n - 1n) - 1n;\nexport const maxInt144 = 2n ** (144n - 1n) - 1n;\nexport const maxInt152 = 2n ** (152n - 1n) - 1n;\nexport const maxInt160 = 2n ** (160n - 1n) - 1n;\nexport const maxInt168 = 2n ** (168n - 1n) - 1n;\nexport const maxInt176 = 2n ** (176n - 1n) - 1n;\nexport const maxInt184 = 2n ** (184n - 1n) - 1n;\nexport const maxInt192 = 2n ** (192n - 1n) - 1n;\nexport const maxInt200 = 2n ** (200n - 1n) - 1n;\nexport const maxInt208 = 2n ** (208n - 1n) - 1n;\nexport const maxInt216 = 2n ** (216n - 1n) - 1n;\nexport const maxInt224 = 2n ** (224n - 1n) - 1n;\nexport const maxInt232 = 2n ** (232n - 1n) - 1n;\nexport const maxInt240 = 2n ** (240n - 1n) - 1n;\nexport const maxInt248 = 2n ** (248n - 1n) - 1n;\nexport const maxInt256 = 2n ** (256n - 1n) - 1n;\nexport const minInt8 = -(2n ** (8n - 1n));\nexport const minInt16 = -(2n ** (16n - 1n));\nexport const minInt24 = -(2n ** (24n - 1n));\nexport const minInt32 = -(2n ** (32n - 1n));\nexport const minInt40 = -(2n ** (40n - 1n));\nexport const minInt48 = -(2n ** (48n - 1n));\nexport const minInt56 = -(2n ** (56n - 1n));\nexport const minInt64 = -(2n ** (64n - 1n));\nexport const minInt72 = -(2n ** (72n - 1n));\nexport const minInt80 = -(2n ** (80n - 1n));\nexport const minInt88 = -(2n ** (88n - 1n));\nexport const minInt96 = -(2n ** (96n - 1n));\nexport const minInt104 = -(2n ** (104n - 1n));\nexport const minInt112 = -(2n ** (112n - 1n));\nexport const minInt120 = -(2n ** (120n - 1n));\nexport const minInt128 = -(2n ** (128n - 1n));\nexport const minInt136 = -(2n ** (136n - 1n));\nexport const minInt144 = -(2n ** (144n - 1n));\nexport const minInt152 = -(2n ** (152n - 1n));\nexport const minInt160 = -(2n ** (160n - 1n));\nexport const minInt168 = -(2n ** (168n - 1n));\nexport const minInt176 = -(2n ** (176n - 1n));\nexport const minInt184 = -(2n ** (184n - 1n));\nexport const minInt192 = -(2n ** (192n - 1n));\nexport const minInt200 = -(2n ** (200n - 1n));\nexport const minInt208 = -(2n ** (208n - 1n));\nexport const minInt216 = -(2n ** (216n - 1n));\nexport const minInt224 = -(2n ** (224n - 1n));\nexport const minInt232 = -(2n ** (232n - 1n));\nexport const minInt240 = -(2n ** (240n - 1n));\nexport const minInt248 = -(2n ** (248n - 1n));\nexport const minInt256 = -(2n ** (256n - 1n));\nexport const maxUint8 = 2n ** 8n - 1n;\nexport const maxUint16 = 2n ** 16n - 1n;\nexport const maxUint24 = 2n ** 24n - 1n;\nexport const maxUint32 = 2n ** 32n - 1n;\nexport const maxUint40 = 2n ** 40n - 1n;\nexport const maxUint48 = 2n ** 48n - 1n;\nexport const maxUint56 = 2n ** 56n - 1n;\nexport const maxUint64 = 2n ** 64n - 1n;\nexport const maxUint72 = 2n ** 72n - 1n;\nexport const maxUint80 = 2n ** 80n - 1n;\nexport const maxUint88 = 2n ** 88n - 1n;\nexport const maxUint96 = 2n ** 96n - 1n;\nexport const maxUint104 = 2n ** 104n - 1n;\nexport const maxUint112 = 2n ** 112n - 1n;\nexport const maxUint120 = 2n ** 120n - 1n;\nexport const maxUint128 = 2n ** 128n - 1n;\nexport const maxUint136 = 2n ** 136n - 1n;\nexport const maxUint144 = 2n ** 144n - 1n;\nexport const maxUint152 = 2n ** 152n - 1n;\nexport const maxUint160 = 2n ** 160n - 1n;\nexport const maxUint168 = 2n ** 168n - 1n;\nexport const maxUint176 = 2n ** 176n - 1n;\nexport const maxUint184 = 2n ** 184n - 1n;\nexport const maxUint192 = 2n ** 192n - 1n;\nexport const maxUint200 = 2n ** 200n - 1n;\nexport const maxUint208 = 2n ** 208n - 1n;\nexport const maxUint216 = 2n ** 216n - 1n;\nexport const maxUint224 = 2n ** 224n - 1n;\nexport const maxUint232 = 2n ** 232n - 1n;\nexport const maxUint240 = 2n ** 240n - 1n;\nexport const maxUint248 = 2n ** 248n - 1n;\nexport const maxUint256 = 2n ** 256n - 1n;\n//# sourceMappingURL=number.js.map","export function concat(values) {\n    if (typeof values[0] === 'string')\n        return concatHex(values);\n    return concatBytes(values);\n}\nexport function concatBytes(values) {\n    let length = 0;\n    for (const arr of values) {\n        length += arr.length;\n    }\n    const result = new Uint8Array(length);\n    let offset = 0;\n    for (const arr of values) {\n        result.set(arr, offset);\n        offset += arr.length;\n    }\n    return result;\n}\nexport function concatHex(values) {\n    return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n//# sourceMappingURL=concat.js.map","import { BaseError } from './base.js';\nexport class NegativeOffsetError extends BaseError {\n    constructor({ offset }) {\n        super(`Offset \\`${offset}\\` cannot be negative.`, {\n            name: 'NegativeOffsetError',\n        });\n    }\n}\nexport class PositionOutOfBoundsError extends BaseError {\n    constructor({ length, position }) {\n        super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: 'PositionOutOfBoundsError' });\n    }\n}\nexport class RecursiveReadLimitExceededError extends BaseError {\n    constructor({ count, limit }) {\n        super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: 'RecursiveReadLimitExceededError' });\n    }\n}\n//# sourceMappingURL=cursor.js.map","import { NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError, } from '../errors/cursor.js';\nconst staticCursor = {\n    bytes: new Uint8Array(),\n    dataView: new DataView(new ArrayBuffer(0)),\n    position: 0,\n    positionReadCount: new Map(),\n    recursiveReadCount: 0,\n    recursiveReadLimit: Number.POSITIVE_INFINITY,\n    assertReadLimit() {\n        if (this.recursiveReadCount >= this.recursiveReadLimit)\n            throw new RecursiveReadLimitExceededError({\n                count: this.recursiveReadCount + 1,\n                limit: this.recursiveReadLimit,\n            });\n    },\n    assertPosition(position) {\n        if (position < 0 || position > this.bytes.length - 1)\n            throw new PositionOutOfBoundsError({\n                length: this.bytes.length,\n                position,\n            });\n    },\n    decrementPosition(offset) {\n        if (offset < 0)\n            throw new NegativeOffsetError({ offset });\n        const position = this.position - offset;\n        this.assertPosition(position);\n        this.position = position;\n    },\n    getReadCount(position) {\n        return this.positionReadCount.get(position || this.position) || 0;\n    },\n    incrementPosition(offset) {\n        if (offset < 0)\n            throw new NegativeOffsetError({ offset });\n        const position = this.position + offset;\n        this.assertPosition(position);\n        this.position = position;\n    },\n    inspectByte(position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position);\n        return this.bytes[position];\n    },\n    inspectBytes(length, position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position + length - 1);\n        return this.bytes.subarray(position, position + length);\n    },\n    inspectUint8(position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position);\n        return this.bytes[position];\n    },\n    inspectUint16(position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position + 1);\n        return this.dataView.getUint16(position);\n    },\n    inspectUint24(position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position + 2);\n        return ((this.dataView.getUint16(position) << 8) +\n            this.dataView.getUint8(position + 2));\n    },\n    inspectUint32(position_) {\n        const position = position_ ?? this.position;\n        this.assertPosition(position + 3);\n        return this.dataView.getUint32(position);\n    },\n    pushByte(byte) {\n        this.assertPosition(this.position);\n        this.bytes[this.position] = byte;\n        this.position++;\n    },\n    pushBytes(bytes) {\n        this.assertPosition(this.position + bytes.length - 1);\n        this.bytes.set(bytes, this.position);\n        this.position += bytes.length;\n    },\n    pushUint8(value) {\n        this.assertPosition(this.position);\n        this.bytes[this.position] = value;\n        this.position++;\n    },\n    pushUint16(value) {\n        this.assertPosition(this.position + 1);\n        this.dataView.setUint16(this.position, value);\n        this.position += 2;\n    },\n    pushUint24(value) {\n        this.assertPosition(this.position + 2);\n        this.dataView.setUint16(this.position, value >> 8);\n        this.dataView.setUint8(this.position + 2, value & ~4294967040);\n        this.position += 3;\n    },\n    pushUint32(value) {\n        this.assertPosition(this.position + 3);\n        this.dataView.setUint32(this.position, value);\n        this.position += 4;\n    },\n    readByte() {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectByte();\n        this.position++;\n        return value;\n    },\n    readBytes(length, size) {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectBytes(length);\n        this.position += size ?? length;\n        return value;\n    },\n    readUint8() {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectUint8();\n        this.position += 1;\n        return value;\n    },\n    readUint16() {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectUint16();\n        this.position += 2;\n        return value;\n    },\n    readUint24() {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectUint24();\n        this.position += 3;\n        return value;\n    },\n    readUint32() {\n        this.assertReadLimit();\n        this._touch();\n        const value = this.inspectUint32();\n        this.position += 4;\n        return value;\n    },\n    get remaining() {\n        return this.bytes.length - this.position;\n    },\n    setPosition(position) {\n        const oldPosition = this.position;\n        this.assertPosition(position);\n        this.position = position;\n        return () => (this.position = oldPosition);\n    },\n    _touch() {\n        if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n            return;\n        const count = this.getReadCount();\n        this.positionReadCount.set(this.position, count + 1);\n        if (count > 0)\n            this.recursiveReadCount++;\n    },\n};\nexport function createCursor(bytes, { recursiveReadLimit = 8_192 } = {}) {\n    const cursor = Object.create(staticCursor);\n    cursor.bytes = bytes;\n    cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n    cursor.positionReadCount = new Map();\n    cursor.recursiveReadLimit = recursiveReadLimit;\n    return cursor;\n}\n//# sourceMappingURL=cursor.js.map","import { BaseError } from '../../errors/base.js';\nimport { createCursor, } from '../cursor.js';\nimport { hexToBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nexport function toRlp(bytes, to = 'hex') {\n    const encodable = getEncodable(bytes);\n    const cursor = createCursor(new Uint8Array(encodable.length));\n    encodable.encode(cursor);\n    if (to === 'hex')\n        return bytesToHex(cursor.bytes);\n    return cursor.bytes;\n}\nexport function bytesToRlp(bytes, to = 'bytes') {\n    return toRlp(bytes, to);\n}\nexport function hexToRlp(hex, to = 'hex') {\n    return toRlp(hex, to);\n}\nfunction getEncodable(bytes) {\n    if (Array.isArray(bytes))\n        return getEncodableList(bytes.map((x) => getEncodable(x)));\n    return getEncodableBytes(bytes);\n}\nfunction getEncodableList(list) {\n    const bodyLength = list.reduce((acc, x) => acc + x.length, 0);\n    const sizeOfBodyLength = getSizeOfLength(bodyLength);\n    const length = (() => {\n        if (bodyLength <= 55)\n            return 1 + bodyLength;\n        return 1 + sizeOfBodyLength + bodyLength;\n    })();\n    return {\n        length,\n        encode(cursor) {\n            if (bodyLength <= 55) {\n                cursor.pushByte(0xc0 + bodyLength);\n            }\n            else {\n                cursor.pushByte(0xc0 + 55 + sizeOfBodyLength);\n                if (sizeOfBodyLength === 1)\n                    cursor.pushUint8(bodyLength);\n                else if (sizeOfBodyLength === 2)\n                    cursor.pushUint16(bodyLength);\n                else if (sizeOfBodyLength === 3)\n                    cursor.pushUint24(bodyLength);\n                else\n                    cursor.pushUint32(bodyLength);\n            }\n            for (const { encode } of list) {\n                encode(cursor);\n            }\n        },\n    };\n}\nfunction getEncodableBytes(bytesOrHex) {\n    const bytes = typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex;\n    const sizeOfBytesLength = getSizeOfLength(bytes.length);\n    const length = (() => {\n        if (bytes.length === 1 && bytes[0] < 0x80)\n            return 1;\n        if (bytes.length <= 55)\n            return 1 + bytes.length;\n        return 1 + sizeOfBytesLength + bytes.length;\n    })();\n    return {\n        length,\n        encode(cursor) {\n            if (bytes.length === 1 && bytes[0] < 0x80) {\n                cursor.pushBytes(bytes);\n            }\n            else if (bytes.length <= 55) {\n                cursor.pushByte(0x80 + bytes.length);\n                cursor.pushBytes(bytes);\n            }\n            else {\n                cursor.pushByte(0x80 + 55 + sizeOfBytesLength);\n                if (sizeOfBytesLength === 1)\n                    cursor.pushUint8(bytes.length);\n                else if (sizeOfBytesLength === 2)\n                    cursor.pushUint16(bytes.length);\n                else if (sizeOfBytesLength === 3)\n                    cursor.pushUint24(bytes.length);\n                else\n                    cursor.pushUint32(bytes.length);\n                cursor.pushBytes(bytes);\n            }\n        },\n    };\n}\nfunction getSizeOfLength(length) {\n    if (length < 2 ** 8)\n        return 1;\n    if (length < 2 ** 16)\n        return 2;\n    if (length < 2 ** 24)\n        return 3;\n    if (length < 2 ** 32)\n        return 4;\n    throw new BaseError('Length is too large.');\n}\n//# sourceMappingURL=toRlp.js.map","export const etherUnits = {\n    gwei: 9,\n    wei: 18,\n};\nexport const gweiUnits = {\n    ether: -9,\n    wei: 9,\n};\nexport const weiUnits = {\n    ether: -18,\n    gwei: -9,\n};\n//# sourceMappingURL=unit.js.map","/**\n *  Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..\n *\n * - Docs: https://viem.sh/docs/utilities/formatUnits\n *\n * @example\n * import { formatUnits } from 'viem'\n *\n * formatUnits(420000000000n, 9)\n * // '420'\n */\nexport function formatUnits(value, decimals) {\n    let display = value.toString();\n    const negative = display.startsWith('-');\n    if (negative)\n        display = display.slice(1);\n    display = display.padStart(decimals, '0');\n    let [integer, fraction] = [\n        display.slice(0, display.length - decimals),\n        display.slice(display.length - decimals),\n    ];\n    fraction = fraction.replace(/(0+)$/, '');\n    return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n//# sourceMappingURL=formatUnits.js.map","import { gweiUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\n/**\n * Converts numerical wei to a string representation of gwei.\n *\n * - Docs: https://viem.sh/docs/utilities/formatGwei\n *\n * @example\n * import { formatGwei } from 'viem'\n *\n * formatGwei(1000000000n)\n * // '1'\n */\nexport function formatGwei(wei, unit = 'wei') {\n    return formatUnits(wei, gweiUnits[unit]);\n}\n//# sourceMappingURL=formatGwei.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport function prettyPrint(args) {\n    const entries = Object.entries(args)\n        .map(([key, value]) => {\n        if (value === undefined || value === false)\n            return null;\n        return [key, value];\n    })\n        .filter(Boolean);\n    const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n    return entries\n        .map(([key, value]) => `  ${`${key}:`.padEnd(maxLength + 1)}  ${value}`)\n        .join('\\n');\n}\nexport class FeeConflictError extends BaseError {\n    constructor() {\n        super([\n            'Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.',\n            'Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.',\n        ].join('\\n'), { name: 'FeeConflictError' });\n    }\n}\nexport class InvalidLegacyVError extends BaseError {\n    constructor({ v }) {\n        super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n            name: 'InvalidLegacyVError',\n        });\n    }\n}\nexport class InvalidSerializableTransactionError extends BaseError {\n    constructor({ transaction }) {\n        super('Cannot infer a transaction type from provided transaction.', {\n            metaMessages: [\n                'Provided Transaction:',\n                '{',\n                prettyPrint(transaction),\n                '}',\n                '',\n                'To infer the type, either provide:',\n                '- a `type` to the Transaction, or',\n                '- an EIP-1559 Transaction with `maxFeePerGas`, or',\n                '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',\n                '- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or',\n                '- an EIP-7702 Transaction with `authorizationList`, or',\n                '- a Legacy Transaction with `gasPrice`',\n            ],\n            name: 'InvalidSerializableTransactionError',\n        });\n    }\n}\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n    constructor({ serializedType }) {\n        super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n            name: 'InvalidSerializedTransactionType',\n        });\n        Object.defineProperty(this, \"serializedType\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.serializedType = serializedType;\n    }\n}\nexport class InvalidSerializedTransactionError extends BaseError {\n    constructor({ attributes, serializedTransaction, type, }) {\n        const missing = Object.entries(attributes)\n            .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n            .filter(Boolean);\n        super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n            metaMessages: [\n                `Serialized Transaction: \"${serializedTransaction}\"`,\n                missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n            ].filter(Boolean),\n            name: 'InvalidSerializedTransactionError',\n        });\n        Object.defineProperty(this, \"serializedTransaction\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"type\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.serializedTransaction = serializedTransaction;\n        this.type = type;\n    }\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n    constructor({ storageKey }) {\n        super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: 'InvalidStorageKeySizeError' });\n    }\n}\nexport class TransactionExecutionError extends BaseError {\n    constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n        const prettyArgs = prettyPrint({\n            chain: chain && `${chain?.name} (id: ${chain?.id})`,\n            from: account?.address,\n            to,\n            value: typeof value !== 'undefined' &&\n                `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n            data,\n            gas,\n            gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n            maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n                `${formatGwei(maxFeePerGas)} gwei`,\n            maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n                `${formatGwei(maxPriorityFeePerGas)} gwei`,\n            nonce,\n        });\n        super(cause.shortMessage, {\n            cause,\n            docsPath,\n            metaMessages: [\n                ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n                'Request Arguments:',\n                prettyArgs,\n            ].filter(Boolean),\n            name: 'TransactionExecutionError',\n        });\n        Object.defineProperty(this, \"cause\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.cause = cause;\n    }\n}\nexport class TransactionNotFoundError extends BaseError {\n    constructor({ blockHash, blockNumber, blockTag, hash, index, }) {\n        let identifier = 'Transaction';\n        if (blockTag && index !== undefined)\n            identifier = `Transaction at block time \"${blockTag}\" at index \"${index}\"`;\n        if (blockHash && index !== undefined)\n            identifier = `Transaction at block hash \"${blockHash}\" at index \"${index}\"`;\n        if (blockNumber && index !== undefined)\n            identifier = `Transaction at block number \"${blockNumber}\" at index \"${index}\"`;\n        if (hash)\n            identifier = `Transaction with hash \"${hash}\"`;\n        super(`${identifier} could not be found.`, {\n            name: 'TransactionNotFoundError',\n        });\n    }\n}\nexport class TransactionReceiptNotFoundError extends BaseError {\n    constructor({ hash }) {\n        super(`Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`, {\n            name: 'TransactionReceiptNotFoundError',\n        });\n    }\n}\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n    constructor({ hash }) {\n        super(`Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`, { name: 'WaitForTransactionReceiptTimeoutError' });\n    }\n}\n//# sourceMappingURL=transaction.js.map","import { toHex } from '../encoding/toHex.js';\nimport { toYParitySignatureArray } from '../transaction/serializeTransaction.js';\n/*\n * Serializes an EIP-7702 authorization list.\n */\nexport function serializeAuthorizationList(authorizationList) {\n    if (!authorizationList || authorizationList.length === 0)\n        return [];\n    const serializedAuthorizationList = [];\n    for (const authorization of authorizationList) {\n        const { chainId, nonce, ...signature } = authorization;\n        const contractAddress = authorization.address;\n        serializedAuthorizationList.push([\n            chainId ? toHex(chainId) : '0x',\n            contractAddress,\n            nonce ? toHex(nonce) : '0x',\n            ...toYParitySignatureArray({}, signature),\n        ]);\n    }\n    return serializedAuthorizationList;\n}\n//# sourceMappingURL=serializeAuthorizationList.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute commitments from a list of blobs.\n *\n * @example\n * ```ts\n * import { blobsToCommitments, toBlobs } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * ```\n */\nexport function blobsToCommitments(parameters) {\n    const { kzg } = parameters;\n    const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n    const blobs = (typeof parameters.blobs[0] === 'string'\n        ? parameters.blobs.map((x) => hexToBytes(x))\n        : parameters.blobs);\n    const commitments = [];\n    for (const blob of blobs)\n        commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n    return (to === 'bytes'\n        ? commitments\n        : commitments.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToCommitments.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute the proofs for a list of blobs and their commitments.\n *\n * @example\n * ```ts\n * import {\n *   blobsToCommitments,\n *   toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n * ```\n */\nexport function blobsToProofs(parameters) {\n    const { kzg } = parameters;\n    const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n    const blobs = (typeof parameters.blobs[0] === 'string'\n        ? parameters.blobs.map((x) => hexToBytes(x))\n        : parameters.blobs);\n    const commitments = (typeof parameters.commitments[0] === 'string'\n        ? parameters.commitments.map((x) => hexToBytes(x))\n        : parameters.commitments);\n    const proofs = [];\n    for (let i = 0; i < blobs.length; i++) {\n        const blob = blobs[i];\n        const commitment = commitments[i];\n        proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n    }\n    return (to === 'bytes'\n        ? proofs\n        : proofs.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToProofs.js.map","/**\n * Internal assertion helpers.\n * @module\n */\n/** Asserts something is positive integer. */\nfunction anumber(n) {\n    if (!Number.isSafeInteger(n) || n < 0)\n        throw new Error('positive integer expected, got ' + n);\n}\n/** Is number an Uint8Array? Copied from utils for perf. */\nfunction isBytes(a) {\n    return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n/** Asserts something is Uint8Array. */\nfunction abytes(b, ...lengths) {\n    if (!isBytes(b))\n        throw new Error('Uint8Array expected');\n    if (lengths.length > 0 && !lengths.includes(b.length))\n        throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\n/** Asserts something is hash */\nfunction ahash(h) {\n    if (typeof h !== 'function' || typeof h.create !== 'function')\n        throw new Error('Hash should be wrapped by utils.wrapConstructor');\n    anumber(h.outputLen);\n    anumber(h.blockLen);\n}\n/** Asserts a hash instance has not been destroyed / finished */\nfunction aexists(instance, checkFinished = true) {\n    if (instance.destroyed)\n        throw new Error('Hash instance has been destroyed');\n    if (checkFinished && instance.finished)\n        throw new Error('Hash#digest() has already been called');\n}\n/** Asserts output is properly-sized byte array */\nfunction aoutput(out, instance) {\n    abytes(out);\n    const min = instance.outputLen;\n    if (out.length < min) {\n        throw new Error('digestInto() expects output buffer of length at least ' + min);\n    }\n}\nexport { anumber, abytes, ahash, aexists, aoutput };\n//# sourceMappingURL=_assert.js.map","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { abytes } from \"./_assert.js\";\n// export { isBytes } from './_assert.ts';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n    return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n// Cast array to different type\nexport function u8(arr) {\n    return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\nexport function u32(arr) {\n    return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n// Cast array to view\nexport function createView(arr) {\n    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word, shift) {\n    return (word << (32 - shift)) | (word >>> shift);\n}\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word, shift) {\n    return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// The byte swap operation for uint32\nexport function byteSwap(word) {\n    return (((word << 24) & 0xff000000) |\n        ((word << 8) & 0xff0000) |\n        ((word >>> 8) & 0xff00) |\n        ((word >>> 24) & 0xff));\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const byteSwapIfBE = isLE\n    ? (n) => n\n    : (n) => byteSwap(n);\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr) {\n    for (let i = 0; i < arr.length; i++) {\n        arr[i] = byteSwap(arr[i]);\n    }\n}\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function';\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n    abytes(bytes);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return bytes.toHex();\n    // pre-caching improves the speed 6x\n    let hex = '';\n    for (let i = 0; i < bytes.length; i++) {\n        hex += hexes[bytes[i]];\n    }\n    return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n    if (ch >= asciis._0 && ch <= asciis._9)\n        return ch - asciis._0; // '2' => 50-48\n    if (ch >= asciis.A && ch <= asciis.F)\n        return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n    if (ch >= asciis.a && ch <= asciis.f)\n        return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n    return;\n}\n/**\n * Convert hex string to byte array. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return Uint8Array.fromHex(hex);\n    const hl = hex.length;\n    const al = hl / 2;\n    if (hl % 2)\n        throw new Error('hex string expected, got unpadded hex of length ' + hl);\n    const array = new Uint8Array(al);\n    for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n        const n1 = asciiToBase16(hex.charCodeAt(hi));\n        const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n        if (n1 === undefined || n2 === undefined) {\n            const char = hex[hi] + hex[hi + 1];\n            throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n        }\n        array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n    }\n    return array;\n}\n/**\n * There is no setImmediate in browser and setTimeout is slow.\n * Call of async fn will return Promise, which will be fullfiled only on\n * next scheduler queue processing step and this is exactly what we need.\n */\nexport const nextTick = async () => { };\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(iters, tick, cb) {\n    let ts = Date.now();\n    for (let i = 0; i < iters; i++) {\n        cb(i);\n        // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n        const diff = Date.now() - ts;\n        if (diff >= 0 && diff < tick)\n            continue;\n        await nextTick();\n        ts += diff;\n    }\n}\n/**\n * Convert JS string to byte array.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n    if (typeof str !== 'string')\n        throw new Error('utf8ToBytes expected string, got ' + typeof str);\n    return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n    if (typeof data === 'string')\n        data = utf8ToBytes(data);\n    abytes(data);\n    return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n    let sum = 0;\n    for (let i = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        abytes(a);\n        sum += a.length;\n    }\n    const res = new Uint8Array(sum);\n    for (let i = 0, pad = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        res.set(a, pad);\n        pad += a.length;\n    }\n    return res;\n}\n/** For runtime check if class implements interface */\nexport class Hash {\n    // Safe version that clones internal state\n    clone() {\n        return this._cloneInto();\n    }\n}\nexport function checkOpts(defaults, opts) {\n    if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n        throw new Error('Options should be object or undefined');\n    const merged = Object.assign(defaults, opts);\n    return merged;\n}\n/** Wraps hash function, creating an interface on top of it */\nexport function wrapConstructor(hashCons) {\n    const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n    const tmp = hashCons();\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = () => hashCons();\n    return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n    const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n    const tmp = hashCons({});\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = (opts) => hashCons(opts);\n    return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n    const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n    const tmp = hashCons({});\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = (opts) => hashCons(opts);\n    return hashC;\n}\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32) {\n    if (crypto && typeof crypto.getRandomValues === 'function') {\n        return crypto.getRandomValues(new Uint8Array(bytesLength));\n    }\n    // Legacy Node.js compatibility\n    if (crypto && typeof crypto.randomBytes === 'function') {\n        return Uint8Array.from(crypto.randomBytes(bytesLength));\n    }\n    throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","/**\n * Internal Merkle-Damgard hash utils.\n * @module\n */\nimport { aexists, aoutput } from \"./_assert.js\";\nimport { Hash, createView, toBytes } from \"./utils.js\";\n/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */\nexport function setBigUint64(view, byteOffset, value, isLE) {\n    if (typeof view.setBigUint64 === 'function')\n        return view.setBigUint64(byteOffset, value, isLE);\n    const _32n = BigInt(32);\n    const _u32_max = BigInt(0xffffffff);\n    const wh = Number((value >> _32n) & _u32_max);\n    const wl = Number(value & _u32_max);\n    const h = isLE ? 4 : 0;\n    const l = isLE ? 0 : 4;\n    view.setUint32(byteOffset + h, wh, isLE);\n    view.setUint32(byteOffset + l, wl, isLE);\n}\n/** Choice: a ? b : c */\nexport function Chi(a, b, c) {\n    return (a & b) ^ (~a & c);\n}\n/** Majority function, true if any two inputs is true. */\nexport function Maj(a, b, c) {\n    return (a & b) ^ (a & c) ^ (b & c);\n}\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n    constructor(blockLen, outputLen, padOffset, isLE) {\n        super();\n        this.finished = false;\n        this.length = 0;\n        this.pos = 0;\n        this.destroyed = false;\n        this.blockLen = blockLen;\n        this.outputLen = outputLen;\n        this.padOffset = padOffset;\n        this.isLE = isLE;\n        this.buffer = new Uint8Array(blockLen);\n        this.view = createView(this.buffer);\n    }\n    update(data) {\n        aexists(this);\n        const { view, buffer, blockLen } = this;\n        data = toBytes(data);\n        const len = data.length;\n        for (let pos = 0; pos < len;) {\n            const take = Math.min(blockLen - this.pos, len - pos);\n            // Fast path: we have at least one block in input, cast it to view and process\n            if (take === blockLen) {\n                const dataView = createView(data);\n                for (; blockLen <= len - pos; pos += blockLen)\n                    this.process(dataView, pos);\n                continue;\n            }\n            buffer.set(data.subarray(pos, pos + take), this.pos);\n            this.pos += take;\n            pos += take;\n            if (this.pos === blockLen) {\n                this.process(view, 0);\n                this.pos = 0;\n            }\n        }\n        this.length += data.length;\n        this.roundClean();\n        return this;\n    }\n    digestInto(out) {\n        aexists(this);\n        aoutput(out, this);\n        this.finished = true;\n        // Padding\n        // We can avoid allocation of buffer for padding completely if it\n        // was previously not allocated here. But it won't change performance.\n        const { buffer, view, blockLen, isLE } = this;\n        let { pos } = this;\n        // append the bit '1' to the message\n        buffer[pos++] = 0b10000000;\n        this.buffer.subarray(pos).fill(0);\n        // we have less than padOffset left in buffer, so we cannot put length in\n        // current block, need process it and pad again\n        if (this.padOffset > blockLen - pos) {\n            this.process(view, 0);\n            pos = 0;\n        }\n        // Pad until full block byte with zeros\n        for (let i = pos; i < blockLen; i++)\n            buffer[i] = 0;\n        // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n        // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n        // So we just write lowest 64 bits of that value.\n        setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n        this.process(view, 0);\n        const oview = createView(out);\n        const len = this.outputLen;\n        // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n        if (len % 4)\n            throw new Error('_sha2: outputLen should be aligned to 32bit');\n        const outLen = len / 4;\n        const state = this.get();\n        if (outLen > state.length)\n            throw new Error('_sha2: outputLen bigger than state');\n        for (let i = 0; i < outLen; i++)\n            oview.setUint32(4 * i, state[i], isLE);\n    }\n    digest() {\n        const { buffer, outputLen } = this;\n        this.digestInto(buffer);\n        const res = buffer.slice(0, outputLen);\n        this.destroy();\n        return res;\n    }\n    _cloneInto(to) {\n        to || (to = new this.constructor());\n        to.set(...this.get());\n        const { blockLen, buffer, length, finished, destroyed, pos } = this;\n        to.length = length;\n        to.pos = pos;\n        to.finished = finished;\n        to.destroyed = destroyed;\n        if (length % blockLen)\n            to.buffer.set(buffer);\n        return to;\n    }\n}\n//# sourceMappingURL=_md.js.map","/**\n * SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.\n *\n * To break sha256 using birthday attack, attackers need to try 2^128 hashes.\n * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.\n *\n * Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).\n * @module\n */\nimport { Chi, HashMD, Maj } from \"./_md.js\";\nimport { rotr, wrapConstructor } from \"./utils.js\";\n/** Round constants: first 32 bits of fractional parts of the cube roots of the first 64 primes 2..311). */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n    0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n    0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n    0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n    0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n    0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n    0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n    0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n    0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n/** Initial state: first 32 bits of fractional parts of the square roots of the first 8 primes 2..19. */\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n    0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n/**\n * Temporary buffer, not used to store anything between runs.\n * Named this way because it matches specification.\n */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nexport class SHA256 extends HashMD {\n    constructor(outputLen = 32) {\n        super(64, outputLen, 8, false);\n        // We cannot use array here since array allows indexing by variable\n        // which means optimizer/compiler cannot use registers.\n        this.A = SHA256_IV[0] | 0;\n        this.B = SHA256_IV[1] | 0;\n        this.C = SHA256_IV[2] | 0;\n        this.D = SHA256_IV[3] | 0;\n        this.E = SHA256_IV[4] | 0;\n        this.F = SHA256_IV[5] | 0;\n        this.G = SHA256_IV[6] | 0;\n        this.H = SHA256_IV[7] | 0;\n    }\n    get() {\n        const { A, B, C, D, E, F, G, H } = this;\n        return [A, B, C, D, E, F, G, H];\n    }\n    // prettier-ignore\n    set(A, B, C, D, E, F, G, H) {\n        this.A = A | 0;\n        this.B = B | 0;\n        this.C = C | 0;\n        this.D = D | 0;\n        this.E = E | 0;\n        this.F = F | 0;\n        this.G = G | 0;\n        this.H = H | 0;\n    }\n    process(view, offset) {\n        // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n        for (let i = 0; i < 16; i++, offset += 4)\n            SHA256_W[i] = view.getUint32(offset, false);\n        for (let i = 16; i < 64; i++) {\n            const W15 = SHA256_W[i - 15];\n            const W2 = SHA256_W[i - 2];\n            const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n            const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n            SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n        }\n        // Compression function main loop, 64 rounds\n        let { A, B, C, D, E, F, G, H } = this;\n        for (let i = 0; i < 64; i++) {\n            const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n            const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n            const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n            const T2 = (sigma0 + Maj(A, B, C)) | 0;\n            H = G;\n            G = F;\n            F = E;\n            E = (D + T1) | 0;\n            D = C;\n            C = B;\n            B = A;\n            A = (T1 + T2) | 0;\n        }\n        // Add the compressed chunk to the current hash value\n        A = (A + this.A) | 0;\n        B = (B + this.B) | 0;\n        C = (C + this.C) | 0;\n        D = (D + this.D) | 0;\n        E = (E + this.E) | 0;\n        F = (F + this.F) | 0;\n        G = (G + this.G) | 0;\n        H = (H + this.H) | 0;\n        this.set(A, B, C, D, E, F, G, H);\n    }\n    roundClean() {\n        SHA256_W.fill(0);\n    }\n    destroy() {\n        this.set(0, 0, 0, 0, 0, 0, 0, 0);\n        this.buffer.fill(0);\n    }\n}\n/**\n * Constants taken from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf.\n */\nclass SHA224 extends SHA256 {\n    constructor() {\n        super(28);\n        this.A = 0xc1059ed8 | 0;\n        this.B = 0x367cd507 | 0;\n        this.C = 0x3070dd17 | 0;\n        this.D = 0xf70e5939 | 0;\n        this.E = 0xffc00b31 | 0;\n        this.F = 0x68581511 | 0;\n        this.G = 0x64f98fa7 | 0;\n        this.H = 0xbefa4fa4 | 0;\n    }\n}\n/** SHA2-256 hash function */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\n/** SHA2-224 hash function */\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { sha256 as noble_sha256 } from '@noble/hashes/sha256';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function sha256(value, to_) {\n    const to = to_ || 'hex';\n    const bytes = noble_sha256(isHex(value, { strict: false }) ? toBytes(value) : value);\n    if (to === 'bytes')\n        return bytes;\n    return toHex(bytes);\n}\n//# sourceMappingURL=sha256.js.map","import { bytesToHex } from '../encoding/toHex.js';\nimport { sha256 } from '../hash/sha256.js';\n/**\n * Transform a commitment to it's versioned hash.\n *\n * @example\n * ```ts\n * import {\n *   blobsToCommitments,\n *   commitmentToVersionedHash,\n *   toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const [commitment] = blobsToCommitments({ blobs, kzg })\n * const versionedHash = commitmentToVersionedHash({ commitment })\n * ```\n */\nexport function commitmentToVersionedHash(parameters) {\n    const { commitment, version = 1 } = parameters;\n    const to = parameters.to ?? (typeof commitment === 'string' ? 'hex' : 'bytes');\n    const versionedHash = sha256(commitment, 'bytes');\n    versionedHash.set([version], 0);\n    return (to === 'bytes' ? versionedHash : bytesToHex(versionedHash));\n}\n//# sourceMappingURL=commitmentToVersionedHash.js.map","import { commitmentToVersionedHash, } from './commitmentToVersionedHash.js';\n/**\n * Transform a list of commitments to their versioned hashes.\n *\n * @example\n * ```ts\n * import {\n *   blobsToCommitments,\n *   commitmentsToVersionedHashes,\n *   toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const versionedHashes = commitmentsToVersionedHashes({ commitments })\n * ```\n */\nexport function commitmentsToVersionedHashes(parameters) {\n    const { commitments, version } = parameters;\n    const to = parameters.to ?? (typeof commitments[0] === 'string' ? 'hex' : 'bytes');\n    const hashes = [];\n    for (const commitment of commitments) {\n        hashes.push(commitmentToVersionedHash({\n            commitment,\n            to,\n            version,\n        }));\n    }\n    return hashes;\n}\n//# sourceMappingURL=commitmentsToVersionedHashes.js.map","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n/** Blob limit per transaction. */\nconst blobsPerTransaction = 6;\n/** The number of bytes in a BLS scalar field element. */\nexport const bytesPerFieldElement = 32;\n/** The number of field elements in a blob. */\nexport const fieldElementsPerBlob = 4096;\n/** The number of bytes in a blob. */\nexport const bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n/** Blob bytes limit per transaction. */\nexport const maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction -\n    // terminator byte (0x80).\n    1 -\n    // zero byte (0x00) appended to each field element.\n    1 * fieldElementsPerBlob * blobsPerTransaction;\n//# sourceMappingURL=blob.js.map","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\nexport const versionedHashVersionKzg = 1;\n//# sourceMappingURL=kzg.js.map","import { versionedHashVersionKzg } from '../constants/kzg.js';\nimport { BaseError } from './base.js';\nexport class BlobSizeTooLargeError extends BaseError {\n    constructor({ maxSize, size }) {\n        super('Blob size is too large.', {\n            metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size} bytes`],\n            name: 'BlobSizeTooLargeError',\n        });\n    }\n}\nexport class EmptyBlobError extends BaseError {\n    constructor() {\n        super('Blob data must not be empty.', { name: 'EmptyBlobError' });\n    }\n}\nexport class InvalidVersionedHashSizeError extends BaseError {\n    constructor({ hash, size, }) {\n        super(`Versioned hash \"${hash}\" size is invalid.`, {\n            metaMessages: ['Expected: 32', `Received: ${size}`],\n            name: 'InvalidVersionedHashSizeError',\n        });\n    }\n}\nexport class InvalidVersionedHashVersionError extends BaseError {\n    constructor({ hash, version, }) {\n        super(`Versioned hash \"${hash}\" version is invalid.`, {\n            metaMessages: [\n                `Expected: ${versionedHashVersionKzg}`,\n                `Received: ${version}`,\n            ],\n            name: 'InvalidVersionedHashVersionError',\n        });\n    }\n}\n//# sourceMappingURL=blob.js.map","import { bytesPerBlob, bytesPerFieldElement, fieldElementsPerBlob, maxBytesPerTransaction, } from '../../constants/blob.js';\nimport { BlobSizeTooLargeError, EmptyBlobError, } from '../../errors/blob.js';\nimport { createCursor } from '../cursor.js';\nimport { size } from '../data/size.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Transforms arbitrary data to blobs.\n *\n * @example\n * ```ts\n * import { toBlobs, stringToHex } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * ```\n */\nexport function toBlobs(parameters) {\n    const to = parameters.to ?? (typeof parameters.data === 'string' ? 'hex' : 'bytes');\n    const data = (typeof parameters.data === 'string'\n        ? hexToBytes(parameters.data)\n        : parameters.data);\n    const size_ = size(data);\n    if (!size_)\n        throw new EmptyBlobError();\n    if (size_ > maxBytesPerTransaction)\n        throw new BlobSizeTooLargeError({\n            maxSize: maxBytesPerTransaction,\n            size: size_,\n        });\n    const blobs = [];\n    let active = true;\n    let position = 0;\n    while (active) {\n        const blob = createCursor(new Uint8Array(bytesPerBlob));\n        let size = 0;\n        while (size < fieldElementsPerBlob) {\n            const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n            // Push a zero byte so the field element doesn't overflow the BLS modulus.\n            blob.pushByte(0x00);\n            // Push the current segment of data bytes.\n            blob.pushBytes(bytes);\n            // If we detect that the current segment of data bytes is less than 31 bytes,\n            // we can stop processing and push a terminator byte to indicate the end of the blob.\n            if (bytes.length < 31) {\n                blob.pushByte(0x80);\n                active = false;\n                break;\n            }\n            size++;\n            position += 31;\n        }\n        blobs.push(blob);\n    }\n    return (to === 'bytes'\n        ? blobs.map((x) => x.bytes)\n        : blobs.map((x) => bytesToHex(x.bytes)));\n}\n//# sourceMappingURL=toBlobs.js.map","import { blobsToCommitments, } from './blobsToCommitments.js';\nimport { blobsToProofs } from './blobsToProofs.js';\nimport { toBlobs } from './toBlobs.js';\n/**\n * Transforms arbitrary data (or blobs, commitments, & proofs) into a sidecar array.\n *\n * @example\n * ```ts\n * import { toBlobSidecars, stringToHex } from 'viem'\n *\n * const sidecars = toBlobSidecars({ data: stringToHex('hello world') })\n * ```\n *\n * @example\n * ```ts\n * import {\n *   blobsToCommitments,\n *   toBlobs,\n *   blobsToProofs,\n *   toBlobSidecars,\n *   stringToHex\n * } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n *\n * const sidecars = toBlobSidecars({ blobs, commitments, proofs })\n * ```\n */\nexport function toBlobSidecars(parameters) {\n    const { data, kzg, to } = parameters;\n    const blobs = parameters.blobs ?? toBlobs({ data: data, to });\n    const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg: kzg, to });\n    const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg: kzg, to });\n    const sidecars = [];\n    for (let i = 0; i < blobs.length; i++)\n        sidecars.push({\n            blob: blobs[i],\n            commitment: commitments[i],\n            proof: proofs[i],\n        });\n    return sidecars;\n}\n//# sourceMappingURL=toBlobSidecars.js.map","import { BaseError } from './base.js';\nexport class InvalidAddressError extends BaseError {\n    constructor({ address }) {\n        super(`Address \"${address}\" is invalid.`, {\n            metaMessages: [\n                '- Address must be a hex value of 20 bytes (40 hex characters).',\n                '- Address must match its checksum counterpart.',\n            ],\n            name: 'InvalidAddressError',\n        });\n    }\n}\n//# sourceMappingURL=address.js.map","import { BaseError } from './base.js';\nexport class ChainDoesNotSupportContract extends BaseError {\n    constructor({ blockNumber, chain, contract, }) {\n        super(`Chain \"${chain.name}\" does not support contract \"${contract.name}\".`, {\n            metaMessages: [\n                'This could be due to any of the following:',\n                ...(blockNumber &&\n                    contract.blockCreated &&\n                    contract.blockCreated > blockNumber\n                    ? [\n                        `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,\n                    ]\n                    : [\n                        `- The chain does not have the contract \"${contract.name}\" configured.`,\n                    ]),\n            ],\n            name: 'ChainDoesNotSupportContract',\n        });\n    }\n}\nexport class ChainMismatchError extends BaseError {\n    constructor({ chain, currentChainId, }) {\n        super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {\n            metaMessages: [\n                `Current Chain ID:  ${currentChainId}`,\n                `Expected Chain ID: ${chain.id} – ${chain.name}`,\n            ],\n            name: 'ChainMismatchError',\n        });\n    }\n}\nexport class ChainNotFoundError extends BaseError {\n    constructor() {\n        super([\n            'No chain was provided to the request.',\n            'Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.',\n        ].join('\\n'), {\n            name: 'ChainNotFoundError',\n        });\n    }\n}\nexport class ClientChainNotConfiguredError extends BaseError {\n    constructor() {\n        super('No chain was provided to the Client.', {\n            name: 'ClientChainNotConfiguredError',\n        });\n    }\n}\nexport class InvalidChainIdError extends BaseError {\n    constructor({ chainId }) {\n        super(typeof chainId === 'number'\n            ? `Chain ID \"${chainId}\" is invalid.`\n            : 'Chain ID is invalid.', { name: 'InvalidChainIdError' });\n    }\n}\n//# sourceMappingURL=chain.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport class ExecutionRevertedError extends BaseError {\n    constructor({ cause, message, } = {}) {\n        const reason = message\n            ?.replace('execution reverted: ', '')\n            ?.replace('execution reverted', '');\n        super(`Execution reverted ${reason ? `with reason: ${reason}` : 'for an unknown reason'}.`, {\n            cause,\n            name: 'ExecutionRevertedError',\n        });\n    }\n}\nObject.defineProperty(ExecutionRevertedError, \"code\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: 3\n});\nObject.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /execution reverted/\n});\nexport class FeeCapTooHighError extends BaseError {\n    constructor({ cause, maxFeePerGas, } = {}) {\n        super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {\n            cause,\n            name: 'FeeCapTooHighError',\n        });\n    }\n}\nObject.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n});\nexport class FeeCapTooLowError extends BaseError {\n    constructor({ cause, maxFeePerGas, } = {}) {\n        super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {\n            cause,\n            name: 'FeeCapTooLowError',\n        });\n    }\n}\nObject.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n});\nexport class NonceTooHighError extends BaseError {\n    constructor({ cause, nonce, } = {}) {\n        super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause, name: 'NonceTooHighError' });\n    }\n}\nObject.defineProperty(NonceTooHighError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /nonce too high/\n});\nexport class NonceTooLowError extends BaseError {\n    constructor({ cause, nonce, } = {}) {\n        super([\n            `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,\n            'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n        ].join('\\n'), { cause, name: 'NonceTooLowError' });\n    }\n}\nObject.defineProperty(NonceTooLowError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /nonce too low|transaction already imported|already known/\n});\nexport class NonceMaxValueError extends BaseError {\n    constructor({ cause, nonce, } = {}) {\n        super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause, name: 'NonceMaxValueError' });\n    }\n}\nObject.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /nonce has max value/\n});\nexport class InsufficientFundsError extends BaseError {\n    constructor({ cause } = {}) {\n        super([\n            'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n        ].join('\\n'), {\n            cause,\n            metaMessages: [\n                'This error could arise when the account does not have enough funds to:',\n                ' - pay for the total gas fee,',\n                ' - pay for the value to send.',\n                ' ',\n                'The cost of the transaction is calculated as `gas * gas fee + value`, where:',\n                ' - `gas` is the amount of gas needed for transaction to execute,',\n                ' - `gas fee` is the gas fee,',\n                ' - `value` is the amount of ether to send to the recipient.',\n            ],\n            name: 'InsufficientFundsError',\n        });\n    }\n}\nObject.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /insufficient funds|exceeds transaction sender account balance/\n});\nexport class IntrinsicGasTooHighError extends BaseError {\n    constructor({ cause, gas, } = {}) {\n        super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {\n            cause,\n            name: 'IntrinsicGasTooHighError',\n        });\n    }\n}\nObject.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /intrinsic gas too high|gas limit reached/\n});\nexport class IntrinsicGasTooLowError extends BaseError {\n    constructor({ cause, gas, } = {}) {\n        super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {\n            cause,\n            name: 'IntrinsicGasTooLowError',\n        });\n    }\n}\nObject.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /intrinsic gas too low/\n});\nexport class TransactionTypeNotSupportedError extends BaseError {\n    constructor({ cause }) {\n        super('The transaction type is not supported for this chain.', {\n            cause,\n            name: 'TransactionTypeNotSupportedError',\n        });\n    }\n}\nObject.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /transaction type not valid/\n});\nexport class TipAboveFeeCapError extends BaseError {\n    constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n        super([\n            `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n                ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n                : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}).`,\n        ].join('\\n'), {\n            cause,\n            name: 'TipAboveFeeCapError',\n        });\n    }\n}\nObject.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n});\nexport class UnknownNodeError extends BaseError {\n    constructor({ cause }) {\n        super(`An error occurred while executing: ${cause?.shortMessage}`, {\n            cause,\n            name: 'UnknownNodeError',\n        });\n    }\n}\n//# sourceMappingURL=node.js.map","/**\n * Map with a LRU (Least recently used) policy.\n *\n * @link https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU\n */\nexport class LruMap extends Map {\n    constructor(size) {\n        super();\n        Object.defineProperty(this, \"maxSize\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.maxSize = size;\n    }\n    get(key) {\n        const value = super.get(key);\n        if (super.has(key) && value !== undefined) {\n            this.delete(key);\n            super.set(key, value);\n        }\n        return value;\n    }\n    set(key, value) {\n        super.set(key, value);\n        if (this.maxSize && this.size > this.maxSize) {\n            const firstKey = this.keys().next().value;\n            if (firstKey)\n                this.delete(firstKey);\n        }\n        return this;\n    }\n}\n//# sourceMappingURL=lru.js.map","/**\n * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.\n * @todo re-check https://issues.chromium.org/issues/42212588\n * @module\n */\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\nfunction fromBig(n, le = false) {\n    if (le)\n        return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n    return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n    let Ah = new Uint32Array(lst.length);\n    let Al = new Uint32Array(lst.length);\n    for (let i = 0; i < lst.length; i++) {\n        const { h, l } = fromBig(lst[i], le);\n        [Ah[i], Al[i]] = [h, l];\n    }\n    return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n    const l = (Al >>> 0) + (Bl >>> 0);\n    return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n    fromBig, split, toBig,\n    shrSH, shrSL,\n    rotrSH, rotrSL, rotrBH, rotrBL,\n    rotr32H, rotr32L,\n    rotlSH, rotlSL, rotlBH, rotlBL,\n    add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","/**\n * SHA3 (keccak) hash function, based on a new \"Sponge function\" design.\n * Different from older hashes, the internal state is bigger than output size.\n *\n * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),\n * [Website](https://keccak.team/keccak.html),\n * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).\n *\n * Check out `sha3-addons` module for cSHAKE, k12, and others.\n * @module\n */\nimport { abytes, aexists, anumber, aoutput } from \"./_assert.js\";\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from \"./_u64.js\";\nimport { byteSwap32, Hash, isLE, toBytes, u32, wrapConstructor, wrapXOFConstructorWithOpts, } from \"./utils.js\";\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n    // Pi\n    [x, y] = [y, (2 * x + 3 * y) % 5];\n    SHA3_PI.push(2 * (5 * y + x));\n    // Rotational\n    SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n    // Iota\n    let t = _0n;\n    for (let j = 0; j < 7; j++) {\n        R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n        if (R & _2n)\n            t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n    }\n    _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n/** `keccakf1600` internal function, additionally allows to adjust round count. */\nexport function keccakP(s, rounds = 24) {\n    const B = new Uint32Array(5 * 2);\n    // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n    for (let round = 24 - rounds; round < 24; round++) {\n        // Theta θ\n        for (let x = 0; x < 10; x++)\n            B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n        for (let x = 0; x < 10; x += 2) {\n            const idx1 = (x + 8) % 10;\n            const idx0 = (x + 2) % 10;\n            const B0 = B[idx0];\n            const B1 = B[idx0 + 1];\n            const Th = rotlH(B0, B1, 1) ^ B[idx1];\n            const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n            for (let y = 0; y < 50; y += 10) {\n                s[x + y] ^= Th;\n                s[x + y + 1] ^= Tl;\n            }\n        }\n        // Rho (ρ) and Pi (π)\n        let curH = s[2];\n        let curL = s[3];\n        for (let t = 0; t < 24; t++) {\n            const shift = SHA3_ROTL[t];\n            const Th = rotlH(curH, curL, shift);\n            const Tl = rotlL(curH, curL, shift);\n            const PI = SHA3_PI[t];\n            curH = s[PI];\n            curL = s[PI + 1];\n            s[PI] = Th;\n            s[PI + 1] = Tl;\n        }\n        // Chi (χ)\n        for (let y = 0; y < 50; y += 10) {\n            for (let x = 0; x < 10; x++)\n                B[x] = s[y + x];\n            for (let x = 0; x < 10; x++)\n                s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n        }\n        // Iota (ι)\n        s[0] ^= SHA3_IOTA_H[round];\n        s[1] ^= SHA3_IOTA_L[round];\n    }\n    B.fill(0);\n}\n/** Keccak sponge function. */\nexport class Keccak extends Hash {\n    // NOTE: we accept arguments in bytes instead of bits here.\n    constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n        super();\n        this.pos = 0;\n        this.posOut = 0;\n        this.finished = false;\n        this.destroyed = false;\n        this.enableXOF = false;\n        this.blockLen = blockLen;\n        this.suffix = suffix;\n        this.outputLen = outputLen;\n        this.enableXOF = enableXOF;\n        this.rounds = rounds;\n        // Can be passed from user as dkLen\n        anumber(outputLen);\n        // 1600 = 5x5 matrix of 64bit.  1600 bits === 200 bytes\n        // 0 < blockLen < 200\n        if (0 >= this.blockLen || this.blockLen >= 200)\n            throw new Error('Sha3 supports only keccak-f1600 function');\n        this.state = new Uint8Array(200);\n        this.state32 = u32(this.state);\n    }\n    keccak() {\n        if (!isLE)\n            byteSwap32(this.state32);\n        keccakP(this.state32, this.rounds);\n        if (!isLE)\n            byteSwap32(this.state32);\n        this.posOut = 0;\n        this.pos = 0;\n    }\n    update(data) {\n        aexists(this);\n        const { blockLen, state } = this;\n        data = toBytes(data);\n        const len = data.length;\n        for (let pos = 0; pos < len;) {\n            const take = Math.min(blockLen - this.pos, len - pos);\n            for (let i = 0; i < take; i++)\n                state[this.pos++] ^= data[pos++];\n            if (this.pos === blockLen)\n                this.keccak();\n        }\n        return this;\n    }\n    finish() {\n        if (this.finished)\n            return;\n        this.finished = true;\n        const { state, suffix, pos, blockLen } = this;\n        // Do the padding\n        state[pos] ^= suffix;\n        if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n            this.keccak();\n        state[blockLen - 1] ^= 0x80;\n        this.keccak();\n    }\n    writeInto(out) {\n        aexists(this, false);\n        abytes(out);\n        this.finish();\n        const bufferOut = this.state;\n        const { blockLen } = this;\n        for (let pos = 0, len = out.length; pos < len;) {\n            if (this.posOut >= blockLen)\n                this.keccak();\n            const take = Math.min(blockLen - this.posOut, len - pos);\n            out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n            this.posOut += take;\n            pos += take;\n        }\n        return out;\n    }\n    xofInto(out) {\n        // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n        if (!this.enableXOF)\n            throw new Error('XOF is not possible for this instance');\n        return this.writeInto(out);\n    }\n    xof(bytes) {\n        anumber(bytes);\n        return this.xofInto(new Uint8Array(bytes));\n    }\n    digestInto(out) {\n        aoutput(out, this);\n        if (this.finished)\n            throw new Error('digest() was already called');\n        this.writeInto(out);\n        this.destroy();\n        return out;\n    }\n    digest() {\n        return this.digestInto(new Uint8Array(this.outputLen));\n    }\n    destroy() {\n        this.destroyed = true;\n        this.state.fill(0);\n    }\n    _cloneInto(to) {\n        const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n        to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n        to.state32.set(this.state32);\n        to.pos = this.pos;\n        to.posOut = this.posOut;\n        to.finished = this.finished;\n        to.rounds = rounds;\n        // Suffix can change in cSHAKE\n        to.suffix = suffix;\n        to.outputLen = outputLen;\n        to.enableXOF = enableXOF;\n        to.destroyed = this.destroyed;\n        return to;\n    }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\n/** SHA3-224 hash function. */\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/** SHA3-256 hash function. Different from keccak-256. */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\n/** SHA3-384 hash function. */\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\n/** SHA3-512 hash function. */\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\n/** keccak-224 hash function. */\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/** keccak-256 hash function. Different from SHA3-256. */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\n/** keccak-384 hash function. */\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\n/** keccak-512 hash function. */\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\n/** SHAKE128 XOF with 128-bit security. */\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\n/** SHAKE256 XOF with 256-bit security. */\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { keccak_256 } from '@noble/hashes/sha3';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function keccak256(value, to_) {\n    const to = to_ || 'hex';\n    const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n    if (to === 'bytes')\n        return bytes;\n    return toHex(bytes);\n}\n//# sourceMappingURL=keccak256.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { stringToBytes, } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { LruMap } from '../lru.js';\nimport { isAddress } from './isAddress.js';\nconst checksumAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function checksumAddress(address_, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n    if (checksumAddressCache.has(`${address_}.${chainId}`))\n        return checksumAddressCache.get(`${address_}.${chainId}`);\n    const hexAddress = chainId\n        ? `${chainId}${address_.toLowerCase()}`\n        : address_.substring(2).toLowerCase();\n    const hash = keccak256(stringToBytes(hexAddress), 'bytes');\n    const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split('');\n    for (let i = 0; i < 40; i += 2) {\n        if (hash[i >> 1] >> 4 >= 8 && address[i]) {\n            address[i] = address[i].toUpperCase();\n        }\n        if ((hash[i >> 1] & 0x0f) >= 8 && address[i + 1]) {\n            address[i + 1] = address[i + 1].toUpperCase();\n        }\n    }\n    const result = `0x${address.join('')}`;\n    checksumAddressCache.set(`${address_}.${chainId}`, result);\n    return result;\n}\nexport function getAddress(address, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n    if (!isAddress(address, { strict: false }))\n        throw new InvalidAddressError({ address });\n    return checksumAddress(address, chainId);\n}\n//# sourceMappingURL=getAddress.js.map","import { LruMap } from '../lru.js';\nimport { checksumAddress } from './getAddress.js';\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/;\n/** @internal */\nexport const isAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function isAddress(address, options) {\n    const { strict = true } = options ?? {};\n    const cacheKey = `${address}.${strict}`;\n    if (isAddressCache.has(cacheKey))\n        return isAddressCache.get(cacheKey);\n    const result = (() => {\n        if (!addressRegex.test(address))\n            return false;\n        if (address.toLowerCase() === address)\n            return true;\n        if (strict)\n            return checksumAddress(address) === address;\n        return true;\n    })();\n    isAddressCache.set(cacheKey, result);\n    return result;\n}\n//# sourceMappingURL=isAddress.js.map","import { SliceOffsetOutOfBoundsError, } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n    if (isHex(value, { strict: false }))\n        return sliceHex(value, start, end, {\n            strict,\n        });\n    return sliceBytes(value, start, end, {\n        strict,\n    });\n}\nfunction assertStartOffset(value, start) {\n    if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n        throw new SliceOffsetOutOfBoundsError({\n            offset: start,\n            position: 'start',\n            size: size(value),\n        });\n}\nfunction assertEndOffset(value, start, end) {\n    if (typeof start === 'number' &&\n        typeof end === 'number' &&\n        size(value) !== end - start) {\n        throw new SliceOffsetOutOfBoundsError({\n            offset: end,\n            position: 'end',\n            size: size(value),\n        });\n    }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n    assertStartOffset(value_, start);\n    const value = value_.slice(start, end);\n    if (strict)\n        assertEndOffset(value, start, end);\n    return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n    assertStartOffset(value_, start);\n    const value = `0x${value_\n        .replace('0x', '')\n        .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n    if (strict)\n        assertEndOffset(value, start, end);\n    return value;\n}\n//# sourceMappingURL=slice.js.map","import { versionedHashVersionKzg } from '../../constants/kzg.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError, } from '../../errors/blob.js';\nimport { InvalidChainIdError, } from '../../errors/chain.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { hexToNumber } from '../encoding/fromHex.js';\nexport function assertTransactionEIP7702(transaction) {\n    const { authorizationList } = transaction;\n    if (authorizationList) {\n        for (const authorization of authorizationList) {\n            const { chainId } = authorization;\n            const address = authorization.address;\n            if (!isAddress(address))\n                throw new InvalidAddressError({ address });\n            if (chainId < 0)\n                throw new InvalidChainIdError({ chainId });\n        }\n    }\n    assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP4844(transaction) {\n    const { blobVersionedHashes } = transaction;\n    if (blobVersionedHashes) {\n        if (blobVersionedHashes.length === 0)\n            throw new EmptyBlobError();\n        for (const hash of blobVersionedHashes) {\n            const size_ = size(hash);\n            const version = hexToNumber(slice(hash, 0, 1));\n            if (size_ !== 32)\n                throw new InvalidVersionedHashSizeError({ hash, size: size_ });\n            if (version !== versionedHashVersionKzg)\n                throw new InvalidVersionedHashVersionError({\n                    hash,\n                    version,\n                });\n        }\n    }\n    assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP1559(transaction) {\n    const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n    if (chainId <= 0)\n        throw new InvalidChainIdError({ chainId });\n    if (to && !isAddress(to))\n        throw new InvalidAddressError({ address: to });\n    if (maxFeePerGas && maxFeePerGas > maxUint256)\n        throw new FeeCapTooHighError({ maxFeePerGas });\n    if (maxPriorityFeePerGas &&\n        maxFeePerGas &&\n        maxPriorityFeePerGas > maxFeePerGas)\n        throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\nexport function assertTransactionEIP2930(transaction) {\n    const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n    if (chainId <= 0)\n        throw new InvalidChainIdError({ chainId });\n    if (to && !isAddress(to))\n        throw new InvalidAddressError({ address: to });\n    if (maxPriorityFeePerGas || maxFeePerGas)\n        throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.');\n    if (gasPrice && gasPrice > maxUint256)\n        throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\nexport function assertTransactionLegacy(transaction) {\n    const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n    if (to && !isAddress(to))\n        throw new InvalidAddressError({ address: to });\n    if (typeof chainId !== 'undefined' && chainId <= 0)\n        throw new InvalidChainIdError({ chainId });\n    if (maxPriorityFeePerGas || maxFeePerGas)\n        throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.');\n    if (gasPrice && gasPrice > maxUint256)\n        throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\n//# sourceMappingURL=assertTransaction.js.map","import { InvalidSerializableTransactionError, } from '../../errors/transaction.js';\nexport function getTransactionType(transaction) {\n    if (transaction.type)\n        return transaction.type;\n    if (typeof transaction.authorizationList !== 'undefined')\n        return 'eip7702';\n    if (typeof transaction.blobs !== 'undefined' ||\n        typeof transaction.blobVersionedHashes !== 'undefined' ||\n        typeof transaction.maxFeePerBlobGas !== 'undefined' ||\n        typeof transaction.sidecars !== 'undefined')\n        return 'eip4844';\n    if (typeof transaction.maxFeePerGas !== 'undefined' ||\n        typeof transaction.maxPriorityFeePerGas !== 'undefined') {\n        return 'eip1559';\n    }\n    if (typeof transaction.gasPrice !== 'undefined') {\n        if (typeof transaction.accessList !== 'undefined')\n            return 'eip2930';\n        return 'legacy';\n    }\n    throw new InvalidSerializableTransactionError({ transaction });\n}\n//# sourceMappingURL=getTransactionType.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { InvalidStorageKeySizeError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\n/*\n * Serialize an  EIP-2930 access list\n * @remarks\n * Use to create a transaction serializer with support for EIP-2930 access lists\n *\n * @param accessList - Array of objects of address and arrays of Storage Keys\n * @throws InvalidAddressError, InvalidStorageKeySizeError\n * @returns Array of hex strings\n */\nexport function serializeAccessList(accessList) {\n    if (!accessList || accessList.length === 0)\n        return [];\n    const serializedAccessList = [];\n    for (let i = 0; i < accessList.length; i++) {\n        const { address, storageKeys } = accessList[i];\n        for (let j = 0; j < storageKeys.length; j++) {\n            if (storageKeys[j].length - 2 !== 64) {\n                throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j] });\n            }\n        }\n        if (!isAddress(address, { strict: false })) {\n            throw new InvalidAddressError({ address });\n        }\n        serializedAccessList.push([address, storageKeys]);\n    }\n    return serializedAccessList;\n}\n//# sourceMappingURL=serializeAccessList.js.map","import { InvalidLegacyVError, } from '../../errors/transaction.js';\nimport { serializeAuthorizationList, } from '../authorization/serializeAuthorizationList.js';\nimport { blobsToCommitments, } from '../blob/blobsToCommitments.js';\nimport { blobsToProofs, } from '../blob/blobsToProofs.js';\nimport { commitmentsToVersionedHashes, } from '../blob/commitmentsToVersionedHashes.js';\nimport { toBlobSidecars, } from '../blob/toBlobSidecars.js';\nimport { concatHex } from '../data/concat.js';\nimport { trim } from '../data/trim.js';\nimport { bytesToHex, toHex } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionEIP4844, assertTransactionEIP7702, assertTransactionLegacy, } from './assertTransaction.js';\nimport { getTransactionType, } from './getTransactionType.js';\nimport { serializeAccessList, } from './serializeAccessList.js';\nexport function serializeTransaction(transaction, signature) {\n    const type = getTransactionType(transaction);\n    if (type === 'eip1559')\n        return serializeTransactionEIP1559(transaction, signature);\n    if (type === 'eip2930')\n        return serializeTransactionEIP2930(transaction, signature);\n    if (type === 'eip4844')\n        return serializeTransactionEIP4844(transaction, signature);\n    if (type === 'eip7702')\n        return serializeTransactionEIP7702(transaction, signature);\n    return serializeTransactionLegacy(transaction, signature);\n}\nfunction serializeTransactionEIP7702(transaction, signature) {\n    const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n    assertTransactionEIP7702(transaction);\n    const serializedAccessList = serializeAccessList(accessList);\n    const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n    return concatHex([\n        '0x04',\n        toRlp([\n            toHex(chainId),\n            nonce ? toHex(nonce) : '0x',\n            maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n            maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n            gas ? toHex(gas) : '0x',\n            to ?? '0x',\n            value ? toHex(value) : '0x',\n            data ?? '0x',\n            serializedAccessList,\n            serializedAuthorizationList,\n            ...toYParitySignatureArray(transaction, signature),\n        ]),\n    ]);\n}\nfunction serializeTransactionEIP4844(transaction, signature) {\n    const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n    assertTransactionEIP4844(transaction);\n    let blobVersionedHashes = transaction.blobVersionedHashes;\n    let sidecars = transaction.sidecars;\n    // If `blobs` are passed, we will need to compute the KZG commitments & proofs.\n    if (transaction.blobs &&\n        (typeof blobVersionedHashes === 'undefined' ||\n            typeof sidecars === 'undefined')) {\n        const blobs = (typeof transaction.blobs[0] === 'string'\n            ? transaction.blobs\n            : transaction.blobs.map((x) => bytesToHex(x)));\n        const kzg = transaction.kzg;\n        const commitments = blobsToCommitments({\n            blobs,\n            kzg,\n        });\n        if (typeof blobVersionedHashes === 'undefined')\n            blobVersionedHashes = commitmentsToVersionedHashes({\n                commitments,\n            });\n        if (typeof sidecars === 'undefined') {\n            const proofs = blobsToProofs({ blobs, commitments, kzg });\n            sidecars = toBlobSidecars({ blobs, commitments, proofs });\n        }\n    }\n    const serializedAccessList = serializeAccessList(accessList);\n    const serializedTransaction = [\n        toHex(chainId),\n        nonce ? toHex(nonce) : '0x',\n        maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n        maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n        gas ? toHex(gas) : '0x',\n        to ?? '0x',\n        value ? toHex(value) : '0x',\n        data ?? '0x',\n        serializedAccessList,\n        maxFeePerBlobGas ? toHex(maxFeePerBlobGas) : '0x',\n        blobVersionedHashes ?? [],\n        ...toYParitySignatureArray(transaction, signature),\n    ];\n    const blobs = [];\n    const commitments = [];\n    const proofs = [];\n    if (sidecars)\n        for (let i = 0; i < sidecars.length; i++) {\n            const { blob, commitment, proof } = sidecars[i];\n            blobs.push(blob);\n            commitments.push(commitment);\n            proofs.push(proof);\n        }\n    return concatHex([\n        '0x03',\n        sidecars\n            ? // If sidecars are enabled, envelope turns into a \"wrapper\":\n                toRlp([serializedTransaction, blobs, commitments, proofs])\n            : // If sidecars are disabled, standard envelope is used:\n                toRlp(serializedTransaction),\n    ]);\n}\nfunction serializeTransactionEIP1559(transaction, signature) {\n    const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n    assertTransactionEIP1559(transaction);\n    const serializedAccessList = serializeAccessList(accessList);\n    const serializedTransaction = [\n        toHex(chainId),\n        nonce ? toHex(nonce) : '0x',\n        maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n        maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n        gas ? toHex(gas) : '0x',\n        to ?? '0x',\n        value ? toHex(value) : '0x',\n        data ?? '0x',\n        serializedAccessList,\n        ...toYParitySignatureArray(transaction, signature),\n    ];\n    return concatHex([\n        '0x02',\n        toRlp(serializedTransaction),\n    ]);\n}\nfunction serializeTransactionEIP2930(transaction, signature) {\n    const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n    assertTransactionEIP2930(transaction);\n    const serializedAccessList = serializeAccessList(accessList);\n    const serializedTransaction = [\n        toHex(chainId),\n        nonce ? toHex(nonce) : '0x',\n        gasPrice ? toHex(gasPrice) : '0x',\n        gas ? toHex(gas) : '0x',\n        to ?? '0x',\n        value ? toHex(value) : '0x',\n        data ?? '0x',\n        serializedAccessList,\n        ...toYParitySignatureArray(transaction, signature),\n    ];\n    return concatHex([\n        '0x01',\n        toRlp(serializedTransaction),\n    ]);\n}\nfunction serializeTransactionLegacy(transaction, signature) {\n    const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n    assertTransactionLegacy(transaction);\n    let serializedTransaction = [\n        nonce ? toHex(nonce) : '0x',\n        gasPrice ? toHex(gasPrice) : '0x',\n        gas ? toHex(gas) : '0x',\n        to ?? '0x',\n        value ? toHex(value) : '0x',\n        data ?? '0x',\n    ];\n    if (signature) {\n        const v = (() => {\n            // EIP-155 (inferred chainId)\n            if (signature.v >= 35n) {\n                const inferredChainId = (signature.v - 35n) / 2n;\n                if (inferredChainId > 0)\n                    return signature.v;\n                return 27n + (signature.v === 35n ? 0n : 1n);\n            }\n            // EIP-155 (explicit chainId)\n            if (chainId > 0)\n                return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n            // Pre-EIP-155 (no chainId)\n            const v = 27n + (signature.v === 27n ? 0n : 1n);\n            if (signature.v !== v)\n                throw new InvalidLegacyVError({ v: signature.v });\n            return v;\n        })();\n        const r = trim(signature.r);\n        const s = trim(signature.s);\n        serializedTransaction = [\n            ...serializedTransaction,\n            toHex(v),\n            r === '0x00' ? '0x' : r,\n            s === '0x00' ? '0x' : s,\n        ];\n    }\n    else if (chainId > 0) {\n        serializedTransaction = [\n            ...serializedTransaction,\n            toHex(chainId),\n            '0x',\n            '0x',\n        ];\n    }\n    return toRlp(serializedTransaction);\n}\nexport function toYParitySignatureArray(transaction, signature_) {\n    const signature = signature_ ?? transaction;\n    const { v, yParity } = signature;\n    if (typeof signature.r === 'undefined')\n        return [];\n    if (typeof signature.s === 'undefined')\n        return [];\n    if (typeof v === 'undefined' && typeof yParity === 'undefined')\n        return [];\n    const r = trim(signature.r);\n    const s = trim(signature.s);\n    const yParity_ = (() => {\n        if (typeof yParity === 'number')\n            return yParity ? toHex(1) : '0x';\n        if (v === 0n)\n            return '0x';\n        if (v === 1n)\n            return toHex(1);\n        return v === 27n ? '0x' : toHex(1);\n    })();\n    return [yParity_, r === '0x00' ? '0x' : r, s === '0x00' ? '0x' : s];\n}\n//# sourceMappingURL=serializeTransaction.js.map","/**\n * Predeploy contracts for OP Stack.\n * @see https://github.com/ethereum-optimism/optimism/blob/develop/specs/predeploys.md\n */\nexport const contracts = {\n    gasPriceOracle: { address: '0x420000000000000000000000000000000000000F' },\n    l1Block: { address: '0x4200000000000000000000000000000000000015' },\n    l2CrossDomainMessenger: {\n        address: '0x4200000000000000000000000000000000000007',\n    },\n    l2Erc721Bridge: { address: '0x4200000000000000000000000000000000000014' },\n    l2StandardBridge: { address: '0x4200000000000000000000000000000000000010' },\n    l2ToL1MessagePasser: {\n        address: '0x4200000000000000000000000000000000000016',\n    },\n};\n//# sourceMappingURL=contracts.js.map","import { hexToBigInt } from '../utils/encoding/fromHex.js';\nimport { defineBlock } from '../utils/formatters/block.js';\nimport { defineTransaction, formatTransaction, } from '../utils/formatters/transaction.js';\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js';\nexport const formatters = {\n    block: /*#__PURE__*/ defineBlock({\n        format(args) {\n            const transactions = args.transactions?.map((transaction) => {\n                if (typeof transaction === 'string')\n                    return transaction;\n                const formatted = formatTransaction(transaction);\n                if (formatted.typeHex === '0x7e') {\n                    formatted.isSystemTx = transaction.isSystemTx;\n                    formatted.mint = transaction.mint\n                        ? hexToBigInt(transaction.mint)\n                        : undefined;\n                    formatted.sourceHash = transaction.sourceHash;\n                    formatted.type = 'deposit';\n                }\n                return formatted;\n            });\n            return {\n                transactions,\n                stateRoot: args.stateRoot,\n            };\n        },\n    }),\n    transaction: /*#__PURE__*/ defineTransaction({\n        format(args) {\n            const transaction = {};\n            if (args.type === '0x7e') {\n                transaction.isSystemTx = args.isSystemTx;\n                transaction.mint = args.mint ? hexToBigInt(args.mint) : undefined;\n                transaction.sourceHash = args.sourceHash;\n                transaction.type = 'deposit';\n            }\n            return transaction;\n        },\n    }),\n    transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({\n        format(args) {\n            return {\n                l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n                l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n                l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n                l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null,\n            };\n        },\n    }),\n};\n//# sourceMappingURL=formatters.js.map","import { InvalidAddressError } from '../errors/address.js';\nimport { isAddress } from '../utils/address/isAddress.js';\nimport { concatHex } from '../utils/data/concat.js';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { toRlp } from '../utils/encoding/toRlp.js';\nimport { serializeTransaction as serializeTransaction_, } from '../utils/transaction/serializeTransaction.js';\nexport function serializeTransaction(transaction, signature) {\n    if (isDeposit(transaction))\n        return serializeTransactionDeposit(transaction);\n    return serializeTransaction_(transaction, signature);\n}\nexport const serializers = {\n    transaction: serializeTransaction,\n};\nfunction serializeTransactionDeposit(transaction) {\n    assertTransactionDeposit(transaction);\n    const { sourceHash, data, from, gas, isSystemTx, mint, to, value } = transaction;\n    const serializedTransaction = [\n        sourceHash,\n        from,\n        to ?? '0x',\n        mint ? toHex(mint) : '0x',\n        value ? toHex(value) : '0x',\n        gas ? toHex(gas) : '0x',\n        isSystemTx ? '0x1' : '0x',\n        data ?? '0x',\n    ];\n    return concatHex([\n        '0x7e',\n        toRlp(serializedTransaction),\n    ]);\n}\nfunction isDeposit(transaction) {\n    if (transaction.type === 'deposit')\n        return true;\n    if (typeof transaction.sourceHash !== 'undefined')\n        return true;\n    return false;\n}\nexport function assertTransactionDeposit(transaction) {\n    const { from, to } = transaction;\n    if (from && !isAddress(from))\n        throw new InvalidAddressError({ address: from });\n    if (to && !isAddress(to))\n        throw new InvalidAddressError({ address: to });\n}\n//# sourceMappingURL=serializers.js.map","import { contracts } from './contracts.js';\nimport { formatters } from './formatters.js';\nimport { serializers } from './serializers.js';\nexport const chainConfig = {\n    contracts,\n    formatters,\n    serializers,\n};\n//# sourceMappingURL=chainConfig.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 1; // mainnet\nexport const base = /*#__PURE__*/ defineChain({\n    ...chainConfig,\n    id: 8453,\n    name: 'Base',\n    nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n    rpcUrls: {\n        default: {\n            http: ['https://mainnet.base.org'],\n        },\n    },\n    blockExplorers: {\n        default: {\n            name: 'Basescan',\n            url: 'https://basescan.org',\n            apiUrl: 'https://api.basescan.org/api',\n        },\n    },\n    contracts: {\n        ...chainConfig.contracts,\n        disputeGameFactory: {\n            [sourceId]: {\n                address: '0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e',\n            },\n        },\n        l2OutputOracle: {\n            [sourceId]: {\n                address: '0x56315b90c40730925ec5485cf004d835058518A0',\n            },\n        },\n        multicall3: {\n            address: '0xca11bde05977b3631167028862be2a173976ca11',\n            blockCreated: 5022,\n        },\n        portal: {\n            [sourceId]: {\n                address: '0x49048044D57e1C92A77f79988d21Fa8fAF74E97e',\n                blockCreated: 17482143,\n            },\n        },\n        l1StandardBridge: {\n            [sourceId]: {\n                address: '0x3154Cf16ccdb4C6d922629664174b904d80F2C35',\n                blockCreated: 17482143,\n            },\n        },\n    },\n    sourceId,\n});\n//# sourceMappingURL=base.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bsc = /*#__PURE__*/ defineChain({\n    id: 56,\n    name: 'BNB Smart Chain',\n    nativeCurrency: {\n        decimals: 18,\n        name: 'BNB',\n        symbol: 'BNB',\n    },\n    rpcUrls: {\n        default: { http: ['https://56.rpc.thirdweb.com'] },\n    },\n    blockExplorers: {\n        default: {\n            name: 'BscScan',\n            url: 'https://bscscan.com',\n            apiUrl: 'https://api.bscscan.com/api',\n        },\n    },\n    contracts: {\n        multicall3: {\n            address: '0xca11bde05977b3631167028862be2a173976ca11',\n            blockCreated: 15921452,\n        },\n    },\n});\n//# sourceMappingURL=bsc.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const bscTestnet = /*#__PURE__*/ defineChain({\n    id: 97,\n    name: 'Binance Smart Chain Testnet',\n    nativeCurrency: {\n        decimals: 18,\n        name: 'BNB',\n        symbol: 'tBNB',\n    },\n    rpcUrls: {\n        default: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] },\n    },\n    blockExplorers: {\n        default: {\n            name: 'BscScan',\n            url: 'https://testnet.bscscan.com',\n            apiUrl: 'https://api-testnet.bscscan.com/api',\n        },\n    },\n    contracts: {\n        multicall3: {\n            address: '0xca11bde05977b3631167028862be2a173976ca11',\n            blockCreated: 17422483,\n        },\n    },\n    testnet: true,\n});\n//# sourceMappingURL=bscTestnet.js.map","import { defineChain } from '../../utils/chain/defineChain.js';\nexport const mainnet = /*#__PURE__*/ defineChain({\n    id: 1,\n    name: 'Ethereum',\n    nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n    rpcUrls: {\n        default: {\n            http: ['https://eth.merkle.io'],\n        },\n    },\n    blockExplorers: {\n        default: {\n            name: 'Etherscan',\n            url: 'https://etherscan.io',\n            apiUrl: 'https://api.etherscan.io/api',\n        },\n    },\n    contracts: {\n        ensRegistry: {\n            address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',\n        },\n        ensUniversalResolver: {\n            address: '0xce01f8eee7E479C928F8919abD53E553a36CeF67',\n            blockCreated: 19_258_213,\n        },\n        multicall3: {\n            address: '0xca11bde05977b3631167028862be2a173976ca11',\n            blockCreated: 14_353_601,\n        },\n    },\n});\n//# sourceMappingURL=mainnet.js.map","import { chainConfig } from '../../op-stack/chainConfig.js';\nimport { defineChain } from '../../utils/chain/defineChain.js';\nconst sourceId = 11_155_111; // sepolia\nexport const unichainSepolia = /*#__PURE__*/ defineChain({\n    ...chainConfig,\n    id: 1301,\n    name: 'Unichain Sepolia',\n    nativeCurrency: {\n        name: 'Ether',\n        symbol: 'ETH',\n        decimals: 18,\n    },\n    rpcUrls: {\n        default: {\n            http: ['https://sepolia.unichain.org'],\n        },\n    },\n    blockExplorers: {\n        default: {\n            name: 'Uniscan',\n            url: 'https://sepolia.uniscan.xyz',\n            apiUrl: 'https://api-sepolia.uniscan.xyz/api',\n        },\n    },\n    contracts: {\n        ...chainConfig.contracts,\n        multicall3: {\n            address: '0xca11bde05977b3631167028862be2a173976ca11',\n            blockCreated: 0,\n        },\n        portal: {\n            [sourceId]: {\n                address: '0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD',\n            },\n        },\n        l1StandardBridge: {\n            [sourceId]: {\n                address: '0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2',\n            },\n        },\n        disputeGameFactory: {\n            [sourceId]: {\n                address: '0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b',\n            },\n        },\n    },\n    testnet: true,\n    sourceId,\n});\n//# sourceMappingURL=unichainSepolia.js.map","import { Chain } from \"viem\";\r\nimport { INetwork } from \"../networks\";\r\n\r\nexport enum ChainSymbols {\r\n  eth = \"eth\",\r\n  uni = \"uni\",\r\n  base = \"base\",\r\n  bsc = \"bsc\",\r\n  tbsc = \"tbsc\",\r\n  sol = \"sol\",\r\n  solDevnet = \"tsol\",\r\n  sui = \"sui\",\r\n  suiDevnet = \"tsui\",\r\n  ton = \"ton\",\r\n  tonDevnet = \"tton\",\r\n}\r\n\r\nexport enum ChainIds {\r\n  eth = 1,\r\n  uni = 130,\r\n  base = 8453,\r\n  bsc = 56,\r\n  tbsc = 97,\r\n  sol = 8453,\r\n  solDevnet = 84532,\r\n  sui = 84532,\r\n  suiDevnet = 100,\r\n  ton = 10,\r\n  tonDevnet = 11,\r\n}\r\n\r\nexport interface IBlockExplorer {\r\n  name: string;\r\n  url: string;\r\n  hash: string;\r\n  address: string;\r\n}\r\n\r\nexport interface IChain extends Chain {\r\n  id: number;\r\n  name: string;\r\n  symbol: ChainSymbols;\r\n  network: INetwork;\r\n  logo: string;\r\n  nativeCurrency: {\r\n    name: string;\r\n    symbol: string;\r\n    decimals: number;\r\n  };\r\n  blockExplorers: {\r\n    default: IBlockExplorer;\r\n    [key: string]: IBlockExplorer;\r\n  };\r\n}\r\n","import {\r\n  bsc as baseBSC,\r\n  base as baseBase,\r\n  mainnet as baseMainnet,\r\n  bscTestnet as baseTBSC,\r\n  unichainSepolia as baseUni,\r\n} from \"viem/chains\";\r\n\r\nimport { IChain, ChainSymbols, ChainIds } from \"./types\";\r\nimport { networkEth } from \"../networks\";\r\nimport { BaseLogo, BSCLogo, EthLogo, UniLogo } from \"based-assets\";\r\n\r\nexport const chainEth: IChain = {\r\n  ...baseMainnet,\r\n  id: ChainIds.eth,\r\n  symbol: ChainSymbols.eth,\r\n  logo: EthLogo,\r\n  network: networkEth,\r\n  blockExplorers: {\r\n    ...baseMainnet.blockExplorers,\r\n    default: {\r\n      ...baseMainnet.blockExplorers.default,\r\n      hash: \"https://etherscan.io/tx/{{addr}}\",\r\n      address: \"https://etherscan.io/address/{{addr}}\",\r\n    },\r\n  },\r\n};\r\n\r\nexport const chainBSC: IChain = {\r\n  ...baseBSC,\r\n  id: ChainIds.bsc,\r\n  symbol: ChainSymbols.bsc,\r\n  logo: BSCLogo,\r\n  network: networkEth,\r\n  rpcUrls: {\r\n    default: {\r\n      http: [\r\n        baseBSC.rpcUrls.default.http[0],\r\n        \"https://bsc.blockpi.network/v1/rpc/32cdfa234a4a17abbb8e3f23bc6410a9b7d47cb3\",\r\n      ],\r\n    },\r\n  },\r\n  blockExplorers: {\r\n    ...baseBSC.blockExplorers,\r\n    default: {\r\n      ...baseBSC.blockExplorers.default,\r\n      hash: \"https://bscscan.com/tx/{{addr}}\",\r\n      address: \"https://bscscan.com/address/{{addr}}\",\r\n    },\r\n  },\r\n};\r\n\r\nexport const chainBSCTestnet: IChain = {\r\n  ...baseTBSC,\r\n  id: ChainIds.tbsc,\r\n  symbol: ChainSymbols.tbsc,\r\n  logo: BSCLogo,\r\n  network: networkEth,\r\n  rpcUrls: {\r\n    default: {\r\n      http: [\r\n        \"https://bsc-testnet-rpc.publicnode.com\",\r\n        ...baseTBSC.rpcUrls.default.http,\r\n      ],\r\n      webSocket: [\r\n        \"wss://bsc-testnet-rpc.publicnode.com\",\r\n        \"wss://bsc-testnet.blockpi.network/v1/ws/cd61e00aed93674ae0d608f823e2c2d05a52752d\",\r\n      ],\r\n    },\r\n  },\r\n  blockExplorers: {\r\n    ...baseTBSC.blockExplorers,\r\n    default: {\r\n      ...baseTBSC.blockExplorers.default,\r\n      hash: \"https://testnet.bscscan.com/tx/{{addr}}\",\r\n      address: \"https://testnet.bscscan.com/address/{{addr}}\",\r\n    },\r\n  },\r\n};\r\n\r\nexport const chainUni: IChain = {\r\n  ...baseUni,\r\n  id: ChainIds.uni,\r\n  symbol: ChainSymbols.uni,\r\n  logo: UniLogo,\r\n  network: networkEth,\r\n  blockExplorers: {\r\n    ...baseUni.blockExplorers,\r\n    default: {\r\n      ...baseUni.blockExplorers.default,\r\n      hash: \"https://explorer.unichain.io/tx/{{addr}}\",\r\n      address: \"https://explorer.unichain.io/address/{{addr}}\",\r\n    },\r\n  },\r\n};\r\n\r\nexport const chainBase: IChain = {\r\n  ...baseBase,\r\n  id: ChainIds.base,\r\n  symbol: ChainSymbols.base,\r\n  logo: BaseLogo,\r\n  network: networkEth,\r\n  blockExplorers: {\r\n    ...baseBase.blockExplorers,\r\n    default: {\r\n      ...baseBase.blockExplorers.default,\r\n      hash: \"https://basescan.org/tx/{{addr}}\",\r\n      address: \"https://basescan.org/address/{{addr}}\",\r\n    },\r\n  },\r\n};\r\n","import { networkSol } from \"../networks\";\r\nimport { SolLogo } from \"based-assets\";\r\nimport { IChain, ChainSymbols, ChainIds } from \"./types\";\r\nimport { defineChain } from \"viem\";\r\nimport { clusterApiUrl } from \"@solana/web3.js\";\r\nimport { WalletAdapterNetwork } from \"@solana/wallet-adapter-base\";\r\n\r\nexport const chainSol: IChain = defineChain({\r\n  id: ChainIds.sol,\r\n  symbol: ChainSymbols.sol,\r\n  name: \"Solana\",\r\n  logo: SolLogo,\r\n  network: networkSol,\r\n  nativeCurrency: { name: \"Solana\", symbol: \"SOL\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: {\r\n      http: [\r\n        clusterApiUrl(WalletAdapterNetwork.Mainnet),\r\n        \"https://late-indulgent-surf.solana-mainnet.quiknode.pro/06bfbf9317a2dac06f06abf1087a9ea64cd0da56/\",\r\n      ],\r\n    },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Solscan\",\r\n      url: \"https://explorer.solana.com\",\r\n      hash: \"https://solscan.io/tx/{{addr}}\",\r\n      address: \"https://solscan.io/account/{{addr}}\",\r\n    },\r\n  },\r\n});\r\n\r\nexport const chainSolDevnet: IChain = defineChain({\r\n  id: ChainIds.solDevnet,\r\n  symbol: ChainSymbols.solDevnet,\r\n  name: \"Solana Devnet\",\r\n  logo: SolLogo,\r\n  network: networkSol,\r\n  nativeCurrency: { name: \"Solana\", symbol: \"SOL\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: {\r\n      http: [\r\n        clusterApiUrl(WalletAdapterNetwork.Devnet),\r\n        \"https://cosmological-quaint-friday.solana-devnet.quiknode.pro/c1f4aaab4ab76f04042e3902cdb03dc8a35b5c6d/\",\r\n        \"https://rpc.walletconnect.org/v1\",\r\n      ],\r\n    },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Solscan\",\r\n      url: \"https://explorer.solana.com\",\r\n      hash: \"https://solscan.io/tx/{{addr}}?cluster=devnet\",\r\n      address: \"https://solscan.io/account/{{addr}}?cluster=devnet\",\r\n    },\r\n    solana: {\r\n      name: \"Solana Explorer\",\r\n      url: \"https://explorer.solana.com\",\r\n      hash: \"https://solscan.io/tx/{{addr}}?cluster=devnet\",\r\n      address: \"https://solscan.io/account/{{addr}}?cluster=devnet\",\r\n    },\r\n  },\r\n  testnet: true,\r\n});\r\n","import { TonLogo } from \"based-assets\";\r\nimport { defineChain } from \"viem\";\r\nimport { IChain, ChainSymbols, ChainIds } from \"./types\";\r\nimport { networkTon } from \"../networks\";\r\n\r\nexport const chainTon: IChain = defineChain({\r\n  id: ChainIds.ton,\r\n  symbol: ChainSymbols.ton,\r\n  name: \"TON\",\r\n  logo: TonLogo,\r\n  network: networkTon,\r\n  nativeCurrency: { name: \"Toncoin\", symbol: \"TON\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: { http: [\"https://toncenter.com/api/v2/json-rpc\"] },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Tonviewer\",\r\n      url: \"https://tonviewer.com\",\r\n      hash: \"https://tonviewer.com/tx/{{addr}}\",\r\n      address: \"https://tonviewer.com/address/{{addr}}\",\r\n    },\r\n  },\r\n  testnet: false,\r\n});\r\n\r\nexport const chainTonDevnet: IChain = defineChain({\r\n  id: ChainIds.tonDevnet,\r\n  symbol: ChainSymbols.tonDevnet,\r\n  name: \"TON Testnet\",\r\n  logo: TonLogo,\r\n  network: networkTon,\r\n  nativeCurrency: { name: \"Toncoin\", symbol: \"TON\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: { http: [\"https://toncenter.com/api/v2/json-rpc\"] },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Tonviewer\",\r\n      url: \"https://tonviewer.com\",\r\n      hash: \"https://tonviewer.com/tx/{{addr}}\",\r\n      address: \"https://tonviewer.com/address/{{addr}}\",\r\n    },\r\n  },\r\n  testnet: true,\r\n});\r\n","import { SuiLogo } from \"based-assets\";\r\nimport { defineChain } from \"viem\";\r\nimport { IChain, ChainSymbols, ChainIds } from \"./types\";\r\nimport { networkSui } from \"../networks\";\r\n\r\nexport const chainSui: IChain = defineChain({\r\n  id: ChainIds.sui,\r\n  symbol: ChainSymbols.sui,\r\n  name: \"Sui\",\r\n  logo: SuiLogo,\r\n  network: networkSui,\r\n  nativeCurrency: { name: \"Sui\", symbol: \"SUI\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: { http: [\"https://fullnode.mainnet.sui.io\"] },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Suiexplorer\",\r\n      url: \"https://suiexplorer.com\",\r\n      hash: \"https://suiexplorer.com/tx/{{addr}}\",\r\n      address: \"https://suiexplorer.com/address/{{addr}}\",\r\n    },\r\n  },\r\n  testnet: false,\r\n});\r\n\r\nexport const chainSuiDevnet: IChain = defineChain({\r\n  id: ChainIds.suiDevnet,\r\n  symbol: ChainSymbols.suiDevnet,\r\n  name: \"Sui Devnet\",\r\n  logo: SuiLogo,\r\n  network: networkSui,\r\n  nativeCurrency: { name: \"Sui\", symbol: \"SUI\", decimals: 9 },\r\n  rpcUrls: {\r\n    default: { http: [\"https://fullnode.devnet.sui.io\"] },\r\n  },\r\n  blockExplorers: {\r\n    default: {\r\n      name: \"Suiexplorer\",\r\n      url: \"https://suiexplorer.com\",\r\n      hash: \"https://suiexplorer.com/tx/{{addr}}\",\r\n      address: \"https://suiexplorer.com/address/{{addr}}\",\r\n    },\r\n  },\r\n  testnet: true,\r\n});\r\n","import {\r\n  chainBSC,\r\n  chainBase,\r\n  chainEth,\r\n  chainBSCTestnet,\r\n  chainUni,\r\n} from \"./eth\";\r\nimport { chainSol, chainSolDevnet } from \"./solana\";\r\nimport { chainTon, chainTonDevnet } from \"./ton\";\r\nimport { chainSui, chainSuiDevnet } from \"./sui\";\r\nimport type { IChain } from \"./types\";\r\n\r\nexport const isMainnet = process.env.NEXT_PUBLIC_APP_ENV === \"mainnet\";\r\n\r\nexport * from \"./types\";\r\n\r\nexport {\r\n  chainBSCTestnet,\r\n  chainBSC,\r\n  chainBase,\r\n  chainEth,\r\n  chainUni,\r\n  chainSol,\r\n  chainSolDevnet,\r\n  chainTon,\r\n  chainTonDevnet,\r\n  chainSui,\r\n  chainSuiDevnet,\r\n};\r\n\r\nexport const AllChains: IChain[] = [\r\n  chainBSCTestnet,\r\n  chainBSC,\r\n  chainBase,\r\n  chainEth,\r\n  chainUni,\r\n  chainSol,\r\n  chainSolDevnet,\r\n];\r\n\r\n// export const supportedChains: IChain[] = isMainnet\r\n//   ? [chainSol, chainBSC, chainEth, chainBase, chainUni]\r\n//   : [chainSolDevnet, chainBSCTestnet];\r\n"],"names":["defineChain","chain","version","errorConfig","docsBaseUrl","docsPath","docsSlug","BaseError","shortMessage","args","details","_a","docsUrl","message","fn","walk","err","IntegerOutOfRangeError","max","min","signed","size","value","SizeOverflowError","givenSize","maxSize","isHex","strict","trim","hexOrBytes","dir","data","sliceLength","SliceOffsetOutOfBoundsError","offset","position","SizeExceedsPaddingSizeError","targetSize","type","pad","padHex","padBytes","hex_","hex","bytes","paddedBytes","padEnd","hexes","_v","i","toHex","opts","numberToHex","stringToHex","boolToHex","bytesToHex","assertSize","string","value_","maxValue","minValue","suffix","encoder","toBytes","numberToBytes","boolToBytes","hexToBytes","stringToBytes","charCodeMap","charCodeToBase16","char","hexString","length","index","j","nibbleLeft","nibbleRight","size_","hexToBigInt","hexToNumber","defineFormatter","format","exclude","overrides","formatted","key","transactionType","formatTransaction","transaction","transaction_","formatAuthorizationList","defineTransaction","authorizationList","authorization","formatBlock","block","transactions","defineBlock","formatLog","log","eventName","receiptStatuses","formatTransactionReceipt","transactionReceipt","receipt","defineTransactionReceipt","maxUint256","concatHex","values","acc","x","NegativeOffsetError","PositionOutOfBoundsError","RecursiveReadLimitExceededError","count","limit","staticCursor","position_","byte","oldPosition","createCursor","recursiveReadLimit","cursor","toRlp","to","encodable","getEncodable","getEncodableList","getEncodableBytes","list","bodyLength","sizeOfBodyLength","getSizeOfLength","encode","bytesOrHex","sizeOfBytesLength","gweiUnits","formatUnits","decimals","display","negative","integer","fraction","formatGwei","wei","unit","prettyPrint","entries","maxLength","InvalidLegacyVError","v","InvalidSerializableTransactionError","InvalidStorageKeySizeError","storageKey","serializeAuthorizationList","serializedAuthorizationList","chainId","nonce","signature","contractAddress","toYParitySignatureArray","blobsToCommitments","parameters","kzg","blobs","commitments","blob","blobsToProofs","proofs","commitment","anumber","n","isBytes","a","abytes","b","lengths","aexists","instance","checkFinished","aoutput","out","u32","arr","createView","rotr","word","shift","isLE","byteSwap","byteSwap32","utf8ToBytes","str","Hash","wrapConstructor","hashCons","hashC","msg","tmp","setBigUint64","view","byteOffset","_32n","_u32_max","wh","wl","h","l","Chi","c","Maj","HashMD","blockLen","outputLen","padOffset","buffer","len","pos","take","dataView","oview","outLen","state","res","finished","destroyed","SHA256_K","SHA256_IV","SHA256_W","SHA256","A","B","C","D","E","F","G","H","W15","W2","s0","s1","sigma1","T1","T2","sha256","to_","noble_sha256","commitmentToVersionedHash","versionedHash","commitmentsToVersionedHashes","hashes","blobsPerTransaction","bytesPerFieldElement","fieldElementsPerBlob","bytesPerBlob","maxBytesPerTransaction","versionedHashVersionKzg","BlobSizeTooLargeError","EmptyBlobError","InvalidVersionedHashSizeError","hash","InvalidVersionedHashVersionError","toBlobs","active","toBlobSidecars","sidecars","InvalidAddressError","address","InvalidChainIdError","FeeCapTooHighError","cause","maxFeePerGas","TipAboveFeeCapError","maxPriorityFeePerGas","LruMap","firstKey","U32_MASK64","fromBig","le","split","lst","Ah","Al","rotlSH","rotlSL","rotlBH","rotlBL","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_0n","_1n","_2n","_7n","_256n","_0x71n","round","R","y","t","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","s","rounds","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","Keccak","enableXOF","bufferOut","gen","keccak_256","keccak256","checksumAddressCache","checksumAddress","address_","hexAddress","result","addressRegex","isAddressCache","isAddress","options","cacheKey","slice","start","end","sliceHex","sliceBytes","assertEndOffset","assertTransactionEIP7702","assertTransactionEIP1559","assertTransactionEIP4844","blobVersionedHashes","assertTransactionEIP2930","gasPrice","assertTransactionLegacy","getTransactionType","serializeAccessList","accessList","serializedAccessList","storageKeys","serializeTransaction","serializeTransactionEIP1559","serializeTransactionEIP2930","serializeTransactionEIP4844","serializeTransactionEIP7702","serializeTransactionLegacy","gas","maxFeePerBlobGas","serializedTransaction","proof","r","signature_","yParity","contracts","formatters","isDeposit","serializeTransactionDeposit","serializeTransaction_","serializers","assertTransactionDeposit","sourceHash","from","isSystemTx","mint","chainConfig","sourceId","base","bsc","bscTestnet","mainnet","unichainSepolia","ChainSymbols","ChainIds","chainEth","baseMainnet","EthLogo","networkEth","chainBSC","baseBSC","BSCLogo","chainBSCTestnet","baseTBSC","chainUni","baseUni","UniLogo","chainBase","baseBase","BaseLogo","chainSol","SolLogo","networkSol","clusterApiUrl","WalletAdapterNetwork","chainSolDevnet","chainTon","TonLogo","networkTon","chainTonDevnet","chainSui","SuiLogo","networkSui","chainSuiDevnet","isMainnet","AllChains"],"mappings":"iNAAO,SAASA,EAAYC,EAAO,CAC/B,MAAO,CACH,WAAY,OACZ,KAAM,OACN,YAAa,OACb,GAAGA,CACN,CACL,CCPO,MAAMC,GAAU,SCCvB,IAAIC,EAAc,CACd,WAAY,CAAC,CAAE,YAAAC,EAAa,SAAAC,EAAW,GAAI,SAAAC,CAAQ,IAAQD,EACrD,GAAGD,GAAe,iBAAiB,GAAGC,CAAQ,GAAGC,EAAW,IAAIA,CAAQ,GAAK,EAAE,GAC/E,OACN,QAAS,QAAQJ,EAAO,EAC5B,EAIO,MAAMK,UAAkB,KAAM,CACjC,YAAYC,EAAcC,EAAO,GAAI,OACjC,MAAMC,GAAW,IAAM,OACnB,OAAID,EAAK,iBAAiBF,EACfE,EAAK,MAAM,SAClBE,EAAAF,EAAK,QAAL,MAAAE,EAAY,QACLF,EAAK,MAAM,QACfA,EAAK,OACxB,GAAY,EACEJ,EACEI,EAAK,iBAAiBF,GACfE,EAAK,MAAM,UAAYA,EAAK,SAGrCG,GAAUD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,GAAsB,CACjCvB,GACAH,GACAQ,GACAZ,GACAS,GACAM,GACAK,EACF","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63]}