@namehash/namehash-ui 0.0.0-next-20260120091912 → 0.0.0-next-20260120123821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/version.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/base.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/encoding.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/isHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/size.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/trim.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/data.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/pad.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toBytes.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/fromHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/formatter.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transactionRequest.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/number.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/concat.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/cursor.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/cursor.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/unit.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatUnits.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatEther.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatGwei.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/transaction.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/utils.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/_md.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/_u64.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha2.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/address.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/chain.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/node.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/lru.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha3.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/hash/keccak256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/address/getAddress.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/address/isAddress.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/slice.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/accounts/utils/parseAccount.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/stateOverride.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/contract.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/errors/getNodeError.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/errors/getCallError.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/extract.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/assertRequest.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/chain/defineChain.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/block.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/log.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transactionReceipt.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toRlp.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/serializeTransaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/authorization/serializeAuthorizationList.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/blobsToCommitments.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/blobsToProofs.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/commitmentToVersionedHash.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/hash/sha256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/commitmentsToVersionedHashes.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/blob.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/kzg.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/blob.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/toBlobs.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/toBlobSidecars.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/assertTransaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/getTransactionType.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/serializeAccessList.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/contracts.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/formatters.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/serializers.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/chainConfig.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/arbitrum.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/arbitrumSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/base.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/baseSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/linea/actions/estimateGas.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/account.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/linea/chainConfig.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/linea.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/lineaSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/mainnet.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/optimism.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/optimismSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/scroll.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/scrollSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/sepolia.ts","../src/components/chains/ChainIcon.tsx","../src/components/chains/icons/ArbitrumIcon.tsx","../src/components/chains/icons/ArbitrumTestnetIcon.tsx","../src/components/chains/icons/BaseIcon.tsx","../src/components/chains/icons/BaseTestnetIcon.tsx","../src/components/chains/icons/EthereumIcon.tsx","../src/components/chains/icons/EthereumLocalIcon.tsx","../src/components/chains/icons/EthereumTestnetIcon.tsx","../src/components/chains/icons/LineaIcon.tsx","../src/components/chains/icons/LineaTestnetIcon.tsx","../src/components/chains/icons/OptimismIcon.tsx","../src/components/chains/icons/OptimismTestnetIcon.tsx","../src/components/chains/icons/ScrollIcon.tsx","../src/components/chains/icons/ScrollTestnetIcon.tsx","../src/components/chains/icons/UnrecognizedChainIcon.tsx","../src/utils/chains.ts","../src/components/chains/ChainName.tsx","../src/components/datetime/AbsoluteTime.tsx","../src/components/datetime/DisplayDuration.tsx","../src/components/datetime/RelativeTime.tsx","../src/utils/cn.ts","../src/components/ui/tooltip.tsx","../src/components/icons/ens/EnsServiceProviderIcon.tsx","../src/components/icons/namehash/NameHashLabsIcon.tsx","../src/components/icons/socials/EfpIcon.tsx","../src/components/icons/socials/EmailIcon.tsx","../src/components/icons/socials/FarcasterIcon.tsx","../src/components/icons/socials/GitHubIcon.tsx","../src/components/icons/socials/TelegramIcon.tsx","../src/components/icons/socials/TwitterIcon.tsx","../src/components/footer/Footer.tsx","../src/components/icons/ChainExplorerIcon.tsx","../src/components/icons/ens/EnsIcon.tsx","../src/components/icons/InfoIcon.tsx","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/address.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/index.ts","../src/components/identity/Address.tsx","../src/components/identity/EnsAvatar.tsx","../src/utils/ensMetadata.ts","../src/components/ui/avatar.tsx","../src/components/identity/Identity.tsx","../src/utils/blockExplorers.ts","../src/utils/ensManager.ts","../src/components/special-buttons/CopyButton.tsx","../src/components/ui/button.tsx","../src/components/identity/Name.tsx","../src/components/identity/ResolveAndDisplayIdentity.tsx","../src/hooks/useIsMobile.tsx","../src/components/ui/skeleton.tsx","../src/components/registrar-actions/RegistrarActionCard.tsx","../src/hooks/useNow.ts","../src/hooks/useSystemClock.ts","../src/utils/syncedClock.ts","../src/utils/systemClock.ts"],"sourcesContent":["export const version = '2.38.5'\n","import { version } from './version.js'\n\ntype ErrorConfig = {\n getDocsUrl?: ((args: BaseErrorParameters) => string | undefined) | undefined\n version?: string | undefined\n}\n\nlet errorConfig: ErrorConfig = {\n getDocsUrl: ({\n docsBaseUrl,\n docsPath = '',\n docsSlug,\n }: BaseErrorParameters) =>\n docsPath\n ? `${docsBaseUrl ?? 'https://viem.sh'}${docsPath}${\n docsSlug ? `#${docsSlug}` : ''\n }`\n : undefined,\n version: `viem@${version}`,\n}\n\nexport function setErrorConfig(config: ErrorConfig) {\n errorConfig = config\n}\n\ntype BaseErrorParameters = {\n cause?: BaseError | Error | undefined\n details?: string | undefined\n docsBaseUrl?: string | undefined\n docsPath?: string | undefined\n docsSlug?: string | undefined\n metaMessages?: string[] | undefined\n name?: string | undefined\n}\n\nexport type BaseErrorType = BaseError & { name: 'BaseError' }\nexport class BaseError extends Error {\n details: string\n docsPath?: string | undefined\n metaMessages?: string[] | undefined\n shortMessage: string\n version: string\n\n override name = 'BaseError'\n\n constructor(shortMessage: string, args: BaseErrorParameters = {}) {\n const details = (() => {\n if (args.cause instanceof BaseError) return args.cause.details\n if (args.cause?.message) 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\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\n super(message, args.cause ? { cause: args.cause } : undefined)\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\n walk(): Error\n walk(fn: (err: unknown) => boolean): Error | null\n walk(fn?: any): any {\n return walk(this, fn)\n }\n}\n\nfunction walk(\n err: unknown,\n fn?: ((err: unknown) => boolean) | undefined,\n): unknown {\n if (fn?.(err)) return err\n if (\n err &&\n typeof err === 'object' &&\n 'cause' in err &&\n err.cause !== undefined\n )\n return walk(err.cause, fn)\n return fn ? null : err\n}\n","import type { ByteArray, Hex } from '../types/misc.js'\n\nimport { BaseError } from './base.js'\n\nexport type IntegerOutOfRangeErrorType = IntegerOutOfRangeError & {\n name: 'IntegerOutOfRangeError'\n}\nexport class IntegerOutOfRangeError extends BaseError {\n constructor({\n max,\n min,\n signed,\n size,\n value,\n }: {\n max?: string | undefined\n min: string\n signed?: boolean | undefined\n size?: number | undefined\n value: string\n }) {\n super(\n `Number \"${value}\" is not in safe ${\n size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''\n }integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`,\n { name: 'IntegerOutOfRangeError' },\n )\n }\n}\n\nexport type InvalidBytesBooleanErrorType = InvalidBytesBooleanError & {\n name: 'InvalidBytesBooleanError'\n}\nexport class InvalidBytesBooleanError extends BaseError {\n constructor(bytes: ByteArray) {\n super(\n `Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,\n {\n name: 'InvalidBytesBooleanError',\n },\n )\n }\n}\n\nexport type InvalidHexBooleanErrorType = InvalidHexBooleanError & {\n name: 'InvalidHexBooleanError'\n}\nexport class InvalidHexBooleanError extends BaseError {\n constructor(hex: Hex) {\n super(\n `Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`,\n { name: 'InvalidHexBooleanError' },\n )\n }\n}\n\nexport type InvalidHexValueErrorType = InvalidHexValueError & {\n name: 'InvalidHexValueError'\n}\nexport class InvalidHexValueError extends BaseError {\n constructor(value: Hex) {\n super(\n `Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`,\n { name: 'InvalidHexValueError' },\n )\n }\n}\n\nexport type SizeOverflowErrorType = SizeOverflowError & {\n name: 'SizeOverflowError'\n}\nexport class SizeOverflowError extends BaseError {\n constructor({ givenSize, maxSize }: { givenSize: number; maxSize: number }) {\n super(\n `Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`,\n { name: 'SizeOverflowError' },\n )\n }\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Hex } from '../../types/misc.js'\n\nexport type IsHexErrorType = ErrorType\n\nexport function isHex(\n value: unknown,\n { strict = true }: { strict?: boolean | undefined } = {},\n): value is Hex {\n if (!value) return false\n if (typeof value !== 'string') return false\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x')\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nimport { type IsHexErrorType, isHex } from './isHex.js'\n\nexport type SizeErrorType = IsHexErrorType | ErrorType\n\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: Hex | ByteArray) {\n if (isHex(value, { strict: false })) return Math.ceil((value.length - 2) / 2)\n return value.length\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\ntype TrimOptions = {\n dir?: 'left' | 'right' | undefined\n}\nexport type TrimReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type TrimErrorType = ErrorType\n\nexport function trim<value extends ByteArray | Hex>(\n hexOrBytes: value,\n { dir = 'left' }: TrimOptions = {},\n): TrimReturnType<value> {\n let data: any =\n typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes\n\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 break\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength)\n\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right') data = `${data}0`\n return `0x${\n data.length % 2 === 1 ? `0${data}` : data\n }` as TrimReturnType<value>\n }\n return data as TrimReturnType<value>\n}\n","import { BaseError } from './base.js'\n\nexport type SliceOffsetOutOfBoundsErrorType = SliceOffsetOutOfBoundsError & {\n name: 'SliceOffsetOutOfBoundsError'\n}\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n constructor({\n offset,\n position,\n size,\n }: { offset: number; position: 'start' | 'end'; size: number }) {\n super(\n `Slice ${\n position === 'start' ? 'starting' : 'ending'\n } at offset \"${offset}\" is out-of-bounds (size: ${size}).`,\n { name: 'SliceOffsetOutOfBoundsError' },\n )\n }\n}\n\nexport type SizeExceedsPaddingSizeErrorType = SizeExceedsPaddingSizeError & {\n name: 'SizeExceedsPaddingSizeError'\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n constructor({\n size,\n targetSize,\n type,\n }: {\n size: number\n targetSize: number\n type: 'hex' | 'bytes'\n }) {\n super(\n `${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`,\n { name: 'SizeExceedsPaddingSizeError' },\n )\n }\n}\n\nexport type InvalidBytesLengthErrorType = InvalidBytesLengthError & {\n name: 'InvalidBytesLengthError'\n}\nexport class InvalidBytesLengthError extends BaseError {\n constructor({\n size,\n targetSize,\n type,\n }: {\n size: number\n targetSize: number\n type: 'hex' | 'bytes'\n }) {\n super(\n `${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`,\n { name: 'InvalidBytesLengthError' },\n )\n }\n}\n","import {\n SizeExceedsPaddingSizeError,\n type SizeExceedsPaddingSizeErrorType,\n} from '../../errors/data.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\ntype PadOptions = {\n dir?: 'left' | 'right' | undefined\n size?: number | null | undefined\n}\nexport type PadReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type PadErrorType = PadHexErrorType | PadBytesErrorType | ErrorType\n\nexport function pad<value extends ByteArray | Hex>(\n hexOrBytes: value,\n { dir, size = 32 }: PadOptions = {},\n): PadReturnType<value> {\n if (typeof hexOrBytes === 'string')\n return padHex(hexOrBytes, { dir, size }) as PadReturnType<value>\n return padBytes(hexOrBytes, { dir, size }) as PadReturnType<value>\n}\n\nexport type PadHexErrorType = SizeExceedsPaddingSizeErrorType | ErrorType\n\nexport function padHex(hex_: Hex, { dir, size = 32 }: PadOptions = {}) {\n if (size === null) 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\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](\n size * 2,\n '0',\n )}` as Hex\n}\n\nexport type PadBytesErrorType = SizeExceedsPaddingSizeErrorType | ErrorType\n\nexport function padBytes(\n bytes: ByteArray,\n { dir, size = 32 }: PadOptions = {},\n) {\n if (size === null) 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","import {\n IntegerOutOfRangeError,\n type IntegerOutOfRangeErrorType,\n} from '../../errors/encoding.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type PadErrorType, pad } from '../data/pad.js'\n\nimport { type AssertSizeErrorType, assertSize } from './fromHex.js'\n\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) =>\n i.toString(16).padStart(2, '0'),\n)\n\nexport type ToHexParameters = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type ToHexErrorType =\n | BoolToHexErrorType\n | BytesToHexErrorType\n | NumberToHexErrorType\n | StringToHexErrorType\n | ErrorType\n\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(\n value: string | number | bigint | boolean | ByteArray,\n opts: ToHexParameters = {},\n): Hex {\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') return boolToHex(value, opts)\n return bytesToHex(value, opts)\n}\n\nexport type BoolToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type BoolToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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: boolean, opts: BoolToHexOpts = {}): Hex {\n const hex: 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\nexport type BytesToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type BytesToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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: ByteArray, opts: BytesToHexOpts = {}): Hex {\n let string = ''\n for (let i = 0; i < value.length; i++) {\n string += hexes[value[i]]\n }\n const hex = `0x${string}` as const\n\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\nexport type NumberToHexOpts =\n | {\n /** Whether or not the number of a signed representation. */\n signed?: boolean | undefined\n /** The size (in bytes) of the output hex value. */\n size: number\n }\n | {\n signed?: undefined\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n }\n\nexport type NumberToHexErrorType =\n | IntegerOutOfRangeErrorType\n | PadErrorType\n | ErrorType\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(\n value_: number | bigint,\n opts: NumberToHexOpts = {},\n): Hex {\n const { signed, size } = opts\n\n const value = BigInt(value_)\n\n let maxValue: bigint | number | undefined\n if (size) {\n if (signed) maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n\n else maxValue = 2n ** (BigInt(size) * 8n) - 1n\n } else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER)\n }\n\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0\n\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\n const hex = `0x${(\n signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value\n ).toString(16)}` as Hex\n if (size) return pad(hex, { size }) as Hex\n return hex\n}\n\nexport type StringToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type StringToHexErrorType = BytesToHexErrorType | ErrorType\n\nconst encoder = /*#__PURE__*/ new TextEncoder()\n\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_: string, opts: StringToHexOpts = {}): Hex {\n const value = encoder.encode(value_)\n return bytesToHex(value, opts)\n}\n","import { BaseError } from '../../errors/base.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type PadErrorType, pad } from '../data/pad.js'\n\nimport { type AssertSizeErrorType, assertSize } from './fromHex.js'\nimport {\n type NumberToHexErrorType,\n type NumberToHexOpts,\n numberToHex,\n} from './toHex.js'\n\nconst encoder = /*#__PURE__*/ new TextEncoder()\n\nexport type ToBytesParameters = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type ToBytesErrorType =\n | NumberToBytesErrorType\n | BoolToBytesErrorType\n | HexToBytesErrorType\n | StringToBytesErrorType\n | IsHexErrorType\n | ErrorType\n\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(\n value: string | bigint | number | boolean | Hex,\n opts: ToBytesParameters = {},\n): ByteArray {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts)\n if (typeof value === 'boolean') return boolToBytes(value, opts)\n if (isHex(value)) return hexToBytes(value, opts)\n return stringToBytes(value, opts)\n}\n\nexport type BoolToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type BoolToBytesErrorType =\n | AssertSizeErrorType\n | PadErrorType\n | ErrorType\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: boolean, opts: BoolToBytesOpts = {}) {\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\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} as const\n\nfunction charCodeToBase16(char: number) {\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\nexport type HexToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type HexToBytesErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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_: Hex, opts: HexToBytesOpts = {}): ByteArray {\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\n let hexString = hex.slice(2) as string\n if (hexString.length % 2) hexString = `0${hexString}`\n\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(\n `Invalid byte sequence (\"${hexString[j - 2]}${\n hexString[j - 1]\n }\" in \"${hexString}\").`,\n )\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight\n }\n return bytes\n}\n\nexport type NumberToBytesErrorType =\n | NumberToHexErrorType\n | HexToBytesErrorType\n | ErrorType\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(\n value: bigint | number,\n opts?: NumberToHexOpts | undefined,\n) {\n const hex = numberToHex(value, opts)\n return hexToBytes(hex)\n}\n\nexport type StringToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type StringToBytesErrorType =\n | AssertSizeErrorType\n | PadErrorType\n | ErrorType\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(\n value: string,\n opts: StringToBytesOpts = {},\n): ByteArray {\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","import {\n InvalidHexBooleanError,\n type InvalidHexBooleanErrorType,\n SizeOverflowError,\n type SizeOverflowErrorType,\n} from '../../errors/encoding.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type SizeErrorType, size as size_ } from '../data/size.js'\nimport { type TrimErrorType, trim } from '../data/trim.js'\n\nimport { type HexToBytesErrorType, hexToBytes } from './toBytes.js'\n\nexport type AssertSizeErrorType =\n | SizeOverflowErrorType\n | SizeErrorType\n | ErrorType\n\nexport function assertSize(\n hexOrBytes: Hex | ByteArray,\n { size }: { size: number },\n): void {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n })\n}\n\nexport type FromHexParameters<\n to extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean',\n> =\n | to\n | {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n /** Type to convert to. */\n to: to\n }\n\nexport type FromHexReturnType<to> = to extends 'string'\n ? string\n : to extends 'bigint'\n ? bigint\n : to extends 'number'\n ? number\n : to extends 'bytes'\n ? ByteArray\n : to extends 'boolean'\n ? boolean\n : never\n\nexport type FromHexErrorType =\n | HexToNumberErrorType\n | HexToBigIntErrorType\n | HexToBoolErrorType\n | HexToStringErrorType\n | HexToBytesErrorType\n | ErrorType\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<\n to extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean',\n>(hex: Hex, toOrOpts: FromHexParameters<to>): FromHexReturnType<to> {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts\n const to = opts.to\n\n if (to === 'number') return hexToNumber(hex, opts) as FromHexReturnType<to>\n if (to === 'bigint') return hexToBigInt(hex, opts) as FromHexReturnType<to>\n if (to === 'string') return hexToString(hex, opts) as FromHexReturnType<to>\n if (to === 'boolean') return hexToBool(hex, opts) as FromHexReturnType<to>\n return hexToBytes(hex, opts) as FromHexReturnType<to>\n}\n\nexport type HexToBigIntOpts = {\n /** Whether or not the number of a signed representation. */\n signed?: boolean | undefined\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToBigIntErrorType = AssertSizeErrorType | ErrorType\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: Hex, opts: HexToBigIntOpts = {}): bigint {\n const { signed } = opts\n\n if (opts.size) assertSize(hex, { size: opts.size })\n\n const value = BigInt(hex)\n if (!signed) return value\n\n const size = (hex.length - 2) / 2\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n\n if (value <= max) return value\n\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n\n}\n\nexport type HexToBoolOpts = {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToBoolErrorType =\n | AssertSizeErrorType\n | InvalidHexBooleanErrorType\n | TrimErrorType\n | ErrorType\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_: Hex, opts: HexToBoolOpts = {}): boolean {\n let hex = hex_\n if (opts.size) {\n assertSize(hex, { size: opts.size })\n hex = trim(hex)\n }\n if (trim(hex) === '0x00') return false\n if (trim(hex) === '0x01') return true\n throw new InvalidHexBooleanError(hex)\n}\n\nexport type HexToNumberOpts = HexToBigIntOpts\n\nexport type HexToNumberErrorType = HexToBigIntErrorType | ErrorType\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: Hex, opts: HexToNumberOpts = {}): number {\n return Number(hexToBigInt(hex, opts))\n}\n\nexport type HexToStringOpts = {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToStringErrorType =\n | AssertSizeErrorType\n | HexToBytesErrorType\n | TrimErrorType\n | ErrorType\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: Hex, opts: HexToStringOpts = {}): string {\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","import type { ErrorType } from '../../errors/utils.js'\nimport type { Prettify } from '../../types/utils.js'\n\nexport type DefineFormatterErrorType = ErrorType\n\nexport function defineFormatter<type extends string, parameters, returnType>(\n type: type,\n format: (args: parameters, action?: string | undefined) => returnType,\n) {\n return <\n parametersOverride,\n returnTypeOverride,\n exclude extends (keyof parameters | keyof parametersOverride)[] = [],\n >({\n exclude,\n format: overrides,\n }: {\n exclude?: exclude | undefined\n format: (\n args: parametersOverride,\n action?: string | undefined,\n ) => returnTypeOverride\n }) => {\n return {\n exclude,\n format: (args: parametersOverride, action?: string | undefined) => {\n const formatted = format(args as any, action)\n if (exclude) {\n for (const key of exclude) {\n delete (formatted as any)[key]\n }\n }\n return {\n ...formatted,\n ...overrides(args, action),\n } as Prettify<returnTypeOverride> & {\n [_key in exclude[number]]: never\n }\n },\n type,\n }\n }\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Account } from '../../types/account.js'\nimport type { AuthorizationList } from '../../types/authorization.js'\nimport type {\n Chain,\n ExtractChainFormatterParameters,\n} from '../../types/chain.js'\nimport type { ByteArray } from '../../types/misc.js'\nimport type {\n RpcAuthorizationList,\n RpcTransactionRequest,\n} from '../../types/rpc.js'\nimport type { TransactionRequest } from '../../types/transaction.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { bytesToHex, numberToHex } from '../encoding/toHex.js'\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\n\nexport type FormattedTransactionRequest<\n chain extends Chain | undefined = Chain | undefined,\n> = ExtractChainFormatterParameters<\n chain,\n 'transactionRequest',\n TransactionRequest\n>\n\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n} as const\n\nexport type FormatTransactionRequestErrorType = ErrorType\n\nexport function formatTransactionRequest(\n request: ExactPartial<TransactionRequest> & { account?: Account | undefined },\n _?: string | undefined,\n) {\n const rpcRequest = {} as RpcTransactionRequest\n\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(\n request.authorizationList,\n )\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = (request.blobs as ByteArray[]).map((x) =>\n bytesToHex(x),\n )\n else rpcRequest.blobs = request.blobs\n }\n if (typeof request.data !== 'undefined') rpcRequest.data = request.data\n if (request.account) rpcRequest.from = request.account.address\n if (typeof request.from !== 'undefined') rpcRequest.from = request.from\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas)\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice)\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas)\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas)\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas)\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce)\n if (typeof request.to !== 'undefined') rpcRequest.to = request.to\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type]\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value)\n\n return rpcRequest\n}\n\nexport type DefineTransactionRequestErrorType =\n | DefineFormatterErrorType\n | ErrorType\n\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter(\n 'transactionRequest',\n formatTransactionRequest,\n)\n\n//////////////////////////////////////////////////////////////////////////////\n\nfunction formatAuthorizationList(\n authorizationList: AuthorizationList<number, boolean>,\n): RpcAuthorizationList {\n return authorizationList.map(\n (authorization) =>\n ({\n address: authorization.address,\n r: authorization.r\n ? numberToHex(BigInt(authorization.r))\n : authorization.r,\n s: authorization.s\n ? numberToHex(BigInt(authorization.s))\n : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }) as any,\n ) as RpcAuthorizationList\n}\n","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\n\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))\n\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","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nexport type ConcatReturnType<value extends Hex | ByteArray> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type ConcatErrorType =\n | ConcatBytesErrorType\n | ConcatHexErrorType\n | ErrorType\n\nexport function concat<value extends Hex | ByteArray>(\n values: readonly value[],\n): ConcatReturnType<value> {\n if (typeof values[0] === 'string')\n return concatHex(values as readonly Hex[]) as ConcatReturnType<value>\n return concatBytes(values as readonly ByteArray[]) as ConcatReturnType<value>\n}\n\nexport type ConcatBytesErrorType = ErrorType\n\nexport function concatBytes(values: readonly ByteArray[]): ByteArray {\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}\n\nexport type ConcatHexErrorType = ErrorType\n\nexport function concatHex(values: readonly Hex[]): Hex {\n return `0x${(values as Hex[]).reduce(\n (acc, x) => acc + x.replace('0x', ''),\n '',\n )}`\n}\n","import { BaseError } from './base.js'\n\nexport type NegativeOffsetErrorType = NegativeOffsetError & {\n name: 'NegativeOffsetError'\n}\nexport class NegativeOffsetError extends BaseError {\n constructor({ offset }: { offset: number }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: 'NegativeOffsetError',\n })\n }\n}\n\nexport type PositionOutOfBoundsErrorType = PositionOutOfBoundsError & {\n name: 'PositionOutOfBoundsError'\n}\nexport class PositionOutOfBoundsError extends BaseError {\n constructor({ length, position }: { length: number; position: number }) {\n super(\n `Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`,\n { name: 'PositionOutOfBoundsError' },\n )\n }\n}\n\nexport type RecursiveReadLimitExceededErrorType =\n RecursiveReadLimitExceededError & {\n name: 'RecursiveReadLimitExceededError'\n }\nexport class RecursiveReadLimitExceededError extends BaseError {\n constructor({ count, limit }: { count: number; limit: number }) {\n super(\n `Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`,\n { name: 'RecursiveReadLimitExceededError' },\n )\n }\n}\n","import {\n NegativeOffsetError,\n type NegativeOffsetErrorType,\n PositionOutOfBoundsError,\n type PositionOutOfBoundsErrorType,\n RecursiveReadLimitExceededError,\n type RecursiveReadLimitExceededErrorType,\n} from '../errors/cursor.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ByteArray } from '../types/misc.js'\n\nexport type Cursor = {\n bytes: ByteArray\n dataView: DataView\n position: number\n positionReadCount: Map<number, number>\n recursiveReadCount: number\n recursiveReadLimit: number\n remaining: number\n assertReadLimit(position?: number): void\n assertPosition(position: number): void\n decrementPosition(offset: number): void\n getReadCount(position?: number): number\n incrementPosition(offset: number): void\n inspectByte(position?: number): ByteArray[number]\n inspectBytes(length: number, position?: number): ByteArray\n inspectUint8(position?: number): number\n inspectUint16(position?: number): number\n inspectUint24(position?: number): number\n inspectUint32(position?: number): number\n pushByte(byte: ByteArray[number]): void\n pushBytes(bytes: ByteArray): void\n pushUint8(value: number): void\n pushUint16(value: number): void\n pushUint24(value: number): void\n pushUint32(value: number): void\n readByte(): ByteArray[number]\n readBytes(length: number, size?: number): ByteArray\n readUint8(): number\n readUint16(): number\n readUint24(): number\n readUint32(): number\n setPosition(position: number): () => void\n _touch(): void\n}\n\ntype CursorErrorType =\n | CursorAssertPositionErrorType\n | CursorDecrementPositionErrorType\n | CursorIncrementPositionErrorType\n | ErrorType\n\ntype CursorAssertPositionErrorType = PositionOutOfBoundsErrorType | ErrorType\n\ntype CursorDecrementPositionErrorType = NegativeOffsetErrorType | ErrorType\n\ntype CursorIncrementPositionErrorType = NegativeOffsetErrorType | ErrorType\n\ntype StaticCursorErrorType =\n | NegativeOffsetErrorType\n | RecursiveReadLimitExceededErrorType\n\nconst staticCursor: Cursor = {\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) 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) 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 (\n (this.dataView.getUint16(position) << 8) +\n this.dataView.getUint8(position + 2)\n )\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: ByteArray[number]) {\n this.assertPosition(this.position)\n this.bytes[this.position] = byte\n this.position++\n },\n pushBytes(bytes: ByteArray) {\n this.assertPosition(this.position + bytes.length - 1)\n this.bytes.set(bytes, this.position)\n this.position += bytes.length\n },\n pushUint8(value: number) {\n this.assertPosition(this.position)\n this.bytes[this.position] = value\n this.position++\n },\n pushUint16(value: number) {\n this.assertPosition(this.position + 1)\n this.dataView.setUint16(this.position, value)\n this.position += 2\n },\n pushUint24(value: number) {\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: number) {\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) return\n const count = this.getReadCount()\n this.positionReadCount.set(this.position, count + 1)\n if (count > 0) this.recursiveReadCount++\n },\n}\n\ntype CursorConfig = { recursiveReadLimit?: number | undefined }\n\nexport type CreateCursorErrorType =\n | CursorErrorType\n | StaticCursorErrorType\n | ErrorType\n\nexport function createCursor(\n bytes: ByteArray,\n { recursiveReadLimit = 8_192 }: CursorConfig = {},\n): Cursor {\n const cursor: Cursor = Object.create(staticCursor)\n cursor.bytes = bytes\n cursor.dataView = new DataView(\n bytes.buffer,\n bytes.byteOffset,\n bytes.byteLength,\n )\n cursor.positionReadCount = new Map()\n cursor.recursiveReadLimit = recursiveReadLimit\n return cursor\n}\n","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","import type { ErrorType } from '../../errors/utils.js'\n\nexport type FormatUnitsErrorType = ErrorType\n\n/**\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: bigint, decimals: number) {\n let display = value.toString()\n\n const negative = display.startsWith('-')\n if (negative) display = display.slice(1)\n\n display = display.padStart(decimals, '0')\n\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'}${\n fraction ? `.${fraction}` : ''\n }`\n}\n","import { etherUnits } from '../../constants/unit.js'\n\nimport { type FormatUnitsErrorType, formatUnits } from './formatUnits.js'\n\nexport type FormatEtherErrorType = FormatUnitsErrorType\n\n/**\n * Converts numerical wei to a string representation of ether.\n *\n * - Docs: https://viem.sh/docs/utilities/formatEther\n *\n * @example\n * import { formatEther } from 'viem'\n *\n * formatEther(1000000000000000000n)\n * // '1'\n */\nexport function formatEther(wei: bigint, unit: 'wei' | 'gwei' = 'wei') {\n return formatUnits(wei, etherUnits[unit])\n}\n","import { gweiUnits } from '../../constants/unit.js'\n\nimport { type FormatUnitsErrorType, formatUnits } from './formatUnits.js'\n\nexport type FormatGweiErrorType = FormatUnitsErrorType\n\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: bigint, unit: 'wei' = 'wei') {\n return formatUnits(wei, gweiUnits[unit])\n}\n","import type { Account } from '../accounts/types.js'\nimport type { SendTransactionParameters } from '../actions/wallet/sendTransaction.js'\nimport type { BlockTag } from '../types/block.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Hash, Hex } from '../types/misc.js'\nimport type {\n TransactionReceipt,\n TransactionType,\n} from '../types/transaction.js'\nimport { formatEther } from '../utils/unit/formatEther.js'\nimport { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { BaseError } from './base.js'\n\nexport function prettyPrint(\n args: Record<string, bigint | number | string | undefined | false | unknown>,\n) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false) return null\n return [key, value]\n })\n .filter(Boolean) as [string, string][]\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}\n\nexport type FeeConflictErrorType = FeeConflictError & {\n name: 'FeeConflictError'\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super(\n [\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'),\n { name: 'FeeConflictError' },\n )\n }\n}\n\nexport type InvalidLegacyVErrorType = InvalidLegacyVError & {\n name: 'InvalidLegacyVError'\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }: { v: bigint }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n name: 'InvalidLegacyVError',\n })\n }\n}\n\nexport type InvalidSerializableTransactionErrorType =\n InvalidSerializableTransactionError & {\n name: 'InvalidSerializableTransactionError'\n }\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }: { transaction: Record<string, unknown> }) {\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}\n\nexport type InvalidSerializedTransactionTypeErrorType =\n InvalidSerializedTransactionTypeError & {\n name: 'InvalidSerializedTransactionTypeError'\n }\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n serializedType: Hex\n\n constructor({ serializedType }: { serializedType: Hex }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n name: 'InvalidSerializedTransactionType',\n })\n\n this.serializedType = serializedType\n }\n}\n\nexport type InvalidSerializedTransactionErrorType =\n InvalidSerializedTransactionError & {\n name: 'InvalidSerializedTransactionError'\n }\nexport class InvalidSerializedTransactionError extends BaseError {\n serializedTransaction: Hex\n type: TransactionType\n\n constructor({\n attributes,\n serializedTransaction,\n type,\n }: {\n attributes: Record<string, unknown>\n serializedTransaction: Hex\n type: TransactionType\n }) {\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\n this.serializedTransaction = serializedTransaction\n this.type = type\n }\n}\n\nexport type InvalidStorageKeySizeErrorType = InvalidStorageKeySizeError & {\n name: 'InvalidStorageKeySizeError'\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }: { storageKey: Hex }) {\n super(\n `Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor(\n (storageKey.length - 2) / 2,\n )} bytes.`,\n { name: 'InvalidStorageKeySizeError' },\n )\n }\n}\n\nexport type TransactionExecutionErrorType = TransactionExecutionError & {\n name: 'TransactionExecutionError'\n}\nexport class TransactionExecutionError extends BaseError {\n override cause: BaseError\n\n constructor(\n cause: BaseError,\n {\n account,\n docsPath,\n chain,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n }: Omit<SendTransactionParameters, 'account' | 'chain'> & {\n account: Account | null\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n ) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value:\n typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice:\n typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas:\n typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas:\n typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n })\n\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'TransactionExecutionError',\n })\n this.cause = cause\n }\n}\n\nexport type TransactionNotFoundErrorType = TransactionNotFoundError & {\n name: 'TransactionNotFoundError'\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({\n blockHash,\n blockNumber,\n blockTag,\n hash,\n index,\n }: {\n blockHash?: Hash | undefined\n blockNumber?: bigint | undefined\n blockTag?: BlockTag | undefined\n hash?: Hash | undefined\n index?: number | undefined\n }) {\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) identifier = `Transaction with hash \"${hash}\"`\n super(`${identifier} could not be found.`, {\n name: 'TransactionNotFoundError',\n })\n }\n}\n\nexport type TransactionReceiptNotFoundErrorType =\n TransactionReceiptNotFoundError & {\n name: 'TransactionReceiptNotFoundError'\n }\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }: { hash: Hash }) {\n super(\n `Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`,\n {\n name: 'TransactionReceiptNotFoundError',\n },\n )\n }\n}\n\nexport type TransactionReceiptRevertedErrorType =\n TransactionReceiptRevertedError & {\n name: 'TransactionReceiptRevertedError'\n }\nexport class TransactionReceiptRevertedError extends BaseError {\n receipt: TransactionReceipt\n\n constructor({ receipt }: { receipt: TransactionReceipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n ' ',\n 'You can attempt to extract the revert reason by:',\n '- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract',\n '- using the `call` Action with raw `data`',\n ],\n name: 'TransactionReceiptRevertedError',\n })\n\n this.receipt = receipt\n }\n}\n\nexport type WaitForTransactionReceiptTimeoutErrorType =\n WaitForTransactionReceiptTimeoutError & {\n name: 'WaitForTransactionReceiptTimeoutError'\n }\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }: { hash: Hash }) {\n super(\n `Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`,\n { name: 'WaitForTransactionReceiptTimeoutError' },\n )\n }\n}\n","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\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';\n\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n/** Asserts something is positive integer. */\nexport function anumber(n: number): void {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);\n}\n\n/** Asserts something is Uint8Array. */\nexport function abytes(b: Uint8Array | undefined, ...lengths: number[]): void {\n if (!isBytes(b)) 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\n/** Asserts something is hash */\nexport function ahash(h: IHash): void {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.createHasher');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n\n/** Asserts a hash instance has not been destroyed / finished */\nexport function aexists(instance: any, checkFinished = true): void {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\n\n/** Asserts output is properly-sized byte array */\nexport function aoutput(out: any, instance: any): void {\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}\n\n/** Generic type encompassing 8/16/32-byte arrays - but not 64-byte. */\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr: TypedArray): Uint8Array {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr: TypedArray): Uint32Array {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays: TypedArray[]): void {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n}\n\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr: TypedArray): DataView {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word: number, shift: number): number {\n return (word << (32 - shift)) | (word >>> shift);\n}\n\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word: number, shift: number): number {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE: boolean = /* @__PURE__ */ (() =>\n new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n\n/** The byte swap operation for uint32 */\nexport function byteSwap(word: number): number {\n return (\n ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff)\n );\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const swap8IfBE: (n: number) => number = isLE\n ? (n: number) => n\n : (n: number) => byteSwap(n);\n\n/** @deprecated */\nexport const byteSwapIfBE: typeof swap8IfBE = swap8IfBE;\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr: Uint32Array): Uint32Array {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n}\n\nexport const swap32IfBE: (u: Uint32Array) => Uint32Array = isLE\n ? (u: Uint32Array) => u\n : byteSwap32;\n\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin: boolean = /* @__PURE__ */ (() =>\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n\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: Uint8Array): string {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin) 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\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 } as const;\nfunction asciiToBase16(ch: number): number | undefined {\n if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\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: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin) return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) 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/**\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 (): Promise<void> => {};\n\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(\n iters: number,\n tick: number,\n cb: (i: number) => void\n): Promise<void> {\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) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols, but ts doesn't see them: https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\ndeclare const TextDecoder: any;\n\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes: Uint8Array): string {\n return new TextDecoder().decode(bytes);\n}\n\n/** Accepted input of hash functions. Strings are converted to byte arrays. */\nexport type Input = string | Uint8Array;\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: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** KDFs can accept string or Uint8Array for user convenience. */\nexport type KDFInput = string | Uint8Array;\n/**\n * Helper for KDFs: consumes uint8array or string.\n * When string is passed, does utf8 decoding, using TextDecoder.\n */\nexport function kdfInputToBytes(data: KDFInput): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** Copies several Uint8Arrays into one. */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\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\ntype EmptyObj = {};\nexport function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\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 as T1 & T2;\n}\n\n/** Hash interface. */\nexport type IHash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\n\n/** For runtime check if class implements interface */\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n /**\n * Resets internal state. Makes Hash instance unusable.\n * Reset is impossible for keyed hashes if key is consumed into state. If digest is not consumed\n * by user, they will need to manually call `destroy()` when zeroing is necessary.\n */\n abstract destroy(): void;\n /**\n * Clones hash instance. Unsafe: doesn't check whether `to` is valid. Can be used as `clone()`\n * when no options are passed.\n * Reasons to use `_cloneInto` instead of clone: 1) performance 2) reuse instance => all internal\n * buffers are overwritten => causes buffer overwrite which is used for digest in some cases.\n * There are no guarantees for clean-up because it's impossible in JS.\n */\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n abstract clone(): T;\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot\n * destroy state, next call can require more bytes.\n */\nexport type HashXOF<T extends Hash<T>> = Hash<T> & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\n/** Hash function */\nexport type CHash = ReturnType<typeof createHasher>;\n/** Hash function with output */\nexport type CHashO = ReturnType<typeof createOptHasher>;\n/** XOF with output */\nexport type CHashXO = ReturnType<typeof createXOFer>;\n\n/** Wraps hash function, creating an interface on top of it */\nexport function createHasher<T extends Hash<T>>(\n hashCons: () => Hash<T>\n): {\n (msg: Input): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(): Hash<T>;\n} {\n const hashC = (msg: Input): Uint8Array => 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}\n\nexport function createOptHasher<H extends Hash<H>, T extends Object>(\n hashCons: (opts?: T) => Hash<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): Hash<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\n\nexport function createXOFer<H extends HashXOF<H>, T extends Object>(\n hashCons: (opts?: T) => HashXOF<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): HashXOF<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\nexport const wrapConstructor: typeof createHasher = createHasher;\nexport const wrapConstructorWithOpts: typeof createOptHasher = createOptHasher;\nexport const wrapXOFConstructorWithOpts: typeof createXOFer = createXOFer;\n\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32): Uint8Array {\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","/**\n * Internal Merkle-Damgard hash utils.\n * @module\n */\nimport { type Input, Hash, abytes, aexists, aoutput, clean, createView, toBytes } from './utils.ts';\n\n/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */\nexport function setBigUint64(\n view: DataView,\n byteOffset: number,\n value: bigint,\n isLE: boolean\n): void {\n if (typeof view.setBigUint64 === 'function') 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\n/** Choice: a ? b : c */\nexport function Chi(a: number, b: number, c: number): number {\n return (a & b) ^ (~a & c);\n}\n\n/** Majority function, true if any two inputs is true. */\nexport function Maj(a: number, b: number, c: number): number {\n return (a & b) ^ (a & c) ^ (b & c);\n}\n\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport abstract class HashMD<T extends HashMD<T>> extends Hash<T> {\n protected abstract process(buf: DataView, offset: number): void;\n protected abstract get(): number[];\n protected abstract set(...args: number[]): void;\n abstract destroy(): void;\n protected abstract roundClean(): void;\n\n readonly blockLen: number;\n readonly outputLen: number;\n readonly padOffset: number;\n readonly isLE: boolean;\n\n // For partial updates less than block size\n protected buffer: Uint8Array;\n protected view: DataView;\n protected finished = false;\n protected length = 0;\n protected pos = 0;\n protected destroyed = false;\n\n constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean) {\n super();\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: Input): this {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\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) 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: Uint8Array): void {\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 clean(this.buffer.subarray(pos));\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++) 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) 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) throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);\n }\n digest(): Uint8Array {\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?: T): T {\n to ||= new (this.constructor as any)() as T;\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen) to.buffer.set(buffer);\n return to;\n }\n clone(): T {\n return this._cloneInto();\n }\n}\n\n/**\n * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.\n * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.\n */\n\n/** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */\nexport const SHA256_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,\n]);\n\n/** Initial SHA224 state. Bits 32..64 of frac part of sqrt of primes 23..53 */\nexport const SHA224_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4,\n]);\n\n/** Initial SHA384 state. Bits 0..64 of frac part of sqrt of primes 23..53 */\nexport const SHA384_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0xcbbb9d5d, 0xc1059ed8, 0x629a292a, 0x367cd507, 0x9159015a, 0x3070dd17, 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31, 0x8eb44a87, 0x68581511, 0xdb0c2e0d, 0x64f98fa7, 0x47b5481d, 0xbefa4fa4,\n]);\n\n/** Initial SHA512 state. Bits 0..64 of frac part of sqrt of primes 2..19 */\nexport const SHA512_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xf3bcc908, 0xbb67ae85, 0x84caa73b, 0x3c6ef372, 0xfe94f82b, 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1, 0x9b05688c, 0x2b3e6c1f, 0x1f83d9ab, 0xfb41bd6b, 0x5be0cd19, 0x137e2179,\n]);\n","/**\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);\n\nfunction fromBig(\n n: bigint,\n le = false\n): {\n h: number;\n l: number;\n} {\n if (le) 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}\n\nfunction split(lst: bigint[], le = false): Uint32Array[] {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n\nconst toBig = (h: number, l: number): bigint => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h: number, _l: number, s: number): number => h >>> s;\nconst shrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h: number, l: number, s: number): number => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h: number, l: number, s: number): number => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h: number, l: number, s: number): number => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h: number, l: number): number => l;\nconst rotr32L = (h: number, _l: number): number => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h: number, l: number, s: number): number => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h: number, l: number, s: number): number => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h: number, l: number, s: number): number => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h: number, l: number, s: number): number => (h << (s - 32)) | (l >>> (64 - s));\n\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(\n Ah: number,\n Al: number,\n Bh: number,\n Bl: number\n): {\n h: number;\n l: number;\n} {\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: number, Bl: number, Cl: number): number => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low: number, Ah: number, Bh: number, Ch: number): number =>\n (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al: number, Bl: number, Cl: number, Dl: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number): number =>\n (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al: number, Bl: number, Cl: number, Dl: number, El: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number): number =>\n (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n\n// prettier-ignore\nexport {\n add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig\n};\n// prettier-ignore\nconst u64: { fromBig: typeof fromBig; split: typeof split; toBig: (h: number, l: number) => bigint; shrSH: (h: number, _l: number, s: number) => number; shrSL: (h: number, l: number, s: number) => number; rotrSH: (h: number, l: number, s: number) => number; rotrSL: (h: number, l: number, s: number) => number; rotrBH: (h: number, l: number, s: number) => number; rotrBL: (h: number, l: number, s: number) => number; rotr32H: (_h: number, l: number) => number; rotr32L: (h: number, _l: number) => number; rotlSH: (h: number, l: number, s: number) => number; rotlSL: (h: number, l: number, s: number) => number; rotlBH: (h: number, l: number, s: number) => number; rotlBL: (h: number, l: number, s: number) => number; add: typeof add; add3L: (Al: number, Bl: number, Cl: number) => number; add3H: (low: number, Ah: number, Bh: number, Ch: number) => number; add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number; add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number; add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number; add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number; } = {\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","/**\n * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.\n * SHA256 is the fastest hash implementable in JS, even faster than Blake3.\n * Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and\n * [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).\n * @module\n */\nimport { Chi, HashMD, Maj, SHA224_IV, SHA256_IV, SHA384_IV, SHA512_IV } from './_md.ts';\nimport * as u64 from './_u64.ts';\nimport { type CHash, clean, createHasher, rotr } from './utils.ts';\n\n/**\n * Round constants:\n * First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)\n */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ Uint32Array.from([\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\n/** Reusable temporary buffer. \"W\" comes straight from spec. */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nexport class SHA256 extends HashMD<SHA256> {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n protected A: number = SHA256_IV[0] | 0;\n protected B: number = SHA256_IV[1] | 0;\n protected C: number = SHA256_IV[2] | 0;\n protected D: number = SHA256_IV[3] | 0;\n protected E: number = SHA256_IV[4] | 0;\n protected F: number = SHA256_IV[5] | 0;\n protected G: number = SHA256_IV[6] | 0;\n protected H: number = SHA256_IV[7] | 0;\n\n constructor(outputLen: number = 32) {\n super(64, outputLen, 8, false);\n }\n protected get(): [number, number, number, number, number, number, number, number] {\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 protected set(\n A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number\n ): void {\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 protected process(view: DataView, offset: number): void {\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) 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 protected roundClean(): void {\n clean(SHA256_W);\n }\n destroy(): void {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n}\n\nexport class SHA224 extends SHA256 {\n protected A: number = SHA224_IV[0] | 0;\n protected B: number = SHA224_IV[1] | 0;\n protected C: number = SHA224_IV[2] | 0;\n protected D: number = SHA224_IV[3] | 0;\n protected E: number = SHA224_IV[4] | 0;\n protected F: number = SHA224_IV[5] | 0;\n protected G: number = SHA224_IV[6] | 0;\n protected H: number = SHA224_IV[7] | 0;\n constructor() {\n super(28);\n }\n}\n\n// SHA2-512 is slower than sha256 in js because u64 operations are slow.\n\n// Round contants\n// First 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409\n// prettier-ignore\nconst K512 = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\nconst SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\nconst SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n\n// Reusable temporary buffers\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n\nexport class SHA512 extends HashMD<SHA512> {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n // h -- high 32 bits, l -- low 32 bits\n protected Ah: number = SHA512_IV[0] | 0;\n protected Al: number = SHA512_IV[1] | 0;\n protected Bh: number = SHA512_IV[2] | 0;\n protected Bl: number = SHA512_IV[3] | 0;\n protected Ch: number = SHA512_IV[4] | 0;\n protected Cl: number = SHA512_IV[5] | 0;\n protected Dh: number = SHA512_IV[6] | 0;\n protected Dl: number = SHA512_IV[7] | 0;\n protected Eh: number = SHA512_IV[8] | 0;\n protected El: number = SHA512_IV[9] | 0;\n protected Fh: number = SHA512_IV[10] | 0;\n protected Fl: number = SHA512_IV[11] | 0;\n protected Gh: number = SHA512_IV[12] | 0;\n protected Gl: number = SHA512_IV[13] | 0;\n protected Hh: number = SHA512_IV[14] | 0;\n protected Hl: number = SHA512_IV[15] | 0;\n\n constructor(outputLen: number = 64) {\n super(128, outputLen, 16, false);\n }\n // prettier-ignore\n protected get(): [\n number, number, number, number, number, number, number, number,\n number, number, number, number, number, number, number, number\n ] {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n protected set(\n Ah: number, Al: number, Bh: number, Bl: number, Ch: number, Cl: number, Dh: number, Dl: number,\n Eh: number, El: number, Fh: number, Fl: number, Gh: number, Gl: number, Hh: number, Hl: number\n ): void {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n protected process(view: DataView, offset: number): void {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n protected roundClean(): void {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy(): void {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\n\nexport class SHA384 extends SHA512 {\n protected Ah: number = SHA384_IV[0] | 0;\n protected Al: number = SHA384_IV[1] | 0;\n protected Bh: number = SHA384_IV[2] | 0;\n protected Bl: number = SHA384_IV[3] | 0;\n protected Ch: number = SHA384_IV[4] | 0;\n protected Cl: number = SHA384_IV[5] | 0;\n protected Dh: number = SHA384_IV[6] | 0;\n protected Dl: number = SHA384_IV[7] | 0;\n protected Eh: number = SHA384_IV[8] | 0;\n protected El: number = SHA384_IV[9] | 0;\n protected Fh: number = SHA384_IV[10] | 0;\n protected Fl: number = SHA384_IV[11] | 0;\n protected Gh: number = SHA384_IV[12] | 0;\n protected Gl: number = SHA384_IV[13] | 0;\n protected Hh: number = SHA384_IV[14] | 0;\n protected Hl: number = SHA384_IV[15] | 0;\n\n constructor() {\n super(48);\n }\n}\n\n/**\n * Truncated SHA512/256 and SHA512/224.\n * SHA512_IV is XORed with 0xa5a5a5a5a5a5a5a5, then used as \"intermediary\" IV of SHA512/t.\n * Then t hashes string to produce result IV.\n * See `test/misc/sha2-gen-iv.js`.\n */\n\n/** SHA512/224 IV */\nconst T224_IV = /* @__PURE__ */ Uint32Array.from([\n 0x8c3d37c8, 0x19544da2, 0x73e19966, 0x89dcd4d6, 0x1dfab7ae, 0x32ff9c82, 0x679dd514, 0x582f9fcf,\n 0x0f6d2b69, 0x7bd44da8, 0x77e36f73, 0x04c48942, 0x3f9d85a8, 0x6a1d36c8, 0x1112e6ad, 0x91d692a1,\n]);\n\n/** SHA512/256 IV */\nconst T256_IV = /* @__PURE__ */ Uint32Array.from([\n 0x22312194, 0xfc2bf72c, 0x9f555fa3, 0xc84c64c2, 0x2393b86b, 0x6f53b151, 0x96387719, 0x5940eabd,\n 0x96283ee2, 0xa88effe3, 0xbe5e1e25, 0x53863992, 0x2b0199fc, 0x2c85b8aa, 0x0eb72ddc, 0x81c52ca2,\n]);\n\nexport class SHA512_224 extends SHA512 {\n protected Ah: number = T224_IV[0] | 0;\n protected Al: number = T224_IV[1] | 0;\n protected Bh: number = T224_IV[2] | 0;\n protected Bl: number = T224_IV[3] | 0;\n protected Ch: number = T224_IV[4] | 0;\n protected Cl: number = T224_IV[5] | 0;\n protected Dh: number = T224_IV[6] | 0;\n protected Dl: number = T224_IV[7] | 0;\n protected Eh: number = T224_IV[8] | 0;\n protected El: number = T224_IV[9] | 0;\n protected Fh: number = T224_IV[10] | 0;\n protected Fl: number = T224_IV[11] | 0;\n protected Gh: number = T224_IV[12] | 0;\n protected Gl: number = T224_IV[13] | 0;\n protected Hh: number = T224_IV[14] | 0;\n protected Hl: number = T224_IV[15] | 0;\n\n constructor() {\n super(28);\n }\n}\n\nexport class SHA512_256 extends SHA512 {\n protected Ah: number = T256_IV[0] | 0;\n protected Al: number = T256_IV[1] | 0;\n protected Bh: number = T256_IV[2] | 0;\n protected Bl: number = T256_IV[3] | 0;\n protected Ch: number = T256_IV[4] | 0;\n protected Cl: number = T256_IV[5] | 0;\n protected Dh: number = T256_IV[6] | 0;\n protected Dl: number = T256_IV[7] | 0;\n protected Eh: number = T256_IV[8] | 0;\n protected El: number = T256_IV[9] | 0;\n protected Fh: number = T256_IV[10] | 0;\n protected Fl: number = T256_IV[11] | 0;\n protected Gh: number = T256_IV[12] | 0;\n protected Gl: number = T256_IV[13] | 0;\n protected Hh: number = T256_IV[14] | 0;\n protected Hl: number = T256_IV[15] | 0;\n\n constructor() {\n super(32);\n }\n}\n\n/**\n * SHA2-256 hash function from RFC 4634.\n *\n * It is the fastest JS hash, even faster than Blake3.\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 */\nexport const sha256: CHash = /* @__PURE__ */ createHasher(() => new SHA256());\n/** SHA2-224 hash function from RFC 4634 */\nexport const sha224: CHash = /* @__PURE__ */ createHasher(() => new SHA224());\n\n/** SHA2-512 hash function from RFC 4634. */\nexport const sha512: CHash = /* @__PURE__ */ createHasher(() => new SHA512());\n/** SHA2-384 hash function from RFC 4634. */\nexport const sha384: CHash = /* @__PURE__ */ createHasher(() => new SHA384());\n\n/**\n * SHA2-512/256 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).\n */\nexport const sha512_256: CHash = /* @__PURE__ */ createHasher(() => new SHA512_256());\n/**\n * SHA2-512/224 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).\n */\nexport const sha512_224: CHash = /* @__PURE__ */ createHasher(() => new SHA512_224());\n","import { BaseError } from './base.js'\n\nexport type InvalidAddressErrorType = InvalidAddressError & {\n name: 'InvalidAddressError'\n}\nexport class InvalidAddressError extends BaseError {\n constructor({ address }: { address: string }) {\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","import type { Chain } from '../types/chain.js'\n\nimport { BaseError } from './base.js'\n\nexport type ChainDoesNotSupportContractErrorType =\n ChainDoesNotSupportContract & {\n name: 'ChainDoesNotSupportContract'\n }\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({\n blockNumber,\n chain,\n contract,\n }: {\n blockNumber?: bigint | undefined\n chain: Chain\n contract: { name: string; blockCreated?: number | undefined }\n }) {\n super(\n `Chain \"${chain.name}\" does not support contract \"${contract.name}\".`,\n {\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 }\n}\n\nexport type ChainMismatchErrorType = ChainMismatchError & {\n name: 'ChainMismatchError'\n}\nexport class ChainMismatchError extends BaseError {\n constructor({\n chain,\n currentChainId,\n }: {\n chain: Chain\n currentChainId: number\n }) {\n super(\n `The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`,\n {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n name: 'ChainMismatchError',\n },\n )\n }\n}\n\nexport type ChainNotFoundErrorType = ChainNotFoundError & {\n name: 'ChainNotFoundError'\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super(\n [\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 {\n name: 'ChainNotFoundError',\n },\n )\n }\n}\n\nexport type ClientChainNotConfiguredErrorType =\n ClientChainNotConfiguredError & {\n name: 'ClientChainNotConfiguredError'\n }\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.', {\n name: 'ClientChainNotConfiguredError',\n })\n }\n}\n\nexport type InvalidChainIdErrorType = InvalidChainIdError & {\n name: 'InvalidChainIdError'\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }: { chainId?: number | undefined }) {\n super(\n typeof chainId === 'number'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.',\n { name: 'InvalidChainIdError' },\n )\n }\n}\n","import { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { BaseError } from './base.js'\n\n/**\n * geth: https://github.com/ethereum/go-ethereum/blob/master/core/error.go\n * https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction.go#L34-L41\n *\n * erigon: https://github.com/ledgerwatch/erigon/blob/master/core/error.go\n * https://github.com/ledgerwatch/erigon/blob/master/core/types/transaction.go#L41-L46\n *\n * anvil: https://github.com/foundry-rs/foundry/blob/master/anvil/src/eth/error.rs#L108\n */\nexport type ExecutionRevertedErrorType = ExecutionRevertedError & {\n code: 3\n name: 'ExecutionRevertedError'\n}\nexport class ExecutionRevertedError extends BaseError {\n static code = 3\n static nodeMessage = /execution reverted/\n\n constructor({\n cause,\n message,\n }: { cause?: BaseError | undefined; message?: string | undefined } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '')\n super(\n `Execution reverted ${\n reason ? `with reason: ${reason}` : 'for an unknown reason'\n }.`,\n {\n cause,\n name: 'ExecutionRevertedError',\n },\n )\n }\n}\n\nexport type FeeCapTooHighErrorType = FeeCapTooHighError & {\n name: 'FeeCapTooHighError'\n}\nexport class FeeCapTooHighError extends BaseError {\n static nodeMessage =\n /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n constructor({\n cause,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n `The fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''\n }) cannot be higher than the maximum allowed value (2^256-1).`,\n {\n cause,\n name: 'FeeCapTooHighError',\n },\n )\n }\n}\n\nexport type FeeCapTooLowErrorType = FeeCapTooLowError & {\n name: 'FeeCapTooLowError'\n}\nexport class FeeCapTooLowError extends BaseError {\n static nodeMessage =\n /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n constructor({\n cause,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n `The fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''\n } gwei) cannot be lower than the block base fee.`,\n {\n cause,\n name: 'FeeCapTooLowError',\n },\n )\n }\n}\n\nexport type NonceTooHighErrorType = NonceTooHighError & {\n name: 'NonceTooHighError'\n}\nexport class NonceTooHighError extends BaseError {\n static nodeMessage = /nonce too high/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }is higher than the next one expected.`,\n { cause, name: 'NonceTooHighError' },\n )\n }\n}\n\nexport type NonceTooLowErrorType = NonceTooLowError & {\n name: 'NonceTooLowError'\n}\nexport class NonceTooLowError extends BaseError {\n static nodeMessage =\n /nonce too low|transaction already imported|already known/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n [\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'),\n { cause, name: 'NonceTooLowError' },\n )\n }\n}\n\nexport type NonceMaxValueErrorType = NonceMaxValueError & {\n name: 'NonceMaxValueError'\n}\nexport class NonceMaxValueError extends BaseError {\n static nodeMessage = /nonce has max value/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }exceeds the maximum allowed nonce.`,\n { cause, name: 'NonceMaxValueError' },\n )\n }\n}\n\nexport type InsufficientFundsErrorType = InsufficientFundsError & {\n name: 'InsufficientFundsError'\n}\nexport class InsufficientFundsError extends BaseError {\n static nodeMessage =\n /insufficient funds|exceeds transaction sender account balance/\n constructor({ cause }: { cause?: BaseError | undefined } = {}) {\n super(\n [\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'),\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 }\n}\n\nexport type IntrinsicGasTooHighErrorType = IntrinsicGasTooHighError & {\n name: 'IntrinsicGasTooHighError'\n}\nexport class IntrinsicGasTooHighError extends BaseError {\n static nodeMessage = /intrinsic gas too high|gas limit reached/\n constructor({\n cause,\n gas,\n }: { cause?: BaseError | undefined; gas?: bigint | undefined } = {}) {\n super(\n `The amount of gas ${\n gas ? `(${gas}) ` : ''\n }provided for the transaction exceeds the limit allowed for the block.`,\n {\n cause,\n name: 'IntrinsicGasTooHighError',\n },\n )\n }\n}\n\nexport type IntrinsicGasTooLowErrorType = IntrinsicGasTooLowError & {\n name: 'IntrinsicGasTooLowError'\n}\nexport class IntrinsicGasTooLowError extends BaseError {\n static nodeMessage = /intrinsic gas too low/\n constructor({\n cause,\n gas,\n }: { cause?: BaseError | undefined; gas?: bigint | undefined } = {}) {\n super(\n `The amount of gas ${\n gas ? `(${gas}) ` : ''\n }provided for the transaction is too low.`,\n {\n cause,\n name: 'IntrinsicGasTooLowError',\n },\n )\n }\n}\n\nexport type TransactionTypeNotSupportedErrorType =\n TransactionTypeNotSupportedError & {\n name: 'TransactionTypeNotSupportedError'\n }\nexport class TransactionTypeNotSupportedError extends BaseError {\n static nodeMessage = /transaction type not valid/\n constructor({ cause }: { cause?: BaseError | undefined }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n name: 'TransactionTypeNotSupportedError',\n })\n }\n}\n\nexport type TipAboveFeeCapErrorType = TipAboveFeeCapError & {\n name: 'TipAboveFeeCapError'\n}\nexport class TipAboveFeeCapError extends BaseError {\n static nodeMessage =\n /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n constructor({\n cause,\n maxPriorityFeePerGas,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxPriorityFeePerGas?: bigint | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n [\n `The provided tip (\\`maxPriorityFeePerGas\\`${\n maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''\n }) cannot be higher than the fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''\n }).`,\n ].join('\\n'),\n {\n cause,\n name: 'TipAboveFeeCapError',\n },\n )\n }\n}\n\nexport type UnknownNodeErrorType = UnknownNodeError & {\n name: 'UnknownNodeError'\n}\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }: { cause?: BaseError | undefined }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: 'UnknownNodeError',\n })\n }\n}\n","/**\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<value = unknown> extends Map<string, value> {\n maxSize: number\n\n constructor(size: number) {\n super()\n this.maxSize = size\n }\n\n override get(key: string) {\n const value = super.get(key)\n\n if (super.has(key) && value !== undefined) {\n this.delete(key)\n super.set(key, value)\n }\n\n return value\n }\n\n override set(key: string, value: value) {\n super.set(key, value)\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value\n if (firstKey) this.delete(firstKey)\n }\n return this\n }\n}\n","/**\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 { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.ts';\n// prettier-ignore\nimport {\n abytes, aexists, anumber, aoutput,\n clean, createHasher, createXOFer, Hash,\n swap32IfBE,\n toBytes, u32,\n type CHash, type CHashXO, type HashXOF, type Input\n} from './utils.ts';\n\n// No __PURE__ annotations in sha3 header:\n// EVERYTHING is in fact used on every export.\n// Various per round constants calculations\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nconst SHA3_PI: number[] = [];\nconst SHA3_ROTL: number[] = [];\nconst _SHA3_IOTA: bigint[] = [];\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) t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst IOTAS = split(_SHA3_IOTA, true);\nconst SHA3_IOTA_H = IOTAS[0];\nconst SHA3_IOTA_L = IOTAS[1];\n\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h: number, l: number, s: number) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h: number, l: number, s: number) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n\n/** `keccakf1600` internal function, additionally allows to adjust round count. */\nexport function keccakP(s: Uint32Array, rounds: number = 24): void {\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++) 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++) B[x] = s[y + x];\n for (let x = 0; x < 10; x++) 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 clean(B);\n}\n\n/** Keccak sponge function. */\nexport class Keccak extends Hash<Keccak> implements HashXOF<Keccak> {\n protected state: Uint8Array;\n protected pos = 0;\n protected posOut = 0;\n protected finished = false;\n protected state32: Uint32Array;\n protected destroyed = false;\n\n public blockLen: number;\n public suffix: number;\n public outputLen: number;\n protected enableXOF = false;\n protected rounds: number;\n\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(\n blockLen: number,\n suffix: number,\n outputLen: number,\n enableXOF = false,\n rounds: number = 24\n ) {\n super();\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 < blockLen && blockLen < 200))\n throw new Error('only keccak-f1600 function is supported');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone(): Keccak {\n return this._cloneInto();\n }\n protected keccak(): void {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data: Input): this {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\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++) state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen) this.keccak();\n }\n return this;\n }\n protected finish(): void {\n if (this.finished) 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) this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n protected writeInto(out: Uint8Array): Uint8Array {\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) 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: Uint8Array): Uint8Array {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF) throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes: number): Uint8Array {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out: Uint8Array): Uint8Array {\n aoutput(out, this);\n if (this.finished) throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest(): Uint8Array {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy(): void {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to?: Keccak): Keccak {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n 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}\n\nconst gen = (suffix: number, blockLen: number, outputLen: number) =>\n createHasher(() => new Keccak(blockLen, suffix, outputLen));\n\n/** SHA3-224 hash function. */\nexport const sha3_224: CHash = /* @__PURE__ */ (() => gen(0x06, 144, 224 / 8))();\n/** SHA3-256 hash function. Different from keccak-256. */\nexport const sha3_256: CHash = /* @__PURE__ */ (() => gen(0x06, 136, 256 / 8))();\n/** SHA3-384 hash function. */\nexport const sha3_384: CHash = /* @__PURE__ */ (() => gen(0x06, 104, 384 / 8))();\n/** SHA3-512 hash function. */\nexport const sha3_512: CHash = /* @__PURE__ */ (() => gen(0x06, 72, 512 / 8))();\n\n/** keccak-224 hash function. */\nexport const keccak_224: CHash = /* @__PURE__ */ (() => gen(0x01, 144, 224 / 8))();\n/** keccak-256 hash function. Different from SHA3-256. */\nexport const keccak_256: CHash = /* @__PURE__ */ (() => gen(0x01, 136, 256 / 8))();\n/** keccak-384 hash function. */\nexport const keccak_384: CHash = /* @__PURE__ */ (() => gen(0x01, 104, 384 / 8))();\n/** keccak-512 hash function. */\nexport const keccak_512: CHash = /* @__PURE__ */ (() => gen(0x01, 72, 512 / 8))();\n\nexport type ShakeOpts = { dkLen?: number };\n\nconst genShake = (suffix: number, blockLen: number, outputLen: number) =>\n createXOFer<HashXOF<Keccak>, ShakeOpts>(\n (opts: ShakeOpts = {}) =>\n new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true)\n );\n\n/** SHAKE128 XOF with 128-bit security. */\nexport const shake128: CHashXO = /* @__PURE__ */ (() => genShake(0x1f, 168, 128 / 8))();\n/** SHAKE256 XOF with 256-bit security. */\nexport const shake256: CHashXO = /* @__PURE__ */ (() => genShake(0x1f, 136, 256 / 8))();\n","import { keccak_256 } from '@noble/hashes/sha3'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'\nimport { type ToHexErrorType, toHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type Keccak256Hash<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type Keccak256ErrorType =\n | IsHexErrorType\n | ToBytesErrorType\n | ToHexErrorType\n | ErrorType\n\nexport function keccak256<to extends To = 'hex'>(\n value: Hex | ByteArray,\n to_?: to | undefined,\n): Keccak256Hash<to> {\n const to = to_ || 'hex'\n const bytes = keccak_256(\n isHex(value, { strict: false }) ? toBytes(value) : value,\n )\n if (to === 'bytes') return bytes as Keccak256Hash<to>\n return toHex(bytes) as Keccak256Hash<to>\n}\n","import type { Address } from 'abitype'\n\nimport { InvalidAddressError } from '../../errors/address.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport {\n type StringToBytesErrorType,\n stringToBytes,\n} from '../encoding/toBytes.js'\nimport { type Keccak256ErrorType, keccak256 } from '../hash/keccak256.js'\nimport { LruMap } from '../lru.js'\nimport { type IsAddressErrorType, isAddress } from './isAddress.js'\n\nconst checksumAddressCache = /*#__PURE__*/ new LruMap<Address>(8192)\n\nexport type ChecksumAddressErrorType =\n | Keccak256ErrorType\n | StringToBytesErrorType\n | ErrorType\n\nexport function checksumAddress(\n address_: 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 */\n chainId?: number | undefined,\n): Address {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`)!\n\n const hexAddress = chainId\n ? `${chainId}${address_.toLowerCase()}`\n : address_.substring(2).toLowerCase()\n const hash = keccak256(stringToBytes(hexAddress), 'bytes')\n\n const address = (\n chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress\n ).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\n const result = `0x${address.join('')}` as const\n checksumAddressCache.set(`${address_}.${chainId}`, result)\n return result\n}\n\nexport type GetAddressErrorType =\n | ChecksumAddressErrorType\n | IsAddressErrorType\n | ErrorType\n\nexport function getAddress(\n address: string,\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 */\n chainId?: number,\n): Address {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address })\n return checksumAddress(address, chainId)\n}\n","import type { Address } from 'abitype'\nimport type { ErrorType } from '../../errors/utils.js'\nimport { LruMap } from '../lru.js'\nimport { checksumAddress } from './getAddress.js'\n\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/\n\n/** @internal */\nexport const isAddressCache = /*#__PURE__*/ new LruMap<boolean>(8192)\n\nexport type IsAddressOptions = {\n /**\n * Enables strict mode. Whether or not to compare the address against its checksum.\n *\n * @default true\n */\n strict?: boolean | undefined\n}\n\nexport type IsAddressErrorType = ErrorType\n\nexport function isAddress(\n address: string,\n options?: IsAddressOptions | undefined,\n): address is Address {\n const { strict = true } = options ?? {}\n const cacheKey = `${address}.${strict}`\n\n if (isAddressCache.has(cacheKey)) return isAddressCache.get(cacheKey)!\n\n const result = (() => {\n if (!addressRegex.test(address)) return false\n if (address.toLowerCase() === address) return true\n if (strict) return checksumAddress(address as Address) === address\n return true\n })()\n isAddressCache.set(cacheKey, result)\n return result\n}\n","import {\n SliceOffsetOutOfBoundsError,\n type SliceOffsetOutOfBoundsErrorType,\n} from '../../errors/data.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nimport { type IsHexErrorType, isHex } from './isHex.js'\nimport { type SizeErrorType, size } from './size.js'\n\nexport type SliceReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type SliceErrorType =\n | IsHexErrorType\n | SliceBytesErrorType\n | SliceHexErrorType\n | ErrorType\n\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 extends ByteArray | Hex>(\n value: value,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): SliceReturnType<value> {\n if (isHex(value, { strict: false }))\n return sliceHex(value as Hex, start, end, {\n strict,\n }) as SliceReturnType<value>\n return sliceBytes(value as ByteArray, start, end, {\n strict,\n }) as SliceReturnType<value>\n}\n\nexport type AssertStartOffsetErrorType =\n | SliceOffsetOutOfBoundsErrorType\n | SizeErrorType\n | ErrorType\n\nfunction assertStartOffset(value: Hex | ByteArray, start?: number | undefined) {\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}\n\nexport type AssertEndOffsetErrorType =\n | SliceOffsetOutOfBoundsErrorType\n | SizeErrorType\n | ErrorType\n\nfunction assertEndOffset(\n value: Hex | ByteArray,\n start?: number | undefined,\n end?: number | undefined,\n) {\n if (\n typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start\n ) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n })\n }\n}\n\nexport type SliceBytesErrorType =\n | AssertStartOffsetErrorType\n | AssertEndOffsetErrorType\n | ErrorType\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(\n value_: ByteArray,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): ByteArray {\n assertStartOffset(value_, start)\n const value = value_.slice(start, end)\n if (strict) assertEndOffset(value, start, end)\n return value\n}\n\nexport type SliceHexErrorType =\n | AssertStartOffsetErrorType\n | AssertEndOffsetErrorType\n | ErrorType\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(\n value_: Hex,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): Hex {\n assertStartOffset(value_, start)\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}` as const\n if (strict) assertEndOffset(value, start, end)\n return value\n}\n","import type { Address } from 'abitype'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Account } from '../types.js'\n\nexport type ParseAccountErrorType = ErrorType\n\nexport function parseAccount<accountOrAddress extends Address | Account>(\n account: accountOrAddress,\n): accountOrAddress extends Address ? Account : accountOrAddress {\n if (typeof account === 'string')\n return { address: account, type: 'json-rpc' } as any\n return account as any\n}\n","import type { StateMapping, StateOverride } from '../types/stateOverride.js'\nimport { BaseError } from './base.js'\n\nexport type AccountStateConflictErrorType = AccountStateConflictError & {\n name: 'AccountStateConflictError'\n}\n\nexport class AccountStateConflictError extends BaseError {\n constructor({ address }: { address: string }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: 'AccountStateConflictError',\n })\n }\n}\n\nexport type StateAssignmentConflictErrorType = StateAssignmentConflictError & {\n name: 'StateAssignmentConflictError'\n}\n\nexport class StateAssignmentConflictError extends BaseError {\n constructor() {\n super('state and stateDiff are set on the same account.', {\n name: 'StateAssignmentConflictError',\n })\n }\n}\n\n/** @internal */\nexport function prettyStateMapping(stateMapping: StateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\\n`\n }, '')\n}\n\nexport function prettyStateOverride(stateOverride: StateOverride) {\n return stateOverride\n .reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\\n`\n if (state.nonce) val += ` nonce: ${state.nonce}\\n`\n if (state.balance) val += ` balance: ${state.balance}\\n`\n if (state.code) val += ` code: ${state.code}\\n`\n if (state.state) {\n val += ' state:\\n'\n val += prettyStateMapping(state.state)\n }\n if (state.stateDiff) {\n val += ' stateDiff:\\n'\n val += prettyStateMapping(state.stateDiff)\n }\n return val\n }, ' State Override:\\n')\n .slice(0, -1)\n}\n","import type { Abi, Address } from 'abitype'\n\nimport { parseAccount } from '../accounts/utils/parseAccount.js'\nimport type { CallParameters } from '../actions/public/call.js'\nimport { panicReasons } from '../constants/solidity.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Hex } from '../types/misc.js'\nimport {\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n} from '../utils/abi/decodeErrorResult.js'\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js'\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js'\nimport { getAbiItem } from '../utils/abi/getAbiItem.js'\nimport { formatEther } from '../utils/unit/formatEther.js'\nimport { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { AbiErrorSignatureNotFoundError } from './abi.js'\nimport { BaseError } from './base.js'\nimport { prettyStateOverride } from './stateOverride.js'\nimport { prettyPrint } from './transaction.js'\nimport { getContractAddress } from './utils.js'\n\nexport type CallExecutionErrorType = CallExecutionError & {\n name: 'CallExecutionError'\n}\nexport class CallExecutionError extends BaseError {\n override cause: BaseError\n\n constructor(\n cause: BaseError,\n {\n account: account_,\n docsPath,\n chain,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n stateOverride,\n }: CallParameters & {\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n ) {\n const account = account_ ? parseAccount(account_) : undefined\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value:\n typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice:\n typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas:\n typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas:\n typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n })\n\n if (stateOverride) {\n prettyArgs += `\\n${prettyStateOverride(stateOverride)}`\n }\n\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'CallExecutionError',\n })\n this.cause = cause\n }\n}\n\nexport type ContractFunctionExecutionErrorType =\n ContractFunctionExecutionError & {\n name: 'ContractFunctionExecutionError'\n }\nexport class ContractFunctionExecutionError extends BaseError {\n abi: Abi\n args?: unknown[] | undefined\n override cause: BaseError\n contractAddress?: Address | undefined\n formattedArgs?: string | undefined\n functionName: string\n sender?: Address | undefined\n\n constructor(\n cause: BaseError,\n {\n abi,\n args,\n contractAddress,\n docsPath,\n functionName,\n sender,\n }: {\n abi: Abi\n args?: any | undefined\n contractAddress?: Address | undefined\n docsPath?: string | undefined\n functionName: string\n sender?: Address | undefined\n },\n ) {\n const abiItem = getAbiItem({ abi, args, name: functionName })\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined\n\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args:\n formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n })\n\n super(\n cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`,\n {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n prettyArgs && 'Contract Call:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'ContractFunctionExecutionError',\n },\n )\n this.abi = abi\n this.args = args\n this.cause = cause\n this.contractAddress = contractAddress\n this.functionName = functionName\n this.sender = sender\n }\n}\n\nexport type ContractFunctionRevertedErrorType =\n ContractFunctionRevertedError & {\n name: 'ContractFunctionRevertedError'\n }\nexport class ContractFunctionRevertedError extends BaseError {\n data?: DecodeErrorResultReturnType | undefined\n raw?: Hex | undefined\n reason?: string | undefined\n signature?: Hex | undefined\n\n constructor({\n abi,\n data,\n functionName,\n message,\n }: {\n abi: Abi\n data?: Hex | undefined\n functionName: string\n message?: string | undefined\n }) {\n let cause: Error | undefined\n let decodedData: DecodeErrorResultReturnType | undefined\n let metaMessages: string[] | undefined\n let reason: string | undefined\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data })\n const { abiItem, errorName, args: errorArgs } = decodedData\n if (errorName === 'Error') {\n reason = (errorArgs as [string])[0]\n } else if (errorName === 'Panic') {\n const [firstArg] = errorArgs as [number]\n reason = panicReasons[firstArg as keyof typeof panicReasons]\n } else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined\n const formattedArgs =\n abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined\n\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ]\n }\n } catch (err) {\n cause = err as Error\n }\n } else if (message) reason = message\n\n let signature: Hex | undefined\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ]\n }\n\n super(\n (reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${\n signature ? 'signature' : 'reason'\n }:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`,\n {\n cause,\n metaMessages,\n name: 'ContractFunctionRevertedError',\n },\n )\n\n this.data = decodedData\n this.raw = data\n this.reason = reason\n this.signature = signature\n }\n}\n\nexport type ContractFunctionZeroDataErrorType =\n ContractFunctionZeroDataError & {\n name: 'ContractFunctionZeroDataError'\n }\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName }: { functionName: string }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n name: 'ContractFunctionZeroDataError',\n })\n }\n}\n\nexport type CounterfactualDeploymentFailedErrorType =\n CounterfactualDeploymentFailedError & {\n name: 'CounterfactualDeploymentFailedError'\n }\nexport class CounterfactualDeploymentFailedError extends BaseError {\n constructor({ factory }: { factory?: Address | undefined }) {\n super(\n `Deployment for counterfactual contract call failed${\n factory ? ` for factory \"${factory}\".` : ''\n }`,\n {\n metaMessages: [\n 'Please ensure:',\n '- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).',\n '- The `factoryData` is a valid encoded function call for contract deployment function on the factory.',\n ],\n name: 'CounterfactualDeploymentFailedError',\n },\n )\n }\n}\n\nexport type RawContractErrorType = RawContractError & {\n name: 'RawContractError'\n}\nexport class RawContractError extends BaseError {\n code = 3\n\n data?: Hex | { data?: Hex | undefined } | undefined\n\n constructor({\n data,\n message,\n }: {\n data?: Hex | { data?: Hex | undefined } | undefined\n message?: string | undefined\n }) {\n super(message || '', { name: 'RawContractError' })\n this.data = data\n }\n}\n","import type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'\nimport { BaseError } from '../../errors/base.js'\nimport {\n ExecutionRevertedError,\n type ExecutionRevertedErrorType,\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n FeeCapTooLowError,\n type FeeCapTooLowErrorType,\n InsufficientFundsError,\n type InsufficientFundsErrorType,\n IntrinsicGasTooHighError,\n type IntrinsicGasTooHighErrorType,\n IntrinsicGasTooLowError,\n type IntrinsicGasTooLowErrorType,\n NonceMaxValueError,\n type NonceMaxValueErrorType,\n NonceTooHighError,\n type NonceTooHighErrorType,\n NonceTooLowError,\n type NonceTooLowErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n TransactionTypeNotSupportedError,\n type TransactionTypeNotSupportedErrorType,\n UnknownNodeError,\n type UnknownNodeErrorType,\n} from '../../errors/node.js'\nimport { RpcRequestError } from '../../errors/request.js'\nimport {\n InvalidInputRpcError,\n TransactionRejectedRpcError,\n} from '../../errors/rpc.js'\nimport type { ExactPartial } from '../../types/utils.js'\n\nexport function containsNodeError(err: BaseError) {\n return (\n err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code)\n )\n}\n\nexport type GetNodeErrorParameters = ExactPartial<\n SendTransactionParameters<any>\n>\n\nexport type GetNodeErrorReturnType =\n | ExecutionRevertedErrorType\n | FeeCapTooHighErrorType\n | FeeCapTooLowErrorType\n | NonceTooHighErrorType\n | NonceTooLowErrorType\n | NonceMaxValueErrorType\n | InsufficientFundsErrorType\n | IntrinsicGasTooHighErrorType\n | IntrinsicGasTooLowErrorType\n | TransactionTypeNotSupportedErrorType\n | TipAboveFeeCapErrorType\n | UnknownNodeErrorType\n\nexport function getNodeError(\n err: BaseError,\n args: GetNodeErrorParameters,\n): GetNodeErrorReturnType {\n const message = (err.details || '').toLowerCase()\n\n const executionRevertedError =\n err instanceof BaseError\n ? err.walk(\n (e) =>\n (e as { code: number } | null | undefined)?.code ===\n ExecutionRevertedError.code,\n )\n : err\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n }) as any\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n }) as any\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n }) as any\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n }) as any\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce }) as any\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce }) as any\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce }) as any\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err }) as any\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas }) as any\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas }) as any\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err }) as any\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n }) as any\n return new UnknownNodeError({\n cause: err,\n }) as any\n}\n","import type { CallParameters } from '../../actions/public/call.js'\nimport type { BaseError } from '../../errors/base.js'\nimport {\n CallExecutionError,\n type CallExecutionErrorType,\n} from '../../errors/contract.js'\nimport { UnknownNodeError } from '../../errors/node.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Chain } from '../../types/chain.js'\n\nimport {\n type GetNodeErrorParameters,\n type GetNodeErrorReturnType,\n getNodeError,\n} from './getNodeError.js'\n\nexport type GetCallErrorReturnType<cause = ErrorType> = Omit<\n CallExecutionErrorType,\n 'cause'\n> & {\n cause: cause | GetNodeErrorReturnType\n}\n\nexport function getCallError<err extends ErrorType<string>>(\n err: err,\n {\n docsPath,\n ...args\n }: CallParameters & {\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n): GetCallErrorReturnType<err> {\n const cause = (() => {\n const cause = getNodeError(\n err as {} as BaseError,\n args as GetNodeErrorParameters,\n )\n if (cause instanceof UnknownNodeError) return err as {} as BaseError\n return cause\n })()\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n }) as GetCallErrorReturnType<err>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ChainFormatter } from '../../types/chain.js'\n\nexport type ExtractErrorType = ErrorType\n\n/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(\n value_: Record<string, unknown>,\n { format }: { format?: ChainFormatter['format'] | undefined },\n) {\n if (!format) return {}\n\n const value: Record<string, unknown> = {}\n function extract_(formatted: Record<string, any>) {\n const keys = Object.keys(formatted)\n for (const key of keys) {\n if (key in value_) value[key] = value_[key]\n if (\n formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key])\n )\n extract_(formatted[key])\n }\n }\n\n const formatted = format(value_ || {})\n extract_(formatted)\n\n return value\n}\n","import {\n type ParseAccountErrorType,\n parseAccount,\n} from '../../accounts/utils/parseAccount.js'\nimport type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'\nimport { maxUint256 } from '../../constants/number.js'\nimport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport {\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n} from '../../errors/node.js'\nimport {\n FeeConflictError,\n type FeeConflictErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Chain } from '../../types/chain.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { isAddress } from '../address/isAddress.js'\n\nexport type AssertRequestParameters = ExactPartial<\n SendTransactionParameters<Chain>\n>\n\nexport type AssertRequestErrorType =\n | InvalidAddressErrorType\n | FeeConflictErrorType\n | FeeCapTooHighErrorType\n | ParseAccountErrorType\n | TipAboveFeeCapErrorType\n | ErrorType\n\nexport function assertRequest(args: AssertRequestParameters) {\n const {\n account: account_,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n } = args\n const account = account_ ? parseAccount(account_) : undefined\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (\n typeof gasPrice !== 'undefined' &&\n (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined')\n )\n throw new FeeConflictError()\n\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas })\n if (\n maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas\n )\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas })\n}\n","import type { Chain, ChainFormatters } from '../../types/chain.js'\nimport type { Assign, Prettify } from '../../types/utils.js'\n\nexport function defineChain<\n formatters extends ChainFormatters,\n const chain extends Chain<formatters>,\n>(chain: chain): Prettify<Assign<Chain<undefined>, chain>> {\n return {\n formatters: undefined,\n fees: undefined,\n serializers: undefined,\n ...chain,\n } as Assign<Chain<undefined>, chain>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Block, BlockTag } from '../../types/block.js'\nimport type {\n Chain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { Hash } from '../../types/misc.js'\nimport type { RpcBlock } from '../../types/rpc.js'\nimport type { ExactPartial, Prettify } from '../../types/utils.js'\n\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\nimport { type FormattedTransaction, formatTransaction } from './transaction.js'\n\ntype BlockPendingDependencies = 'hash' | 'logsBloom' | 'nonce' | 'number'\n\nexport type FormattedBlock<\n chain extends Chain | undefined = undefined,\n includeTransactions extends boolean = boolean,\n blockTag extends BlockTag = BlockTag,\n _FormatterReturnType = ExtractChainFormatterReturnType<\n chain,\n 'block',\n Block<bigint, includeTransactions>\n >,\n _ExcludedPendingDependencies extends string = BlockPendingDependencies &\n ExtractChainFormatterExclude<chain, 'block'>,\n _Formatted = Omit<_FormatterReturnType, BlockPendingDependencies> & {\n [_key in _ExcludedPendingDependencies]: never\n } & Pick<\n Block<bigint, includeTransactions, blockTag>,\n BlockPendingDependencies\n >,\n _Transactions = includeTransactions extends true\n ? Prettify<FormattedTransaction<chain, blockTag>>[]\n : Hash[],\n> = Omit<_Formatted, 'transactions'> & {\n transactions: _Transactions\n}\n\nexport type FormatBlockErrorType = ErrorType\n\nexport function formatBlock(\n block: ExactPartial<RpcBlock>,\n _?: string | undefined,\n) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === 'string') 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 } as Block\n}\n\nexport type DefineBlockErrorType = DefineFormatterErrorType | ErrorType\n\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock)\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { SignedAuthorizationList } from '../../types/authorization.js'\nimport type { BlockTag } from '../../types/block.js'\nimport type {\n Chain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { Hex } from '../../types/misc.js'\nimport type { RpcAuthorizationList, RpcTransaction } from '../../types/rpc.js'\nimport type { Transaction, TransactionType } from '../../types/transaction.js'\nimport type { ExactPartial, UnionLooseOmit } from '../../types/utils.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\n\ntype TransactionPendingDependencies =\n | 'blockHash'\n | 'blockNumber'\n | 'transactionIndex'\n\nexport type FormattedTransaction<\n chain extends Chain | undefined = undefined,\n blockTag extends BlockTag = BlockTag,\n _FormatterReturnType = ExtractChainFormatterReturnType<\n chain,\n 'transaction',\n Transaction\n >,\n _ExcludedPendingDependencies extends string = TransactionPendingDependencies &\n ExtractChainFormatterExclude<chain, 'transaction'>,\n> = UnionLooseOmit<_FormatterReturnType, TransactionPendingDependencies> & {\n [_K in _ExcludedPendingDependencies]: never\n} & Pick<\n Transaction<bigint, number, blockTag extends 'pending' ? true : false>,\n TransactionPendingDependencies\n >\n\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n} as const satisfies Record<Hex, TransactionType>\n\nexport type FormatTransactionErrorType = ErrorType\n\nexport function formatTransaction(\n transaction: ExactPartial<RpcTransaction>,\n _?: string | undefined,\n) {\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 as any)[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 } as Transaction\n\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(\n transaction.authorizationList,\n )\n\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity) return Number(transaction.yParity)\n\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n) return 0\n if (transaction_.v === 1n || transaction_.v === 28n) return 1\n if (transaction_.v >= 35n) return transaction_.v % 2n === 0n ? 1 : 0\n }\n\n return undefined\n })()\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}\n\nexport type DefineTransactionErrorType = DefineFormatterErrorType | ErrorType\n\nexport const defineTransaction = /*#__PURE__*/ defineFormatter(\n 'transaction',\n formatTransaction,\n)\n\n//////////////////////////////////////////////////////////////////////////////\n\nfunction formatAuthorizationList(\n authorizationList: RpcAuthorizationList,\n): SignedAuthorizationList {\n return authorizationList.map((authorization) => ({\n address: (authorization as any).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 })) as SignedAuthorizationList\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Log } from '../../types/log.js'\nimport type { RpcLog } from '../../types/rpc.js'\nimport type { ExactPartial } from '../../types/utils.js'\n\nexport type FormatLogErrorType = ErrorType\n\nexport function formatLog(\n log: ExactPartial<RpcLog>,\n {\n args,\n eventName,\n }: { args?: unknown | undefined; eventName?: string | undefined } = {},\n) {\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 } as Log\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type {\n Chain,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { RpcTransactionReceipt } from '../../types/rpc.js'\nimport type { TransactionReceipt } from '../../types/transaction.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\n\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\nimport { formatLog } from './log.js'\nimport { transactionType } from './transaction.js'\n\nexport type FormattedTransactionReceipt<\n chain extends Chain | undefined = undefined,\n> = ExtractChainFormatterReturnType<\n chain,\n 'transactionReceipt',\n TransactionReceipt\n>\n\nexport const receiptStatuses = {\n '0x0': 'reverted',\n '0x1': 'success',\n} as const\n\nexport type FormatTransactionReceiptErrorType = ErrorType\n\nexport function formatTransactionReceipt(\n transactionReceipt: ExactPartial<RpcTransactionReceipt>,\n _?: string | undefined,\n) {\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[\n transactionReceipt.type as keyof typeof transactionType\n ] || transactionReceipt.type\n : null,\n } as TransactionReceipt\n\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice)\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed)\n\n return receipt\n}\n\nexport type DefineTransactionReceiptErrorType =\n | DefineFormatterErrorType\n | ErrorType\n\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter(\n 'transactionReceipt',\n formatTransactionReceipt,\n)\n","import { BaseError } from '../../errors/base.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport {\n type CreateCursorErrorType,\n type Cursor,\n createCursor,\n} from '../cursor.js'\n\nimport { type HexToBytesErrorType, hexToBytes } from './toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from './toHex.js'\n\nexport type RecursiveArray<T> = T | readonly RecursiveArray<T>[]\n\ntype To = 'hex' | 'bytes'\n\ntype Encodable = {\n length: number\n encode(cursor: Cursor): void\n}\n\nexport type ToRlpReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type ToRlpErrorType =\n | CreateCursorErrorType\n | BytesToHexErrorType\n | HexToBytesErrorType\n | ErrorType\n\nexport function toRlp<to extends To = 'hex'>(\n bytes: RecursiveArray<ByteArray> | RecursiveArray<Hex>,\n to: to | To | undefined = 'hex',\n): ToRlpReturnType<to> {\n const encodable = getEncodable(bytes)\n const cursor = createCursor(new Uint8Array(encodable.length))\n encodable.encode(cursor)\n\n if (to === 'hex') return bytesToHex(cursor.bytes) as ToRlpReturnType<to>\n return cursor.bytes as ToRlpReturnType<to>\n}\n\nexport type BytesToRlpErrorType = ToRlpErrorType | ErrorType\n\nexport function bytesToRlp<to extends To = 'bytes'>(\n bytes: RecursiveArray<ByteArray>,\n to: to | To | undefined = 'bytes',\n): ToRlpReturnType<to> {\n return toRlp(bytes, to)\n}\n\nexport type HexToRlpErrorType = ToRlpErrorType | ErrorType\n\nexport function hexToRlp<to extends To = 'hex'>(\n hex: RecursiveArray<Hex>,\n to: to | To | undefined = 'hex',\n): ToRlpReturnType<to> {\n return toRlp(hex, to)\n}\n\nfunction getEncodable(\n bytes: RecursiveArray<ByteArray> | RecursiveArray<Hex>,\n): Encodable {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)))\n return getEncodableBytes(bytes as any)\n}\n\nfunction getEncodableList(list: Encodable[]): Encodable {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0)\n\n const sizeOfBodyLength = getSizeOfLength(bodyLength)\n const length = (() => {\n if (bodyLength <= 55) return 1 + bodyLength\n return 1 + sizeOfBodyLength + bodyLength\n })()\n\n return {\n length,\n encode(cursor: Cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength)\n } else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength)\n if (sizeOfBodyLength === 1) cursor.pushUint8(bodyLength)\n else if (sizeOfBodyLength === 2) cursor.pushUint16(bodyLength)\n else if (sizeOfBodyLength === 3) cursor.pushUint24(bodyLength)\n else cursor.pushUint32(bodyLength)\n }\n for (const { encode } of list) {\n encode(cursor)\n }\n },\n }\n}\n\nfunction getEncodableBytes(bytesOrHex: ByteArray | Hex): Encodable {\n const bytes =\n typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex\n\n const sizeOfBytesLength = getSizeOfLength(bytes.length)\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80) return 1\n if (bytes.length <= 55) return 1 + bytes.length\n return 1 + sizeOfBytesLength + bytes.length\n })()\n\n return {\n length,\n encode(cursor: Cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes)\n } else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length)\n cursor.pushBytes(bytes)\n } else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength)\n if (sizeOfBytesLength === 1) cursor.pushUint8(bytes.length)\n else if (sizeOfBytesLength === 2) cursor.pushUint16(bytes.length)\n else if (sizeOfBytesLength === 3) cursor.pushUint24(bytes.length)\n else cursor.pushUint32(bytes.length)\n cursor.pushBytes(bytes)\n }\n },\n }\n}\n\nfunction getSizeOfLength(length: number) {\n if (length < 2 ** 8) return 1\n if (length < 2 ** 16) return 2\n if (length < 2 ** 24) return 3\n if (length < 2 ** 32) return 4\n throw new BaseError('Length is too large.')\n}\n","import {\n InvalidLegacyVError,\n type InvalidLegacyVErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n ByteArray,\n Hex,\n Signature,\n SignatureLegacy,\n} from '../../types/misc.js'\nimport type {\n TransactionSerializable,\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n TransactionSerializableLegacy,\n TransactionSerialized,\n TransactionSerializedEIP1559,\n TransactionSerializedEIP2930,\n TransactionSerializedEIP4844,\n TransactionSerializedEIP7702,\n TransactionSerializedLegacy,\n TransactionType,\n} from '../../types/transaction.js'\nimport type { MaybePromise, OneOf } from '../../types/utils.js'\nimport {\n type SerializeAuthorizationListErrorType,\n serializeAuthorizationList,\n} from '../authorization/serializeAuthorizationList.js'\nimport {\n type BlobsToCommitmentsErrorType,\n blobsToCommitments,\n} from '../blob/blobsToCommitments.js'\nimport {\n blobsToProofs,\n type blobsToProofsErrorType,\n} from '../blob/blobsToProofs.js'\nimport {\n type CommitmentsToVersionedHashesErrorType,\n commitmentsToVersionedHashes,\n} from '../blob/commitmentsToVersionedHashes.js'\nimport {\n type ToBlobSidecarsErrorType,\n toBlobSidecars,\n} from '../blob/toBlobSidecars.js'\nimport { type ConcatHexErrorType, concatHex } from '../data/concat.js'\nimport { trim } from '../data/trim.js'\nimport {\n bytesToHex,\n type NumberToHexErrorType,\n numberToHex,\n} from '../encoding/toHex.js'\nimport { type ToRlpErrorType, toRlp } from '../encoding/toRlp.js'\n\nimport {\n type AssertTransactionEIP1559ErrorType,\n type AssertTransactionEIP2930ErrorType,\n type AssertTransactionEIP4844ErrorType,\n type AssertTransactionEIP7702ErrorType,\n type AssertTransactionLegacyErrorType,\n assertTransactionEIP1559,\n assertTransactionEIP2930,\n assertTransactionEIP4844,\n assertTransactionEIP7702,\n assertTransactionLegacy,\n} from './assertTransaction.js'\nimport {\n type GetTransactionType,\n type GetTransactionTypeErrorType,\n getTransactionType,\n} from './getTransactionType.js'\nimport {\n type SerializeAccessListErrorType,\n serializeAccessList,\n} from './serializeAccessList.js'\n\nexport type SerializedTransactionReturnType<\n transaction extends TransactionSerializable = TransactionSerializable,\n ///\n _transactionType extends TransactionType = GetTransactionType<transaction>,\n> = TransactionSerialized<_transactionType>\n\nexport type SerializeTransactionFn<\n transaction extends TransactionSerializableGeneric = TransactionSerializable,\n ///\n _transactionType extends TransactionType = never,\n> = (\n transaction: OneOf<TransactionSerializable | transaction>,\n signature?: Signature | undefined,\n) => MaybePromise<\n SerializedTransactionReturnType<\n OneOf<TransactionSerializable | transaction>,\n _transactionType\n >\n>\n\nexport type SerializeTransactionErrorType =\n | GetTransactionTypeErrorType\n | SerializeTransactionEIP1559ErrorType\n | SerializeTransactionEIP2930ErrorType\n | SerializeTransactionEIP4844ErrorType\n | SerializeTransactionEIP7702ErrorType\n | SerializeTransactionLegacyErrorType\n | ErrorType\n\nexport function serializeTransaction<\n const transaction extends TransactionSerializable,\n ///\n _transactionType extends TransactionType = GetTransactionType<transaction>,\n>(\n transaction: transaction,\n signature?: Signature | undefined,\n): SerializedTransactionReturnType<transaction, _transactionType> {\n const type = getTransactionType(transaction) as GetTransactionType\n\n if (type === 'eip1559')\n return serializeTransactionEIP1559(\n transaction as TransactionSerializableEIP1559,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip2930')\n return serializeTransactionEIP2930(\n transaction as TransactionSerializableEIP2930,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip4844')\n return serializeTransactionEIP4844(\n transaction as TransactionSerializableEIP4844,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip7702')\n return serializeTransactionEIP7702(\n transaction as TransactionSerializableEIP7702,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n return serializeTransactionLegacy(\n transaction as TransactionSerializableLegacy,\n signature as SignatureLegacy,\n ) as SerializedTransactionReturnType<transaction>\n}\n\ntype SerializeTransactionEIP7702ErrorType =\n | AssertTransactionEIP7702ErrorType\n | SerializeAuthorizationListErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP7702(\n transaction: TransactionSerializableEIP7702,\n signature?: Signature | undefined,\n): TransactionSerializedEIP7702 {\n const {\n authorizationList,\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP7702(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n const serializedAuthorizationList =\n serializeAuthorizationList(authorizationList)\n\n return concatHex([\n '0x04',\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature),\n ]),\n ]) as TransactionSerializedEIP7702\n}\n\ntype SerializeTransactionEIP4844ErrorType =\n | AssertTransactionEIP4844ErrorType\n | BlobsToCommitmentsErrorType\n | CommitmentsToVersionedHashesErrorType\n | blobsToProofsErrorType\n | ToBlobSidecarsErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP4844(\n transaction: TransactionSerializableEIP4844,\n signature?: Signature | undefined,\n): TransactionSerializedEIP4844 {\n const {\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP4844(transaction)\n\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 (\n transaction.blobs &&\n (typeof blobVersionedHashes === 'undefined' ||\n typeof sidecars === 'undefined')\n ) {\n const blobs = (\n typeof transaction.blobs[0] === 'string'\n ? transaction.blobs\n : (transaction.blobs as ByteArray[]).map((x) => bytesToHex(x))\n ) as Hex[]\n const kzg = transaction.kzg!\n const commitments = blobsToCommitments({\n blobs,\n kzg,\n })\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\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : '0x',\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature),\n ] as const\n\n const blobs: Hex[] = []\n const commitments: Hex[] = []\n const proofs: Hex[] = []\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\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 ]) as TransactionSerializedEIP4844\n}\n\ntype SerializeTransactionEIP1559ErrorType =\n | AssertTransactionEIP1559ErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP1559(\n transaction: TransactionSerializableEIP1559,\n signature?: Signature | undefined,\n): TransactionSerializedEIP1559 {\n const {\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP1559(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ]\n\n return concatHex([\n '0x02',\n toRlp(serializedTransaction),\n ]) as TransactionSerializedEIP1559\n}\n\ntype SerializeTransactionEIP2930ErrorType =\n | AssertTransactionEIP2930ErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP2930(\n transaction: TransactionSerializableEIP2930,\n signature?: Signature | undefined,\n): TransactionSerializedEIP2930 {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } =\n transaction\n\n assertTransactionEIP2930(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ]\n\n return concatHex([\n '0x01',\n toRlp(serializedTransaction),\n ]) as TransactionSerializedEIP2930\n}\n\ntype SerializeTransactionLegacyErrorType =\n | AssertTransactionLegacyErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | ErrorType\n\nfunction serializeTransactionLegacy(\n transaction: TransactionSerializableLegacy,\n signature?: SignatureLegacy | undefined,\n): TransactionSerializedLegacy {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction\n\n assertTransactionLegacy(transaction)\n\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n ]\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) return signature.v\n return 27n + (signature.v === 35n ? 0n : 1n)\n }\n\n // EIP-155 (explicit chainId)\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n)\n\n // Pre-EIP-155 (no chainId)\n const v = 27n + (signature.v === 27n ? 0n : 1n)\n if (signature.v !== v) throw new InvalidLegacyVError({ v: signature.v })\n return v\n })()\n\n const r = trim(signature.r)\n const s = trim(signature.s)\n\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v),\n r === '0x00' ? '0x' : r,\n s === '0x00' ? '0x' : s,\n ]\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n '0x',\n '0x',\n ]\n }\n\n return toRlp(serializedTransaction) as TransactionSerializedLegacy\n}\n\nexport function toYParitySignatureArray(\n transaction: TransactionSerializableGeneric,\n signature_?: Signature | undefined,\n) {\n const signature = signature_ ?? transaction\n const { v, yParity } = signature\n\n if (typeof signature.r === 'undefined') return []\n if (typeof signature.s === 'undefined') return []\n if (typeof v === 'undefined' && typeof yParity === 'undefined') return []\n\n const r = trim(signature.r)\n const s = trim(signature.s)\n\n const yParity_ = (() => {\n if (typeof yParity === 'number') return yParity ? numberToHex(1) : '0x'\n if (v === 0n) return '0x'\n if (v === 1n) return numberToHex(1)\n\n return v === 27n ? '0x' : numberToHex(1)\n })()\n\n return [yParity_, r === '0x00' ? '0x' : r, s === '0x00' ? '0x' : s]\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type {\n AuthorizationList,\n SerializedAuthorizationList,\n} from '../../types/authorization.js'\nimport { toHex } from '../encoding/toHex.js'\nimport { toYParitySignatureArray } from '../transaction/serializeTransaction.js'\n\nexport type SerializeAuthorizationListReturnType = SerializedAuthorizationList\n\nexport type SerializeAuthorizationListErrorType = ErrorType\n\n/*\n * Serializes an EIP-7702 authorization list.\n */\nexport function serializeAuthorizationList(\n authorizationList?: AuthorizationList<number, true> | undefined,\n): SerializeAuthorizationListReturnType {\n if (!authorizationList || authorizationList.length === 0) return []\n\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\n return serializedAuthorizationList as {} as SerializeAuthorizationListReturnType\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type BlobsToCommitmentsParameters<\n blobs extends readonly ByteArray[] | readonly Hex[] =\n | readonly ByteArray[]\n | readonly Hex[],\n to extends To | undefined = undefined,\n> = {\n /** Blobs to transform into commitments. */\n blobs: blobs | readonly ByteArray[] | readonly Hex[]\n /** KZG implementation. */\n kzg: Pick<Kzg, 'blobToKzgCommitment'>\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type BlobsToCommitmentsReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type BlobsToCommitmentsErrorType =\n | HexToBytesErrorType\n | BytesToHexErrorType\n | ErrorType\n\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<\n const blobs extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: BlobsToCommitmentsParameters<blobs, to>,\n): BlobsToCommitmentsReturnType<to> {\n const { kzg } = parameters\n\n const to =\n parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes')\n const blobs = (\n typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x as any))\n : parameters.blobs\n ) as ByteArray[]\n\n const commitments: ByteArray[] = []\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)))\n\n return (to === 'bytes'\n ? commitments\n : commitments.map((x) =>\n bytesToHex(x),\n )) as {} as BlobsToCommitmentsReturnType<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type blobsToProofsParameters<\n blobs extends readonly ByteArray[] | readonly Hex[],\n commitments extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n ///\n _blobsType =\n | (blobs extends readonly Hex[] ? readonly Hex[] : never)\n | (blobs extends readonly ByteArray[] ? readonly ByteArray[] : never),\n> = {\n /** Blobs to transform into proofs. */\n blobs: blobs\n /** Commitments for the blobs. */\n commitments: commitments &\n (commitments extends _blobsType\n ? {}\n : `commitments must be the same type as blobs`)\n /** KZG implementation. */\n kzg: Pick<Kzg, 'computeBlobKzgProof'>\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type blobsToProofsReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray[] : never)\n | (to extends 'hex' ? Hex[] : never)\n\nexport type blobsToProofsErrorType =\n | BytesToHexErrorType\n | HexToBytesErrorType\n | ErrorType\n\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<\n const blobs extends readonly ByteArray[] | readonly Hex[],\n const commitments extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: blobsToProofsParameters<blobs, commitments, to>,\n): blobsToProofsReturnType<to> {\n const { kzg } = parameters\n\n const to =\n parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes')\n\n const blobs = (\n typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x as any))\n : parameters.blobs\n ) as ByteArray[]\n const commitments = (\n typeof parameters.commitments[0] === 'string'\n ? parameters.commitments.map((x) => hexToBytes(x as any))\n : parameters.commitments\n ) as ByteArray[]\n\n const proofs: ByteArray[] = []\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\n return (to === 'bytes'\n ? proofs\n : proofs.map((x) => bytesToHex(x))) as {} as blobsToProofsReturnType<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\nimport { type Sha256ErrorType, sha256 } from '../hash/sha256.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type CommitmentToVersionedHashParameters<\n commitment extends Uint8Array | Hex = Uint8Array | Hex,\n to extends To | undefined = undefined,\n> = {\n /** Commitment from blob. */\n commitment: commitment | Uint8Array | Hex\n /** Return type. */\n to?: to | To | undefined\n /** Version to tag onto the hash. */\n version?: number | undefined\n}\n\nexport type CommitmentToVersionedHashReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type CommitmentToVersionedHashErrorType =\n | Sha256ErrorType\n | BytesToHexErrorType\n | ErrorType\n\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<\n const commitment extends Hex | ByteArray,\n to extends To =\n | (commitment extends Hex ? 'hex' : never)\n | (commitment extends ByteArray ? 'bytes' : never),\n>(\n parameters: CommitmentToVersionedHashParameters<commitment, to>,\n): CommitmentToVersionedHashReturnType<to> {\n const { commitment, version = 1 } = parameters\n const to = parameters.to ?? (typeof commitment === 'string' ? 'hex' : 'bytes')\n\n const versionedHash = sha256(commitment, 'bytes')\n versionedHash.set([version], 0)\n return (\n to === 'bytes' ? versionedHash : bytesToHex(versionedHash)\n ) as CommitmentToVersionedHashReturnType<to>\n}\n","/**\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 * @deprecated\n */\nimport {\n SHA224 as SHA224n,\n sha224 as sha224n,\n SHA256 as SHA256n,\n sha256 as sha256n,\n} from './sha2.ts';\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const SHA256: typeof SHA256n = SHA256n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const sha256: typeof sha256n = sha256n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const SHA224: typeof SHA224n = SHA224n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const sha224: typeof sha224n = sha224n;\n","import { sha256 as noble_sha256 } from '@noble/hashes/sha256'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'\nimport { type ToHexErrorType, toHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type Sha256Hash<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type Sha256ErrorType =\n | IsHexErrorType\n | ToBytesErrorType\n | ToHexErrorType\n | ErrorType\n\nexport function sha256<to extends To = 'hex'>(\n value: Hex | ByteArray,\n to_?: to | undefined,\n): Sha256Hash<to> {\n const to = to_ || 'hex'\n const bytes = noble_sha256(\n isHex(value, { strict: false }) ? toBytes(value) : value,\n )\n if (to === 'bytes') return bytes as Sha256Hash<to>\n return toHex(bytes) as Sha256Hash<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport {\n type CommitmentToVersionedHashErrorType,\n commitmentToVersionedHash,\n} from './commitmentToVersionedHash.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type CommitmentsToVersionedHashesParameters<\n commitments extends readonly Uint8Array[] | readonly Hex[] =\n | readonly Uint8Array[]\n | readonly Hex[],\n to extends To | undefined = undefined,\n> = {\n /** Commitments from blobs. */\n commitments: commitments | readonly Uint8Array[] | readonly Hex[]\n /** Return type. */\n to?: to | To | undefined\n /** Version to tag onto the hashes. */\n version?: number | undefined\n}\n\nexport type CommitmentsToVersionedHashesReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type CommitmentsToVersionedHashesErrorType =\n | CommitmentToVersionedHashErrorType\n | ErrorType\n\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<\n const commitments extends readonly Uint8Array[] | readonly Hex[],\n to extends To =\n | (commitments extends readonly Hex[] ? 'hex' : never)\n | (commitments extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: CommitmentsToVersionedHashesParameters<commitments, to>,\n): CommitmentsToVersionedHashesReturnType<to> {\n const { commitments, version } = parameters\n\n const to =\n parameters.to ?? (typeof commitments[0] === 'string' ? 'hex' : 'bytes')\n\n const hashes: Uint8Array[] | Hex[] = []\n for (const commitment of commitments) {\n hashes.push(\n commitmentToVersionedHash({\n commitment,\n to,\n version,\n }) as any,\n )\n }\n return hashes as any\n}\n","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n\n/** Blob limit per transaction. */\nconst blobsPerTransaction = 6\n\n/** The number of bytes in a BLS scalar field element. */\nexport const bytesPerFieldElement = 32\n\n/** The number of field elements in a blob. */\nexport const fieldElementsPerBlob = 4096\n\n/** The number of bytes in a blob. */\nexport const bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob\n\n/** Blob bytes limit per transaction. */\nexport const maxBytesPerTransaction =\n bytesPerBlob * blobsPerTransaction -\n // terminator byte (0x80).\n 1 -\n // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction\n","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n\nexport const versionedHashVersionKzg = 1\n","import { versionedHashVersionKzg } from '../constants/kzg.js'\nimport type { Hash } from '../types/misc.js'\n\nimport { BaseError } from './base.js'\n\nexport type BlobSizeTooLargeErrorType = BlobSizeTooLargeError & {\n name: 'BlobSizeTooLargeError'\n}\nexport class BlobSizeTooLargeError extends BaseError {\n constructor({ maxSize, size }: { maxSize: number; size: number }) {\n super('Blob size is too large.', {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size} bytes`],\n name: 'BlobSizeTooLargeError',\n })\n }\n}\n\nexport type EmptyBlobErrorType = EmptyBlobError & {\n name: 'EmptyBlobError'\n}\nexport class EmptyBlobError extends BaseError {\n constructor() {\n super('Blob data must not be empty.', { name: 'EmptyBlobError' })\n }\n}\n\nexport type InvalidVersionedHashSizeErrorType =\n InvalidVersionedHashSizeError & {\n name: 'InvalidVersionedHashSizeError'\n }\nexport class InvalidVersionedHashSizeError extends BaseError {\n constructor({\n hash,\n size,\n }: {\n hash: Hash\n size: number\n }) {\n super(`Versioned hash \"${hash}\" size is invalid.`, {\n metaMessages: ['Expected: 32', `Received: ${size}`],\n name: 'InvalidVersionedHashSizeError',\n })\n }\n}\n\nexport type InvalidVersionedHashVersionErrorType =\n InvalidVersionedHashVersionError & {\n name: 'InvalidVersionedHashVersionError'\n }\nexport class InvalidVersionedHashVersionError extends BaseError {\n constructor({\n hash,\n version,\n }: {\n hash: Hash\n version: number\n }) {\n super(`Versioned hash \"${hash}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version}`,\n ],\n name: 'InvalidVersionedHashVersionError',\n })\n }\n}\n","import {\n bytesPerBlob,\n bytesPerFieldElement,\n fieldElementsPerBlob,\n maxBytesPerTransaction,\n} from '../../constants/blob.js'\nimport {\n BlobSizeTooLargeError,\n type BlobSizeTooLargeErrorType,\n EmptyBlobError,\n type EmptyBlobErrorType,\n} from '../../errors/blob.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type CreateCursorErrorType, createCursor } from '../cursor.js'\nimport { type SizeErrorType, size } from '../data/size.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type ToBlobsParameters<\n data extends Hex | ByteArray = Hex | ByteArray,\n to extends To | undefined = undefined,\n> = {\n /** Data to transform to a blob. */\n data: data | Hex | ByteArray\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type ToBlobsReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type ToBlobsErrorType =\n | BlobSizeTooLargeErrorType\n | BytesToHexErrorType\n | CreateCursorErrorType\n | EmptyBlobErrorType\n | HexToBytesErrorType\n | SizeErrorType\n | ErrorType\n\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<\n const data extends Hex | ByteArray,\n to extends To =\n | (data extends Hex ? 'hex' : never)\n | (data extends ByteArray ? 'bytes' : never),\n>(parameters: ToBlobsParameters<data, to>): ToBlobsReturnType<to> {\n const to =\n parameters.to ?? (typeof parameters.data === 'string' ? 'hex' : 'bytes')\n const data = (\n typeof parameters.data === 'string'\n ? hexToBytes(parameters.data)\n : parameters.data\n ) as ByteArray\n\n const size_ = size(data)\n if (!size_) throw new EmptyBlobError()\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_,\n })\n\n const blobs = []\n\n let active = true\n let position = 0\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob))\n\n let size = 0\n while (size < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1))\n\n // Push a zero byte so the field element doesn't overflow the BLS modulus.\n blob.pushByte(0x00)\n\n // Push the current segment of data bytes.\n blob.pushBytes(bytes)\n\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\n size++\n position += 31\n }\n\n blobs.push(blob)\n }\n\n return (\n to === 'bytes'\n ? blobs.map((x) => x.bytes)\n : blobs.map((x) => bytesToHex(x.bytes))\n ) as any\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { BlobSidecars } from '../../types/eip4844.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport type { OneOf } from '../../types/utils.js'\nimport {\n type BlobsToCommitmentsErrorType,\n blobsToCommitments,\n} from './blobsToCommitments.js'\nimport { blobsToProofs, type blobsToProofsErrorType } from './blobsToProofs.js'\nimport { type ToBlobsErrorType, toBlobs } from './toBlobs.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type ToBlobSidecarsParameters<\n data extends Hex | ByteArray | undefined = undefined,\n blobs extends readonly Hex[] | readonly ByteArray[] | undefined = undefined,\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n ///\n _blobsType =\n | (blobs extends readonly Hex[] ? readonly Hex[] : never)\n | (blobs extends readonly ByteArray[] ? readonly ByteArray[] : never),\n> = {\n /** Return type. */\n to?: to | To | undefined\n} & OneOf<\n | {\n /** Data to transform into blobs. */\n data: data | Hex | ByteArray\n /** KZG implementation. */\n kzg: Kzg\n }\n | {\n /** Blobs. */\n blobs: blobs | readonly Hex[] | readonly ByteArray[]\n /** Commitment for each blob. */\n commitments: _blobsType | readonly Hex[] | readonly ByteArray[]\n /** Proof for each blob. */\n proofs: _blobsType | readonly Hex[] | readonly ByteArray[]\n }\n>\n\nexport type ToBlobSidecarsReturnType<to extends To> =\n | (to extends 'bytes' ? BlobSidecars<ByteArray> : never)\n | (to extends 'hex' ? BlobSidecars<Hex> : never)\n\nexport type ToBlobSidecarsErrorType =\n | BlobsToCommitmentsErrorType\n | ToBlobsErrorType\n | blobsToProofsErrorType\n | ErrorType\n\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<\n const data extends Hex | ByteArray | undefined = undefined,\n const blobs extends\n | readonly Hex[]\n | readonly ByteArray[]\n | undefined = undefined,\n to extends To =\n | (data extends Hex ? 'hex' : never)\n | (data extends ByteArray ? 'bytes' : never)\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: ToBlobSidecarsParameters<data, blobs, to>,\n): ToBlobSidecarsReturnType<to> {\n const { data, kzg, to } = parameters\n const blobs = parameters.blobs ?? toBlobs({ data: data!, to })\n const commitments =\n parameters.commitments ?? blobsToCommitments({ blobs, kzg: kzg!, to })\n const proofs =\n parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg: kzg!, to })\n\n const sidecars: BlobSidecars = []\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\n return sidecars as ToBlobSidecarsReturnType<to>\n}\n","import { versionedHashVersionKzg } from '../../constants/kzg.js'\nimport { maxUint256 } from '../../constants/number.js'\nimport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport { BaseError, type BaseErrorType } from '../../errors/base.js'\nimport {\n EmptyBlobError,\n type EmptyBlobErrorType,\n InvalidVersionedHashSizeError,\n type InvalidVersionedHashSizeErrorType,\n InvalidVersionedHashVersionError,\n type InvalidVersionedHashVersionErrorType,\n} from '../../errors/blob.js'\nimport {\n InvalidChainIdError,\n type InvalidChainIdErrorType,\n} from '../../errors/chain.js'\nimport {\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n} from '../../errors/node.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableLegacy,\n} from '../../types/transaction.js'\nimport { type IsAddressErrorType, isAddress } from '../address/isAddress.js'\nimport { size } from '../data/size.js'\nimport { slice } from '../data/slice.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\n\nexport type AssertTransactionEIP7702ErrorType =\n | AssertTransactionEIP1559ErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | ErrorType\n\nexport function assertTransactionEIP7702(\n transaction: TransactionSerializableEIP7702,\n) {\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)) throw new InvalidAddressError({ address })\n if (chainId < 0) throw new InvalidChainIdError({ chainId })\n }\n }\n assertTransactionEIP1559(transaction as {} as TransactionSerializableEIP1559)\n}\n\nexport type AssertTransactionEIP4844ErrorType =\n | AssertTransactionEIP1559ErrorType\n | EmptyBlobErrorType\n | InvalidVersionedHashSizeErrorType\n | InvalidVersionedHashVersionErrorType\n | ErrorType\n\nexport function assertTransactionEIP4844(\n transaction: TransactionSerializableEIP4844,\n) {\n const { blobVersionedHashes } = transaction\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0) 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 as {} as TransactionSerializableEIP1559)\n}\n\nexport type AssertTransactionEIP1559ErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | TipAboveFeeCapErrorType\n | ErrorType\n\nexport function assertTransactionEIP1559(\n transaction: TransactionSerializableEIP1559,\n) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction\n if (chainId <= 0) throw new InvalidChainIdError({ chainId })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas })\n if (\n maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas\n )\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas })\n}\n\nexport type AssertTransactionEIP2930ErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | ErrorType\n\nexport function assertTransactionEIP2930(\n transaction: TransactionSerializableEIP2930,\n) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } =\n transaction\n if (chainId <= 0) throw new InvalidChainIdError({ chainId })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError(\n '`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.',\n )\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice })\n}\n\nexport type AssertTransactionLegacyErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | ErrorType\n\nexport function assertTransactionLegacy(\n transaction: TransactionSerializableLegacy,\n) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } =\n transaction\n if (to && !isAddress(to)) 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(\n '`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.',\n )\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice })\n}\n","import {\n InvalidSerializableTransactionError,\n type InvalidSerializableTransactionErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n FeeValuesEIP1559,\n FeeValuesEIP4844,\n FeeValuesLegacy,\n} from '../../index.js'\nimport type {\n TransactionRequestGeneric,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n} from '../../types/transaction.js'\nimport type { Assign, ExactPartial, IsNever, OneOf } from '../../types/utils.js'\n\nexport type GetTransactionType<\n transaction extends OneOf<\n TransactionSerializableGeneric | TransactionRequestGeneric\n > = TransactionSerializableGeneric,\n result =\n | (transaction extends LegacyProperties ? 'legacy' : never)\n | (transaction extends EIP1559Properties ? 'eip1559' : never)\n | (transaction extends EIP2930Properties ? 'eip2930' : never)\n | (transaction extends EIP4844Properties ? 'eip4844' : never)\n | (transaction extends EIP7702Properties ? 'eip7702' : never)\n | (transaction['type'] extends TransactionSerializableGeneric['type']\n ? Extract<transaction['type'], string>\n : never),\n> = IsNever<keyof transaction> extends true\n ? string\n : IsNever<result> extends false\n ? result\n : string\n\nexport type GetTransactionTypeErrorType =\n | InvalidSerializableTransactionErrorType\n | ErrorType\n\nexport function getTransactionType<\n const transaction extends OneOf<\n TransactionSerializableGeneric | TransactionRequestGeneric\n >,\n>(transaction: transaction): GetTransactionType<transaction> {\n if (transaction.type)\n return transaction.type as GetTransactionType<transaction>\n\n if (typeof transaction.authorizationList !== 'undefined')\n return 'eip7702' as any\n\n if (\n typeof transaction.blobs !== 'undefined' ||\n typeof transaction.blobVersionedHashes !== 'undefined' ||\n typeof transaction.maxFeePerBlobGas !== 'undefined' ||\n typeof transaction.sidecars !== 'undefined'\n )\n return 'eip4844' as any\n\n if (\n typeof transaction.maxFeePerGas !== 'undefined' ||\n typeof transaction.maxPriorityFeePerGas !== 'undefined'\n ) {\n return 'eip1559' as any\n }\n\n if (typeof transaction.gasPrice !== 'undefined') {\n if (typeof transaction.accessList !== 'undefined') return 'eip2930' as any\n return 'legacy' as any\n }\n\n throw new InvalidSerializableTransactionError({ transaction })\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////\n// Types\n\ntype BaseProperties = {\n accessList?: undefined\n authorizationList?: undefined\n blobs?: undefined\n blobVersionedHashes?: undefined\n gasPrice?: undefined\n maxFeePerBlobGas?: undefined\n maxFeePerGas?: undefined\n maxPriorityFeePerGas?: undefined\n sidecars?: undefined\n}\n\ntype LegacyProperties = Assign<BaseProperties, FeeValuesLegacy>\ntype EIP1559Properties = Assign<\n BaseProperties,\n OneOf<\n | {\n maxFeePerGas: FeeValuesEIP1559['maxFeePerGas']\n }\n | {\n maxPriorityFeePerGas: FeeValuesEIP1559['maxPriorityFeePerGas']\n },\n FeeValuesEIP1559\n > & {\n accessList?: TransactionSerializableEIP2930['accessList'] | undefined\n }\n>\ntype EIP2930Properties = Assign<\n ExactPartial<LegacyProperties>,\n {\n accessList: TransactionSerializableEIP2930['accessList']\n }\n>\ntype EIP4844Properties = Assign<\n ExactPartial<EIP1559Properties>,\n ExactPartial<FeeValuesEIP4844> &\n OneOf<\n | {\n blobs: TransactionSerializableEIP4844['blobs']\n }\n | {\n blobVersionedHashes: TransactionSerializableEIP4844['blobVersionedHashes']\n }\n | {\n sidecars: TransactionSerializableEIP4844['sidecars']\n },\n TransactionSerializableEIP4844\n >\n>\ntype EIP7702Properties = Assign<\n ExactPartial<EIP1559Properties>,\n {\n authorizationList: TransactionSerializableEIP7702['authorizationList']\n }\n>\n","import {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport {\n InvalidStorageKeySizeError,\n type InvalidStorageKeySizeErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Hex } from '../../types/misc.js'\nimport type { AccessList } from '../../types/transaction.js'\nimport { type IsAddressErrorType, isAddress } from '../address/isAddress.js'\nimport type { RecursiveArray } from '../encoding/toRlp.js'\n\nexport type SerializeAccessListErrorType =\n | InvalidStorageKeySizeErrorType\n | InvalidAddressErrorType\n | IsAddressErrorType\n | ErrorType\n\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(\n accessList?: AccessList | undefined,\n): RecursiveArray<Hex> {\n if (!accessList || accessList.length === 0) return []\n\n const serializedAccessList = []\n for (let i = 0; i < accessList.length; i++) {\n const { address, storageKeys } = accessList[i]\n\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\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address })\n }\n\n serializedAccessList.push([address, storageKeys])\n }\n return serializedAccessList\n}\n","import type { Chain } from '../types/chain.js'\n\n/**\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} as const satisfies Chain['contracts']\n","import type { ChainFormatters } from '../types/chain.js'\nimport type { RpcTransaction } from '../types/rpc.js'\nimport { hexToBigInt } from '../utils/encoding/fromHex.js'\nimport { defineBlock } from '../utils/formatters/block.js'\nimport {\n defineTransaction,\n formatTransaction,\n} from '../utils/formatters/transaction.js'\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js'\nimport type { OpStackBlock, OpStackRpcBlock } from './types/block.js'\nimport type {\n OpStackRpcTransaction,\n OpStackRpcTransactionReceipt,\n OpStackTransaction,\n OpStackTransactionReceipt,\n} from './types/transaction.js'\n\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args: OpStackRpcBlock): OpStackBlock {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string') return transaction\n const formatted = formatTransaction(\n transaction as RpcTransaction,\n ) as OpStackTransaction\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 } as OpStackBlock\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args: OpStackRpcTransaction): OpStackTransaction {\n const transaction = {} as OpStackTransaction\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: OpStackRpcTransactionReceipt): OpStackTransactionReceipt {\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 } as OpStackTransactionReceipt\n },\n }),\n} as const satisfies ChainFormatters\n","import { InvalidAddressError } from '../errors/address.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ChainSerializers } from '../types/chain.js'\nimport type { Hex, Signature } from '../types/misc.js'\nimport type { TransactionSerializable } from '../types/transaction.js'\nimport type { RequiredBy } from '../types/utils.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 {\n type SerializeTransactionErrorType as SerializeTransactionErrorType_,\n serializeTransaction as serializeTransaction_,\n} from '../utils/transaction/serializeTransaction.js'\nimport type {\n OpStackTransactionSerializable,\n TransactionSerializableDeposit,\n TransactionSerializedDeposit,\n} from './types/transaction.js'\n\nexport type SerializeTransactionReturnType = ReturnType<\n typeof serializeTransaction\n>\n\nexport type SerializeTransactionErrorType =\n | SerializeTransactionErrorType_\n | ErrorType\n\nexport function serializeTransaction(\n transaction: OpStackTransactionSerializable,\n signature?: Signature,\n) {\n if (isDeposit(transaction)) return serializeTransactionDeposit(transaction)\n return serializeTransaction_(\n transaction as TransactionSerializable,\n signature,\n )\n}\n\nexport const serializers = {\n transaction: serializeTransaction,\n} as const satisfies ChainSerializers\n\n//////////////////////////////////////////////////////////////////////////////\n// Serializers\n\nexport type SerializeTransactionDepositReturnType = TransactionSerializedDeposit\n\nfunction serializeTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n): SerializeTransactionDepositReturnType {\n assertTransactionDeposit(transaction)\n\n const { sourceHash, data, from, gas, isSystemTx, mint, to, value } =\n transaction\n\n const serializedTransaction: Hex[] = [\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\n return concatHex([\n '0x7e',\n toRlp(serializedTransaction),\n ]) as SerializeTransactionDepositReturnType\n}\n\nfunction isDeposit(\n transaction: OpStackTransactionSerializable,\n): transaction is RequiredBy<TransactionSerializableDeposit, 'type'> {\n if (transaction.type === 'deposit') return true\n if (typeof transaction.sourceHash !== 'undefined') return true\n return false\n}\n\nexport function assertTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n) {\n const { from, to } = transaction\n if (from && !isAddress(from)) throw new InvalidAddressError({ address: from })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n}\n","import { contracts } from './contracts.js'\nimport { formatters } from './formatters.js'\nimport { serializers } from './serializers.js'\n\nexport const chainConfig = {\n blockTime: 2_000,\n contracts,\n formatters,\n serializers,\n} as const\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const arbitrum = /*#__PURE__*/ defineChain({\n id: 42_161,\n name: 'Arbitrum One',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: ['https://arb1.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://arbiscan.io',\n apiUrl: 'https://api.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 7654707,\n },\n },\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const arbitrumSepolia = /*#__PURE__*/ defineChain({\n id: 421_614,\n name: 'Arbitrum Sepolia',\n blockTime: 250,\n nativeCurrency: {\n name: 'Arbitrum Sepolia Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rollup.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://sepolia.arbiscan.io',\n apiUrl: 'https://api-sepolia.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 81930,\n },\n },\n testnet: true,\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 1 // mainnet\n\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\nexport const basePreconf = /*#__PURE__*/ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: ['https://mainnet-preconf.base.org'],\n },\n },\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 11_155_111 // sepolia\n\nexport const baseSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 84532,\n network: 'base-sepolia',\n name: 'Base Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.base.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://sepolia.basescan.org',\n apiUrl: 'https://api-sepolia.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x49f53e41452c74589e85ca1677426ba426459e85',\n blockCreated: 4446677,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xfd0Bf71F60660E2f608ed56e1659C450eB113120',\n blockCreated: 4446677,\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1059647,\n },\n },\n testnet: true,\n sourceId,\n})\n\nexport const baseSepoliaPreconf = /*#__PURE__*/ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: ['https://sepolia-preconf.base.org'],\n },\n },\n})\n","import type { Account } from '../../accounts/types.js'\nimport { parseAccount } from '../../accounts/utils/parseAccount.js'\nimport type { EstimateGasParameters as EstimateGasParameters_base } from '../../actions/public/estimateGas.js'\nimport type { Client } from '../../clients/createClient.js'\nimport type { Transport } from '../../clients/transports/createTransport.js'\nimport { AccountNotFoundError } from '../../errors/account.js'\nimport type { BaseError } from '../../errors/base.js'\nimport type { GetAccountParameter } from '../../types/account.js'\nimport type { Chain } from '../../types/chain.js'\nimport type { TransactionRequest } from '../../types/transaction.js'\nimport type { Filter } from '../../types/utils.js'\nimport { numberToHex } from '../../utils/encoding/toHex.js'\nimport { getCallError } from '../../utils/errors/getCallError.js'\nimport { extract } from '../../utils/formatters/extract.js'\nimport { formatTransactionRequest } from '../../utils/formatters/transactionRequest.js'\nimport {\n type AssertRequestParameters,\n assertRequest,\n} from '../../utils/transaction/assertRequest.js'\nimport type { LineaRpcSchema } from '../types/rpc.js'\n\nexport type EstimateGasParameters<\n chain extends Chain | undefined = Chain | undefined,\n account extends Account | undefined = Account | undefined,\n> = EstimateGasParameters_base<chain> & GetAccountParameter<account>\n\nexport type EstimateGasReturnType = {\n gasLimit: bigint\n baseFeePerGas: bigint\n priorityFeePerGas: bigint\n}\n\n/**\n * Estimates the gas and fees per gas necessary to complete a transaction without submitting it to the network.\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateGasParameters}\n * @returns A gas estimate and fees per gas (in wei). {@link EstimateGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseEther } from 'viem'\n * import { linea } from 'viem/chains'\n * import { estimateGas } from 'viem/linea'\n *\n * const client = createPublicClient({\n * chain: linea,\n * transport: http(),\n * })\n * const gasEstimate = await estimateGas(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 0n,\n * })\n */\nexport async function estimateGas<\n chain extends Chain | undefined,\n account extends Account | undefined,\n>(\n client: Client<Transport, chain, account>,\n args: EstimateGasParameters<chain>,\n): Promise<EstimateGasReturnType> {\n const { account: account_ = client.account } = args\n\n if (!account_) throw new AccountNotFoundError()\n const account = parseAccount(account_)\n\n try {\n const {\n accessList,\n blockNumber,\n blockTag,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n ...rest\n } = args\n\n const blockNumberHex =\n typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined\n const block = blockNumberHex || blockTag\n\n assertRequest(args as AssertRequestParameters)\n\n const chainFormat = client.chain?.formatters?.transactionRequest?.format\n const format = chainFormat || formatTransactionRequest\n\n const request = format(\n {\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n } as TransactionRequest,\n 'estimateGas',\n )\n\n type LineaEstimateGasSchema = Filter<\n LineaRpcSchema,\n { Method: 'linea_estimateGas' }\n >[0]\n const { baseFeePerGas, gasLimit, priorityFeePerGas } =\n await client.request<LineaEstimateGasSchema>({\n method: 'linea_estimateGas',\n params: block ? [request, block] : [request],\n })\n return {\n baseFeePerGas: BigInt(baseFeePerGas),\n gasLimit: BigInt(gasLimit),\n priorityFeePerGas: BigInt(priorityFeePerGas),\n }\n } catch (err) {\n throw getCallError(err as BaseError, {\n ...args,\n account,\n chain: client.chain,\n })\n }\n}\n","import { BaseError } from './base.js'\n\nexport type AccountNotFoundErrorType = AccountNotFoundError & {\n name: 'AccountNotFoundError'\n}\nexport class AccountNotFoundError extends BaseError {\n constructor({ docsPath }: { docsPath?: string | undefined } = {}) {\n super(\n [\n 'Could not find an Account to execute with this Action.',\n 'Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.',\n ].join('\\n'),\n {\n docsPath,\n docsSlug: 'account',\n name: 'AccountNotFoundError',\n },\n )\n }\n}\n\nexport type AccountTypeNotSupportedErrorType = AccountTypeNotSupportedError & {\n name: 'AccountTypeNotSupportedError'\n}\nexport class AccountTypeNotSupportedError extends BaseError {\n constructor({\n docsPath,\n metaMessages,\n type,\n }: {\n docsPath?: string | undefined\n metaMessages?: string[] | undefined\n type: string\n }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath,\n metaMessages,\n name: 'AccountTypeNotSupportedError',\n })\n }\n}\n","import type { ChainConfig, ChainEstimateFeesPerGasFn } from '../types/chain.js'\nimport { estimateGas } from './actions/estimateGas.js'\n\nexport const chainConfig = {\n fees: {\n estimateFeesPerGas,\n async maxPriorityFeePerGas({ block, client, request }) {\n const response = await estimateFeesPerGas({\n block,\n client,\n multiply: (x) => x,\n request,\n type: 'eip1559',\n })\n // Returning `null` will trigger the base `estimateMaxPriorityFeePerGas` to perform\n // fallback mechanisms to estimate priority fee.\n if (!response?.maxPriorityFeePerGas) return null\n return response.maxPriorityFeePerGas\n },\n },\n} as const satisfies ChainConfig\n\n///////////////////////////////////////////////////////////////////////////\n// Internal\n///////////////////////////////////////////////////////////////////////////\n\nasync function estimateFeesPerGas({\n client,\n multiply,\n request,\n type,\n}: Parameters<ChainEstimateFeesPerGasFn>[0]): ReturnType<ChainEstimateFeesPerGasFn> {\n try {\n const response = await estimateGas(client, {\n ...request,\n account: request?.account!,\n })\n const { priorityFeePerGas: maxPriorityFeePerGas } = response\n\n const baseFeePerGas = multiply(BigInt(response.baseFeePerGas))\n const maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas\n\n if (type === 'legacy') return { gasPrice: maxFeePerGas }\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n }\n } catch {\n // Returning `null` will trigger the base `estimateFeesPerGas` to perform\n // fallback mechanisms to estimate fees.\n return null\n }\n}\n","import { chainConfig } from '../../linea/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const linea = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_144,\n name: 'Linea Mainnet',\n blockTime: 2000,\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.linea.build'],\n webSocket: ['wss://rpc.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://lineascan.build',\n apiUrl: 'https://api.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 42,\n },\n ensRegistry: {\n address: '0x50130b669B28C339991d8676FA73CF122a121267',\n blockCreated: 6682888,\n },\n ensUniversalResolver: {\n address: '0x4D41762915F83c76EcaF6776d9b08076aA32b492',\n blockCreated: 22_222_151,\n },\n },\n ensTlds: ['.linea.eth'],\n testnet: false,\n})\n","import { chainConfig } from '../../linea/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const lineaSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_141,\n name: 'Linea Sepolia Testnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.sepolia.linea.build'],\n webSocket: ['wss://rpc.sepolia.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.lineascan.build',\n apiUrl: 'https://api-sepolia.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 227427,\n },\n ensRegistry: {\n address: '0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7',\n blockCreated: 2395094,\n },\n ensUniversalResolver: {\n address: '0x4D41762915F83c76EcaF6776d9b08076aA32b492',\n blockCreated: 17_168_484,\n },\n },\n ensTlds: ['.linea.eth'],\n testnet: true,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const mainnet = /*#__PURE__*/ defineChain({\n id: 1,\n name: 'Ethereum',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n blockTime: 12_000,\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 ensUniversalResolver: {\n address: '0xeeeeeeee14d718c2b47d9923deab1335e144eeee',\n blockCreated: 23_085_558,\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14_353_601,\n },\n },\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 1 // mainnet\n\nexport const optimism = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 10,\n name: 'OP Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Optimism Explorer',\n url: 'https://optimistic.etherscan.io',\n apiUrl: 'https://api-optimistic.etherscan.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xe5965Ab5962eDc7477C8520243A95517CD252fA9',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xdfe97868233d1aa22e815a266982f2cf17685a27',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 4286263,\n },\n portal: {\n [sourceId]: {\n address: '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',\n },\n },\n },\n sourceId,\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 11_155_111 // sepolia\n\nexport const optimismSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 11155420,\n name: 'OP Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://optimism-sepolia.blockscout.com',\n apiUrl: 'https://optimism-sepolia.blockscout.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1620204,\n },\n portal: {\n [sourceId]: {\n address: '0x16Fc5058F25648194471939df75CF27A2fdC48BC',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1',\n },\n },\n },\n testnet: true,\n sourceId,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const scroll = /*#__PURE__*/ defineChain({\n id: 534_352,\n name: 'Scroll',\n blockTime: 3000,\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.scroll.io'],\n webSocket: ['wss://wss-rpc.scroll.io/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://scrollscan.com',\n apiUrl: 'https://api.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14,\n },\n },\n testnet: false,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const scrollSepolia = /*#__PURE__*/ defineChain({\n id: 534_351,\n name: 'Scroll Sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rpc.scroll.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://sepolia.scrollscan.com',\n apiUrl: 'https://api-sepolia.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 9473,\n },\n },\n testnet: true,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const sepolia = /*#__PURE__*/ defineChain({\n id: 11_155_111,\n name: 'Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://11155111.rpc.thirdweb.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.etherscan.io',\n apiUrl: 'https://api-sepolia.etherscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 751532,\n },\n ensUniversalResolver: {\n address: '0xeeeeeeee14d718c2b47d9923deab1335e144eeee',\n blockCreated: 8_928_790,\n },\n },\n testnet: true,\n})\n","import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n scroll,\n scrollSepolia,\n sepolia,\n} from \"viem/chains\";\n\nimport { ensTestEnvL1Chain } from \"@ensnode/datasources\";\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { ArbitrumIcon } from \"./icons/ArbitrumIcon\";\nimport { ArbitrumTestnetIcon } from \"./icons/ArbitrumTestnetIcon\";\nimport { BaseIcon } from \"./icons/BaseIcon\";\nimport { BaseTestnetIcon } from \"./icons/BaseTestnetIcon\";\nimport { EthereumIcon } from \"./icons/EthereumIcon\";\nimport { EthereumLocalIcon } from \"./icons/EthereumLocalIcon\";\nimport { EthereumTestnetIcon } from \"./icons/EthereumTestnetIcon\";\nimport { LineaIcon } from \"./icons/LineaIcon\";\nimport { LineaTestnetIcon } from \"./icons/LineaTestnetIcon\";\nimport { OptimismIcon } from \"./icons/OptimismIcon\";\nimport { OptimismTestnetIcon } from \"./icons/OptimismTestnetIcon\";\nimport { ScrollIcon } from \"./icons/ScrollIcon\";\nimport { ScrollTestnetIcon } from \"./icons/ScrollTestnetIcon\";\nimport { UnrecognizedChainIcon } from \"./icons/UnrecognizedChainIcon\";\n\nexport interface ChainIconProps {\n chainId: ChainId;\n width?: number;\n height?: number;\n}\n\n/**\n * Mapping of {@link ChainId} to chain icon.\n */\nconst chainIcons = new Map<number, React.ComponentType<React.SVGProps<SVGSVGElement>>>([\n // mainnet\n [mainnet.id, EthereumIcon],\n [base.id, BaseIcon],\n [linea.id, LineaIcon],\n [optimism.id, OptimismIcon],\n [arbitrum.id, ArbitrumIcon],\n [scroll.id, ScrollIcon],\n\n // sepolia\n [sepolia.id, EthereumTestnetIcon],\n [baseSepolia.id, BaseTestnetIcon],\n [lineaSepolia.id, LineaTestnetIcon],\n [optimismSepolia.id, OptimismTestnetIcon],\n [arbitrumSepolia.id, ArbitrumTestnetIcon],\n [scrollSepolia.id, ScrollTestnetIcon],\n\n // ens-test-env\n [ensTestEnvL1Chain.id, EthereumLocalIcon],\n]);\n\n/**\n * Renders an icon for the provided chain ID.\n */\nexport function ChainIcon({ chainId, width = 20, height = 20 }: ChainIconProps) {\n const Icon = chainIcons.get(chainId) || UnrecognizedChainIcon;\n return <Icon width={width} height={height} />;\n}\n","import type React from \"react\";\n\nexport const ArbitrumIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask id=\"mask0_1105_4046\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"18\" height=\"20\">\n <path d=\"M18 0H0V20H18V0Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_1105_4046)\">\n <path\n d=\"M10.5066 11.5199L9.52179 14.1748C9.49274 14.2484 9.49274 14.3302 9.52179 14.4039L11.2129 18.9734L13.17 17.8606L10.8224 11.5199C10.7683 11.3726 10.5606 11.3726 10.5066 11.5199Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M12.4786 7.05258C12.4246 6.90533 12.2169 6.90533 12.1629 7.05258L11.1781 9.70751C11.149 9.7812 11.149 9.86301 11.1781 9.93664L13.9495 17.4188L15.9066 16.306L12.4786 7.05258Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M9 1.23952C9.04984 1.23952 9.09559 1.25179 9.14127 1.27634L16.6039 5.51851C16.6912 5.5676 16.7452 5.6576 16.7452 5.75578V14.2401C16.7452 14.3383 16.6912 14.4283 16.6039 14.4774L9.14127 18.7237C9.09974 18.7482 9.04984 18.7605 9 18.7605C8.95016 18.7605 8.90441 18.7482 8.85873 18.7237L1.40028 14.4815C1.31302 14.4324 1.259 14.3424 1.259 14.2443V5.75578C1.259 5.6576 1.31302 5.5676 1.40028 5.51851L8.86289 1.27634C8.90441 1.25179 8.95432 1.23952 9 1.23952ZM9 0C8.7341 0 8.46813 0.0695437 8.23128 0.204541L0.768699 4.44672C0.295014 4.71671 0 5.21579 0 5.75578V14.2401C0 14.7801 0.295014 15.2833 0.768699 15.5533L8.23128 19.7954C8.46813 19.9304 8.7341 20 9 20C9.2659 20 9.53187 19.9304 9.76872 19.7954L17.2313 15.5533C17.7091 15.2833 18 14.7842 18 14.2401V5.75578C18 5.21579 17.705 4.71262 17.2313 4.44263L9.77288 0.204541C9.53187 0.0695437 9.2659 0 9 0Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M4.07031 17.4269L4.75591 15.5779L6.13541 16.7069L4.84732 17.8687L4.07031 17.4269Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M8.37115 5.15039H6.48059C6.33932 5.15039 6.21046 5.2363 6.16477 5.3672L2.10938 16.3142L4.06644 17.4269L8.53321 5.3713C8.57057 5.26493 8.49162 5.15039 8.37115 5.15039Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M11.6831 5.15039H9.79251C9.65125 5.15039 9.52239 5.2363 9.47671 5.3672L4.84375 17.8687L6.80079 18.9815L11.841 5.37538C11.8825 5.26493 11.7995 5.15039 11.6831 5.15039Z\"\n fill=\"#1B4ADD\"\n />\n </g>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ArbitrumTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask id=\"mask0_1105_4086\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"18\" height=\"20\">\n <path d=\"M18 0H0V20H18V0Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_1105_4086)\">\n <path\n d=\"M10.5066 11.5199L9.52179 14.1748C9.49274 14.2484 9.49274 14.3302 9.52179 14.4039L11.2129 18.9734L13.17 17.8606L10.8224 11.5199C10.7683 11.3726 10.5606 11.3726 10.5066 11.5199Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M12.4786 7.05258C12.4246 6.90533 12.2169 6.90533 12.1629 7.05258L11.1781 9.70751C11.149 9.7812 11.149 9.86301 11.1781 9.93664L13.9495 17.4188L15.9066 16.306L12.4786 7.05258Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M9 1.23952C9.04984 1.23952 9.09559 1.25179 9.14127 1.27634L16.6039 5.51851C16.6912 5.5676 16.7452 5.6576 16.7452 5.75578V14.2401C16.7452 14.3383 16.6912 14.4283 16.6039 14.4774L9.14127 18.7237C9.09974 18.7482 9.04984 18.7605 9 18.7605C8.95016 18.7605 8.90441 18.7482 8.85873 18.7237L1.40028 14.4815C1.31302 14.4324 1.259 14.3424 1.259 14.2443V5.75578C1.259 5.6576 1.31302 5.5676 1.40028 5.51851L8.86289 1.27634C8.90441 1.25179 8.95432 1.23952 9 1.23952ZM9 0C8.7341 0 8.46813 0.0695437 8.23128 0.204541L0.768699 4.44672C0.295014 4.71671 0 5.21579 0 5.75578V14.2401C0 14.7801 0.295014 15.2833 0.768699 15.5533L8.23128 19.7954C8.46813 19.9304 8.7341 20 9 20C9.2659 20 9.53187 19.9304 9.76872 19.7954L17.2313 15.5533C17.7091 15.2833 18 14.7842 18 14.2401V5.75578C18 5.21579 17.705 4.71262 17.2313 4.44263L9.77288 0.204541C9.53187 0.0695437 9.2659 0 9 0Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M4.07031 17.4269L4.75591 15.5779L6.13541 16.7069L4.84732 17.8687L4.07031 17.4269Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M8.37115 5.15039H6.48059C6.33932 5.15039 6.21046 5.2363 6.16477 5.3672L2.10938 16.3142L4.06644 17.4269L8.53321 5.3713C8.57057 5.26493 8.49162 5.15039 8.37115 5.15039Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M11.6831 5.15039H9.79251C9.65125 5.15039 9.52239 5.2363 9.47671 5.3672L4.84375 17.8687L6.80079 18.9815L11.841 5.37538C11.8825 5.26493 11.7995 5.15039 11.6831 5.15039Z\"\n fill=\"#FFB300\"\n />\n </g>\n </svg>\n);\n","import type React from \"react\";\n\nexport const BaseIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"146\"\n height=\"146\"\n viewBox=\"0 0 146 146\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <circle cx=\"73\" cy=\"73\" r=\"73\" fill=\"#0052FF\" />\n <path\n d=\"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z\"\n fill=\"white\"\n />\n </svg>\n);\n","import type React from \"react\";\n\nexport const BaseTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_75_249)\">\n <path\n d=\"M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M10.0442 16.9491C13.9201 16.9491 17.062 13.8125 17.062 9.94339C17.062 6.07428 13.9201 2.93774 10.0442 2.93774C6.36701 2.93774 3.35038 5.76096 3.05078 9.35451H12.3268V10.5323H3.05078C3.35038 14.1258 6.36701 16.9491 10.0442 16.9491Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_75_249\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"12\"\n height=\"20\"\n viewBox=\"0 0 12 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M6.12793 19.2568L0.425781 11.3174L6.12793 14.6455L11.834 11.3174L6.12793 19.2568ZM11.8311 10.0029L6.12891 13.333L6.12793 13.332V13.333L0.425781 10.0029L6.12793 0.900391V0.904297L6.12891 0.900391L11.8311 10.0029Z\"\n fill=\"#272727\"\n />\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumLocalIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M10.1285 0.900879L10.0039 1.31915V13.2105L10.1285 13.3333L15.8311 10.0031L10.1285 0.900879Z\"\n fill=\"#B22222\"\n />\n <path\n d=\"M10.1285 0.900879L4.42578 10.0031L10.1285 13.3333L10.1285 7.68823V0.900879Z\"\n fill=\"#FA8072\"\n />\n <path\n d=\"M10.1288 14.6459L10.0586 14.7305V19.054L10.1288 19.2566L15.8349 11.3174L10.1288 14.6459Z\"\n fill=\"#DC143C\"\n />\n <path d=\"M10.1285 19.2566V14.6459L4.42578 11.3174L10.1285 19.2566Z\" fill=\"#FA8072\" />\n <path d=\"M10.1289 13.3333L15.8315 10.0032L10.1289 7.68799V13.3333Z\" fill=\"#8B0000\" />\n <path d=\"M4.42578 10.0032L10.1284 13.3333V7.68799L4.42578 10.0032Z\" fill=\"#CD5C5C\" />\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M10.1285 0.900879L10.0039 1.31915V13.2105L10.1285 13.3333L15.8311 10.0031L10.1285 0.900879Z\"\n fill=\"#FFD700\"\n />\n <path\n d=\"M10.1285 0.900879L4.42578 10.0031L10.1285 13.3333L10.1285 7.68823V0.900879Z\"\n fill=\"#FFEA70\"\n />\n <path\n d=\"M10.1288 14.6459L10.0586 14.7305V19.054L10.1288 19.2566L15.8349 11.3174L10.1288 14.6459Z\"\n fill=\"#FFC300\"\n />\n <path d=\"M10.1285 19.2566V14.6459L4.42578 11.3174L10.1285 19.2566Z\" fill=\"#FFEA70\" />\n <path d=\"M10.1289 13.3333L15.8315 10.0032L10.1289 7.68799V13.3333Z\" fill=\"#FFB300\" />\n <path d=\"M4.42578 10.0032L10.1284 13.3333V7.68799L4.42578 10.0032Z\" fill=\"#FFD54F\" />\n </svg>\n);\n","import type React from \"react\";\n\nexport const LineaIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"200\"\n height=\"208\"\n viewBox=\"0 0 200 208\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect width=\"199.4\" height=\"207.623\" fill=\"#61DFFF\" />\n <g clipPath=\"url(#clip0_2318_291)\">\n <path\n d=\"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z\"\n fill=\"#121212\"\n />\n <path\n d=\"M132.369 85.7575C141.687 85.7575 149.241 78.2037 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2037 123.05 85.7575 132.369 85.7575Z\"\n fill=\"#121212\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_2318_291\">\n <rect\n width=\"99.5407\"\n height=\"103.977\"\n fill=\"white\"\n transform=\"translate(49.7001 52.0134)\"\n />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const LineaTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_75_253)\">\n <path d=\"M20 0H0V20H20V0Z\" fill=\"#FFB300\" />\n <mask\n id=\"mask0_75_253\"\n style={{ maskType: \"luminance\" }}\n maskUnits=\"userSpaceOnUse\"\n x=\"5\"\n y=\"5\"\n width=\"11\"\n height=\"10\"\n >\n <path d=\"M15.1779 5.00134H5.72156V14.9991H15.1779V5.00134Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_75_253)\">\n <path\n d=\"M13.5751 14.9991H5.72156V6.62366H7.51845V13.3759H13.5751V14.9982V14.9991Z\"\n fill=\"#121212\"\n />\n <path\n d=\"M13.5751 8.24597C14.4603 8.24597 15.178 7.51964 15.178 6.62366C15.178 5.72768 14.4603 5.00134 13.5751 5.00134C12.6898 5.00134 11.9723 5.72768 11.9723 6.62366C11.9723 7.51964 12.6898 8.24597 13.5751 8.24597Z\"\n fill=\"#121212\"\n />\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_75_253\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const OptimismIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_68_566)\">\n <path\n d=\"M9.99876 15.0916V18.8278C6.15551 18.8278 3.03906 15.7113 3.03906 11.8681C3.03906 8.02486 6.15551 4.90841 9.99876 4.90841V1.17212C13.842 1.17212 16.9585 4.28861 16.9585 8.13181C16.9585 11.9751 13.842 15.0916 9.99876 15.0916Z\"\n fill=\"white\"\n />\n <path\n d=\"M10 0C4.47766 0 0 4.47765 0 9.99999C0 15.5223 4.47766 20 10 20C15.5224 20 20 15.5223 20 9.99999C20 4.47765 15.5224 0 10 0ZM10 15.0916V18.8278C6.15676 18.8278 3.04031 15.7113 3.04031 11.8681C3.04031 8.0249 6.15676 4.90845 10 4.90845V1.17216C13.8432 1.17216 16.9597 4.28865 16.9597 8.13185C16.9597 11.9751 13.8432 15.0916 10 15.0916ZM13.4432 9.96774V10.0322C11.9253 10.7883 10.7883 11.9252 10.0323 13.4432H9.96775C9.21171 11.9252 8.07471 10.7883 6.55676 10.0322V9.96774C8.07471 9.2117 9.21171 8.07475 9.96775 6.5568H10.0323C10.7883 8.07475 11.9253 9.2117 13.4432 9.96774Z\"\n fill=\"#FF0420\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_68_566\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const OptimismTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4080)\">\n <path\n d=\"M9.99876 15.0916V18.8278C6.15551 18.8278 3.03906 15.7113 3.03906 11.8681C3.03906 8.02486 6.15551 4.90841 9.99876 4.90841V1.17212C13.842 1.17212 16.9585 4.28861 16.9585 8.13181C16.9585 11.9751 13.842 15.0916 9.99876 15.0916Z\"\n fill=\"white\"\n />\n <path\n d=\"M10 0C4.47766 0 0 4.47765 0 9.99999C0 15.5223 4.47766 20 10 20C15.5224 20 20 15.5223 20 9.99999C20 4.47765 15.5224 0 10 0ZM10 15.0916V18.8278C6.15676 18.8278 3.04031 15.7113 3.04031 11.8681C3.04031 8.0249 6.15676 4.90845 10 4.90845V1.17216C13.8432 1.17216 16.9597 4.28865 16.9597 8.13185C16.9597 11.9751 13.8432 15.0916 10 15.0916ZM13.4432 9.96774V10.0322C11.9253 10.7883 10.7883 11.9252 10.0323 13.4432H9.96775C9.21171 11.9252 8.07471 10.7883 6.55676 10.0322V9.96774C8.07471 9.2117 9.21171 8.07475 9.96775 6.5568H10.0323C10.7883 8.07475 11.9253 9.2117 13.4432 9.96774Z\"\n fill=\"#FFB300\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4080\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ScrollIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4058)\">\n <path\n d=\"M18.0834 13.185V2.11004C18.0684 1.18504 17.3484 0.439209 16.4434 0.439209H5.1626C2.72927 0.475042 0.773438 2.51671 0.773438 5.01838C0.773438 5.86254 0.993438 6.58504 1.33177 7.21837C1.61927 7.74587 2.0676 8.24337 2.50844 8.61171C2.63344 8.71754 2.5751 8.67171 2.9576 8.91337C3.31224 9.12703 3.69285 9.29423 4.0901 9.41088L4.08177 16.0325C4.09677 16.3492 4.12677 16.65 4.20677 16.9284C4.45677 17.8634 5.0901 18.5784 5.9501 18.925C6.31094 19.0684 6.71511 19.1667 7.14927 19.1742L16.1576 19.2042C17.9518 19.2042 19.4076 17.7125 19.4076 15.8667C19.4098 15.3478 19.2914 14.8354 19.0618 14.37C18.8321 13.9046 18.4967 13.499 18.0834 13.185Z\"\n fill=\"#FFEEDA\"\n />\n <path\n d=\"M18.3037 15.95C18.267 17.1325 17.3187 18.0816 16.1562 18.0816L9.95703 18.0591C10.4699 17.4495 10.7511 16.6783 10.7512 15.8816C10.7512 14.5783 9.9937 13.6816 9.9937 13.6816H16.1637C17.3479 13.6816 18.3112 14.6691 18.3112 15.8816L18.3037 15.95Z\"\n fill=\"#EBC28E\"\n />\n <path\n d=\"M3.09594 7.67732C2.3826 6.98399 1.8826 6.08816 1.8826 5.02566V4.91232C1.94094 3.09732 3.39844 1.63566 5.1701 1.58316H16.4509C16.7451 1.59899 16.9801 1.80982 16.9801 2.11816V11.8965C17.2384 11.9423 17.3634 11.9798 17.6134 12.0698C17.8118 12.1448 18.0834 12.3032 18.0834 12.3032V2.11816C18.0684 1.19149 17.3484 0.444824 16.4434 0.444824H5.1626C2.72927 0.483158 0.773438 2.52482 0.773438 5.02566C0.773438 6.47982 1.4201 7.72232 2.47927 8.59649C2.5526 8.65649 2.61927 8.73232 2.8101 8.73232C3.14094 8.73232 3.37677 8.46066 3.36177 8.16732C3.35427 7.91816 3.25094 7.82816 3.09594 7.67732Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M16.1561 12.5366H7.30943C7.02046 12.5421 6.74538 12.6616 6.54417 12.8691C6.34295 13.0765 6.23191 13.3551 6.23526 13.6441V14.9474C6.25026 15.5499 6.75026 16.0624 7.34609 16.0624H8.00026V14.9474H7.34609V13.6741H7.70609C8.82443 13.6741 9.64776 14.7366 9.64776 15.8741C9.64776 16.8833 8.75026 18.1716 7.25026 18.0658C5.91943 17.9758 5.19859 16.7633 5.19859 15.8741V4.82995C5.19859 4.33245 4.80109 3.92578 4.31609 3.92578H3.43359V5.05578H4.08776V15.8808C4.05109 18.0808 5.61776 19.1891 7.25026 19.1891L16.1636 19.2191C17.9578 19.2191 19.4136 17.7274 19.4136 15.8816C19.4136 14.0358 17.9511 12.5366 16.1561 12.5366ZM18.3028 15.9491C18.2661 17.1324 17.3169 18.0816 16.1553 18.0816L9.95526 18.0591C10.4684 17.4495 10.7499 16.6784 10.7503 15.8816C10.7503 14.5783 9.99193 13.6816 9.99193 13.6816H16.1644C17.3478 13.6816 18.3111 14.6683 18.3111 15.8816L18.3028 15.9491ZM13.7728 5.25911H7.10276V4.12911H13.7728C13.8461 4.12998 13.9185 4.14529 13.9859 4.17416C14.0533 4.20302 14.1144 4.24488 14.1656 4.29735C14.2168 4.34982 14.2572 4.41186 14.2845 4.47994C14.3117 4.54801 14.3253 4.62079 14.3244 4.69411C14.3253 4.76744 14.3117 4.84022 14.2845 4.90829C14.2572 4.97637 14.2168 5.03841 14.1656 5.09088C14.1144 5.14335 14.0533 5.18521 13.9859 5.21407C13.9185 5.24294 13.8461 5.25824 13.7728 5.25911Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M13.7755 10.5775H7.10547V9.4475H13.7755C13.8488 9.44837 13.9212 9.46367 13.9886 9.49254C14.056 9.5214 14.1171 9.56327 14.1683 9.61573C14.2196 9.6682 14.2599 9.73024 14.2872 9.79832C14.3144 9.8664 14.328 9.93917 14.3271 10.0125C14.328 10.0858 14.3144 10.1586 14.2872 10.2267C14.2599 10.2948 14.2196 10.3568 14.1683 10.4093C14.1171 10.4617 14.056 10.5036 13.9886 10.5325C13.9212 10.5613 13.8488 10.5766 13.7755 10.5775ZM14.9521 7.91833H7.10547V6.78833H14.9446C15.018 6.7892 15.0904 6.80451 15.1578 6.83337C15.2252 6.86224 15.2863 6.9041 15.3375 6.95656C15.3887 7.00903 15.4291 7.07107 15.4564 7.13915C15.4836 7.20723 15.4972 7.28001 15.4963 7.35333C15.4983 7.42632 15.4857 7.49898 15.4594 7.56706C15.433 7.63515 15.3933 7.6973 15.3427 7.7499C15.292 7.80249 15.2314 7.84447 15.1643 7.87339C15.0973 7.9023 15.0251 7.91758 14.9521 7.91833Z\"\n fill=\"#101010\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4058\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ScrollTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4096)\">\n <path\n d=\"M18.0834 13.185V2.11004C18.0684 1.18504 17.3484 0.439209 16.4434 0.439209H5.1626C2.72927 0.475042 0.773438 2.51671 0.773438 5.01838C0.773438 5.86254 0.993438 6.58504 1.33177 7.21837C1.61927 7.74587 2.0676 8.24337 2.50844 8.61171C2.63344 8.71754 2.5751 8.67171 2.9576 8.91337C3.31224 9.12703 3.69285 9.29423 4.0901 9.41088L4.08177 16.0325C4.09677 16.3492 4.12677 16.65 4.20677 16.9284C4.45677 17.8634 5.0901 18.5784 5.9501 18.925C6.31094 19.0684 6.71511 19.1667 7.14927 19.1742L16.1576 19.2042C17.9518 19.2042 19.4076 17.7125 19.4076 15.8667C19.4098 15.3478 19.2914 14.8354 19.0618 14.37C18.8321 13.9046 18.4967 13.499 18.0834 13.185Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M18.3037 15.95C18.267 17.1325 17.3187 18.0816 16.1562 18.0816L9.95703 18.0591C10.4699 17.4495 10.7511 16.6783 10.7512 15.8816C10.7512 14.5783 9.9937 13.6816 9.9937 13.6816H16.1637C17.3479 13.6816 18.3112 14.6691 18.3112 15.8816L18.3037 15.95Z\"\n fill=\"#DF9C00\"\n />\n <path\n d=\"M3.09594 7.67732C2.3826 6.98399 1.8826 6.08816 1.8826 5.02566V4.91232C1.94094 3.09732 3.39844 1.63566 5.1701 1.58316H16.4509C16.7451 1.59899 16.9801 1.80982 16.9801 2.11816V11.8965C17.2384 11.9423 17.3634 11.9798 17.6134 12.0698C17.8118 12.1448 18.0834 12.3032 18.0834 12.3032V2.11816C18.0684 1.19149 17.3484 0.444824 16.4434 0.444824H5.1626C2.72927 0.483158 0.773438 2.52482 0.773438 5.02566C0.773438 6.47982 1.4201 7.72232 2.47927 8.59649C2.5526 8.65649 2.61927 8.73232 2.8101 8.73232C3.14094 8.73232 3.37677 8.46066 3.36177 8.16732C3.35427 7.91816 3.25094 7.82816 3.09594 7.67732Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M16.1561 12.5366H7.30943C7.02046 12.5421 6.74538 12.6616 6.54417 12.8691C6.34295 13.0765 6.23191 13.3551 6.23526 13.6441V14.9474C6.25026 15.5499 6.75026 16.0624 7.34609 16.0624H8.00026V14.9474H7.34609V13.6741H7.70609C8.82443 13.6741 9.64776 14.7366 9.64776 15.8741C9.64776 16.8833 8.75026 18.1716 7.25026 18.0658C5.91943 17.9758 5.19859 16.7633 5.19859 15.8741V4.82995C5.19859 4.33245 4.80109 3.92578 4.31609 3.92578H3.43359V5.05578H4.08776V15.8808C4.05109 18.0808 5.61776 19.1891 7.25026 19.1891L16.1636 19.2191C17.9578 19.2191 19.4136 17.7274 19.4136 15.8816C19.4136 14.0358 17.9511 12.5366 16.1561 12.5366ZM18.3028 15.9491C18.2661 17.1324 17.3169 18.0816 16.1553 18.0816L9.95526 18.0591C10.4684 17.4495 10.7499 16.6784 10.7503 15.8816C10.7503 14.5783 9.99193 13.6816 9.99193 13.6816H16.1644C17.3478 13.6816 18.3111 14.6683 18.3111 15.8816L18.3028 15.9491ZM13.7728 5.25911H7.10276V4.12911H13.7728C13.8461 4.12998 13.9185 4.14529 13.9859 4.17416C14.0533 4.20302 14.1144 4.24488 14.1656 4.29735C14.2168 4.34982 14.2572 4.41186 14.2845 4.47994C14.3117 4.54801 14.3253 4.62079 14.3244 4.69411C14.3253 4.76744 14.3117 4.84022 14.2845 4.90829C14.2572 4.97637 14.2168 5.03841 14.1656 5.09088C14.1144 5.14335 14.0533 5.18521 13.9859 5.21407C13.9185 5.24294 13.8461 5.25824 13.7728 5.25911Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M13.7755 10.5775H7.10547V9.4475H13.7755C13.8488 9.44837 13.9212 9.46367 13.9886 9.49254C14.056 9.5214 14.1171 9.56327 14.1683 9.61573C14.2196 9.6682 14.2599 9.73024 14.2872 9.79832C14.3144 9.8664 14.328 9.93917 14.3271 10.0125C14.328 10.0858 14.3144 10.1586 14.2872 10.2267C14.2599 10.2948 14.2196 10.3568 14.1683 10.4093C14.1171 10.4617 14.056 10.5036 13.9886 10.5325C13.9212 10.5613 13.8488 10.5766 13.7755 10.5775ZM14.9521 7.91833H7.10547V6.78833H14.9446C15.018 6.7892 15.0904 6.80451 15.1578 6.83337C15.2252 6.86224 15.2863 6.9041 15.3375 6.95656C15.3887 7.00903 15.4291 7.07107 15.4564 7.13915C15.4836 7.20723 15.4972 7.28001 15.4963 7.35333C15.4983 7.42632 15.4857 7.49898 15.4594 7.56706C15.433 7.63515 15.3933 7.6973 15.3427 7.7499C15.292 7.80249 15.2314 7.84447 15.1643 7.87339C15.0973 7.9023 15.0251 7.91758 14.9521 7.91833Z\"\n fill=\"#101010\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4096\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const UnrecognizedChainIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M1.75004 5.83325L9.00004 9.99992M9.00004 9.99992L16.25 5.83325M9.00004 9.99992L9 18.3333M16.5 6.6665C16.4997 6.37423 16.4225 6.08718 16.2763 5.83414C16.13 5.5811 15.9198 5.37097 15.6667 5.22484L9.83333 1.8915C9.57997 1.74522 9.29256 1.66821 9 1.66821C8.70744 1.66821 8.42003 1.74522 8.16667 1.8915L2.33333 5.22484C2.08022 5.37097 1.86998 5.5811 1.72372 5.83414C1.57745 6.08718 1.5003 6.37423 1.5 6.6665V13.3332C1.5003 13.6254 1.57745 13.9125 1.72372 14.1655C1.86998 14.4186 2.08022 14.6287 2.33333 14.7748L8.16667 18.1082C8.42003 18.2545 8.70744 18.3315 9 18.3315C9.29256 18.3315 9.57997 18.2545 9.83333 18.1082L15.6667 14.7748C15.9198 14.6287 16.13 14.4186 16.2763 14.1655C16.4225 13.9125 16.4997 13.6254 16.5 13.3332V6.6665Z\"\n stroke=\"#737373\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n","import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n scroll,\n scrollSepolia,\n sepolia,\n} from \"viem/chains\";\n\nimport { ensTestEnvL1Chain } from \"@ensnode/datasources\";\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nexport const SUPPORTED_CHAINS = [\n ensTestEnvL1Chain,\n mainnet,\n sepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n optimism,\n optimismSepolia,\n arbitrum,\n arbitrumSepolia,\n scroll,\n scrollSepolia,\n];\n\n/**\n * Mapping of {@link ChainId} to prettified chain name.\n *\n * NOTE: We prefer our custom names here, rather than those provided by default in `Chain#name`.\n */\nconst CUSTOM_CHAIN_NAMES = new Map<ChainId, string>([\n [ensTestEnvL1Chain.id, \"Ethereum Local (ens-test-env)\"],\n [mainnet.id, \"Mainnet\"],\n [sepolia.id, \"Ethereum Sepolia\"],\n [base.id, \"Base\"],\n [baseSepolia.id, \"Base Sepolia\"],\n [linea.id, \"Linea\"],\n [lineaSepolia.id, \"Linea Sepolia\"],\n [optimism.id, \"Optimism\"],\n [optimismSepolia.id, \"Optimism Sepolia\"],\n [arbitrum.id, \"Arbitrum\"],\n [arbitrumSepolia.id, \"Arbitrum Sepolia\"],\n [scroll.id, \"Scroll\"],\n [scrollSepolia.id, \"Scroll Sepolia\"],\n]);\n\n/**\n * Returns a prettified chain name for the provided chain id.\n */\nexport function getChainName(chainId: ChainId): string {\n const name = CUSTOM_CHAIN_NAMES.get(chainId);\n return name || `Unknown Chain (${chainId})`;\n}\n","import type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { getChainName } from \"../../utils/chains\";\n\nexport interface ChainNameProps {\n chainId: ChainId;\n className: string;\n}\n\n/**\n * Renders a prettified chain name for the provided {@link ChainId}.\n */\nexport const ChainName = ({ chainId, className }: ChainNameProps) => (\n <p className={className}>{getChainName(chainId)}</p>\n);\n","import { fromUnixTime, intlFormat } from \"date-fns\";\nimport { useEffect, useState } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Client-only absolute time component\n */\nexport function AbsoluteTime({\n timestamp,\n options,\n}: {\n timestamp: UnixTimestamp;\n options: Intl.DateTimeFormatOptions;\n}) {\n const date = fromUnixTime(timestamp);\n const [absoluteTime, setAbsoluteTime] = useState<string>(\"\");\n\n useEffect(() => {\n setAbsoluteTime(intlFormat(date, options));\n }, [date, options]);\n\n return <>{absoluteTime}</>;\n}\n","import { formatDistanceStrict, fromUnixTime } from \"date-fns\";\nimport { useEffect, useState } from \"react\";\n\nimport type { Duration } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Display Duration component\n */\nexport function DisplayDuration({ duration }: { duration: Duration }) {\n const [timeDistance, setTimeDistance] = useState<string>(\"\");\n\n // formatDistanceStrict needs two UnixTimestamp values\n // so we create `beginsAt` and `endsAt` timestamps\n // where `beginsAt = endsAt - duration`\n const beginsAt = fromUnixTime(0);\n const endsAt = fromUnixTime(duration);\n\n useEffect(() => {\n setTimeDistance(formatDistanceStrict(beginsAt, endsAt));\n }, [beginsAt, endsAt]);\n\n return timeDistance;\n}\n","import { formatDistance, formatDistanceStrict, fromUnixTime } from \"date-fns\";\nimport { millisecondsInSecond } from \"date-fns/constants\";\nimport type * as React from \"react\";\nimport { useEffect, useState } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { cn } from \"../../utils/cn\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport { AbsoluteTime } from \"./AbsoluteTime\";\n\n/**\n * Formats a Unix timestamp as its relative distance with now\n *\n * @param timestamp - the timestamp to format as a relative time\n * @param enforcePast - if true, enforces that the return value won't relate to the future.\n * Helpful for UI contexts where it's nonsensical for a value to relate to the future. Ex: how long ago an event happened.\n * Note how different systems may have misaligned clocks. `enforcePast` aims to protect from UI confusion when\n * the client's clock is set incorrectly in the past, such that events happening \"now\" might otherwise appear to\n * be coming from the future.\n * @param includeSeconds - if true includes seconds in the result\n * @param conciseFormatting - if true removes special prefixes / suffixes such as \"about ...\" or \"in almost ...\"\n * @param relativeTo - if defined represents the timestamp to compare with. Otherwise, the timestamp param is compared with the present.\n */\nexport function formatRelativeTime(\n timestamp: UnixTimestamp,\n enforcePast = false,\n includeSeconds = false,\n conciseFormatting = false,\n relativeTo?: UnixTimestamp,\n): string {\n const date = fromUnixTime(timestamp);\n const compareWith = typeof relativeTo !== \"undefined\" ? fromUnixTime(relativeTo) : new Date();\n\n if (\n (enforcePast && date >= compareWith) ||\n (!includeSeconds &&\n !conciseFormatting &&\n Math.abs(date.getTime() - compareWith.getTime()) < 60 * millisecondsInSecond)\n ) {\n return \"just now\";\n }\n\n if (conciseFormatting) {\n return formatDistanceStrict(date, compareWith, { addSuffix: true });\n }\n\n return formatDistance(date, compareWith, {\n addSuffix: true,\n includeSeconds,\n });\n}\n\n/**\n * Client-only relative time component\n */\nexport function RelativeTime({\n timestamp,\n enforcePast = false,\n includeSeconds = false,\n conciseFormatting = false,\n tooltipPosition = \"top\",\n tooltipStyles,\n relativeTo,\n prefix,\n contentWrapper,\n}: {\n timestamp: UnixTimestamp;\n enforcePast?: boolean;\n includeSeconds?: boolean;\n conciseFormatting?: boolean;\n tooltipPosition?: React.ComponentProps<typeof TooltipContent>[\"side\"];\n tooltipStyles?: string;\n relativeTo?: UnixTimestamp;\n prefix?: string;\n /**\n * A component to be rendered as a wrapper for the Relative Time component content.\n */\n contentWrapper?: ({ children }: React.PropsWithChildren) => React.ReactNode;\n}) {\n const [relativeTime, setRelativeTime] = useState<string>(\"\");\n\n useEffect(() => {\n setRelativeTime(\n formatRelativeTime(timestamp, enforcePast, includeSeconds, conciseFormatting, relativeTo),\n );\n }, [timestamp, conciseFormatting, enforcePast, includeSeconds, relativeTo]);\n\n const tooltipTriggerContent = (\n <>\n {prefix}\n {relativeTime}\n </>\n );\n\n return (\n <Tooltip delayDuration={250}>\n <TooltipTrigger className=\"nhui:cursor-text\">\n {typeof contentWrapper === \"function\"\n ? contentWrapper({ children: tooltipTriggerContent })\n : tooltipTriggerContent}\n </TooltipTrigger>\n <TooltipContent\n side={tooltipPosition}\n className={cn(\n \"nhui:bg-[#171717] nhui:text-xs nhui:text-white nhui:text-left nhui:shadow-md nhui:outline-none nhui:w-fit nhui:duration-0\",\n tooltipStyles,\n )}\n >\n <AbsoluteTime\n timestamp={timestamp}\n options={{\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n }}\n />{\" \"}\n (Local time)\n <br />\n <AbsoluteTime\n timestamp={timestamp}\n options={{\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n timeZone: \"UTC\",\n }}\n />{\" \"}\n (UTC)\n </TooltipContent>\n </Tooltip>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nconst TooltipArrow = TooltipPrimitive.Arrow;\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"nhui:bg-foreground nhui:text-background nhui:animate-in nhui:fade-in-0 nhui:zoom-in-95 nhui:data-[state=closed]:animate-out nhui:data-[state=closed]:fade-out-0 nhui:data-[state=closed]:zoom-out-95 nhui:data-[side=bottom]:slide-in-from-top-2 nhui:data-[side=left]:slide-in-from-right-2 nhui:data-[side=right]:slide-in-from-left-2 nhui:data-[side=top]:slide-in-from-bottom-2 nhui:z-50 nhui:w-fit nhui:origin-(--radix-tooltip-content-transform-origin) nhui:rounded-md nhui:px-3 nhui:py-1.5 nhui:text-xs nhui:text-balance\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"nhui:bg-foreground nhui:fill-foreground nhui:z-50 nhui:size-2.5 nhui:translate-y-[calc(-50%_-_2px)] nhui:rotate-45 nhui:rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, TooltipArrow };\n","import type React from \"react\";\n\nexport const EnsServiceProviderIcon = (props: React.SVGAttributes<SVGElement>) => {\n return (\n <svg\n width=\"175\"\n height=\"45\"\n viewBox=\"0 0 175 45\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect x=\"0.229241\" y=\"0.955803\" width=\"174.437\" height=\"43.5415\" rx=\"21.7708\" fill=\"white\" />\n <rect\n x=\"0.229241\"\n y=\"0.955803\"\n width=\"174.437\"\n height=\"43.5415\"\n rx=\"21.7708\"\n stroke=\"#DBDBDB\"\n strokeWidth=\"0.458482\"\n />\n <g clipPath=\"url(#clip0_5306_7300)\">\n <path\n d=\"M14.4666 19.8652C14.7642 20.501 15.5084 21.7728 15.5084 21.7728L24.0291 7.59668L15.7317 13.4317C15.248 13.7683 14.8387 14.2172 14.541 14.7408C13.7596 16.3492 13.7596 18.2194 14.4666 19.8652Z\"\n fill=\"url(#paint0_linear_5306_7300)\"\n />\n <path\n d=\"M11.1168 24.5033C11.3028 27.2337 12.6795 29.7772 14.8376 31.423L24.0281 37.8565C24.0281 37.8565 18.2608 29.5154 13.4237 21.2117C12.94 20.3514 12.6051 19.3789 12.4563 18.369C12.3819 17.9202 12.3819 17.4713 12.4563 17.0225C12.3447 17.2469 12.0842 17.7331 12.0842 17.7331C11.6005 18.743 11.2656 19.8278 11.0796 20.9499C10.9679 22.1468 10.9679 23.3437 11.1168 24.5033Z\"\n fill=\"#A0A8D4\"\n />\n <path\n d=\"M34.5625 25.6254C34.2649 24.9895 33.5207 23.7178 33.5207 23.7178L25 37.8565L33.3347 32.0589C33.8184 31.7222 34.2277 31.2734 34.5253 30.7497C35.2695 29.1413 35.3067 27.2712 34.5625 25.6254Z\"\n fill=\"url(#paint1_linear_5306_7300)\"\n />\n <path\n d=\"M37.9425 20.9499C37.7565 18.2194 36.3798 15.6759 34.2217 14.0302L25.0312 7.59668C25.0312 7.59668 30.7985 15.9378 35.6356 24.2414C36.1193 25.1017 36.4542 26.0742 36.603 27.0841C36.6774 27.533 36.6774 27.9818 36.603 28.4307C36.7147 28.2063 36.9751 27.72 36.9751 27.72C37.4588 26.7101 37.7937 25.6254 37.9797 24.5407C38.0542 23.3063 38.0542 22.1468 37.9425 20.9499Z\"\n fill=\"#A0A8D4\"\n />\n <path\n d=\"M14.5399 14.7408C14.8376 14.2172 15.2097 13.7683 15.7306 13.4317L24.0281 7.59668L15.5074 21.7354C15.5074 21.7354 14.7632 20.4636 14.4655 19.8278C13.7586 18.2194 13.7586 16.3492 14.5399 14.7408ZM11.1168 24.5033C11.3028 27.2338 12.6795 29.7772 14.8376 31.423L24.0281 37.8565C24.0281 37.8565 18.2608 29.5154 13.4237 21.2117C12.94 20.3514 12.6051 19.3789 12.4563 18.369C12.3819 17.9202 12.3819 17.4713 12.4563 17.0225C12.3446 17.2469 12.0842 17.7332 12.0842 17.7332C11.6005 18.7431 11.2656 19.8278 11.0796 20.9499C10.9679 22.1468 10.9679 23.3438 11.1168 24.5033ZM34.558 25.6254C34.2603 24.9895 33.5162 23.7178 33.5162 23.7178L24.9955 37.8565L33.3301 32.0589C33.8138 31.7222 34.2231 31.2734 34.5208 30.7497C35.265 29.1414 35.3022 27.2712 34.558 25.6254ZM37.9068 20.9873C37.7207 18.2568 36.344 15.7133 34.1859 14.0676L25.0327 7.59668C25.0327 7.59668 30.8 15.9378 35.637 24.2414C36.1208 25.1017 36.4556 26.0742 36.6045 27.0841C36.6789 27.533 36.6789 27.9818 36.6045 28.4307C36.7161 28.2063 36.9765 27.72 36.9765 27.72C37.4603 26.7101 37.7951 25.6254 37.9812 24.5407C38.0556 23.3063 38.0556 22.1468 37.9068 20.9873Z\"\n fill=\"url(#paint2_linear_5306_7300)\"\n />\n <path\n d=\"M20.6328 23.185L23.3837 25.9359L28.427 19.9756\"\n stroke=\"black\"\n strokeWidth=\"1.83393\"\n strokeLinecap=\"square\"\n />\n </g>\n <path\n d=\"M55.1627 14.7253C55.1627 15.5875 55.0012 16.326 54.6782 16.9408C54.3578 17.553 53.9201 18.0219 53.3653 18.3475C52.813 18.6732 52.1865 18.836 51.4858 18.836C50.785 18.836 50.1572 18.6732 49.6023 18.3475C49.0501 18.0193 48.6124 17.5491 48.2894 16.9369C47.969 16.3221 47.8088 15.5849 47.8088 14.7253C47.8088 13.863 47.969 13.1258 48.2894 12.5136C48.6124 11.8988 49.0501 11.4286 49.6023 11.103C50.1572 10.7774 50.785 10.6146 51.4858 10.6146C52.1865 10.6146 52.813 10.7774 53.3653 11.103C53.9201 11.4286 54.3578 11.8988 54.6782 12.5136C55.0012 13.1258 55.1627 13.863 55.1627 14.7253ZM53.7052 14.7253C53.7052 14.1183 53.6101 13.6064 53.42 13.1896C53.2324 12.7702 52.9719 12.4537 52.6385 12.2401C52.305 12.0239 51.9208 11.9158 51.4858 11.9158C51.0507 11.9158 50.6665 12.0239 50.333 12.2401C49.9996 12.4537 49.7378 12.7702 49.5476 13.1896C49.3601 13.6064 49.2663 14.1183 49.2663 14.7253C49.2663 15.3322 49.3601 15.8454 49.5476 16.2648C49.7378 16.6816 49.9996 16.9981 50.333 17.2144C50.6665 17.428 51.0507 17.5348 51.4858 17.5348C51.9208 17.5348 52.305 17.428 52.6385 17.2144C52.9719 16.9981 53.2324 16.6816 53.42 16.2648C53.6101 15.8454 53.7052 15.3322 53.7052 14.7253ZM57.0835 18.7266V10.724H62.2101V11.9392H58.5332V14.1118H61.8585V15.327H58.5332V18.7266H57.0835ZM64.0811 18.7266V10.724H69.2077V11.9392H65.5307V14.1118H68.856V15.327H65.5307V18.7266H64.0811ZM72.5283 10.724V18.7266H71.0786V10.724H72.5283ZM81.4982 13.4241H80.0368C79.9951 13.1844 79.9183 12.9721 79.8063 12.7871C79.6942 12.5996 79.5549 12.4407 79.3882 12.3104C79.2214 12.1802 79.0313 12.0825 78.8177 12.0174C78.6067 11.9496 78.3787 11.9158 78.1338 11.9158C77.6988 11.9158 77.3133 12.0252 76.9772 12.244C76.6412 12.4602 76.3781 12.778 76.1879 13.1974C75.9977 13.6142 75.9027 14.1235 75.9027 14.7253C75.9027 15.3374 75.9977 15.8532 76.1879 16.2726C76.3807 16.6894 76.6438 17.0047 76.9772 17.2183C77.3133 17.4293 77.6975 17.5348 78.1299 17.5348C78.3696 17.5348 78.5936 17.5035 78.802 17.441C79.013 17.3759 79.2019 17.2808 79.3686 17.1557C79.5379 17.0307 79.6799 16.877 79.7945 16.6947C79.9118 16.5123 79.9925 16.3039 80.0368 16.0695L81.4982 16.0773C81.4435 16.4576 81.325 16.8145 81.1426 17.1479C80.9629 17.4814 80.7271 17.7757 80.4354 18.031C80.1436 18.2837 79.8024 18.4817 79.4116 18.625C79.0209 18.7656 78.5871 18.836 78.1104 18.836C77.407 18.836 76.7792 18.6732 76.227 18.3475C75.6747 18.0219 75.2397 17.5517 74.9219 16.9369C74.6041 16.3221 74.4452 15.5849 74.4452 14.7253C74.4452 13.863 74.6054 13.1258 74.9258 12.5136C75.2462 11.8988 75.6825 11.4286 76.2348 11.103C76.7871 10.7774 77.4123 10.6146 78.1104 10.6146C78.5559 10.6146 78.9701 10.6771 79.353 10.8021C79.7359 10.9272 80.0772 11.1108 80.3768 11.3531C80.6763 11.5927 80.9225 11.8871 81.1153 12.2362C81.3107 12.5826 81.4383 12.9786 81.4982 13.4241ZM84.8257 10.724V18.7266H83.376V10.724H84.8257ZM87.9734 18.7266H86.426L89.2433 10.724H91.0329L93.8542 18.7266H92.3068L90.1694 12.3651H90.1069L87.9734 18.7266ZM88.0242 15.5888H92.2443V16.7533H88.0242V15.5888ZM95.4584 18.7266V10.724H96.9081V17.5113H100.433V18.7266H95.4584Z\"\n fill=\"black\"\n />\n <path\n d=\"M48.012 33.7266V25.724H53.2168V26.9392H49.4617V29.1118H52.9472V30.327H49.4617V32.5113H53.248V33.7266H48.012ZM61.2721 25.724V33.7266H59.9827L56.2119 28.2756H56.1455V33.7266H54.6958V25.724H55.9931L59.7599 31.1789H59.8303V25.724H61.2721ZM67.2008 27.9239C67.1643 27.5826 67.0106 27.3169 66.7397 27.1268C66.4714 26.9366 66.1223 26.8415 65.6925 26.8415C65.3903 26.8415 65.1311 26.8871 64.9149 26.9783C64.6987 27.0695 64.5333 27.1932 64.4187 27.3495C64.304 27.5058 64.2454 27.6842 64.2428 27.8848C64.2428 28.0515 64.2806 28.1961 64.3561 28.3186C64.4343 28.441 64.5398 28.5452 64.6726 28.6312C64.8055 28.7145 64.9527 28.7849 65.1142 28.8422C65.2757 28.8995 65.4385 28.9477 65.6026 28.9867L66.3529 29.1743C66.6551 29.2446 66.9455 29.3397 67.2243 29.4596C67.5056 29.5794 67.757 29.7305 67.9784 29.9128C68.2024 30.0952 68.3796 30.3153 68.5098 30.5732C68.6401 30.8311 68.7052 31.1333 68.7052 31.4797C68.7052 31.9486 68.5854 32.3615 68.3457 32.7184C68.1061 33.0727 67.7596 33.3501 67.3063 33.5507C66.8556 33.7487 66.3099 33.8477 65.6691 33.8477C65.0465 33.8477 64.5059 33.7513 64.0474 33.5585C63.5916 33.3658 63.2347 33.0844 62.9768 32.7145C62.7215 32.3446 62.5834 31.8939 62.5626 31.3625H63.9888C64.0097 31.6413 64.0956 31.8731 64.2467 32.0581C64.3978 32.243 64.5945 32.3811 64.8368 32.4722C65.0816 32.5634 65.3552 32.609 65.6573 32.609C65.9725 32.609 66.2487 32.5621 66.4857 32.4683C66.7254 32.372 66.913 32.2391 67.0484 32.0698C67.1839 31.8978 67.2529 31.6973 67.2555 31.468C67.2529 31.2596 67.1917 31.0877 67.0719 30.9522C66.952 30.8142 66.784 30.6995 66.5678 30.6084C66.3542 30.5146 66.1041 30.4312 65.8176 30.3583L64.9071 30.1238C64.248 29.9545 63.727 29.6979 63.3441 29.3541C62.9638 29.0076 62.7736 28.5478 62.7736 27.9747C62.7736 27.5032 62.9012 27.0903 63.1565 26.736C63.4144 26.3817 63.7648 26.1069 64.2077 25.9115C64.6505 25.7135 65.152 25.6146 65.712 25.6146C66.2799 25.6146 66.7775 25.7135 67.2047 25.9115C67.6345 26.1069 67.9719 26.3791 68.2168 26.7282C68.4616 27.0747 68.588 27.4732 68.5958 27.9239H67.2008ZM77.0761 27.9239C77.0396 27.5826 76.8859 27.3169 76.615 27.1268C76.3467 26.9366 75.9976 26.8415 75.5678 26.8415C75.2656 26.8415 75.0064 26.8871 74.7902 26.9783C74.574 27.0695 74.4086 27.1932 74.2939 27.3495C74.1793 27.5058 74.1207 27.6842 74.1181 27.8848C74.1181 28.0515 74.1559 28.1961 74.2314 28.3186C74.3096 28.441 74.4151 28.5452 74.5479 28.6312C74.6808 28.7145 74.828 28.7849 74.9895 28.8422C75.151 28.8995 75.3138 28.9477 75.4779 28.9867L76.2282 29.1743C76.5303 29.2446 76.8208 29.3397 77.0995 29.4596C77.3809 29.5794 77.6323 29.7305 77.8537 29.9128C78.0777 30.0952 78.2549 30.3153 78.3851 30.5732C78.5154 30.8311 78.5805 31.1333 78.5805 31.4797C78.5805 31.9486 78.4606 32.3615 78.221 32.7184C77.9813 33.0727 77.6349 33.3501 77.1816 33.5507C76.7309 33.7487 76.1852 33.8477 75.5443 33.8477C74.9217 33.8477 74.3812 33.7513 73.9227 33.5585C73.4668 33.3658 73.11 33.0844 72.8521 32.7145C72.5968 32.3446 72.4587 31.8939 72.4379 31.3625H73.8641C73.8849 31.6413 73.9709 31.8731 74.122 32.0581C74.2731 32.243 74.4698 32.3811 74.712 32.4722C74.9569 32.5634 75.2304 32.609 75.5326 32.609C75.8478 32.609 76.124 32.5621 76.361 32.4683C76.6007 32.372 76.7882 32.2391 76.9237 32.0698C77.0592 31.8978 77.1282 31.6973 77.1308 31.468C77.1282 31.2596 77.067 31.0877 76.9471 30.9522C76.8273 30.8142 76.6593 30.6995 76.4431 30.6084C76.2295 30.5146 75.9794 30.4312 75.6928 30.3583L74.7824 30.1238C74.1233 29.9545 73.6023 29.6979 73.2194 29.3541C72.839 29.0076 72.6489 28.5478 72.6489 27.9747C72.6489 27.5032 72.7765 27.0903 73.0318 26.736C73.2897 26.3817 73.6401 26.1069 74.0829 25.9115C74.5258 25.7135 75.0272 25.6146 75.5873 25.6146C76.1552 25.6146 76.6528 25.7135 77.08 25.9115C77.5098 26.1069 77.8472 26.3791 78.092 26.7282C78.3369 27.0747 78.4633 27.4732 78.4711 27.9239H77.0761ZM82.4675 33.8438C81.8657 33.8438 81.346 33.7187 80.9084 33.4687C80.4733 33.216 80.1386 32.8591 79.9041 32.398C79.6697 31.9343 79.5525 31.3886 79.5525 30.7608C79.5525 30.1434 79.6697 29.6015 79.9041 29.1352C80.1412 28.6663 80.472 28.3016 80.8967 28.0411C81.3213 27.778 81.8201 27.6465 82.3932 27.6465C82.7631 27.6465 83.1122 27.7064 83.4405 27.8262C83.7713 27.9434 84.063 28.1258 84.3157 28.3733C84.571 28.6207 84.7716 28.9359 84.9175 29.3189C85.0634 29.6992 85.1363 30.1525 85.1363 30.6787V31.1124H80.2168V30.159H83.7804C83.7778 29.8881 83.7192 29.6471 83.6046 29.4361C83.4899 29.2225 83.3297 29.0545 83.1239 28.932C82.9208 28.8096 82.6837 28.7484 82.4128 28.7484C82.1236 28.7484 81.8696 28.8187 81.6508 28.9594C81.432 29.0975 81.2614 29.2798 81.1389 29.5064C81.0191 29.7305 80.9579 29.9766 80.9553 30.245V31.0773C80.9553 31.4263 81.0191 31.7259 81.1467 31.976C81.2744 32.2235 81.4528 32.4136 81.6821 32.5465C81.9113 32.6767 82.1796 32.7419 82.487 32.7419C82.6928 32.7419 82.8791 32.7132 83.0458 32.6559C83.2125 32.596 83.3571 32.5087 83.4795 32.3941C83.602 32.2795 83.6944 32.1375 83.757 31.9682L85.0777 32.1167C84.9943 32.4657 84.8354 32.7705 84.601 33.031C84.3691 33.2889 84.0722 33.4895 83.7101 33.6328C83.348 33.7735 82.9338 33.8438 82.4675 33.8438ZM86.333 33.7266V27.7246H87.7045V28.7249H87.7671C87.8765 28.3785 88.064 28.1115 88.3297 27.9239C88.598 27.7337 88.9041 27.6387 89.248 27.6387C89.3261 27.6387 89.4134 27.6426 89.5098 27.6504C89.6088 27.6556 89.6909 27.6647 89.756 27.6777V28.9789C89.6961 28.9581 89.601 28.9399 89.4707 28.9242C89.3431 28.906 89.2193 28.8969 89.0995 28.8969C88.8416 28.8969 88.6098 28.9529 88.404 29.0649C88.2008 29.1743 88.0406 29.3267 87.9234 29.5221C87.8061 29.7175 87.7475 29.9428 87.7475 30.1981V33.7266H86.333ZM96.2395 27.7246L94.1021 33.7266H92.5391L90.4017 27.7246H91.91L93.2893 32.1831H93.3519L94.7351 27.7246H96.2395ZM97.2184 33.7266V27.7246H98.6329V33.7266H97.2184ZM97.9295 26.8728C97.7055 26.8728 97.5127 26.7985 97.3512 26.65C97.1897 26.499 97.1089 26.3179 97.1089 26.1069C97.1089 25.8933 97.1897 25.7122 97.3512 25.5638C97.5127 25.4127 97.7055 25.3371 97.9295 25.3371C98.1562 25.3371 98.3489 25.4127 98.5078 25.5638C98.6693 25.7122 98.7501 25.8933 98.7501 26.1069C98.7501 26.3179 98.6693 26.499 98.5078 26.65C98.3489 26.7985 98.1562 26.8728 97.9295 26.8728ZM102.705 33.8438C102.106 33.8438 101.592 33.7122 101.162 33.4491C100.735 33.186 100.405 32.8226 100.173 32.3589C99.9442 31.8926 99.8296 31.356 99.8296 30.749C99.8296 30.1395 99.9468 29.6015 100.181 29.1352C100.416 28.6663 100.747 28.3016 101.174 28.0411C101.604 27.778 102.112 27.6465 102.698 27.6465C103.185 27.6465 103.616 27.7363 103.991 27.9161C104.369 28.0932 104.67 28.3446 104.894 28.6702C105.118 28.9933 105.245 29.371 105.277 29.8034H103.925C103.87 29.5143 103.74 29.2733 103.534 29.0805C103.331 28.8851 103.058 28.7875 102.717 28.7875C102.428 28.7875 102.174 28.8656 101.955 29.0219C101.736 29.1756 101.566 29.397 101.443 29.6862C101.324 29.9753 101.264 30.3218 101.264 30.7256C101.264 31.1346 101.324 31.4863 101.443 31.7806C101.563 32.0724 101.731 32.2977 101.947 32.4566C102.166 32.6129 102.423 32.6911 102.717 32.6911C102.926 32.6911 103.112 32.652 103.276 32.5738C103.443 32.4931 103.582 32.3772 103.694 32.2261C103.806 32.075 103.883 31.8913 103.925 31.6751H105.277C105.243 32.0997 105.118 32.4762 104.902 32.8044C104.685 33.13 104.391 33.3853 104.018 33.5703C103.646 33.7526 103.208 33.8438 102.705 33.8438ZM109.095 33.8438C108.493 33.8438 107.974 33.7187 107.536 33.4687C107.101 33.216 106.766 32.8591 106.532 32.398C106.297 31.9343 106.18 31.3886 106.18 30.7608C106.18 30.1434 106.297 29.6015 106.532 29.1352C106.769 28.6663 107.1 28.3016 107.524 28.0411C107.949 27.778 108.448 27.6465 109.021 27.6465C109.391 27.6465 109.74 27.7064 110.068 27.8262C110.399 27.9434 110.691 28.1258 110.944 28.3733C111.199 28.6207 111.399 28.9359 111.545 29.3189C111.691 29.6992 111.764 30.1525 111.764 30.6787V31.1124H106.845V30.159H110.408C110.406 29.8881 110.347 29.6471 110.232 29.4361C110.118 29.2225 109.958 29.0545 109.752 28.932C109.549 28.8096 109.311 28.7484 109.041 28.7484C108.751 28.7484 108.497 28.8187 108.279 28.9594C108.06 29.0975 107.889 29.2798 107.767 29.5064C107.647 29.7305 107.586 29.9766 107.583 30.245V31.0773C107.583 31.4263 107.647 31.7259 107.775 31.976C107.902 32.2235 108.081 32.4136 108.31 32.5465C108.539 32.6767 108.807 32.7419 109.115 32.7419C109.321 32.7419 109.507 32.7132 109.674 32.6559C109.84 32.596 109.985 32.5087 110.107 32.3941C110.23 32.2795 110.322 32.1375 110.385 31.9682L111.705 32.1167C111.622 32.4657 111.463 32.7705 111.229 33.031C110.997 33.2889 110.7 33.4895 110.338 33.6328C109.976 33.7735 109.562 33.8438 109.095 33.8438ZM115.753 33.7266V25.724H118.754C119.368 25.724 119.884 25.8386 120.301 26.0678C120.72 26.2971 121.037 26.6123 121.251 27.0134C121.467 27.412 121.575 27.8653 121.575 28.3733C121.575 28.8865 121.467 29.3423 121.251 29.7409C121.034 30.1395 120.715 30.4534 120.293 30.6826C119.871 30.9092 119.352 31.0226 118.734 31.0226H116.745V29.8308H118.539C118.898 29.8308 119.193 29.7682 119.422 29.6432C119.651 29.5182 119.82 29.3462 119.93 29.1274C120.042 28.9086 120.098 28.6572 120.098 28.3733C120.098 28.0893 120.042 27.8392 119.93 27.623C119.82 27.4068 119.65 27.2388 119.418 27.119C119.189 26.9965 118.893 26.9353 118.531 26.9353H117.202V33.7266H115.753ZM122.772 33.7266V27.7246H124.143V28.7249H124.206C124.315 28.3785 124.503 28.1115 124.768 27.9239C125.037 27.7337 125.343 27.6387 125.687 27.6387C125.765 27.6387 125.852 27.6426 125.948 27.6504C126.047 27.6556 126.129 27.6647 126.195 27.6777V28.9789C126.135 28.9581 126.04 28.9399 125.909 28.9242C125.782 28.906 125.658 28.8969 125.538 28.8969C125.28 28.8969 125.048 28.9529 124.843 29.0649C124.639 29.1743 124.479 29.3267 124.362 29.5221C124.245 29.7175 124.186 29.9428 124.186 30.1981V33.7266H122.772ZM129.505 33.8438C128.919 33.8438 128.411 33.7148 127.981 33.4569C127.551 33.199 127.218 32.8383 126.981 32.3746C126.746 31.9109 126.629 31.369 126.629 30.749C126.629 30.129 126.746 29.5859 126.981 29.1196C127.218 28.6533 127.551 28.2912 127.981 28.0333C128.411 27.7754 128.919 27.6465 129.505 27.6465C130.091 27.6465 130.599 27.7754 131.029 28.0333C131.459 28.2912 131.791 28.6533 132.026 29.1196C132.263 29.5859 132.381 30.129 132.381 30.749C132.381 31.369 132.263 31.9109 132.026 32.3746C131.791 32.8383 131.459 33.199 131.029 33.4569C130.599 33.7148 130.091 33.8438 129.505 33.8438ZM129.513 32.7106C129.831 32.7106 130.097 32.6233 130.31 32.4488C130.524 32.2717 130.683 32.0346 130.787 31.7376C130.894 31.4407 130.947 31.1098 130.947 30.7451C130.947 30.3778 130.894 30.0457 130.787 29.7487C130.683 29.4491 130.524 29.2108 130.31 29.0336C130.097 28.8565 129.831 28.7679 129.513 28.7679C129.187 28.7679 128.916 28.8565 128.7 29.0336C128.487 29.2108 128.326 29.4491 128.22 29.7487C128.115 30.0457 128.063 30.3778 128.063 30.7451C128.063 31.1098 128.115 31.4407 128.22 31.7376C128.326 32.0346 128.487 32.2717 128.7 32.4488C128.916 32.6233 129.187 32.7106 129.513 32.7106ZM138.739 27.7246L136.601 33.7266H135.038L132.901 27.7246H134.409L135.788 32.1831H135.851L137.234 27.7246H138.739ZM139.717 33.7266V27.7246H141.132V33.7266H139.717ZM140.429 26.8728C140.205 26.8728 140.012 26.7985 139.85 26.65C139.689 26.499 139.608 26.3179 139.608 26.1069C139.608 25.8933 139.689 25.7122 139.85 25.5638C140.012 25.4127 140.205 25.3371 140.429 25.3371C140.655 25.3371 140.848 25.4127 141.007 25.5638C141.168 25.7122 141.249 25.8933 141.249 26.1069C141.249 26.3179 141.168 26.499 141.007 26.65C140.848 26.7985 140.655 26.8728 140.429 26.8728ZM144.814 33.8321C144.342 33.8321 143.92 33.7109 143.548 33.4687C143.175 33.2264 142.881 32.8747 142.665 32.4136C142.449 31.9525 142.34 31.3925 142.34 30.7334C142.34 30.0665 142.45 29.5038 142.669 29.0454C142.89 28.5843 143.188 28.2365 143.563 28.0021C143.939 27.765 144.357 27.6465 144.818 27.6465C145.169 27.6465 145.459 27.7064 145.685 27.8262C145.912 27.9434 146.092 28.0854 146.224 28.2521C146.357 28.4162 146.46 28.5712 146.533 28.7171H146.592V25.724H148.01V33.7266H146.619V32.7809H146.533C146.46 32.9268 146.355 33.0818 146.217 33.2459C146.079 33.4074 145.896 33.5455 145.67 33.6601C145.443 33.7748 145.158 33.8321 144.814 33.8321ZM145.209 32.6715C145.508 32.6715 145.763 32.5908 145.974 32.4293C146.185 32.2652 146.346 32.0372 146.455 31.7455C146.564 31.4537 146.619 31.1137 146.619 30.7256C146.619 30.3374 146.564 30.0001 146.455 29.7135C146.348 29.427 146.189 29.2043 145.978 29.0454C145.77 28.8865 145.513 28.807 145.209 28.807C144.893 28.807 144.63 28.8891 144.419 29.0532C144.208 29.2173 144.049 29.4439 143.942 29.7331C143.836 30.0222 143.782 30.3531 143.782 30.7256C143.782 31.1007 143.836 31.4355 143.942 31.7298C144.052 32.0216 144.212 32.2521 144.423 32.4215C144.637 32.5882 144.899 32.6715 145.209 32.6715ZM152.175 33.8438C151.573 33.8438 151.053 33.7187 150.616 33.4687C150.181 33.216 149.846 32.8591 149.611 32.398C149.377 31.9343 149.26 31.3886 149.26 30.7608C149.26 30.1434 149.377 29.6015 149.611 29.1352C149.848 28.6663 150.179 28.3016 150.604 28.0411C151.028 27.778 151.527 27.6465 152.1 27.6465C152.47 27.6465 152.819 27.7064 153.148 27.8262C153.478 27.9434 153.77 28.1258 154.023 28.3733C154.278 28.6207 154.479 28.9359 154.625 29.3189C154.771 29.6992 154.843 30.1525 154.843 30.6787V31.1124H149.924V30.159H153.488C153.485 29.8881 153.426 29.6471 153.312 29.4361C153.197 29.2225 153.037 29.0545 152.831 28.932C152.628 28.8096 152.391 28.7484 152.12 28.7484C151.831 28.7484 151.577 28.8187 151.358 28.9594C151.139 29.0975 150.969 29.2798 150.846 29.5064C150.726 29.7305 150.665 29.9766 150.662 30.245V31.0773C150.662 31.4263 150.726 31.7259 150.854 31.976C150.982 32.2235 151.16 32.4136 151.389 32.5465C151.618 32.6767 151.887 32.7419 152.194 32.7419C152.4 32.7419 152.586 32.7132 152.753 32.6559C152.92 32.596 153.064 32.5087 153.187 32.3941C153.309 32.2795 153.402 32.1375 153.464 31.9682L154.785 32.1167C154.702 32.4657 154.543 32.7705 154.308 33.031C154.076 33.2889 153.779 33.4895 153.417 33.6328C153.055 33.7735 152.641 33.8438 152.175 33.8438ZM156.04 33.7266V27.7246H157.412V28.7249H157.474C157.584 28.3785 157.771 28.1115 158.037 27.9239C158.305 27.7337 158.611 27.6387 158.955 27.6387C159.033 27.6387 159.121 27.6426 159.217 27.6504C159.316 27.6556 159.398 27.6647 159.463 27.6777V28.9789C159.403 28.9581 159.308 28.9399 159.178 28.9242C159.05 28.906 158.927 28.8969 158.807 28.8969C158.549 28.8969 158.317 28.9529 158.111 29.0649C157.908 29.1743 157.748 29.3267 157.631 29.5221C157.513 29.7175 157.455 29.9428 157.455 30.1981V33.7266H156.04Z\"\n fill=\"#538FFF\"\n />\n <defs>\n <linearGradient\n id=\"paint0_linear_5306_7300\"\n x1=\"24.4167\"\n y1=\"7.95131\"\n x2=\"13.4223\"\n y2=\"19.8077\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.58\" stopColor=\"#A0A8D4\" />\n <stop offset=\"0.73\" stopColor=\"#8791C7\" />\n <stop offset=\"0.91\" stopColor=\"#6470B4\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_5306_7300\"\n x1=\"24.6497\"\n y1=\"37.5268\"\n x2=\"35.64\"\n y2=\"25.6789\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.58\" stopColor=\"#A0A8D4\" />\n <stop offset=\"0.73\" stopColor=\"#8791C7\" />\n <stop offset=\"0.91\" stopColor=\"#6470B4\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_5306_7300\"\n x1=\"24.5202\"\n y1=\"7.4471\"\n x2=\"24.5202\"\n y2=\"37.9687\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#513EFF\" />\n <stop offset=\"0.18\" stopColor=\"#5157FF\" />\n <stop offset=\"0.57\" stopColor=\"#5298FF\" />\n <stop offset=\"1\" stopColor=\"#52E5FF\" />\n </linearGradient>\n <clipPath id=\"clip0_5306_7300\">\n <rect\n width=\"27.0504\"\n height=\"30.2598\"\n fill=\"white\"\n transform=\"translate(11.0039 7.59668)\"\n />\n </clipPath>\n </defs>\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const NameHashLabsIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"128\"\n height=\"31\"\n viewBox=\"0 0 128 31\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M29.0511 0.258789H17.872C17.78 0.258789 17.7065 0.332341 17.7065 0.424275V7.76061C17.7065 7.85254 17.7616 7.9077 17.8536 7.92608C18.2765 7.98124 18.9568 8.01802 19.5452 8.03641C19.8393 8.03641 20.0968 8.05479 20.3174 8.05479H20.5932C20.6851 8.05479 20.7587 7.98124 20.7587 7.88931V3.47648C20.7587 3.38454 20.8322 3.311 20.9242 3.311H25.9989C26.0909 3.311 26.1644 3.38454 26.1644 3.47648V27.6919C26.1644 27.7838 26.0909 27.8574 25.9989 27.8574H20.869C20.869 27.8574 20.869 27.8574 20.8506 27.8574C20.7771 27.8574 20.7035 27.8022 20.7035 27.7287C20.7035 27.7103 20.7035 27.7103 20.7035 27.6919C20.2806 23.371 17.2468 19.804 13.2569 18.5169C12.2272 18.1859 11.1424 18.0204 10.0392 18.0204H4.98282C4.89089 18.0204 4.81734 18.094 4.81734 18.1859V20.9072C4.81734 20.9991 4.89089 21.0726 4.98282 21.0726H8.40277C8.40277 21.0726 8.43954 21.0726 8.53148 21.0726C9.02792 21.0726 10.9218 21.091 11.5837 21.2197L11.6756 21.2381C11.9146 21.2933 12.1353 21.3484 12.3559 21.422C13.7717 21.8633 15.0404 22.7274 15.9781 23.8858C17.0997 25.2464 17.7065 26.9564 17.7065 28.7216V30.7441C17.7065 30.836 17.78 30.9096 17.872 30.9096H29.0695C29.1614 30.9096 29.235 30.836 29.235 30.7441V0.424275C29.2166 0.332341 29.1431 0.258789 29.0511 0.258789ZM24.2889 9.78316H20.7403C20.7403 9.78316 20.1887 9.78315 19.5268 9.76476C18.8648 9.74638 18.111 9.7096 17.6881 9.63605L17.6329 9.61767L17.5778 9.59929C16.9158 9.45219 16.2723 9.21316 15.6655 8.90058C14.7462 8.42252 13.9188 7.7606 13.2569 6.95159C12.1537 5.59096 11.5285 3.86261 11.5285 2.11586V0.424275C11.5285 0.332341 11.455 0.258789 11.363 0.258789H0.165486C0.0735516 0.258789 0 0.332341 0 0.424275V30.7441C0 30.836 0.0735516 30.9096 0.165486 30.9096H11.363C11.455 30.9096 11.5285 30.836 11.5285 30.7441V23.0584C11.5285 22.9665 11.4734 22.9113 11.3814 22.8929C10.8666 22.8194 9.94726 22.7826 9.26695 22.7642H8.67857C8.58663 22.7642 8.51309 22.8378 8.51309 22.9297V27.6735C8.51309 27.7654 8.43954 27.839 8.34761 27.839H3.27285C3.18092 27.839 3.10737 27.7654 3.10737 27.6735V3.47648C3.10737 3.38454 3.18092 3.311 3.27285 3.311H8.43954C8.51309 3.311 8.58663 3.36617 8.60502 3.43971C9.06469 7.11707 11.3814 10.2244 14.5991 11.7689C15.5368 12.2286 16.5665 12.5412 17.6329 12.7066C18.1478 12.7802 18.6994 12.8354 19.2326 12.8354H24.2889C24.3809 12.8354 24.4544 12.7618 24.4544 12.6699V9.94863C24.4544 9.8567 24.3809 9.78316 24.2889 9.78316Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M76.532 23.3515L74.373 23.5871C74.3119 23.369 74.205 23.164 74.0524 22.9721C73.9041 22.7802 73.7034 22.6253 73.4505 22.5076C73.1975 22.3898 72.8878 22.3309 72.5214 22.3309C72.0286 22.3309 71.6142 22.4378 71.2784 22.6515C70.9469 22.8652 70.7833 23.1422 70.7877 23.4824C70.7833 23.7746 70.8902 24.0123 71.1083 24.1955C71.3307 24.3787 71.6971 24.5292 72.2074 24.6469L73.9215 25.0133C74.8724 25.2183 75.5789 25.5433 76.0413 25.9882C76.508 26.433 76.7435 27.0153 76.7479 27.735C76.7435 28.3674 76.5581 28.9257 76.1918 29.4099C75.8297 29.8896 75.326 30.2647 74.6804 30.5352C74.0349 30.8056 73.2934 30.9408 72.456 30.9408C71.226 30.9408 70.2359 30.6835 69.4857 30.1688C68.7355 29.6497 68.2885 28.9279 68.1445 28.0032L70.454 27.7808C70.5587 28.2344 70.7811 28.5768 71.1214 28.808C71.4616 29.0391 71.9043 29.1547 72.4495 29.1547C73.0121 29.1547 73.4636 29.0391 73.8038 28.808C74.1483 28.5768 74.3206 28.2911 74.3206 27.9509C74.3206 27.663 74.2094 27.4253 73.9869 27.2378C73.7689 27.0502 73.4287 26.9063 72.9663 26.806L71.2522 26.4461C70.2883 26.2455 69.5752 25.9075 69.1128 25.432C68.6505 24.9523 68.4215 24.346 68.4259 23.6132C68.4215 22.9939 68.5894 22.4574 68.9296 22.0038C69.2742 21.5458 69.7518 21.1925 70.3624 20.9439C70.9774 20.6909 71.6862 20.5645 72.4887 20.5645C73.6664 20.5645 74.5932 20.8152 75.2693 21.3168C75.9497 21.8184 76.3706 22.4967 76.532 23.3515Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M57.8281 30.7447V17.3457H60.1965V22.3572H60.2946C60.4168 22.113 60.589 21.8535 60.8115 21.5787C61.0339 21.2995 61.3349 21.0618 61.7143 20.8655C62.0938 20.6649 62.578 20.5646 63.1668 20.5646C63.9431 20.5646 64.6432 20.763 65.2669 21.16C65.895 21.5525 66.3922 22.1348 66.7586 22.9068C67.1293 23.6744 67.3147 24.6166 67.3147 25.7331C67.3147 26.8366 67.1337 27.7744 66.7717 28.5464C66.4096 29.3184 65.9168 29.9072 65.2931 30.3129C64.6694 30.7185 63.9628 30.9213 63.1733 30.9213C62.5976 30.9213 62.12 30.8254 61.7405 30.6334C61.3611 30.4415 61.0557 30.2104 60.8246 29.9399C60.5978 29.6652 60.4211 29.4056 60.2946 29.1614H60.1572V30.7447H57.8281ZM60.1507 25.7201C60.1507 26.3699 60.2423 26.9391 60.4255 27.4276C60.613 27.9161 60.8813 28.2978 61.2302 28.5726C61.5835 28.843 62.0109 28.9782 62.5125 28.9782C63.0359 28.9782 63.4743 28.8386 63.8276 28.5595C64.1809 28.276 64.4469 27.89 64.6257 27.4015C64.8089 26.9086 64.9005 26.3481 64.9005 25.7201C64.9005 25.0963 64.8111 24.5424 64.6323 24.0583C64.4535 23.5741 64.1874 23.1947 63.8341 22.9199C63.4808 22.6451 63.0403 22.5077 62.5125 22.5077C62.0066 22.5077 61.577 22.6407 61.2237 22.9068C60.8704 23.1729 60.6021 23.5458 60.4189 24.0256C60.2401 24.5053 60.1507 25.0702 60.1507 25.7201Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M50.773 30.9473C50.1362 30.9473 49.5626 30.8339 49.0523 30.6071C48.5464 30.376 48.1451 30.0358 47.8485 29.5865C47.5563 29.1373 47.4102 28.5833 47.4102 27.9247C47.4102 27.3577 47.5148 26.8888 47.7242 26.5181C47.9336 26.1474 48.2192 25.8508 48.5813 25.6283C48.9433 25.4059 49.3511 25.2379 49.8047 25.1245C50.2627 25.0068 50.7359 24.9217 51.2244 24.8694C51.8132 24.8083 52.2908 24.7538 52.6572 24.7058C53.0236 24.6535 53.2896 24.575 53.4554 24.4703C53.6255 24.3613 53.7105 24.1933 53.7105 23.9665V23.9273C53.7105 23.4344 53.5644 23.0528 53.2722 22.7823C52.98 22.5119 52.5591 22.3767 52.0095 22.3767C51.4294 22.3767 50.9693 22.5032 50.629 22.7562C50.2932 23.0092 50.0664 23.3079 49.9486 23.6525L47.7373 23.3385C47.9117 22.7278 48.1996 22.2175 48.6009 21.8075C49.0022 21.3932 49.4928 21.0835 50.0729 20.8785C50.653 20.6691 51.2942 20.5645 51.9964 20.5645C52.4806 20.5645 52.9625 20.6212 53.4423 20.7346C53.9221 20.848 54.3604 21.0355 54.7573 21.2972C55.1542 21.5545 55.4726 21.9057 55.7125 22.3505C55.9568 22.7954 56.0789 23.3515 56.0789 24.0189V30.7445H53.8021V29.3641H53.7236C53.5797 29.6432 53.3769 29.9049 53.1152 30.1492C52.8578 30.389 52.5329 30.5831 52.1404 30.7314C51.7522 30.8754 51.2964 30.9473 50.773 30.9473ZM51.388 29.207C51.8634 29.207 52.2756 29.1133 52.6245 28.9257C52.9734 28.7338 53.2417 28.4808 53.4292 28.1668C53.6211 27.8528 53.7171 27.5104 53.7171 27.1396V25.9554C53.6429 26.0165 53.5165 26.0732 53.3376 26.1255C53.1632 26.1779 52.9669 26.2237 52.7488 26.2629C52.5307 26.3022 52.3148 26.3371 52.1011 26.3676C51.8874 26.3981 51.702 26.4243 51.545 26.4461C51.1917 26.4941 50.8755 26.5726 50.5963 26.6817C50.3172 26.7907 50.0969 26.9434 49.9355 27.1396C49.7742 27.3315 49.6935 27.5802 49.6935 27.8855C49.6935 28.3216 49.8527 28.6509 50.1711 28.8734C50.4895 29.0958 50.8951 29.207 51.388 29.207Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M38.2871 30.7447V17.3457H40.7144V28.71H46.6157V30.7447H38.2871Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M121.482 7.74902V13.6372H119.113V0.238281H121.429V5.2956H121.547C121.783 4.72859 122.147 4.28152 122.64 3.9544C123.137 3.62291 123.769 3.45717 124.537 3.45717C125.235 3.45717 125.843 3.60329 126.362 3.89552C126.881 4.18775 127.283 4.61519 127.566 5.17784C127.854 5.74049 127.998 6.42745 127.998 7.23871V13.6372H125.63V7.60509C125.63 6.92904 125.455 6.40346 125.106 6.02836C124.762 5.6489 124.277 5.45916 123.654 5.45916C123.235 5.45916 122.86 5.55076 122.528 5.73395C122.201 5.91277 121.944 6.17229 121.756 6.5125C121.573 6.85271 121.482 7.26488 121.482 7.74902Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M117.682 6.24412L115.523 6.47965C115.462 6.26156 115.355 6.05657 115.203 5.86466C115.054 5.67274 114.854 5.51791 114.601 5.40014C114.348 5.28238 114.038 5.22349 113.672 5.22349C113.179 5.22349 112.765 5.33035 112.429 5.54407C112.097 5.7578 111.934 6.03476 111.938 6.37497C111.934 6.6672 112.041 6.90491 112.259 7.0881C112.481 7.27128 112.847 7.42176 113.358 7.53953L115.072 7.9059C116.023 8.1109 116.729 8.43584 117.192 8.88073C117.658 9.32562 117.894 9.9079 117.898 10.6276C117.894 11.26 117.709 11.8183 117.342 12.3024C116.98 12.7822 116.476 13.1573 115.831 13.4277C115.185 13.6982 114.444 13.8334 113.606 13.8334C112.376 13.8334 111.386 13.576 110.636 13.0614C109.886 12.5423 109.439 11.8205 109.295 10.8958L111.604 10.6734C111.709 11.127 111.932 11.4694 112.272 11.7005C112.612 11.9317 113.055 12.0473 113.6 12.0473C114.163 12.0473 114.614 11.9317 114.954 11.7005C115.299 11.4694 115.471 11.1837 115.471 10.8435C115.471 10.5556 115.36 10.3179 115.137 10.1303C114.919 9.94279 114.579 9.79885 114.117 9.69854L112.403 9.3387C111.439 9.13807 110.726 8.80004 110.263 8.32462C109.801 7.84484 109.572 7.23857 109.576 6.50582C109.572 5.88646 109.74 5.34998 110.08 4.89637C110.425 4.4384 110.902 4.08511 111.513 3.83649C112.128 3.58352 112.837 3.45703 113.639 3.45703C114.817 3.45703 115.744 3.70783 116.42 4.20941C117.1 4.711 117.521 5.38924 117.682 6.24412Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M102.789 13.8399C102.152 13.8399 101.578 13.7265 101.068 13.4997C100.562 13.2685 100.161 12.9283 99.8641 12.4791C99.5719 12.0298 99.4258 11.4759 99.4258 10.8173C99.4258 10.2503 99.5305 9.78141 99.7398 9.41067C99.9492 9.03993 100.235 8.74334 100.597 8.52089C100.959 8.29845 101.367 8.13053 101.82 8.01713C102.278 7.89936 102.752 7.81431 103.24 7.76197C103.829 7.70091 104.306 7.64639 104.673 7.59841C105.039 7.54607 105.305 7.46756 105.471 7.36288C105.641 7.25384 105.726 7.08591 105.726 6.85911V6.81986C105.726 6.32699 105.58 5.94535 105.288 5.67492C104.996 5.4045 104.575 5.26929 104.025 5.26929C103.445 5.26929 102.985 5.39578 102.645 5.64876C102.309 5.90173 102.082 6.2005 101.964 6.54507L99.7529 6.23103C99.9274 5.6204 100.215 5.11009 100.617 4.7001C101.018 4.28574 101.508 3.97607 102.089 3.77107C102.669 3.56171 103.31 3.45703 104.012 3.45703C104.496 3.45703 104.978 3.51373 105.458 3.62713C105.938 3.74054 106.376 3.92809 106.773 4.18979C107.17 4.44712 107.488 4.79823 107.728 5.24312C107.972 5.68801 108.095 6.24412 108.095 6.91145V13.6371H105.818V12.2566H105.739C105.595 12.5358 105.393 12.7975 105.131 13.0417C104.873 13.2816 104.549 13.4757 104.156 13.624C103.768 13.7679 103.312 13.8399 102.789 13.8399ZM103.404 12.0996C103.879 12.0996 104.291 12.0058 104.64 11.8183C104.989 11.6264 105.257 11.3734 105.445 11.0594C105.637 10.7453 105.733 10.4029 105.733 10.0322V8.84802C105.659 8.90908 105.532 8.96578 105.353 9.01812C105.179 9.07046 104.983 9.11626 104.764 9.15551C104.546 9.19477 104.33 9.22966 104.117 9.26019C103.903 9.29072 103.718 9.31689 103.561 9.3387C103.207 9.38668 102.891 9.46519 102.612 9.57423C102.333 9.68327 102.113 9.83593 101.951 10.0322C101.79 10.2241 101.709 10.4727 101.709 10.778C101.709 11.2142 101.868 11.5435 102.187 11.766C102.505 11.9884 102.911 12.0996 103.404 12.0996Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M87.0293 13.6372V0.238281H89.4565V5.91059H95.6653V0.238281H98.0991V13.6372H95.6653V7.9453H89.4565V13.6372H87.0293Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M81.1893 13.8334C80.1817 13.8334 79.3116 13.624 78.5788 13.2053C77.8504 12.7822 77.29 12.1847 76.8974 11.4127C76.5049 10.6363 76.3086 9.72253 76.3086 8.67137C76.3086 7.63766 76.5049 6.73044 76.8974 5.94971C77.2943 5.16461 77.8483 4.55398 78.5592 4.11782C79.2701 3.67729 80.1054 3.45703 81.065 3.45703C81.6843 3.45703 82.2688 3.55735 82.8183 3.75798C83.3723 3.95426 83.8608 4.25957 84.2839 4.67393C84.7113 5.08828 85.0471 5.61604 85.2914 6.2572C85.5356 6.894 85.6578 7.65293 85.6578 8.53398V9.26019H77.4208V7.66383H83.3875C83.3832 7.21022 83.285 6.80677 83.0931 6.45348C82.9012 6.09582 82.633 5.8145 82.2884 5.6095C81.9482 5.4045 81.5513 5.302 81.0977 5.302C80.6135 5.302 80.1883 5.41977 79.8219 5.6553C79.4555 5.88646 79.1698 6.19178 78.9648 6.57124C78.7642 6.94634 78.6617 7.35852 78.6573 7.80777V9.20131C78.6573 9.78577 78.7642 10.2874 78.9779 10.7061C79.1916 11.1204 79.4904 11.4388 79.8742 11.6613C80.2581 11.8794 80.7073 11.9884 81.222 11.9884C81.5666 11.9884 81.8784 11.9404 82.1576 11.8445C82.4367 11.7441 82.6788 11.598 82.8838 11.4061C83.0888 11.2142 83.2436 10.9765 83.3483 10.693L85.5596 10.9416C85.4201 11.5261 85.154 12.0364 84.7615 12.4725C84.3733 12.9043 83.876 13.2402 83.2698 13.4801C82.6635 13.7156 81.97 13.8334 81.1893 13.8334Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M60.9434 13.6371V3.58788H63.2071V5.29546H63.3248C63.5342 4.71973 63.8809 4.27048 64.3651 3.94772C64.8492 3.62059 65.4271 3.45703 66.0988 3.45703C66.7792 3.45703 67.3528 3.62277 67.8195 3.95426C68.2905 4.28138 68.622 4.72845 68.8139 5.29546H68.9186C69.1411 4.73717 69.5162 4.29229 70.0439 3.9608C70.576 3.62495 71.2063 3.45703 71.9347 3.45703C72.8594 3.45703 73.6139 3.74926 74.1984 4.33372C74.7828 4.91818 75.0751 5.77088 75.0751 6.89182V13.6371H72.7002V7.2582C72.7002 6.63449 72.5344 6.17869 72.2029 5.89083C71.8714 5.5986 71.4658 5.45248 70.986 5.45248C70.4147 5.45248 69.9676 5.63131 69.6448 5.98896C69.3264 6.34226 69.1672 6.80241 69.1672 7.36942V13.6371H66.8447V7.16006C66.8447 6.64103 66.6876 6.22667 66.3736 5.917C66.0639 5.60732 65.6583 5.45248 65.1567 5.45248C64.8165 5.45248 64.5068 5.53971 64.2277 5.71418C63.9485 5.88428 63.7261 6.12635 63.5603 6.44039C63.3946 6.75007 63.3117 7.11208 63.3117 7.52644V13.6371H60.9434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M53.9937 13.8399C53.3569 13.8399 52.7833 13.7265 52.273 13.4997C51.7671 13.2685 51.3658 12.9283 51.0692 12.4791C50.777 12.0298 50.6309 11.4759 50.6309 10.8173C50.6309 10.2503 50.7355 9.78141 50.9449 9.41067C51.1543 9.03993 51.4399 8.74334 51.802 8.52089C52.164 8.29845 52.5718 8.13053 53.0254 8.01713C53.4834 7.89936 53.9566 7.81431 54.4451 7.76197C55.0339 7.70091 55.5115 7.64639 55.8779 7.59841C56.2443 7.54607 56.5103 7.46756 56.6761 7.36288C56.8462 7.25384 56.9312 7.08591 56.9312 6.85911V6.81986C56.9312 6.32699 56.7851 5.94535 56.4929 5.67492C56.2007 5.4045 55.7798 5.26929 55.2302 5.26929C54.6501 5.26929 54.19 5.39578 53.8497 5.64876C53.5139 5.90173 53.2871 6.2005 53.1693 6.54507L50.958 6.23103C51.1324 5.6204 51.4203 5.11009 51.8216 4.7001C52.2229 4.28574 52.7135 3.97607 53.2936 3.77107C53.8737 3.56171 54.5149 3.45703 55.2171 3.45703C55.7013 3.45703 56.1832 3.51373 56.663 3.62713C57.1428 3.74054 57.5811 3.92809 57.978 4.18979C58.3749 4.44712 58.6934 4.79823 58.9332 5.24312C59.1775 5.68801 59.2996 6.24412 59.2996 6.91145V13.6371H57.0228V12.2566H56.9443C56.8004 12.5358 56.5976 12.7975 56.3359 13.0417C56.0785 13.2816 55.7536 13.4757 55.3611 13.624C54.9729 13.7679 54.5171 13.8399 53.9937 13.8399ZM54.6087 12.0996C55.0841 12.0996 55.4963 12.0058 55.8452 11.8183C56.1941 11.6264 56.4624 11.3734 56.6499 11.0594C56.8418 10.7453 56.9378 10.4029 56.9378 10.0322V8.84802C56.8636 8.90908 56.7372 8.96578 56.5583 9.01812C56.3839 9.07046 56.1876 9.11626 55.9695 9.15551C55.7514 9.19477 55.5355 9.22966 55.3218 9.26019C55.1081 9.29072 54.9227 9.31689 54.7657 9.3387C54.4124 9.38668 54.0962 9.46519 53.817 9.57423C53.5379 9.68327 53.3176 9.83593 53.1562 10.0322C52.9949 10.2241 52.9142 10.4727 52.9142 10.778C52.9142 11.2142 53.0734 11.5435 53.3918 11.766C53.7102 11.9884 54.1158 12.0996 54.6087 12.0996Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M49.2981 0.238281V13.6372H47.1391L40.8256 4.51051H40.7144V13.6372H38.2871V0.238281H40.4592L46.7661 9.37156H46.8839V0.238281H49.2981Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const EfpIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_510_2632)\">\n <path\n d=\"M6 11.3515L11.6189 2L17.1971 11.3515L11.6189 14.7559L6 11.3515Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.6189 15.7813L6 12.377L11.6189 20.2927L17.1971 12.377L11.6189 15.7813ZM18.7967 16.6837H17.1971V19.0627H14.9825V20.5387H17.1971V22.9999H18.7967V20.5387H20.9705V19.0627H18.7967V16.6837Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_510_2632\">\n <rect width=\"14.9999\" height=\"20.9998\" fill=\"white\" transform=\"translate(6 2)\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const EmailIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n className=\"group\"\n {...props}\n >\n <path\n d=\"M1.5 8.6691V17.25C1.5 18.9069 2.84315 20.25 4.5 20.25H19.5C21.1569 20.25 22.5 18.9069 22.5 17.25V8.6691L13.5723 14.1631C12.6081 14.7564 11.3919 14.7564 10.4277 14.1631L1.5 8.6691Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M22.5 6.90783V6.75C22.5 5.09315 21.1569 3.75 19.5 3.75H4.5C2.84315 3.75 1.5 5.09315 1.5 6.75V6.90783L11.2139 12.8856C11.696 13.1823 12.304 13.1823 12.7861 12.8856L22.5 6.90783Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const FarcasterIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M5.43195 3H18.3314V21H16.4379V12.7548H16.4193C16.21 10.4761 14.2584 8.69032 11.8817 8.69032C9.50495 8.69032 7.55328 10.4761 7.34402 12.7548H7.32544V21H5.43195V3Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2 5.55484L2.76923 8.10968H3.42012V18.4452C3.09332 18.4452 2.8284 18.7051 2.8284 19.0258V19.7226H2.71006C2.38326 19.7226 2.11834 19.9825 2.11834 20.3032V21H8.74556V20.3032C8.74556 19.9825 8.48064 19.7226 8.15385 19.7226H8.0355V19.0258C8.0355 18.7051 7.77058 18.4452 7.44379 18.4452H6.73373V5.55484H2Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.5562 18.4452C16.2294 18.4452 15.9645 18.7051 15.9645 19.0258V19.7226H15.8462C15.5194 19.7226 15.2544 19.9825 15.2544 20.3032V21H21.8817V20.3032C21.8817 19.9825 21.6167 19.7226 21.2899 19.7226H21.1716V19.0258C21.1716 18.7051 20.9067 18.4452 20.5799 18.4452V8.10968H21.2308L22 5.55484H17.2663V18.4452H16.5562Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const GitHubIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.0413 2.25977C6.51859 2.25977 2 6.77836 2 12.3011C2 16.736 4.84504 20.5015 8.86156 21.8403C9.36363 21.924 9.53099 21.5893 9.53099 21.3383C9.53099 21.0872 9.53099 20.5015 9.53099 19.6647C6.76962 20.2505 6.18388 18.3259 6.18388 18.3259C5.76549 17.1544 5.09607 16.8197 5.09607 16.8197C4.09194 16.2339 5.09607 16.2339 5.09607 16.2339C6.1002 16.3176 6.60227 17.2381 6.60227 17.2381C7.52272 18.7443 8.94524 18.3259 9.53099 18.0748C9.61466 17.4054 9.8657 16.987 10.2004 16.736C7.94111 16.485 5.59814 15.6482 5.59814 11.799C5.59814 10.7112 6.01653 9.79075 6.60227 9.12133C6.60227 8.78662 6.18388 7.78249 6.76962 6.44365C6.76962 6.44365 7.6064 6.19261 9.53099 7.44778C10.3678 7.19674 11.2045 7.11307 12.0413 7.11307C12.8781 7.11307 13.7149 7.19674 14.5516 7.44778C16.4762 6.10894 17.313 6.44365 17.313 6.44365C17.8987 7.86617 17.4804 8.8703 17.3967 9.12133C18.0661 9.79075 18.4008 10.7112 18.4008 11.799C18.4008 15.6482 16.0578 16.485 13.7985 16.736C14.1333 17.0707 14.468 17.6564 14.468 18.5769C14.468 19.9157 14.468 21.0036 14.468 21.3383C14.468 21.5893 14.6353 21.924 15.1374 21.8403C19.1539 20.5015 21.9989 16.736 21.9989 12.3011C22.0826 6.77836 17.564 2.25977 12.0413 2.25977Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const TelegramIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M21.9597 4.33581C21.9435 4.26415 21.9081 4.19792 21.857 4.14382C21.806 4.08972 21.7411 4.04967 21.6689 4.02773C21.4062 3.97723 21.1343 3.99594 20.8815 4.08191C20.8815 4.08191 3.35842 10.1941 2.35765 10.8709C2.14267 11.0165 2.07017 11.1014 2.03434 11.2008C1.86102 11.686 2.40015 11.8946 2.40015 11.8946L6.91653 13.3226C6.9929 13.3359 7.07142 13.3315 7.14568 13.3097C8.17228 12.6798 17.4784 6.97509 18.0192 6.78345C18.1025 6.75919 18.1666 6.78345 18.15 6.84409C17.935 7.57588 9.89301 14.508 9.84884 14.5501C9.82733 14.5672 9.81057 14.5892 9.80009 14.6142C9.78961 14.6392 9.78575 14.6664 9.78885 14.6932L9.36721 18.9723C9.36721 18.9723 9.19055 20.3041 10.563 18.9723C11.5362 18.0271 12.4703 17.2443 12.937 16.8635C14.4902 17.9042 16.1609 19.0548 16.8817 19.6572C17.003 19.7711 17.1466 19.8601 17.3041 19.9189C17.4616 19.9776 17.6297 20.005 17.7983 19.9993C18.006 19.9747 18.201 19.8894 18.3575 19.7546C18.5139 19.6198 18.6244 19.442 18.6741 19.2448C18.6741 19.2448 21.8656 6.77375 21.9722 5.10317C21.9831 4.94145 21.9972 4.83472 21.9989 4.72232C22.0041 4.59235 21.9909 4.46231 21.9597 4.33581Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const TwitterIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M13.5222 10.7749L19.4785 4H18.0671L12.8952 9.88256L8.76437 4H4L10.2466 12.8955L4 20H5.41155L10.8732 13.7878L15.2356 20H20L13.5218 10.7749H13.5222ZM11.5889 12.9738L10.956 12.0881L5.92015 5.03974H8.0882L12.1522 10.728L12.7851 11.6137L18.0677 19.0075H15.8997L11.5889 12.9742V12.9738Z\"\n />\n </svg>\n );\n};\n","import { EnsServiceProviderIcon } from \"../icons/ens/EnsServiceProviderIcon\";\nimport { NameHashLabsIcon } from \"../icons/namehash/NameHashLabsIcon\";\nimport { EfpIcon } from \"../icons/socials/EfpIcon\";\nimport { EmailIcon } from \"../icons/socials/EmailIcon\";\nimport { FarcasterIcon } from \"../icons/socials/FarcasterIcon\";\nimport { GitHubIcon } from \"../icons/socials/GitHubIcon\";\nimport { TelegramIcon } from \"../icons/socials/TelegramIcon\";\nimport { TwitterIcon } from \"../icons/socials/TwitterIcon\";\n\nconst footerProducts = [\n {\n name: \"ENSNode\",\n href: \"https://ensnode.io/\",\n },\n {\n name: \"ENSRainbow\",\n href: \"https://ensrainbow.io\",\n },\n {\n name: \"ENSAdmin\",\n href: \"https://ensadmin.io\",\n },\n {\n name: \"ENS Referral Program\",\n href: \"/ens-referral-awards\",\n },\n {\n name: \"ENSAwards\",\n href: \"https://ensawards.org/\",\n },\n {\n name: \"NameGraph\",\n href: \"https://namegraph.dev\",\n },\n {\n name: \"NameAI\",\n href: \"https://nameai.io/\",\n },\n {\n name: \"NameGuard\",\n href: \"https://nameguard.io\",\n },\n {\n name: \"NameKit\",\n href: \"https://namekit.io\",\n },\n];\n\nconst footerResources = [\n {\n name: \"Contact us\",\n href: \"https://namehashlabs.org/contact\",\n },\n {\n name: \"Careers\",\n href: \"https://namehashlabs.org/careers\",\n },\n {\n name: \"Partners\",\n href: \"https://namehashlabs.org/partners\",\n },\n {\n name: \"Brand assets\",\n href: \"https://namehashlabs.org/brand-assets\",\n },\n];\n\nexport function Footer() {\n return (\n <section className=\"nhui:lg:px-[50px] nhui:px-5 nhui:flex nhui:items-center nhui:justify-center nhui:w-full nhui:border-t nhui:border-gray-200\">\n <div className=\"nhui:pt-8 nhui:pb-5 nhui:flex nhui:flex-col nhui:gap-10 nhui:items-start nhui:justify-between nhui:w-full nhui:max-w-[1216px]\">\n <div className=\"nhui:w-full nhui:gap-5 nhui:flex nhui:flex-col nhui:lg:flex-row nhui:lg:justify-between\">\n <div className=\"nhui:flex nhui:flex-col nhui:gap-5\">\n <NameHashLabsIcon />\n\n <p className=\"nhui:text-sm nhui:font-light nhui:text-gray-500 nhui:max-w-[339px] nhui:leading-6\">\n Founded in 2022, Namehash Labs is dedicated to developing open source infrastructure\n that helps the Ethereum Name Service (ENS) Protocol grow.\n </p>\n\n <EnsServiceProviderIcon />\n </div>\n\n <div className=\"nhui:flex nhui:justify-start\">\n <div className=\"nhui:flex nhui:flex-col nhui:w-[228px] nhui:pr-5\">\n <span className=\"nhui:mb-2 nhui:text-sm nhui:font-semibold\">Products</span>\n <ul className=\"nhui:flex nhui:flex-col\">\n {footerProducts.map((product) => {\n return (\n <li key={product.name} className=\"nhui:my-2\">\n <a\n href={product.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"nhui:transition nhui:cursor-pointer nhui:text-gray-500 nhui:hover:text-black nhui:text-sm\"\n >\n {product.name}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n <div className=\"nhui:flex nhui:flex-col nhui:w-[228px]\">\n <span className=\"nhui:mb-2 nhui:text-sm nhui:font-semibold\">Resources</span>\n <ul className=\"nhui:flex nhui:flex-col\">\n {footerResources.map((resource) => {\n return (\n <li key={resource.name} className=\"nhui:my-2\">\n <a\n href={resource.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"nhui:transition nhui:cursor-pointer nhui:text-gray-500 nhui:hover:text-black nhui:text-sm\"\n >\n {resource.name}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n </div>\n </div>\n\n <div className=\"nhui:lg:border-t nhui:lg:border-gray-200 nhui:w-full nhui:flex nhui:flex-col nhui:lg:flex-row nhui:lg:justify-between nhui:gap-5 nhui:pt-5\">\n <p className=\"nhui:text-gray-500 nhui:text-sm nhui:leading-5 nhui:font-normal\">\n © NameHash Labs. All Rights Reserved\n </p>\n\n <div className=\"nhui:flex nhui:gap-3\">\n <a\n href=\"https://x.com/NamehashLabs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Twitter\"\n >\n <TwitterIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://github.com/namehash\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Github\"\n >\n <GitHubIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://warpcast.com/namehash\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Farcaster\"\n >\n <FarcasterIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://efp.app/namehashlabs.eth\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"EFP\"\n >\n <EfpIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200 nhui:w-6 nhui:h-6\" />\n </a>\n\n <a href=\"https://t.me/namehash\" target=\"_blank\" rel=\"noreferrer\" aria-label=\"Telegram\">\n <TelegramIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a href=\"mailto:hello@namehashlabs.org\" aria-label=\"Email\">\n <EmailIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n </div>\n\n <div className=\"nhui:flex nhui:space-x-1 nhui:not-italic nhui:font-normal nhui:text-gray-500 nhui:text-sm nhui:xSmall:font-light\">\n <span>\n Made with\n <span className=\"nhui:text-[#EF4444] nhui:mx-1\">{\"❤️\"}</span>\n by\n </span>\n <a\n className=\"nhui:!text-black nhui:text-sm nhui:text-current nhui:underline nhui:decoration-current nhui:underline-offset-[4px] nhui:transition-all nhui:duration-200 nhui:hover:underline-offset-[2px]\"\n href=\"https://namehashlabs.org/\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n NameHash Labs\n </a>\n </div>\n </div>\n </div>\n </section>\n );\n}\n","import type { LucideIcon, LucideProps } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport const ChainExplorerIcon: LucideIcon = React.forwardRef<SVGSVGElement, LucideProps>(\n (props, ref) => {\n return (\n <svg\n ref={ref}\n width={24}\n height={24}\n viewBox=\"-2.19622685 .37688013 124.38617733 125.52740941\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"m25.79 58.415a5.157 5.157 0 0 1 5.181-5.156l8.59.028a5.164 5.164 0 0 1 5.164 5.164v32.48c.967-.287 2.209-.593 3.568-.913a4.3 4.3 0 0 0 3.317-4.187v-40.291a5.165 5.165 0 0 1 5.164-5.165h8.607a5.165 5.165 0 0 1 5.164 5.165v37.393s2.155-.872 4.254-1.758a4.311 4.311 0 0 0 2.632-3.967v-44.578a5.164 5.164 0 0 1 5.163-5.164h8.606a5.164 5.164 0 0 1 5.164 5.164v36.71c7.462-5.408 15.024-11.912 21.025-19.733a8.662 8.662 0 0 0 1.319-8.092 60.792 60.792 0 0 0 -58.141-40.829 60.788 60.788 0 0 0 -51.99 91.064 7.688 7.688 0 0 0 7.334 3.8c1.628-.143 3.655-.346 6.065-.63a4.3 4.3 0 0 0 3.815-4.268z\"\n fill=\"currentColor\"\n />\n <path\n d=\"m25.602 110.51a60.813 60.813 0 0 0 63.371 5.013 60.815 60.815 0 0 0 33.212-54.203c0-1.4-.065-2.785-.158-4.162-22.219 33.138-63.244 48.63-96.423 53.347\"\n fill=\"currentColor\"\n />\n </svg>\n );\n },\n);\n","import type { LucideIcon, LucideProps } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport const EnsIcon: LucideIcon = React.forwardRef<SVGSVGElement, LucideProps>((props, ref) => {\n return (\n <svg\n ref={ref}\n width={24}\n height={24}\n viewBox=\"0 0 202 231\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"m98.3592 2.80337-63.5239 104.52363c-.4982.82-1.6556.911-2.2736.178-5.5924-6.641-26.42692-34.89-.6463-60.6377 23.5249-23.4947 53.4891-40.24601 64.5942-46.035595 1.2599-.656858 2.587.758365 1.8496 1.971665z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m94.8459 230.385c1.2678.888 2.8299-.626 1.9802-1.918-14.1887-21.581-61.3548-93.386-67.8702-104.165-6.4264-10.632-19.06614-28.301-20.12056-43.4178-.10524-1.5091-2.19202-1.8155-2.71696-.3963-.8466 2.2888-1.74793 5.0206-2.58796 8.1413-10.60469 39.3938 4.79656 81.1968 38.24488 104.6088l53.0706 37.148z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m103.571 228.526 63.524-104.523c.498-.82 1.656-.911 2.274-.178 5.592 6.64 26.427 34.89.646 60.638-23.525 23.494-53.489 40.246-64.594 46.035-1.26.657-2.587-.758-1.85-1.972z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m107.154.930762c-1.268-.8873666-2.83.625938-1.98 1.918258 14.189 21.58108 61.355 93.38638 67.87 104.16498 6.427 10.632 19.066 28.301 20.121 43.418.105 1.509 2.192 1.815 2.717.396.846-2.289 1.748-5.02 2.588-8.141 10.604-39.394-4.797-81.1965-38.245-104.609z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n </svg>\n );\n});\n","import type { SVGProps } from \"react\";\n\nexport const InfoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"17\"\n height=\"16\"\n viewBox=\"0 0 17 16\"\n fill=\"none\"\n {...props}\n >\n <g clipPath=\"url(#clip0_876_7239)\">\n <path\n d=\"M8.2487 10.6666V7.99992M8.2487 5.33325H8.25536M14.9154 7.99992C14.9154 11.6818 11.9306 14.6666 8.2487 14.6666C4.5668 14.6666 1.58203 11.6818 1.58203 7.99992C1.58203 4.31802 4.5668 1.33325 8.2487 1.33325C11.9306 1.33325 14.9154 4.31802 14.9154 7.99992Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_876_7239\">\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(0.25)\" />\n </clipPath>\n </defs>\n </svg>\n);\n","export const entryPoint06Address =\n '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789' as const\nexport const entryPoint07Address =\n '0x0000000071727De22E5E9d8BAf0edAc6f37da032' as const\nexport const entryPoint08Address =\n '0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108' as const\n\nexport const ethAddress = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' as const\n\nexport const zeroAddress = '0x0000000000000000000000000000000000000000' as const\n","// biome-ignore lint/performance/noBarrelFile: entrypoint module\nexport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n type AbiParameter,\n type AbiParameterKind,\n type AbiParameterToPrimitiveType,\n type AbiStateMutability,\n type Address,\n CircularReferenceError,\n InvalidAbiItemError,\n InvalidAbiParameterError,\n InvalidAbiParametersError,\n InvalidAbiTypeParameterError,\n InvalidFunctionModifierError,\n InvalidModifierError,\n InvalidParameterError,\n InvalidParenthesisError,\n InvalidSignatureError,\n InvalidStructSignatureError,\n type Narrow,\n type ParseAbi,\n type ParseAbiItem,\n type ParseAbiParameter,\n type ParseAbiParameters,\n parseAbi,\n parseAbiItem,\n parseAbiParameter,\n parseAbiParameters,\n SolidityProtectedKeywordError,\n type TypedData,\n type TypedDataDomain,\n type TypedDataParameter,\n UnknownSignatureError,\n UnknownTypeError,\n} from 'abitype'\nexport type {\n BlockOverrides,\n Rpc as RpcBlockOverrides,\n} from 'ox/BlockOverrides'\nexport type {\n RpcEstimateUserOperationGasReturnType,\n RpcGetUserOperationByHashReturnType,\n RpcUserOperation,\n RpcUserOperationReceipt,\n RpcUserOperationRequest,\n} from './account-abstraction/types/rpc.js'\nexport type {\n Account,\n AccountSource,\n CustomSource,\n HDAccount,\n HDOptions,\n JsonRpcAccount,\n LocalAccount,\n PrivateKeyAccount,\n} from './accounts/types.js'\nexport type {\n GetEnsAddressErrorType,\n GetEnsAddressParameters,\n GetEnsAddressReturnType,\n} from './actions/ens/getEnsAddress.js'\nexport type {\n GetEnsAvatarErrorType,\n GetEnsAvatarParameters,\n GetEnsAvatarReturnType,\n} from './actions/ens/getEnsAvatar.js'\nexport type {\n GetEnsNameErrorType,\n GetEnsNameParameters,\n GetEnsNameReturnType,\n} from './actions/ens/getEnsName.js'\nexport type {\n GetEnsResolverErrorType,\n GetEnsResolverParameters,\n GetEnsResolverReturnType,\n} from './actions/ens/getEnsResolver.js'\nexport type {\n GetEnsTextErrorType,\n GetEnsTextParameters,\n GetEnsTextReturnType,\n} from './actions/ens/getEnsText.js'\nexport {\n type GetContractErrorType,\n type GetContractParameters,\n type GetContractReturnType,\n getContract,\n} from './actions/getContract.js'\nexport type {\n CallErrorType,\n CallParameters,\n CallReturnType,\n} from './actions/public/call.js'\nexport type {\n CreateAccessListErrorType,\n CreateAccessListParameters,\n CreateAccessListReturnType,\n} from './actions/public/createAccessList.js'\nexport type {\n CreateBlockFilterErrorType,\n CreateBlockFilterReturnType,\n} from './actions/public/createBlockFilter.js'\nexport type {\n CreateContractEventFilterErrorType,\n CreateContractEventFilterParameters,\n CreateContractEventFilterReturnType,\n} from './actions/public/createContractEventFilter.js'\nexport type {\n CreateEventFilterErrorType,\n CreateEventFilterParameters,\n CreateEventFilterReturnType,\n} from './actions/public/createEventFilter.js'\nexport type {\n CreatePendingTransactionFilterErrorType,\n CreatePendingTransactionFilterReturnType,\n} from './actions/public/createPendingTransactionFilter.js'\nexport type {\n EstimateContractGasErrorType,\n EstimateContractGasParameters,\n EstimateContractGasReturnType,\n} from './actions/public/estimateContractGas.js'\nexport type {\n EstimateFeesPerGasErrorType,\n EstimateFeesPerGasParameters,\n EstimateFeesPerGasReturnType,\n} from './actions/public/estimateFeesPerGas.js'\nexport type {\n EstimateGasErrorType,\n EstimateGasParameters,\n EstimateGasReturnType,\n} from './actions/public/estimateGas.js'\nexport type {\n EstimateMaxPriorityFeePerGasErrorType,\n EstimateMaxPriorityFeePerGasParameters,\n EstimateMaxPriorityFeePerGasReturnType,\n} from './actions/public/estimateMaxPriorityFeePerGas.js'\nexport type {\n GetBalanceErrorType,\n GetBalanceParameters,\n GetBalanceReturnType,\n} from './actions/public/getBalance.js'\nexport type {\n GetBlobBaseFeeErrorType,\n GetBlobBaseFeeReturnType,\n} from './actions/public/getBlobBaseFee.js'\nexport type {\n GetBlockErrorType,\n GetBlockParameters,\n GetBlockReturnType,\n} from './actions/public/getBlock.js'\nexport type {\n GetBlockNumberErrorType,\n GetBlockNumberParameters,\n GetBlockNumberReturnType,\n} from './actions/public/getBlockNumber.js'\nexport type {\n GetBlockTransactionCountErrorType,\n GetBlockTransactionCountParameters,\n GetBlockTransactionCountReturnType,\n} from './actions/public/getBlockTransactionCount.js'\nexport type {\n GetChainIdErrorType,\n GetChainIdReturnType,\n} from './actions/public/getChainId.js'\nexport type {\n /** @deprecated Use `GetCodeErrorType` instead */\n GetCodeErrorType as GetBytecodeErrorType,\n GetCodeErrorType,\n /** @deprecated Use `GetCodeParameters` instead */\n GetCodeParameters as GetBytecodeParameters,\n GetCodeParameters,\n /** @deprecated Use `GetCodeReturnType` instead */\n GetCodeReturnType as GetBytecodeReturnType,\n GetCodeReturnType,\n} from './actions/public/getCode.js'\nexport type {\n GetContractEventsErrorType,\n GetContractEventsParameters,\n GetContractEventsReturnType,\n} from './actions/public/getContractEvents.js'\nexport type {\n GetEip712DomainErrorType,\n GetEip712DomainParameters,\n GetEip712DomainReturnType,\n} from './actions/public/getEip712Domain.js'\nexport type {\n GetFeeHistoryErrorType,\n GetFeeHistoryParameters,\n GetFeeHistoryReturnType,\n} from './actions/public/getFeeHistory.js'\nexport type {\n GetFilterChangesErrorType,\n GetFilterChangesParameters,\n GetFilterChangesReturnType,\n} from './actions/public/getFilterChanges.js'\nexport type {\n GetFilterLogsErrorType,\n GetFilterLogsParameters,\n GetFilterLogsReturnType,\n} from './actions/public/getFilterLogs.js'\nexport type {\n GetGasPriceErrorType,\n GetGasPriceReturnType,\n} from './actions/public/getGasPrice.js'\nexport type {\n GetLogsErrorType,\n GetLogsParameters,\n GetLogsReturnType,\n} from './actions/public/getLogs.js'\nexport type {\n GetProofErrorType,\n GetProofParameters,\n GetProofReturnType,\n} from './actions/public/getProof.js'\nexport type {\n GetStorageAtErrorType,\n GetStorageAtParameters,\n GetStorageAtReturnType,\n} from './actions/public/getStorageAt.js'\nexport type {\n GetTransactionErrorType,\n GetTransactionParameters,\n GetTransactionReturnType,\n} from './actions/public/getTransaction.js'\nexport type {\n GetTransactionConfirmationsErrorType,\n GetTransactionConfirmationsParameters,\n GetTransactionConfirmationsReturnType,\n} from './actions/public/getTransactionConfirmations.js'\nexport type {\n GetTransactionCountErrorType,\n GetTransactionCountParameters,\n GetTransactionCountReturnType,\n} from './actions/public/getTransactionCount.js'\nexport type {\n GetTransactionReceiptErrorType,\n GetTransactionReceiptParameters,\n GetTransactionReceiptReturnType,\n} from './actions/public/getTransactionReceipt.js'\nexport type {\n MulticallErrorType,\n MulticallParameters,\n MulticallReturnType,\n} from './actions/public/multicall.js'\nexport type {\n ReadContractErrorType,\n ReadContractParameters,\n ReadContractReturnType,\n} from './actions/public/readContract.js'\nexport type {\n SimulateBlocksErrorType,\n SimulateBlocksParameters,\n SimulateBlocksReturnType,\n} from './actions/public/simulateBlocks.js'\nexport type {\n SimulateCallsErrorType,\n SimulateCallsParameters,\n SimulateCallsReturnType,\n} from './actions/public/simulateCalls.js'\nexport type {\n GetMutabilityAwareValue,\n SimulateContractErrorType,\n SimulateContractParameters,\n SimulateContractReturnType,\n} from './actions/public/simulateContract.js'\nexport type {\n UninstallFilterErrorType,\n UninstallFilterParameters,\n UninstallFilterReturnType,\n} from './actions/public/uninstallFilter.js'\nexport type {\n VerifyHashErrorType as VerifyHashActionErrorType,\n VerifyHashParameters as VerifyHashActionParameters,\n VerifyHashReturnType as VerifyHashActionReturnType,\n} from './actions/public/verifyHash.js'\nexport type {\n VerifyMessageErrorType as VerifyMessageActionErrorType,\n VerifyMessageParameters as VerifyMessageActionParameters,\n VerifyMessageReturnType as VerifyMessageActionReturnType,\n} from './actions/public/verifyMessage.js'\nexport type {\n VerifyTypedDataErrorType as VerifyTypedDataActionErrorType,\n VerifyTypedDataParameters as VerifyTypedDataActionParameters,\n VerifyTypedDataReturnType as VerifyTypedDataActionReturnType,\n} from './actions/public/verifyTypedData.js'\nexport type {\n ReplacementReason,\n ReplacementReturnType,\n WaitForTransactionReceiptErrorType,\n WaitForTransactionReceiptParameters,\n WaitForTransactionReceiptReturnType,\n} from './actions/public/waitForTransactionReceipt.js'\nexport type {\n OnBlockNumberFn,\n OnBlockNumberParameter,\n WatchBlockNumberErrorType,\n WatchBlockNumberParameters,\n WatchBlockNumberReturnType,\n} from './actions/public/watchBlockNumber.js'\nexport type {\n OnBlock,\n OnBlockParameter,\n WatchBlocksErrorType,\n WatchBlocksParameters,\n WatchBlocksReturnType,\n} from './actions/public/watchBlocks.js'\nexport type {\n WatchContractEventErrorType,\n WatchContractEventOnLogsFn,\n WatchContractEventOnLogsParameter,\n WatchContractEventParameters,\n WatchContractEventReturnType,\n} from './actions/public/watchContractEvent.js'\nexport type {\n WatchEventErrorType,\n WatchEventOnLogsFn,\n WatchEventOnLogsParameter,\n WatchEventParameters,\n WatchEventReturnType,\n} from './actions/public/watchEvent.js'\nexport type {\n OnTransactionsFn,\n OnTransactionsParameter,\n WatchPendingTransactionsErrorType,\n WatchPendingTransactionsParameters,\n WatchPendingTransactionsReturnType,\n} from './actions/public/watchPendingTransactions.js'\nexport type {\n DropTransactionErrorType,\n DropTransactionParameters,\n} from './actions/test/dropTransaction.js'\nexport type {\n DumpStateErrorType,\n DumpStateReturnType,\n} from './actions/test/dumpState.js'\nexport type {\n GetAutomineErrorType,\n GetAutomineReturnType,\n} from './actions/test/getAutomine.js'\nexport type {\n GetTxpoolContentErrorType,\n GetTxpoolContentReturnType,\n} from './actions/test/getTxpoolContent.js'\nexport type {\n GetTxpoolStatusErrorType,\n GetTxpoolStatusReturnType,\n} from './actions/test/getTxpoolStatus.js'\nexport type {\n ImpersonateAccountErrorType,\n ImpersonateAccountParameters,\n} from './actions/test/impersonateAccount.js'\nexport type {\n IncreaseTimeErrorType,\n IncreaseTimeParameters,\n} from './actions/test/increaseTime.js'\nexport type {\n InspectTxpoolErrorType,\n InspectTxpoolReturnType,\n} from './actions/test/inspectTxpool.js'\nexport type {\n LoadStateErrorType,\n LoadStateParameters,\n LoadStateReturnType,\n} from './actions/test/loadState.js'\nexport type { MineErrorType, MineParameters } from './actions/test/mine.js'\nexport type { RemoveBlockTimestampIntervalErrorType } from './actions/test/removeBlockTimestampInterval.js'\nexport type { ResetErrorType, ResetParameters } from './actions/test/reset.js'\nexport type {\n RevertErrorType,\n RevertParameters,\n} from './actions/test/revert.js'\nexport type {\n SendUnsignedTransactionErrorType,\n SendUnsignedTransactionParameters,\n SendUnsignedTransactionReturnType,\n} from './actions/test/sendUnsignedTransaction.js'\nexport type { SetAutomineErrorType } from './actions/test/setAutomine.js'\nexport type {\n SetBalanceErrorType,\n SetBalanceParameters,\n} from './actions/test/setBalance.js'\nexport type {\n SetBlockGasLimitErrorType,\n SetBlockGasLimitParameters,\n} from './actions/test/setBlockGasLimit.js'\nexport type {\n SetBlockTimestampIntervalErrorType,\n SetBlockTimestampIntervalParameters,\n} from './actions/test/setBlockTimestampInterval.js'\nexport type {\n SetCodeErrorType,\n SetCodeParameters,\n} from './actions/test/setCode.js'\nexport type {\n SetCoinbaseErrorType,\n SetCoinbaseParameters,\n} from './actions/test/setCoinbase.js'\nexport type {\n SetIntervalMiningErrorType,\n SetIntervalMiningParameters,\n} from './actions/test/setIntervalMining.js'\nexport type { SetLoggingEnabledErrorType } from './actions/test/setLoggingEnabled.js'\nexport type {\n SetMinGasPriceErrorType,\n SetMinGasPriceParameters,\n} from './actions/test/setMinGasPrice.js'\nexport type {\n SetNextBlockBaseFeePerGasErrorType,\n SetNextBlockBaseFeePerGasParameters,\n} from './actions/test/setNextBlockBaseFeePerGas.js'\nexport type {\n SetNextBlockTimestampErrorType,\n SetNextBlockTimestampParameters,\n} from './actions/test/setNextBlockTimestamp.js'\nexport type {\n SetNonceErrorType,\n SetNonceParameters,\n} from './actions/test/setNonce.js'\nexport type { SetRpcUrlErrorType } from './actions/test/setRpcUrl.js'\nexport type {\n SetStorageAtErrorType,\n SetStorageAtParameters,\n} from './actions/test/setStorageAt.js'\nexport type { SnapshotErrorType } from './actions/test/snapshot.js'\nexport type {\n StopImpersonatingAccountErrorType,\n StopImpersonatingAccountParameters,\n} from './actions/test/stopImpersonatingAccount.js'\nexport type {\n AddChainErrorType,\n AddChainParameters,\n} from './actions/wallet/addChain.js'\nexport type {\n DeployContractErrorType,\n DeployContractParameters,\n DeployContractReturnType,\n} from './actions/wallet/deployContract.js'\nexport type {\n GetAddressesErrorType,\n GetAddressesReturnType,\n} from './actions/wallet/getAddresses.js'\nexport type {\n GetCallsStatusErrorType,\n GetCallsStatusParameters,\n GetCallsStatusReturnType,\n} from './actions/wallet/getCallsStatus.js'\nexport type {\n GetCapabilitiesErrorType,\n GetCapabilitiesParameters,\n GetCapabilitiesReturnType,\n} from './actions/wallet/getCapabilities.js'\nexport type {\n GetPermissionsErrorType,\n GetPermissionsReturnType,\n} from './actions/wallet/getPermissions.js'\nexport type {\n PrepareAuthorizationErrorType,\n PrepareAuthorizationParameters,\n PrepareAuthorizationReturnType,\n} from './actions/wallet/prepareAuthorization.js'\nexport type {\n PrepareTransactionRequestErrorType,\n PrepareTransactionRequestParameters,\n PrepareTransactionRequestParameterType,\n PrepareTransactionRequestRequest,\n PrepareTransactionRequestReturnType,\n} from './actions/wallet/prepareTransactionRequest.js'\nexport type {\n RequestAddressesErrorType,\n RequestAddressesReturnType,\n} from './actions/wallet/requestAddresses.js'\nexport type {\n RequestPermissionsErrorType,\n RequestPermissionsParameters,\n RequestPermissionsReturnType,\n} from './actions/wallet/requestPermissions.js'\nexport type {\n SendCallsErrorType,\n SendCallsParameters,\n SendCallsReturnType,\n} from './actions/wallet/sendCalls.js'\nexport type {\n SendCallsSyncErrorType,\n SendCallsSyncParameters,\n SendCallsSyncReturnType,\n} from './actions/wallet/sendCallsSync.js'\nexport type {\n SendRawTransactionErrorType,\n SendRawTransactionParameters,\n SendRawTransactionReturnType,\n} from './actions/wallet/sendRawTransaction.js'\nexport type {\n SendRawTransactionSyncErrorType,\n SendRawTransactionSyncParameters,\n SendRawTransactionSyncReturnType,\n} from './actions/wallet/sendRawTransactionSync.js'\nexport type {\n SendTransactionErrorType,\n SendTransactionParameters,\n SendTransactionRequest,\n SendTransactionReturnType,\n} from './actions/wallet/sendTransaction.js'\nexport type {\n SendTransactionSyncErrorType,\n SendTransactionSyncParameters,\n SendTransactionSyncRequest,\n SendTransactionSyncReturnType,\n} from './actions/wallet/sendTransactionSync.js'\nexport type {\n ShowCallsStatusErrorType,\n ShowCallsStatusParameters,\n ShowCallsStatusReturnType,\n} from './actions/wallet/showCallsStatus.js'\nexport type {\n SignAuthorizationErrorType,\n SignAuthorizationParameters,\n SignAuthorizationReturnType,\n} from './actions/wallet/signAuthorization.js'\nexport type {\n SignMessageErrorType,\n SignMessageParameters,\n SignMessageReturnType,\n} from './actions/wallet/signMessage.js'\nexport type {\n SignTransactionErrorType,\n SignTransactionParameters,\n SignTransactionReturnType,\n} from './actions/wallet/signTransaction.js'\nexport type {\n SignTypedDataErrorType,\n SignTypedDataParameters,\n SignTypedDataReturnType,\n} from './actions/wallet/signTypedData.js'\nexport type {\n SwitchChainErrorType,\n SwitchChainParameters,\n} from './actions/wallet/switchChain.js'\nexport type {\n WaitForCallsStatusErrorType,\n WaitForCallsStatusParameters,\n WaitForCallsStatusReturnType,\n WaitForCallsStatusTimeoutErrorType,\n} from './actions/wallet/waitForCallsStatus.js'\nexport { WaitForCallsStatusTimeoutError } from './actions/wallet/waitForCallsStatus.js'\nexport type {\n WatchAssetErrorType,\n WatchAssetParameters,\n WatchAssetReturnType,\n} from './actions/wallet/watchAsset.js'\nexport type {\n WriteContractErrorType,\n WriteContractParameters,\n WriteContractReturnType,\n} from './actions/wallet/writeContract.js'\nexport type {\n WriteContractSyncErrorType,\n WriteContractSyncParameters,\n WriteContractSyncReturnType,\n} from './actions/wallet/writeContractSync.js'\nexport {\n type Client,\n type ClientConfig,\n type CreateClientErrorType,\n createClient,\n type MulticallBatchOptions,\n rpcSchema,\n} from './clients/createClient.js'\nexport {\n type CreatePublicClientErrorType,\n createPublicClient,\n type PublicClient,\n type PublicClientConfig,\n} from './clients/createPublicClient.js'\nexport {\n type CreateTestClientErrorType,\n createTestClient,\n type TestClient,\n type TestClientConfig,\n} from './clients/createTestClient.js'\nexport {\n type CreateWalletClientErrorType,\n createWalletClient,\n type WalletClient,\n type WalletClientConfig,\n} from './clients/createWalletClient.js'\nexport {\n type PublicActions,\n publicActions,\n} from './clients/decorators/public.js'\nexport {\n type TestActions,\n testActions,\n} from './clients/decorators/test.js'\nexport {\n type WalletActions,\n walletActions,\n} from './clients/decorators/wallet.js'\nexport {\n type CreateTransportErrorType,\n createTransport,\n type Transport,\n type TransportConfig,\n} from './clients/transports/createTransport.js'\nexport {\n type CustomTransport,\n type CustomTransportConfig,\n type CustomTransportErrorType,\n custom,\n} from './clients/transports/custom.js'\nexport {\n type FallbackTransport,\n type FallbackTransportConfig,\n type FallbackTransportErrorType,\n fallback,\n shouldThrow,\n} from './clients/transports/fallback.js'\nexport {\n type HttpTransport,\n type HttpTransportConfig,\n type HttpTransportErrorType,\n http,\n} from './clients/transports/http.js'\nexport {\n type WebSocketTransport,\n type WebSocketTransportConfig,\n type WebSocketTransportErrorType,\n webSocket,\n} from './clients/transports/webSocket.js'\nexport {\n erc20Abi,\n erc20Abi_bytes32,\n erc721Abi,\n erc1155Abi,\n erc4626Abi,\n erc6492SignatureValidatorAbi,\n /** @deprecated use `erc6492SignatureValidatorAbi` instead. */\n erc6492SignatureValidatorAbi as universalSignatureValidatorAbi,\n multicall3Abi,\n} from './constants/abis.js'\nexport { ethAddress, zeroAddress } from './constants/address.js'\nexport { zeroHash } from './constants/bytes.js'\nexport {\n deploylessCallViaBytecodeBytecode,\n deploylessCallViaFactoryBytecode,\n erc6492SignatureValidatorByteCode,\n /** @deprecated use `erc6492SignatureValidatorByteCode` instead. */\n erc6492SignatureValidatorByteCode as universalSignatureValidatorByteCode,\n} from './constants/contracts.js'\nexport {\n maxInt8,\n maxInt16,\n maxInt24,\n maxInt32,\n maxInt40,\n maxInt48,\n maxInt56,\n maxInt64,\n maxInt72,\n maxInt80,\n maxInt88,\n maxInt96,\n maxInt104,\n maxInt112,\n maxInt120,\n maxInt128,\n maxInt136,\n maxInt144,\n maxInt152,\n maxInt160,\n maxInt168,\n maxInt176,\n maxInt184,\n maxInt192,\n maxInt200,\n maxInt208,\n maxInt216,\n maxInt224,\n maxInt232,\n maxInt240,\n maxInt248,\n maxInt256,\n maxUint8,\n maxUint16,\n maxUint24,\n maxUint32,\n maxUint40,\n maxUint48,\n maxUint56,\n maxUint64,\n maxUint72,\n maxUint80,\n maxUint88,\n maxUint96,\n maxUint104,\n maxUint112,\n maxUint120,\n maxUint128,\n maxUint136,\n maxUint144,\n maxUint152,\n maxUint160,\n maxUint168,\n maxUint176,\n maxUint184,\n maxUint192,\n maxUint200,\n maxUint208,\n maxUint216,\n maxUint224,\n maxUint232,\n maxUint240,\n maxUint248,\n maxUint256,\n minInt8,\n minInt16,\n minInt24,\n minInt32,\n minInt40,\n minInt48,\n minInt56,\n minInt64,\n minInt72,\n minInt80,\n minInt88,\n minInt96,\n minInt104,\n minInt112,\n minInt120,\n minInt128,\n minInt136,\n minInt144,\n minInt152,\n minInt160,\n minInt168,\n minInt176,\n minInt184,\n minInt192,\n minInt200,\n minInt208,\n minInt216,\n minInt224,\n minInt232,\n minInt240,\n minInt248,\n minInt256,\n} from './constants/number.js'\nexport { presignMessagePrefix } from './constants/strings.js'\nexport { etherUnits, gweiUnits, weiUnits } from './constants/unit.js'\nexport {\n AbiConstructorNotFoundError,\n type AbiConstructorNotFoundErrorType,\n AbiConstructorParamsNotFoundError,\n type AbiConstructorParamsNotFoundErrorType,\n AbiDecodingDataSizeInvalidError,\n type AbiDecodingDataSizeInvalidErrorType,\n AbiDecodingDataSizeTooSmallError,\n type AbiDecodingDataSizeTooSmallErrorType,\n AbiDecodingZeroDataError,\n type AbiDecodingZeroDataErrorType,\n AbiEncodingArrayLengthMismatchError,\n type AbiEncodingArrayLengthMismatchErrorType,\n AbiEncodingBytesSizeMismatchError,\n type AbiEncodingBytesSizeMismatchErrorType,\n AbiEncodingLengthMismatchError,\n type AbiEncodingLengthMismatchErrorType,\n AbiErrorInputsNotFoundError,\n type AbiErrorInputsNotFoundErrorType,\n AbiErrorNotFoundError,\n type AbiErrorNotFoundErrorType,\n AbiErrorSignatureNotFoundError,\n type AbiErrorSignatureNotFoundErrorType,\n AbiEventNotFoundError,\n type AbiEventNotFoundErrorType,\n AbiEventSignatureEmptyTopicsError,\n type AbiEventSignatureEmptyTopicsErrorType,\n AbiEventSignatureNotFoundError,\n type AbiEventSignatureNotFoundErrorType,\n AbiFunctionNotFoundError,\n type AbiFunctionNotFoundErrorType,\n AbiFunctionOutputsNotFoundError,\n type AbiFunctionOutputsNotFoundErrorType,\n AbiFunctionSignatureNotFoundError,\n type AbiFunctionSignatureNotFoundErrorType,\n BytesSizeMismatchError,\n type BytesSizeMismatchErrorType,\n DecodeLogDataMismatch,\n type DecodeLogDataMismatchErrorType,\n DecodeLogTopicsMismatch,\n type DecodeLogTopicsMismatchErrorType,\n InvalidAbiDecodingTypeError,\n type InvalidAbiDecodingTypeErrorType,\n InvalidAbiEncodingTypeError,\n type InvalidAbiEncodingTypeErrorType,\n InvalidArrayError,\n type InvalidArrayErrorType,\n InvalidDefinitionTypeError,\n type InvalidDefinitionTypeErrorType,\n UnsupportedPackedAbiType,\n type UnsupportedPackedAbiTypeErrorType,\n} from './errors/abi.js'\nexport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from './errors/address.js'\nexport { BaseError, type BaseErrorType, setErrorConfig } from './errors/base.js'\nexport {\n BlockNotFoundError,\n type BlockNotFoundErrorType,\n} from './errors/block.js'\nexport {\n BundleFailedError,\n type BundleFailedErrorType,\n} from './errors/calls.js'\nexport {\n ChainDoesNotSupportContract,\n type ChainDoesNotSupportContractErrorType,\n ChainMismatchError,\n type ChainMismatchErrorType,\n ChainNotFoundError,\n type ChainNotFoundErrorType,\n ClientChainNotConfiguredError,\n type ClientChainNotConfiguredErrorType,\n InvalidChainIdError,\n type InvalidChainIdErrorType,\n} from './errors/chain.js'\nexport {\n CallExecutionError,\n type CallExecutionErrorType,\n ContractFunctionExecutionError,\n type ContractFunctionExecutionErrorType,\n ContractFunctionRevertedError,\n type ContractFunctionRevertedErrorType,\n ContractFunctionZeroDataError,\n type ContractFunctionZeroDataErrorType,\n CounterfactualDeploymentFailedError,\n type CounterfactualDeploymentFailedErrorType,\n RawContractError,\n type RawContractErrorType,\n} from './errors/contract.js'\nexport {\n SizeExceedsPaddingSizeError,\n type SizeExceedsPaddingSizeErrorType,\n SliceOffsetOutOfBoundsError,\n type SliceOffsetOutOfBoundsErrorType,\n} from './errors/data.js'\nexport {\n IntegerOutOfRangeError,\n type IntegerOutOfRangeErrorType,\n InvalidBytesBooleanError,\n type InvalidBytesBooleanErrorType,\n InvalidHexBooleanError,\n type InvalidHexBooleanErrorType,\n InvalidHexValueError,\n type InvalidHexValueErrorType,\n SizeOverflowError,\n type SizeOverflowErrorType,\n} from './errors/encoding.js'\nexport {\n type EnsAvatarInvalidMetadataError,\n type EnsAvatarInvalidMetadataErrorType,\n EnsAvatarInvalidNftUriError,\n type EnsAvatarInvalidNftUriErrorType,\n EnsAvatarUnsupportedNamespaceError,\n type EnsAvatarUnsupportedNamespaceErrorType,\n EnsAvatarUriResolutionError,\n type EnsAvatarUriResolutionErrorType,\n EnsInvalidChainIdError,\n type EnsInvalidChainIdErrorType,\n} from './errors/ens.js'\nexport {\n EstimateGasExecutionError,\n type EstimateGasExecutionErrorType,\n} from './errors/estimateGas.js'\nexport {\n BaseFeeScalarError,\n type BaseFeeScalarErrorType,\n Eip1559FeesNotSupportedError,\n type Eip1559FeesNotSupportedErrorType,\n MaxFeePerGasTooLowError,\n type MaxFeePerGasTooLowErrorType,\n} from './errors/fee.js'\nexport {\n FilterTypeNotSupportedError,\n type FilterTypeNotSupportedErrorType,\n} from './errors/log.js'\nexport {\n ExecutionRevertedError,\n type ExecutionRevertedErrorType,\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n FeeCapTooLowError,\n type FeeCapTooLowErrorType,\n InsufficientFundsError,\n type InsufficientFundsErrorType,\n IntrinsicGasTooHighError,\n type IntrinsicGasTooHighErrorType,\n IntrinsicGasTooLowError,\n type IntrinsicGasTooLowErrorType,\n NonceMaxValueError,\n type NonceMaxValueErrorType,\n NonceTooHighError,\n type NonceTooHighErrorType,\n NonceTooLowError,\n type NonceTooLowErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n TransactionTypeNotSupportedError,\n type TransactionTypeNotSupportedErrorType,\n UnknownNodeError,\n type UnknownNodeErrorType,\n} from './errors/node.js'\nexport {\n HttpRequestError,\n type HttpRequestErrorType,\n RpcRequestError,\n type RpcRequestErrorType,\n SocketClosedError,\n type SocketClosedErrorType,\n TimeoutError,\n type TimeoutErrorType,\n WebSocketRequestError,\n type WebSocketRequestErrorType,\n} from './errors/request.js'\nexport {\n AtomicityNotSupportedError,\n type AtomicityNotSupportedErrorType,\n AtomicReadyWalletRejectedUpgradeError,\n type AtomicReadyWalletRejectedUpgradeErrorType,\n BundleTooLargeError,\n type BundleTooLargeErrorType,\n ChainDisconnectedError,\n type ChainDisconnectedErrorType,\n DuplicateIdError,\n type DuplicateIdErrorType,\n InternalRpcError,\n type InternalRpcErrorType,\n InvalidInputRpcError,\n type InvalidInputRpcErrorType,\n InvalidParamsRpcError,\n type InvalidParamsRpcErrorType,\n InvalidRequestRpcError,\n type InvalidRequestRpcErrorType,\n JsonRpcVersionUnsupportedError,\n type JsonRpcVersionUnsupportedErrorType,\n LimitExceededRpcError,\n type LimitExceededRpcErrorType,\n MethodNotFoundRpcError,\n type MethodNotFoundRpcErrorType,\n MethodNotSupportedRpcError,\n type MethodNotSupportedRpcErrorType,\n ParseRpcError,\n type ParseRpcErrorType,\n ProviderDisconnectedError,\n type ProviderDisconnectedErrorType,\n ProviderRpcError,\n type ProviderRpcErrorCode,\n type ProviderRpcErrorType,\n ResourceNotFoundRpcError,\n type ResourceNotFoundRpcErrorType,\n ResourceUnavailableRpcError,\n type ResourceUnavailableRpcErrorType,\n RpcError,\n type RpcErrorCode,\n type RpcErrorType,\n SwitchChainError,\n TransactionRejectedRpcError,\n type TransactionRejectedRpcErrorType,\n UnauthorizedProviderError,\n type UnauthorizedProviderErrorType,\n UnknownBundleIdError,\n type UnknownBundleIdErrorType,\n UnknownRpcError,\n type UnknownRpcErrorType,\n UnsupportedChainIdError,\n type UnsupportedChainIdErrorType,\n UnsupportedNonOptionalCapabilityError,\n type UnsupportedNonOptionalCapabilityErrorType,\n UnsupportedProviderMethodError,\n type UnsupportedProviderMethodErrorType,\n UserRejectedRequestError,\n type UserRejectedRequestErrorType,\n} from './errors/rpc.js'\nexport {\n AccountStateConflictError,\n type AccountStateConflictErrorType,\n StateAssignmentConflictError,\n type StateAssignmentConflictErrorType,\n} from './errors/stateOverride.js'\nexport {\n FeeConflictError,\n type FeeConflictErrorType,\n InvalidLegacyVError,\n type InvalidLegacyVErrorType,\n InvalidSerializableTransactionError,\n type InvalidSerializableTransactionErrorType,\n InvalidSerializedTransactionError,\n type InvalidSerializedTransactionErrorType,\n InvalidSerializedTransactionTypeError,\n type InvalidSerializedTransactionTypeErrorType,\n InvalidStorageKeySizeError,\n type InvalidStorageKeySizeErrorType,\n TransactionExecutionError,\n type TransactionExecutionErrorType,\n TransactionNotFoundError,\n type TransactionNotFoundErrorType,\n TransactionReceiptNotFoundError,\n type TransactionReceiptNotFoundErrorType,\n WaitForTransactionReceiptTimeoutError,\n type WaitForTransactionReceiptTimeoutErrorType,\n} from './errors/transaction.js'\nexport {\n UrlRequiredError,\n type UrlRequiredErrorType,\n} from './errors/transport.js'\nexport {\n InvalidDomainError,\n type InvalidDomainErrorType,\n InvalidPrimaryTypeError,\n type InvalidPrimaryTypeErrorType,\n InvalidStructTypeError,\n type InvalidStructTypeErrorType,\n} from './errors/typedData.js'\nexport {\n InvalidDecimalNumberError,\n type InvalidDecimalNumberErrorType,\n} from './errors/unit.js'\nexport type {\n DeriveAccount,\n HDKey,\n ParseAccount,\n} from './types/account.js'\nexport type {\n Authorization,\n AuthorizationList,\n AuthorizationRequest,\n SerializedAuthorization,\n SerializedAuthorizationList,\n SignedAuthorization,\n SignedAuthorizationList,\n} from './types/authorization.js'\nexport type {\n Block,\n BlockIdentifier,\n BlockNumber,\n BlockTag,\n Uncle,\n} from './types/block.js'\nexport type { Call, Calls } from './types/calls.js'\nexport type {\n Capabilities,\n /** @deprecated Use `Capabilities` instead. */\n Capabilities as WalletCapabilities,\n CapabilitiesSchema,\n /** @deprecated Use `ChainIdToCapabilities` instead. */\n ChainIdToCapabilities as WalletCapabilitiesRecord,\n ChainIdToCapabilities,\n ExtractCapabilities,\n} from './types/capabilities.js'\nexport type {\n Chain,\n ChainConfig,\n ChainContract,\n ChainEstimateFeesPerGasFn,\n ChainEstimateFeesPerGasFnParameters,\n ChainFees,\n ChainFeesFnParameters,\n ChainFormatter,\n ChainFormatters,\n ChainMaxPriorityFeePerGasFn,\n ChainSerializers,\n DeriveChain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterParameters,\n ExtractChainFormatterReturnType,\n GetChainParameter,\n} from './types/chain.js'\nexport type {\n AbiEventParametersToPrimitiveTypes,\n AbiEventParameterToPrimitiveType,\n AbiEventTopicToPrimitiveType,\n AbiItem,\n AbiItemArgs,\n AbiItemName,\n ContractConstructorArgs,\n ContractErrorArgs,\n ContractErrorName,\n ContractEventArgs,\n ContractEventArgsFromTopics,\n ContractEventName,\n ContractFunctionArgs,\n ContractFunctionName,\n ContractFunctionParameters,\n ContractFunctionReturnType,\n EventDefinition,\n ExtractAbiFunctionForArgs,\n ExtractAbiItem,\n ExtractAbiItemForArgs,\n ExtractAbiItemNames,\n GetEventArgs,\n GetValue,\n LogTopicType,\n MaybeAbiEventName,\n MaybeExtractEventArgsFromAbi,\n UnionWiden,\n Widen,\n} from './types/contract.js'\nexport type {\n AddEthereumChainParameter,\n BundlerRpcSchema,\n DebugBundlerRpcSchema,\n EIP1193EventMap,\n EIP1193Events,\n EIP1193Parameters,\n EIP1193Provider,\n EIP1193RequestFn,\n EIP1474Methods,\n NetworkSync,\n PaymasterRpcSchema,\n ProviderConnectInfo,\n ProviderMessage,\n ProviderRpcErrorType as EIP1193ProviderRpcErrorType,\n PublicRpcSchema,\n RpcSchema,\n RpcSchemaOverride,\n TestRpcSchema,\n WalletCallReceipt,\n WalletGetAssetsParameters,\n WalletGetAssetsReturnType,\n WalletGetCallsStatusReturnType,\n WalletGrantPermissionsParameters,\n WalletGrantPermissionsReturnType,\n WalletPermission,\n WalletPermissionCaveat,\n WalletRpcSchema,\n WalletSendCallsParameters,\n WalletSendCallsReturnType,\n WatchAssetParams,\n} from './types/eip1193.js'\nexport { ProviderRpcError as EIP1193ProviderRpcError } from './types/eip1193.js'\nexport type { BlobSidecar, BlobSidecars } from './types/eip4844.js'\nexport type { AssetGateway, AssetGatewayUrls } from './types/ens.js'\nexport type {\n FeeHistory,\n FeeValues,\n FeeValuesEIP1559,\n FeeValuesEIP4844,\n FeeValuesLegacy,\n FeeValuesType,\n} from './types/fee.js'\nexport type { Filter, FilterType } from './types/filter.js'\nexport type { GetTransactionRequestKzgParameter, Kzg } from './types/kzg.js'\nexport type { Log } from './types/log.js'\nexport type {\n ByteArray,\n CompactSignature,\n Hash,\n Hex,\n LogTopic,\n SignableMessage,\n Signature,\n} from './types/misc.js'\nexport type {\n MulticallContracts,\n MulticallResponse,\n MulticallResults,\n} from './types/multicall.js'\nexport type { Register, ResolvedRegister } from './types/register.js'\nexport type {\n Index,\n Quantity,\n RpcAccountStateOverride,\n RpcAuthorization,\n RpcAuthorizationList,\n RpcBlock,\n RpcBlockIdentifier,\n RpcBlockNumber,\n RpcFeeHistory,\n RpcFeeValues,\n RpcLog,\n RpcProof,\n RpcStateMapping,\n RpcStateOverride,\n RpcTransaction,\n RpcTransactionReceipt,\n RpcTransactionRequest,\n RpcUncle,\n Status,\n} from './types/rpc.js'\nexport type {\n StateMapping,\n StateOverride,\n} from './types/stateOverride.js'\nexport type {\n AccessList,\n Transaction,\n TransactionBase,\n TransactionEIP1559,\n TransactionEIP2930,\n TransactionEIP4844,\n TransactionEIP7702,\n TransactionLegacy,\n TransactionReceipt,\n TransactionRequest,\n TransactionRequestBase,\n TransactionRequestEIP1559,\n TransactionRequestEIP2930,\n TransactionRequestEIP4844,\n TransactionRequestEIP7702,\n TransactionRequestGeneric,\n TransactionRequestLegacy,\n TransactionSerializable,\n TransactionSerializableBase,\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n TransactionSerializableLegacy,\n TransactionSerialized,\n TransactionSerializedEIP1559,\n TransactionSerializedEIP2930,\n TransactionSerializedEIP4844,\n TransactionSerializedEIP7702,\n TransactionSerializedGeneric,\n TransactionSerializedLegacy,\n TransactionType,\n} from './types/transaction.js'\nexport type { GetPollOptions, GetTransportConfig } from './types/transport.js'\nexport type { TypedDataDefinition } from './types/typedData.js'\nexport type {\n Assign,\n Branded,\n Evaluate,\n ExactPartial,\n ExactRequired,\n IsNarrowable,\n IsNever,\n IsUndefined,\n IsUnion,\n LooseOmit,\n MaybePartial,\n MaybePromise,\n MaybeRequired,\n Mutable,\n NoInfer,\n NoUndefined,\n Omit,\n OneOf,\n Or,\n PartialBy,\n Prettify,\n RequiredBy,\n Some,\n UnionEvaluate,\n UnionLooseOmit,\n UnionOmit,\n UnionPartialBy,\n UnionPick,\n UnionRequiredBy,\n UnionToTuple,\n ValueOf,\n} from './types/utils.js'\nexport type { Withdrawal } from './types/withdrawal.js'\nexport {\n type DecodeAbiParametersErrorType,\n type DecodeAbiParametersReturnType,\n decodeAbiParameters,\n} from './utils/abi/decodeAbiParameters.js'\nexport {\n type DecodeDeployDataErrorType,\n type DecodeDeployDataParameters,\n type DecodeDeployDataReturnType,\n decodeDeployData,\n} from './utils/abi/decodeDeployData.js'\nexport {\n type DecodeErrorResultErrorType,\n type DecodeErrorResultParameters,\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n} from './utils/abi/decodeErrorResult.js'\nexport {\n type DecodeEventLogErrorType,\n type DecodeEventLogParameters,\n type DecodeEventLogReturnType,\n decodeEventLog,\n} from './utils/abi/decodeEventLog.js'\nexport {\n type DecodeFunctionDataErrorType,\n type DecodeFunctionDataParameters,\n type DecodeFunctionDataReturnType,\n decodeFunctionData,\n} from './utils/abi/decodeFunctionData.js'\nexport {\n type DecodeFunctionResultErrorType,\n type DecodeFunctionResultParameters,\n type DecodeFunctionResultReturnType,\n decodeFunctionResult,\n} from './utils/abi/decodeFunctionResult.js'\nexport {\n type EncodeAbiParametersErrorType,\n type EncodeAbiParametersReturnType,\n encodeAbiParameters,\n} from './utils/abi/encodeAbiParameters.js'\nexport {\n type EncodeDeployDataErrorType,\n type EncodeDeployDataParameters,\n type EncodeDeployDataReturnType,\n encodeDeployData,\n} from './utils/abi/encodeDeployData.js'\nexport {\n type EncodeErrorResultErrorType,\n type EncodeErrorResultParameters,\n type EncodeErrorResultReturnType,\n encodeErrorResult,\n} from './utils/abi/encodeErrorResult.js'\nexport {\n type EncodeEventTopicsErrorType,\n type EncodeEventTopicsParameters,\n type EncodeEventTopicsReturnType,\n encodeEventTopics,\n} from './utils/abi/encodeEventTopics.js'\nexport {\n type EncodeFunctionDataErrorType,\n type EncodeFunctionDataParameters,\n type EncodeFunctionDataReturnType,\n encodeFunctionData,\n} from './utils/abi/encodeFunctionData.js'\nexport {\n type EncodeFunctionResultErrorType,\n type EncodeFunctionResultParameters,\n type EncodeFunctionResultReturnType,\n encodeFunctionResult,\n} from './utils/abi/encodeFunctionResult.js'\nexport {\n type EncodePackedErrorType,\n encodePacked,\n} from './utils/abi/encodePacked.js'\nexport {\n type GetAbiItemErrorType,\n type GetAbiItemParameters,\n type GetAbiItemReturnType,\n getAbiItem,\n} from './utils/abi/getAbiItem.js'\nexport {\n type ParseEventLogsErrorType,\n type ParseEventLogsParameters,\n type ParseEventLogsReturnType,\n parseEventLogs,\n} from './utils/abi/parseEventLogs.js'\nexport {\n type PrepareEncodeFunctionDataErrorType,\n type PrepareEncodeFunctionDataParameters,\n type PrepareEncodeFunctionDataReturnType,\n prepareEncodeFunctionData,\n} from './utils/abi/prepareEncodeFunctionData.js'\nexport {\n type ChecksumAddressErrorType,\n checksumAddress,\n type GetAddressErrorType,\n getAddress,\n} from './utils/address/getAddress.js'\nexport {\n type GetContractAddressOptions,\n type GetCreate2AddressErrorType,\n type GetCreate2AddressOptions,\n type GetCreateAddressErrorType,\n type GetCreateAddressOptions,\n getContractAddress,\n getCreate2Address,\n getCreateAddress,\n} from './utils/address/getContractAddress.js'\nexport {\n type IsAddressErrorType,\n type IsAddressOptions,\n isAddress,\n} from './utils/address/isAddress.js'\nexport {\n type IsAddressEqualErrorType,\n type IsAddressEqualReturnType,\n isAddressEqual,\n} from './utils/address/isAddressEqual.js'\nexport {\n type BlobsToCommitmentsErrorType,\n type BlobsToCommitmentsParameters,\n type BlobsToCommitmentsReturnType,\n blobsToCommitments,\n} from './utils/blob/blobsToCommitments.js'\nexport {\n blobsToProofs,\n type blobsToProofsErrorType,\n type blobsToProofsParameters,\n type blobsToProofsReturnType,\n} from './utils/blob/blobsToProofs.js'\nexport {\n type CommitmentsToVersionedHashesErrorType,\n type CommitmentsToVersionedHashesParameters,\n type CommitmentsToVersionedHashesReturnType,\n commitmentsToVersionedHashes,\n} from './utils/blob/commitmentsToVersionedHashes.js'\nexport {\n type CommitmentToVersionedHashErrorType,\n type CommitmentToVersionedHashParameters,\n type CommitmentToVersionedHashReturnType,\n commitmentToVersionedHash,\n} from './utils/blob/commitmentToVersionedHash.js'\nexport {\n type FromBlobsErrorType,\n type FromBlobsParameters,\n type FromBlobsReturnType,\n fromBlobs,\n} from './utils/blob/fromBlobs.js'\nexport {\n type SidecarsToVersionedHashesErrorType,\n type SidecarsToVersionedHashesParameters,\n type SidecarsToVersionedHashesReturnType,\n sidecarsToVersionedHashes,\n} from './utils/blob/sidecarsToVersionedHashes.js'\nexport {\n type ToBlobSidecarsErrorType,\n type ToBlobSidecarsParameters,\n type ToBlobSidecarsReturnType,\n toBlobSidecars,\n} from './utils/blob/toBlobSidecars.js'\nexport {\n type ToBlobsErrorType,\n type ToBlobsParameters,\n type ToBlobsReturnType,\n toBlobs,\n} from './utils/blob/toBlobs.js'\nexport {\n type CcipRequestErrorType,\n type CcipRequestParameters,\n ccipRequest,\n /** @deprecated Use `ccipRequest`. */\n ccipRequest as ccipFetch,\n type OffchainLookupErrorType,\n offchainLookup,\n offchainLookupAbiItem,\n offchainLookupSignature,\n} from './utils/ccip.js'\nexport {\n type AssertCurrentChainErrorType,\n type AssertCurrentChainParameters,\n assertCurrentChain,\n} from './utils/chain/assertCurrentChain.js'\nexport { defineChain } from './utils/chain/defineChain.js'\nexport {\n type ExtractChainErrorType,\n type ExtractChainParameters,\n type ExtractChainReturnType,\n extractChain,\n} from './utils/chain/extractChain.js'\nexport {\n type GetChainContractAddressErrorType,\n getChainContractAddress,\n} from './utils/chain/getChainContractAddress.js'\nexport {\n type ConcatBytesErrorType,\n type ConcatErrorType,\n type ConcatHexErrorType,\n type ConcatReturnType,\n concat,\n concatBytes,\n concatHex,\n} from './utils/data/concat.js'\nexport { type IsBytesErrorType, isBytes } from './utils/data/isBytes.js'\nexport { type IsHexErrorType, isHex } from './utils/data/isHex.js'\nexport {\n type PadBytesErrorType,\n type PadErrorType,\n type PadHexErrorType,\n type PadReturnType,\n pad,\n padBytes,\n padHex,\n} from './utils/data/pad.js'\nexport { type SizeErrorType, size } from './utils/data/size.js'\nexport {\n type SliceBytesErrorType,\n type SliceErrorType,\n type SliceHexErrorType,\n slice,\n sliceBytes,\n sliceHex,\n} from './utils/data/slice.js'\nexport {\n type TrimErrorType,\n type TrimReturnType,\n trim,\n} from './utils/data/trim.js'\nexport {\n type BytesToBigIntErrorType,\n type BytesToBigIntOpts,\n type BytesToBoolErrorType,\n type BytesToBoolOpts,\n type BytesToNumberErrorType,\n type BytesToNumberOpts,\n type BytesToStringErrorType,\n type BytesToStringOpts,\n bytesToBigInt,\n bytesToBool,\n bytesToNumber,\n bytesToString,\n type FromBytesErrorType,\n type FromBytesParameters,\n fromBytes,\n} from './utils/encoding/fromBytes.js'\nexport {\n type FromHexErrorType,\n fromHex,\n type HexToBigIntErrorType,\n type HexToBoolErrorType,\n type HexToNumberErrorType,\n type HexToStringErrorType,\n hexToBigInt,\n hexToBool,\n hexToNumber,\n hexToString,\n} from './utils/encoding/fromHex.js'\nexport {\n type FromRlpErrorType,\n type FromRlpReturnType,\n fromRlp,\n} from './utils/encoding/fromRlp.js'\nexport {\n type BoolToBytesErrorType,\n type BoolToBytesOpts,\n boolToBytes,\n type HexToBytesErrorType,\n type HexToBytesOpts,\n hexToBytes,\n type NumberToBytesErrorType,\n numberToBytes,\n type StringToBytesErrorType,\n type StringToBytesOpts,\n stringToBytes,\n type ToBytesErrorType,\n type ToBytesParameters,\n toBytes,\n} from './utils/encoding/toBytes.js'\nexport {\n type BoolToHexErrorType,\n type BoolToHexOpts,\n type BytesToHexErrorType,\n type BytesToHexOpts,\n boolToHex,\n bytesToHex,\n type NumberToHexErrorType,\n type NumberToHexOpts,\n numberToHex,\n type StringToHexErrorType,\n type StringToHexOpts,\n stringToHex,\n type ToHexErrorType,\n type ToHexParameters,\n toHex,\n} from './utils/encoding/toHex.js'\nexport {\n type BytesToRlpErrorType,\n bytesToRlp,\n type HexToRlpErrorType,\n hexToRlp,\n type ToRlpErrorType,\n type ToRlpReturnType,\n toRlp,\n} from './utils/encoding/toRlp.js'\nexport { type LabelhashErrorType, labelhash } from './utils/ens/labelhash.js'\nexport { type NamehashErrorType, namehash } from './utils/ens/namehash.js'\nexport {\n type ToCoinTypeError,\n toCoinType,\n} from './utils/ens/toCoinType.js'\nexport {\n type GetContractErrorReturnType,\n getContractError,\n} from './utils/errors/getContractError.js'\nexport {\n type DefineBlockErrorType,\n defineBlock,\n type FormatBlockErrorType,\n type FormattedBlock,\n formatBlock,\n} from './utils/formatters/block.js'\nexport { type FormatLogErrorType, formatLog } from './utils/formatters/log.js'\nexport {\n type DefineTransactionErrorType,\n defineTransaction,\n type FormatTransactionErrorType,\n type FormattedTransaction,\n formatTransaction,\n transactionType,\n} from './utils/formatters/transaction.js'\nexport {\n type DefineTransactionReceiptErrorType,\n defineTransactionReceipt,\n type FormatTransactionReceiptErrorType,\n type FormattedTransactionReceipt,\n formatTransactionReceipt,\n} from './utils/formatters/transactionReceipt.js'\nexport {\n type DefineTransactionRequestErrorType,\n defineTransactionRequest,\n type FormatTransactionRequestErrorType,\n type FormattedTransactionRequest,\n formatTransactionRequest,\n rpcTransactionType,\n} from './utils/formatters/transactionRequest.js'\nexport { type IsHashErrorType, isHash } from './utils/hash/isHash.js'\nexport {\n type Keccak256ErrorType,\n type Keccak256Hash,\n keccak256,\n} from './utils/hash/keccak256.js'\nexport {\n type Ripemd160ErrorType,\n type Ripemd160Hash,\n ripemd160,\n} from './utils/hash/ripemd160.js'\nexport {\n type Sha256ErrorType,\n type Sha256Hash,\n sha256,\n} from './utils/hash/sha256.js'\nexport {\n type ToEventHashErrorType,\n toEventHash,\n} from './utils/hash/toEventHash.js'\nexport {\n type ToEventSelectorErrorType,\n /** @deprecated use `ToEventSelectorErrorType`. */\n type ToEventSelectorErrorType as GetEventSelectorErrorType,\n toEventSelector,\n /** @deprecated use `toEventSelector`. */\n toEventSelector as getEventSelector,\n} from './utils/hash/toEventSelector.js'\nexport {\n type ToEventSignatureErrorType,\n /** @deprecated use `ToEventSignatureErrorType`. */\n type ToEventSignatureErrorType as GetEventSignatureErrorType,\n toEventSignature,\n /** @deprecated use `toEventSignature`. */\n toEventSignature as getEventSignature,\n} from './utils/hash/toEventSignature.js'\nexport {\n type ToFunctionHashErrorType,\n toFunctionHash,\n} from './utils/hash/toFunctionHash.js'\nexport {\n type ToFunctionSelectorErrorType,\n /** @deprecated use `ToFunctionSelectorErrorType`. */\n type ToFunctionSelectorErrorType as GetFunctionSelectorErrorType,\n toFunctionSelector,\n /** @deprecated use `toFunctionSelector`. */\n toFunctionSelector as getFunctionSelector,\n} from './utils/hash/toFunctionSelector.js'\nexport {\n type ToFunctionSignatureErrorType,\n /** @deprecated use `ToFunctionSignatureErrorType`. */\n type ToFunctionSignatureErrorType as GetFunctionSignatureErrorType,\n toFunctionSignature,\n /** @deprecated use `toFunctionSignature`. */\n toFunctionSignature as getFunctionSignature,\n} from './utils/hash/toFunctionSignature.js'\nexport {\n type DefineKzgErrorType,\n type DefineKzgParameters,\n type DefineKzgReturnType,\n defineKzg,\n} from './utils/kzg/defineKzg.js'\nexport {\n type SetupKzgErrorType,\n type SetupKzgParameters,\n type SetupKzgReturnType,\n setupKzg,\n} from './utils/kzg/setupKzg.js'\nexport {\n type CreateNonceManagerParameters,\n createNonceManager,\n type NonceManager,\n type NonceManagerSource,\n nonceManager,\n} from './utils/nonceManager.js'\nexport { withCache } from './utils/promise/withCache.js'\nexport {\n type WithRetryErrorType,\n withRetry,\n} from './utils/promise/withRetry.js'\nexport {\n type WithTimeoutErrorType,\n withTimeout,\n} from './utils/promise/withTimeout.js'\nexport {\n type CompactSignatureToSignatureErrorType,\n compactSignatureToSignature,\n} from './utils/signature/compactSignatureToSignature.js'\nexport {\n type HashMessageErrorType,\n hashMessage,\n} from './utils/signature/hashMessage.js'\nexport {\n type HashDomainErrorType,\n type HashStructErrorType,\n type HashTypedDataErrorType,\n type HashTypedDataParameters,\n type HashTypedDataReturnType,\n hashDomain,\n hashStruct,\n hashTypedData,\n} from './utils/signature/hashTypedData.js'\nexport {\n type IsErc6492SignatureErrorType,\n type IsErc6492SignatureParameters,\n type IsErc6492SignatureReturnType,\n isErc6492Signature,\n} from './utils/signature/isErc6492Signature.js'\nexport {\n type IsErc8010SignatureErrorType,\n type IsErc8010SignatureParameters,\n type IsErc8010SignatureReturnType,\n isErc8010Signature,\n} from './utils/signature/isErc8010Signature.js'\nexport {\n /** @deprecated Use `ParseCompactSignatureErrorType`. */\n type ParseCompactSignatureErrorType as HexToCompactSignatureErrorType,\n type ParseCompactSignatureErrorType,\n /** @deprecated Use `parseCompactSignature`. */\n parseCompactSignature as hexToCompactSignature,\n parseCompactSignature,\n} from './utils/signature/parseCompactSignature.js'\nexport {\n type ParseErc6492SignatureErrorType,\n type ParseErc6492SignatureParameters,\n type ParseErc6492SignatureReturnType,\n parseErc6492Signature,\n} from './utils/signature/parseErc6492Signature.js'\nexport {\n type ParseErc8010SignatureErrorType,\n type ParseErc8010SignatureParameters,\n type ParseErc8010SignatureReturnType,\n parseErc8010Signature,\n} from './utils/signature/parseErc8010Signature.js'\nexport {\n /** @deprecated Use `ParseSignatureErrorType`. */\n type ParseSignatureErrorType as HexToSignatureErrorType,\n type ParseSignatureErrorType,\n /** @deprecated Use `parseSignature`. */\n parseSignature as hexToSignature,\n parseSignature,\n} from './utils/signature/parseSignature.js'\nexport {\n type RecoverAddressErrorType,\n type RecoverAddressParameters,\n type RecoverAddressReturnType,\n recoverAddress,\n} from './utils/signature/recoverAddress.js'\nexport {\n type RecoverMessageAddressErrorType,\n type RecoverMessageAddressParameters,\n type RecoverMessageAddressReturnType,\n recoverMessageAddress,\n} from './utils/signature/recoverMessageAddress.js'\nexport {\n type RecoverPublicKeyErrorType,\n type RecoverPublicKeyParameters,\n type RecoverPublicKeyReturnType,\n recoverPublicKey,\n} from './utils/signature/recoverPublicKey.js'\nexport {\n type RecoverTransactionAddressErrorType,\n type RecoverTransactionAddressParameters,\n type RecoverTransactionAddressReturnType,\n recoverTransactionAddress,\n} from './utils/signature/recoverTransactionAddress.js'\nexport {\n type RecoverTypedDataAddressErrorType,\n type RecoverTypedDataAddressParameters,\n type RecoverTypedDataAddressReturnType,\n recoverTypedDataAddress,\n} from './utils/signature/recoverTypedDataAddress.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeCompactSignatureErrorType as CompactSignatureToHexErrorType,\n type SerializeCompactSignatureErrorType,\n /** @deprecated Use `serializeCompactSignature` instead. */\n serializeCompactSignature as compactSignatureToHex,\n serializeCompactSignature,\n} from './utils/signature/serializeCompactSignature.js'\nexport {\n type SerializeErc6492SignatureErrorType,\n type SerializeErc6492SignatureParameters,\n type SerializeErc6492SignatureReturnType,\n serializeErc6492Signature,\n} from './utils/signature/serializeErc6492Signature.js'\nexport {\n type SerializeErc8010SignatureErrorType,\n type SerializeErc8010SignatureParameters,\n type SerializeErc8010SignatureReturnType,\n serializeErc8010Signature,\n} from './utils/signature/serializeErc8010Signature.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeSignatureErrorType as SignatureToHexErrorType,\n type SerializeSignatureErrorType,\n type SerializeSignatureParameters,\n type SerializeSignatureReturnType,\n /** @deprecated Use `serializeSignature` instead. */\n serializeSignature as signatureToHex,\n serializeSignature,\n} from './utils/signature/serializeSignature.js'\nexport {\n type SignatureToCompactSignatureErrorType,\n signatureToCompactSignature,\n} from './utils/signature/signatureToCompactSignature.js'\nexport {\n type ToPrefixedMessageErrorType,\n toPrefixedMessage,\n} from './utils/signature/toPrefixedMessage.js'\nexport {\n type VerifyHashErrorType,\n type VerifyHashParameters,\n type VerifyHashReturnType,\n verifyHash,\n} from './utils/signature/verifyHash.js'\nexport {\n type VerifyMessageErrorType,\n type VerifyMessageParameters,\n type VerifyMessageReturnType,\n verifyMessage,\n} from './utils/signature/verifyMessage.js'\nexport {\n type VerifyTypedDataErrorType,\n type VerifyTypedDataParameters,\n type VerifyTypedDataReturnType,\n verifyTypedData,\n} from './utils/signature/verifyTypedData.js'\nexport { type StringifyErrorType, stringify } from './utils/stringify.js'\nexport {\n type AssertRequestErrorType,\n assertRequest,\n} from './utils/transaction/assertRequest.js'\nexport {\n type AssertTransactionEIP1559ErrorType,\n type AssertTransactionEIP2930ErrorType,\n type AssertTransactionLegacyErrorType,\n assertTransactionEIP1559,\n assertTransactionEIP2930,\n assertTransactionLegacy,\n} from './utils/transaction/assertTransaction.js'\nexport {\n type GetSerializedTransactionType,\n type GetSerializedTransactionTypeErrorType,\n getSerializedTransactionType,\n} from './utils/transaction/getSerializedTransactionType.js'\nexport {\n type GetTransactionType,\n type GetTransactionTypeErrorType,\n getTransactionType,\n} from './utils/transaction/getTransactionType.js'\nexport {\n type ParseTransactionErrorType,\n type ParseTransactionReturnType,\n parseTransaction,\n} from './utils/transaction/parseTransaction.js'\nexport {\n type SerializeAccessListErrorType,\n serializeAccessList,\n} from './utils/transaction/serializeAccessList.js'\nexport {\n type SerializedTransactionReturnType,\n type SerializeTransactionErrorType,\n type SerializeTransactionFn,\n serializeTransaction,\n} from './utils/transaction/serializeTransaction.js'\nexport {\n type DomainSeparatorErrorType,\n domainSeparator,\n type GetTypesForEIP712DomainErrorType,\n getTypesForEIP712Domain,\n type SerializeTypedDataErrorType,\n serializeTypedData,\n type ValidateTypedDataErrorType,\n validateTypedData,\n} from './utils/typedData.js'\nexport {\n type FormatEtherErrorType,\n formatEther,\n} from './utils/unit/formatEther.js'\nexport {\n type FormatGweiErrorType,\n formatGwei,\n} from './utils/unit/formatGwei.js'\nexport {\n type FormatUnitsErrorType,\n formatUnits,\n} from './utils/unit/formatUnits.js'\nexport {\n type ParseEtherErrorType,\n parseEther,\n} from './utils/unit/parseEther.js'\nexport { type ParseGweiErrorType, parseGwei } from './utils/unit/parseGwei.js'\nexport {\n type ParseUnitsErrorType,\n parseUnits,\n} from './utils/unit/parseUnits.js'\n","import type { Address } from \"viem\";\nimport { getAddress } from \"viem\";\n\ninterface AddressDisplayProps {\n address: Address;\n className?: string;\n}\n\n/**\n * Displays a truncated checksummed address without any navigation.\n * Pure display component for showing addresses.\n */\nexport function AddressDisplay({ address, className }: AddressDisplayProps) {\n const checksummedAddress = getAddress(address);\n const truncatedAddress = `${checksummedAddress.slice(0, 6)}...${checksummedAddress.slice(-4)}`;\n return <span className={className}>{truncatedAddress}</span>;\n}\n","import BoringAvatar from \"boring-avatars\";\nimport * as React from \"react\";\n\nimport type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport type { Name } from \"@ensnode/ensnode-sdk\";\n\nimport { cn } from \"../../utils/cn\";\nimport { getEnsMetadataServiceAvatarUrl } from \"../../utils/ensMetadata\";\nimport { Avatar, AvatarImage } from \"../ui/avatar\";\n\ninterface EnsAvatarProps {\n name: Name;\n namespaceId: ENSNamespaceId;\n className?: string;\n isSquare?: boolean;\n}\n\ntype ImageLoadingStatus = Parameters<\n NonNullable<React.ComponentProps<typeof AvatarImage>[\"onLoadingStatusChange\"]>\n>[0];\n\nexport const EnsAvatar = ({ name, namespaceId, className, isSquare = false }: EnsAvatarProps) => {\n const [loadingStatus, setLoadingStatus] = React.useState<ImageLoadingStatus>(\"idle\");\n const avatarUrl = getEnsMetadataServiceAvatarUrl(name, namespaceId);\n\n if (avatarUrl === null) {\n return (\n <Avatar className={className}>\n <EnsAvatarFallback name={name} isSquare={isSquare} />\n </Avatar>\n );\n }\n\n return (\n <Avatar className={className}>\n <AvatarImage\n src={avatarUrl.href}\n alt={name}\n onLoadingStatusChange={(status: ImageLoadingStatus) => {\n setLoadingStatus(status);\n }}\n />\n {loadingStatus === \"error\" && <EnsAvatarFallback name={name} isSquare={isSquare} />}\n {(loadingStatus === \"idle\" || loadingStatus === \"loading\") && (\n <AvatarLoading isSquare={isSquare} />\n )}\n </Avatar>\n );\n};\n\ninterface EnsAvatarFallbackProps {\n name: Name;\n isSquare: boolean;\n}\n\nconst avatarFallbackColors = [\"#000000\", \"#bedbff\", \"#5191c1\", \"#1e6495\", \"#0a4b75\"];\n\nconst EnsAvatarFallback = ({ name, isSquare }: EnsAvatarFallbackProps) => (\n <BoringAvatar\n name={name}\n colors={avatarFallbackColors}\n variant=\"beam\"\n className=\"nhui:w-full nhui:h-full\"\n square={isSquare}\n />\n);\n\ntype EnsAvatarLoadingProps = Omit<EnsAvatarProps, \"name\" | \"namespaceId\" | \"className\">;\nconst AvatarLoading = ({ isSquare }: EnsAvatarLoadingProps) => (\n <div\n className={cn(\n \"nhui:h-full nhui:w-full nhui:animate-pulse nhui:bg-gray-200\",\n !isSquare && \"nhui:rounded-full\",\n )}\n />\n);\n\n// TODO: Copied from ENSAwards (as a newer version) - further alignment might be needed\n","import type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport { ENSNamespaceIds, type Name } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Build the avatar image URL for a name on the given ENS Namespace that (once fetched) would\n * load the avatar image for the given name from the ENS Metadata Service\n * (https://metadata.ens.domains/docs).\n *\n * The returned URL is dynamically built based on the provided ENS namespace. Not all ENS\n * namespaces are supported by the ENS Metadata Service. Therefore, the returned URL may\n * be null.\n *\n * @param {Name} name - ENS name to build the avatar image URL for\n * @param {ENSNamespaceId} namespaceId - ENS Namespace identifier\n * @returns avatar image URL for the name on the given ENS Namespace, or null if the given\n * ENS namespace is not supported by the ENS Metadata Service\n */\nexport function getEnsMetadataServiceAvatarUrl(\n name: Name,\n namespaceId: ENSNamespaceId,\n): URL | null {\n switch (namespaceId) {\n case ENSNamespaceIds.Mainnet:\n return new URL(name, `https://metadata.ens.domains/mainnet/avatar/`);\n case ENSNamespaceIds.Sepolia:\n return new URL(name, `https://metadata.ens.domains/sepolia/avatar/`);\n case ENSNamespaceIds.EnsTestEnv:\n // ens-test-env runs on a local chain and is not supported by metadata.ens.domains\n // TODO: Above comment is not true. Details at https://github.com/namehash/ensnode/issues/1078\n return null;\n }\n}\n","import * as AvatarPrimitive from \"@radix-ui/react-avatar\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"nhui:relative nhui:flex nhui:size-8 nhui:shrink-0 nhui:overflow-hidden nhui:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"nhui:aspect-square nhui:size-full\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"nhui:bg-muted nhui:flex nhui:size-full nhui:items-center nhui:justify-center nhui:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport type { PropsWithChildren } from \"react\";\n\nimport type { ENSNamespaceId, Identity } from \"@ensnode/ensnode-sdk\";\nimport {\n DEFAULT_EVM_CHAIN_ID,\n isResolvedIdentity,\n ResolutionStatusIds,\n translateDefaultableChainIdToChainId,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { getBlockExplorerAddressDetailsUrl } from \"../../utils/blockExplorers\";\nimport { getChainName } from \"../../utils/chains\";\nimport { cn } from \"../../utils/cn\";\nimport { getEnsManagerAddressDetailsUrl } from \"../../utils/ensManager\";\nimport { ChainIcon } from \"../chains/ChainIcon\";\nimport { ChainExplorerIcon } from \"../icons/ChainExplorerIcon\";\nimport { EnsIcon } from \"../icons/ens/EnsIcon\";\nimport { CopyButton } from \"../special-buttons/CopyButton\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport { AddressDisplay } from \"./Address\";\n\nexport interface IdentityLinkDetails {\n isExternal: boolean;\n link: URL | null;\n}\ninterface IdentityLinkProps {\n linkDetails: IdentityLinkDetails;\n className?: string;\n}\n\n/**\n * Displays an identifier (address or name) with a link to the identity details URL.\n * If the ENS namespace has a known ENS Manager App,\n * includes a link to the view details of the address within that ENS namespace.\n *\n * Can take other components (ex.ChainIcon) as children\n * and display them alongside the link as one common interaction area.\n */\nexport function IdentityLink({\n linkDetails,\n className,\n children,\n}: PropsWithChildren<IdentityLinkProps>) {\n if (linkDetails.link === null) {\n return <>{children}</>;\n }\n\n return (\n <a\n href={linkDetails.link.href}\n target={linkDetails.isExternal ? \"_blank\" : \"_self\"}\n className={cn(\n \"nhui:text-sm nhui:leading-normal nhui:font-medium nhui:text-blue-600\",\n className,\n )}\n >\n {children}\n </a>\n );\n}\n\nexport interface IdentityTooltipProps {\n identity: Identity;\n namespaceId: ENSNamespaceId;\n}\n\n/**\n * On hover displays details on how the primary name for\n * the address of the identity was resolved.\n */\nexport const IdentityTooltip = ({\n identity,\n namespaceId,\n children,\n}: PropsWithChildren<IdentityTooltipProps>) => {\n if (!isResolvedIdentity(identity)) {\n // identity is still loading, don't build any tooltip components yet.\n return children;\n }\n\n const chainDescription =\n identity.chainId === DEFAULT_EVM_CHAIN_ID\n ? 'the \"default\" EVM Chain'\n : getChainName(identity.chainId);\n\n let header: string;\n\n switch (identity.resolutionStatus) {\n case ResolutionStatusIds.Named:\n header = `Primary name on ${chainDescription} for address:`;\n break;\n case ResolutionStatusIds.Unnamed:\n header = `Unnamed address on ${chainDescription}:`;\n break;\n case ResolutionStatusIds.Unknown:\n header = `Error resolving address on ${chainDescription}:`;\n break;\n }\n\n const ensAppAddressDetailsUrl = getEnsManagerAddressDetailsUrl(identity.address, namespaceId);\n\n const body = (\n <span>\n <AddressDisplay address={identity.address} />\n </span>\n );\n\n const effectiveChainId = translateDefaultableChainIdToChainId(identity.chainId, namespaceId);\n const chainExplorerUrl = getBlockExplorerAddressDetailsUrl(effectiveChainId, identity.address);\n\n return (\n <Tooltip delayDuration={250}>\n <TooltipTrigger asChild>{children}</TooltipTrigger>\n <TooltipContent\n side=\"top\"\n className=\"nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit [&_svg]:fill-gray-50 [&_svg]:bg-gray-50\"\n >\n {/*TODO: The styling of all tooltips should either be unified across all our apps or made customizable. */}\n {/*Currently aligned to fit ensadmin, cause it's only used there*/}\n <div className=\"nhui:flex nhui:gap-4\">\n <div className=\"nhui:flex nhui:items-center\">\n <ChainIcon\n chainId={translateDefaultableChainIdToChainId(identity.chainId, namespaceId)}\n height={24}\n width={24}\n />\n </div>\n <div>\n {header}\n <br />\n {body}\n </div>\n <div className=\"nhui:flex nhui:items-center nhui:gap-2\">\n <CopyButton\n value={identity.address}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n successIcon={<CheckIcon className=\"nhui:h-4 nhui:w-4\" style={{ fill: \"none\" }} />}\n icon={<CopyIcon className=\"nhui:h-4 nhui:w-4\" style={{ fill: \"none\" }} />}\n showToast={true}\n />\n {chainExplorerUrl && (\n <a target=\"_blank\" href={chainExplorerUrl.toString()}>\n <ChainExplorerIcon\n height={24}\n width={24}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n />\n </a>\n )}\n {ensAppAddressDetailsUrl && (\n <a target=\"_blank\" href={ensAppAddressDetailsUrl.toString()}>\n <EnsIcon\n height={24}\n width={24}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n />\n </a>\n )}\n </div>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import type { Address, Hash } from \"viem\";\n\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { SUPPORTED_CHAINS } from \"./chains\";\n\n/**\n * Gets the \"base\" block explorer URL for a given {@link ChainId}\n *\n * @returns default block explorer URL for the chain with the provided id,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerUrl = (chainId: ChainId): URL | null => {\n const chain = SUPPORTED_CHAINS.find((chain) => chain.id === chainId);\n if (!chain) return null;\n\n // NOTE: anvil/ens-test-env chain does not have a blockExplorer\n if (!chain.blockExplorers) return null;\n\n return new URL(chain.blockExplorers.default.url);\n};\n\n/**\n * Gets the block explorer URL for a specific address on a specific chainId\n *\n * @returns complete block explorer URL for a specific address on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerAddressDetailsUrl = (\n chainId: ChainId,\n address: Address,\n): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`address/${address}`, chainBlockExplorer.toString());\n};\n\n/**\n * Gets the block explorer URL for a specific transaction hash on a specific chainId\n *\n * @returns complete block explorer URL for a specific transaction hash on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerTransactionDetailsUrl = (\n chainId: ChainId,\n transactionHash: Hash,\n): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`tx/${transactionHash}`, chainBlockExplorer.toString());\n};\n\n/**\n * Gets the block explorer URL for a specific block on a specific chainId\n *\n * @returns complete block explorer URL for a specific block on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerBlockUrl = (chainId: ChainId, blockNumber: number): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`block/${blockNumber}`, chainBlockExplorer.toString());\n};\n","import type { Address } from \"viem\";\n\nimport type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport { ENSNamespaceIds, type Name } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Get the ENS Manager App URL for the provided namespace.\n *\n * @param {ENSNamespaceId} namespaceId - ENS Namespace identifier\n * @returns ENS Manager App URL for the provided namespace, or null if the provided namespace\n * doesn't have a known ENS Manager App\n */\nexport function getEnsManagerUrl(namespaceId: ENSNamespaceId): URL | null {\n switch (namespaceId) {\n case ENSNamespaceIds.Mainnet:\n return new URL(`https://app.ens.domains/`);\n case ENSNamespaceIds.Sepolia:\n return new URL(`https://sepolia.app.ens.domains/`);\n case ENSNamespaceIds.EnsTestEnv:\n // ens-test-env runs on a local chain and is not supported by app.ens.domains\n return null;\n }\n}\n\n/**\n * Builds the URL of the external ENS Manager App Profile page for a given name and ENS Namespace.\n *\n * @returns URL to the Profile page in the external ENS Manager App for a given name and ENS Namespace,\n * or null if this URL is not known\n */\nexport function getEnsManagerNameDetailsUrl(name: Name, namespaceId: ENSNamespaceId): URL | null {\n const baseUrl = getEnsManagerUrl(namespaceId);\n if (!baseUrl) return null;\n\n return new URL(name, baseUrl);\n}\n\n/**\n * Get the URL of the address details page in ENS Manager App for a given address and ENS Namespace.\n *\n * @returns URL to the address details page in the ENS Manager App for a given address and ENS\n * Namespace, or null if this URL is not known\n */\nexport function getEnsManagerAddressDetailsUrl(\n address: Address,\n namespaceId: ENSNamespaceId,\n): URL | null {\n const baseUrl = getEnsManagerUrl(namespaceId);\n if (!baseUrl) return null;\n\n return new URL(address, baseUrl);\n}\n","import * as React from \"react\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../../utils/cn\";\nimport { Button, type ButtonProps } from \"../ui/button\";\n\nexport interface CopyButtonProps extends Omit<ButtonProps, \"onClick\"> {\n value: string;\n message?: string;\n showToast?: boolean;\n icon?: React.ReactNode;\n successIcon?: React.ReactNode;\n}\n\nexport function CopyButton({\n value,\n message = \"Copied to clipboard\",\n variant = \"ghost\",\n size = \"icon\",\n showToast = false,\n icon,\n successIcon,\n className,\n children,\n ...props\n}: CopyButtonProps) {\n const [hasCopied, setHasCopied] = React.useState(false);\n const [isCopying, setIsCopying] = React.useState(false);\n\n React.useEffect(() => {\n if (hasCopied) {\n const timeout = setTimeout(() => setHasCopied(false), 2000);\n return () => clearTimeout(timeout);\n }\n }, [hasCopied]);\n\n async function copyToClipboard() {\n if (isCopying) return;\n\n try {\n setIsCopying(true);\n await navigator.clipboard.writeText(value);\n setHasCopied(true);\n\n if (showToast) {\n toast.success(message);\n }\n } catch (error) {\n console.error(\"Failed to copy text:\", error);\n\n if (showToast) {\n toast.error(\"Failed to copy text to clipboard\");\n }\n } finally {\n setIsCopying(false);\n }\n }\n\n return (\n <Button\n variant={variant}\n size={size}\n type=\"button\"\n onClick={copyToClipboard}\n disabled={isCopying}\n className={cn(\"nhui:cursor-pointer\", className)}\n {...props}\n >\n {hasCopied ? (successIcon ? successIcon : \"Copied\") : icon ? icon : \"Copy\"}\n <span className=\"sr-only\">Copy to clipboard</span>\n </Button>\n );\n}\n","import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nconst buttonVariants = cva(\n \"nhui:inline-flex nhui:items-center nhui:justify-center nhui:gap-2 nhui:whitespace-nowrap nhui:rounded-md nhui:text-sm nhui:font-medium nhui:transition-all nhui:disabled:pointer-events-none nhui:disabled:opacity-50 nhui:[&_svg]:pointer-events-none nhui:[&_svg:not([class*=size-])]:size-4 nhui:shrink-0 nhui:[&_svg]:shrink-0 nhui:outline-none nhui:focus-visible:border-ring nhui:focus-visible:ring-ring/50 nhui:focus-visible:ring-[3px] nhui:aria-invalid:ring-destructive/20 nhui:dark:aria-invalid:ring-destructive/40 nhui:aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"nhui:bg-primary nhui:text-primary-foreground nhui:hover:bg-primary/90\",\n destructive:\n \"nhui:bg-destructive nhui:text-white nhui:hover:bg-destructive/90 nhui:focus-visible:ring-destructive/20 nhui:dark:focus-visible:ring-destructive/40 nhui:dark:bg-destructive/60\",\n outline:\n \"nhui:border nhui:bg-background nhui:shadow-xs nhui:hover:bg-accent nhui:hover:text-accent-foreground nhui:dark:bg-input/30 nhui:dark:border-input nhui:dark:hover:bg-input/50\",\n secondary: \"nhui:bg-secondary nhui:text-secondary-foreground nhui:hover:bg-secondary/80\",\n ghost:\n \"nhui:hover:bg-accent nhui:hover:text-accent-foreground nhui:dark:hover:bg-accent/50\",\n link: \"nhui:text-primary nhui:underline-offset-4 nhui:hover:underline\",\n },\n size: {\n default: \"nhui:h-9 nhui:px-4 nhui:py-2 nhui:has-[>svg]:px-3\",\n sm: \"nhui:h-8 nhui:rounded-md nhui:gap-1.5 nhui:px-3 nhui:has-[>svg]:px-2.5\",\n lg: \"nhui:h-10 nhui:rounded-md nhui:px-6 nhui:has-[>svg]:px-4\",\n icon: \"nhui:size-9\",\n \"icon-sm\": \"nhui:size-8\",\n \"icon-lg\": \"nhui:size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ComponentProps<\"button\">,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","import type { Name } from \"@ensnode/ensnode-sdk\";\nimport { beautifyName } from \"@ensnode/ensnode-sdk\";\n\ninterface NameDisplayProps {\n name: Name;\n className?: string;\n}\n\n/**\n * Displays an ENS name in beautified form.\n *\n * @param name - The name to display in beautified form.\n *\n */\nexport function NameDisplay({ name, className = \"nhui:font-medium\" }: NameDisplayProps) {\n const beautifiedName = beautifyName(name);\n return <span className={className}>{beautifiedName}</span>;\n}\n","import type * as React from \"react\";\n\nimport { useResolvedIdentity } from \"@ensnode/ensnode-react\";\nimport {\n type ENSNamespaceId,\n type Identity,\n isResolvedIdentity,\n ResolutionStatusIds,\n translateDefaultableChainIdToChainId,\n type UnresolvedIdentity,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { useIsMobile } from \"../../hooks/useIsMobile\";\nimport { cn } from \"../../utils/cn\";\nimport { ChainIcon } from \"../chains/ChainIcon\";\nimport { Skeleton } from \"../ui/skeleton\";\nimport { AddressDisplay } from \"./Address\";\nimport { EnsAvatar } from \"./EnsAvatar\";\nimport { IdentityLink, type IdentityLinkDetails, IdentityTooltip } from \"./Identity\";\nimport { NameDisplay } from \"./Name\";\n\nexport interface ResolveAndDisplayIdentityProps {\n identity: UnresolvedIdentity;\n namespaceId: ENSNamespaceId;\n accelerate?: boolean;\n withLink?: boolean;\n identityLinkDetails?: IdentityLinkDetails;\n withTooltip?: boolean;\n withAvatar?: boolean;\n withIdentifier?: boolean;\n className?: string;\n}\n\n/**\n * Resolves the provided `UnresolvedIdentity` through ENSNode and displays the result.\n *\n * @param identity - The `UnresolvedIdentity` to resolve and display.\n * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'ens-test-env')\n * @param accelerate - Whether to attempt Protocol Acceleration (default: false)\n * when resolving the primary name.\n * @param withLink - Whether to wrap the displayed identity in an `IdentityLink` component.\n * @param identityLinkDetails - If the `withLink` is true, provides info on where should it lead and should it be an external link.\n * @param withTooltip - Whether to wrap the displayed identity in an `IdentityInfoTooltip` component.\n * @param withAvatar - Whether to display an avatar image.\n * @param withIdentifier - Whether to display identity's textual identifier (address or name).\n * @param className - The class name to apply to the displayed identity.\n */\nexport function ResolveAndDisplayIdentity({\n identity,\n namespaceId,\n accelerate = true,\n withLink = true,\n identityLinkDetails,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: ResolveAndDisplayIdentityProps) {\n // resolve the primary name for `identity` using ENSNode\n // TODO: extract out the concept of resolving an `Identity` into a provider that child\n // components can then hook into.\n const { identity: identityResult } = useResolvedIdentity({\n identity,\n accelerate,\n });\n\n return (\n <DisplayIdentity\n identity={identityResult}\n namespaceId={namespaceId}\n withLink={withLink}\n identityLinkDetails={identityLinkDetails}\n withTooltip={withTooltip}\n withAvatar={withAvatar}\n withIdentifier={withIdentifier}\n className={className}\n />\n );\n}\n\ninterface DisplayIdentityProps {\n identity: Identity;\n namespaceId: ENSNamespaceId;\n withLink?: boolean;\n identityLinkDetails?: IdentityLinkDetails;\n withTooltip?: boolean;\n withAvatar?: boolean;\n withIdentifier?: boolean;\n className?: string;\n}\n\n/**\n * Displays the provided `Identity`.\n *\n * Performs _NO_ resolution if the provided `identity` is not already a `ResolvedIdentity`.\n *\n * @param identity - The identity to display. May be a `ResolvedIdentity` or an `UnresolvedIdentity`.\n * If not a `ResolvedIdentity` (and therefore just an `UnresolvedIdentity`) then displays a loading state.\n * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'ens-test-env')\n * @param withLink - Whether to wrap the displayed identity in an `IdentityLink` component.\n * @param identityLinkDetails - If the `withLink` is true, provides info on where should it lead and should it be an external link.\n * @param withTooltip - Whether to wrap the displayed identity in an `IdentityInfoTooltip` component.\n * @param withAvatar - Whether to display an avatar image.\n * @param withIdentifier - Whether to display identity's textual identifier (address or name).\n * @param className - The class name to apply to the displayed identity.\n *\n * @throws Error - if `withLink` is true, but no `identityLinkDetails` are provided.\n */\nexport function DisplayIdentity({\n identity,\n namespaceId,\n withLink = true,\n identityLinkDetails,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: DisplayIdentityProps) {\n let avatar: React.ReactElement;\n let identifier: React.ReactElement;\n\n const isMobile = useIsMobile();\n\n if (!isResolvedIdentity(identity)) {\n // identity is an `UnresolvedIdentity` which represents that it hasn't been resolved yet\n // display loading state\n avatar = (\n <Skeleton\n className={cn(\n \"nhui:h-10 nhui:w-10 nhui:rounded-full nhui:bg-gray-200\",\n isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\",\n )}\n />\n );\n identifier = (\n <Skeleton\n className={cn(\n \"nhui:w-[100px] nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200\",\n className,\n )}\n />\n );\n } else if (\n identity.resolutionStatus === ResolutionStatusIds.Unnamed ||\n identity.resolutionStatus === ResolutionStatusIds.Unknown\n ) {\n avatar = (\n <div\n className={cn(\n \"nhui:w-10 nhui:h-10 nhui:flex nhui:justify-center nhui:items-center\",\n isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\",\n )}\n >\n <ChainIcon\n chainId={translateDefaultableChainIdToChainId(identity.chainId, namespaceId)}\n height={isMobile && withIdentifier ? 16 : 24}\n width={isMobile && withIdentifier ? 16 : 24}\n />\n </div>\n );\n identifier = (\n <AddressDisplay\n address={identity.address}\n className={cn(\n \"nhui:whitespace-nowrap nhui:hover:underline nhui:hover:underline-offset-[25%]\",\n className,\n )}\n />\n );\n } else {\n avatar = (\n <EnsAvatar\n name={identity.name}\n namespaceId={namespaceId}\n className={cn(\"nhui:h-10 nhui:w-10\", isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\")}\n />\n );\n identifier = (\n <NameDisplay\n name={identity.name}\n className={cn(\n \"nhui:w-fit nhui:sm:w-full nhui:whitespace-nowrap nhui:hover:underline nhui:hover:underline-offset-[25%] nhui:overflow-x-auto\",\n className,\n )}\n />\n );\n }\n\n let result = (\n <div className=\"nhui:inline-flex nhui:items-center nhui:gap-2\">\n {/* TODO: extract the `EnsAvatar` / `ChainIcon` out of this component and remove the\n `withAvatar` prop. */}\n {withAvatar && avatar}\n {withIdentifier && identifier}\n </div>\n );\n\n // TODO: extract the `IdentityInfoTooltip` out of this component and remove the `withTooltip` prop.\n if (withTooltip) {\n result = (\n <IdentityTooltip identity={identity} namespaceId={namespaceId}>\n {result}\n </IdentityTooltip>\n );\n }\n\n // TODO: extract the `IdentityLink` out of this component and remove the `withLink` prop.\n if (withLink) {\n if (identityLinkDetails === undefined) {\n throw new Error(\"Invariant(ResolveAndDisplayIdentity): Expected identity link details\");\n }\n result = (\n <IdentityLink\n linkDetails={identityLinkDetails}\n className={cn(\"nhui:inline-flex nhui:w-fit nhui:h-fit\")}\n >\n {result}\n </IdentityLink>\n );\n }\n\n return result;\n}\n\n// TODO: Copied from ENSAwards (as a newer version) - performed some refactor actions\n// to make the component usable across all our apps, but further alignment might be needed\n","import * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 640;\n\nexport function useIsMobile(breakpoint: number = MOBILE_BREAKPOINT) {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < breakpoint);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < breakpoint);\n return () => mql.removeEventListener(\"change\", onChange);\n }, [breakpoint]);\n\n return !!isMobile;\n}\n","import { cn } from \"../../utils/cn\";\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"nhui:bg-accent nhui:animate-pulse nhui:rounded-md\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import { Info as InfoIcon, CircleQuestionMark as QuestionmarkIcon } from \"lucide-react\";\nimport { memo, type PropsWithChildren, type ReactNode } from \"react\";\nimport { type Address, zeroAddress } from \"viem\";\n\nimport type {\n DefaultableChainId,\n ENSNamespaceId,\n NamedRegistrarAction,\n RegistrarActionReferral,\n UnixTimestamp,\n} from \"@ensnode/ensnode-sdk\";\nimport {\n buildUnresolvedIdentity,\n isRegistrarActionReferralAvailable,\n RegistrarActionTypes,\n ZERO_ENCODED_REFERRER,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { useIsMobile } from \"../../hooks/useIsMobile\";\nimport { getBlockExplorerTransactionDetailsUrl } from \"../../utils/blockExplorers\";\nimport { cn } from \"../../utils/cn\";\nimport { DisplayDuration } from \"../datetime/DisplayDuration\";\nimport { RelativeTime } from \"../datetime/RelativeTime\";\nimport type { IdentityLinkDetails } from \"../identity/Identity\";\nimport { NameDisplay } from \"../identity/Name\";\nimport {\n ResolveAndDisplayIdentity,\n type ResolveAndDisplayIdentityProps,\n} from \"../identity/ResolveAndDisplayIdentity\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\n\ninterface LabeledFieldProps {\n fieldLabel: string;\n className?: string;\n}\n\n/**\n * Display a labeled field.\n */\nexport function LabeledField({\n fieldLabel,\n className,\n children,\n}: PropsWithChildren<LabeledFieldProps>) {\n return (\n <div\n className={cn(\n \"nhui:max-sm:w-full nhui:flex nhui:flex-row nhui:sm:flex-col nhui:flex-nowrap nhui:justify-between nhui:sm:justify-center nhui:items-start nhui:gap-0 nhui:max-sm:self-stretch\",\n className,\n )}\n >\n <p className=\"nhui:text-muted-foreground nhui:text-sm nhui:leading-normal nhui:font-normal\">\n {fieldLabel}\n </p>\n {children}\n </div>\n );\n}\n\ntype ReferrerLinkFunction = (address: Address, namespaceId: ENSNamespaceId) => URL | null;\n\ninterface ResolveAndDisplayReferrerIdentityProps\n extends Omit<ResolveAndDisplayIdentityProps, \"identity\" | \"identityLinkDetails\"> {\n chainId: DefaultableChainId;\n referral: RegistrarActionReferral;\n getReferrerLink: ReferrerLinkFunction;\n}\n\n/**\n * Resolve and Display Referrer Identity\n *\n * Resolves and displays the identity of the decoded referrer, or a fallback UI.\n */\nfunction ResolveAndDisplayReferrerIdentity({\n namespaceId,\n chainId,\n referral,\n accelerate = true,\n withLink = true,\n getReferrerLink,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: ResolveAndDisplayReferrerIdentityProps) {\n // if encoded referrer is not available or is the zero encoded referrer then\n if (\n !isRegistrarActionReferralAvailable(referral) ||\n referral.encodedReferrer === ZERO_ENCODED_REFERRER\n ) {\n // when we only want to display avatar (without textual identifier) don't display anything (return an empty placeholder).\n // Otherwise, display a hyphen with no avatar\n return withAvatar && !withIdentifier ? (\n <div className=\"nhui:w-10 nhui:h-10\" />\n ) : (\n <p className=\"nhui:h-[21px]\">-</p>\n );\n }\n\n // if the encoded referrer was not the zeroEncodedReferrer but couldn't be\n // decoded according to the subjective interpretation rules of\n // the current ENS Referral Awards program then display a tooltip with details\n if (referral.decodedReferrer === zeroAddress) {\n // when we only want to display avatar (without textual identifier) use a dedicated placeholder.\n // Otherwise, display \"unknown\" plus the placeholder.\n const unknownAvatarPlaceholder = (className?: string, iconSize = 24) => (\n <div\n className={cn(\n \"nhui:flex nhui:justify-center nhui:items-center nhui:rounded-full nhui:bg-gray-200\",\n className,\n !withAvatar && \"nhui:hidden\",\n )}\n >\n <QuestionmarkIcon size={iconSize} className=\"nhui:text-gray-400\" />\n </div>\n );\n\n return withAvatar && !withIdentifier ? (\n unknownAvatarPlaceholder(\"nhui:w-10 nhui:h-10\", 24)\n ) : (\n <span className=\"nhui:h-[21px] nhui:inline-flex nhui:items-center nhui:gap-2 nhui:font-medium\">\n {unknownAvatarPlaceholder(\"nhui:w-5 nhui:h-5\", 16)}\n Unknown\n <Tooltip delayDuration={250}>\n <TooltipTrigger>\n <InfoIcon size={16} className=\"nhui:shrink-0 nhui:fill-neutral-300 nhui:text-white\" />\n </TooltipTrigger>\n <TooltipContent\n side=\"top\"\n className=\"nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit [&_svg]:fill-gray-50 [&_svg]:bg-gray-50\"\n >\n Encoded referrer\n <code className=\"nhui:block\">{referral.encodedReferrer}</code> does not follow the\n formatting requirements of incentive programs.\n </TooltipContent>\n </Tooltip>\n </span>\n );\n }\n\n // resolve and display identity for the decodedReferrer address\n const referrerIdentity = buildUnresolvedIdentity(referral.decodedReferrer, namespaceId, chainId);\n\n return (\n <ResolveAndDisplayIdentity\n identity={referrerIdentity}\n namespaceId={namespaceId}\n accelerate={accelerate}\n withAvatar={withAvatar}\n withTooltip={withTooltip}\n withIdentifier={withIdentifier}\n className={className}\n withLink={withLink}\n identityLinkDetails={{\n isExternal: true,\n link: getReferrerLink(referrerIdentity.address, namespaceId),\n }}\n />\n );\n}\n\nexport interface RegistrarActionCardLoadingProps {\n showReferrer?: boolean;\n showReferralProgramField?: boolean;\n}\n\n/**\n * Display Registrar Action Card loading state\n */\nexport function RegistrarActionCardLoading({\n showReferrer = true,\n showReferralProgramField = true,\n}: RegistrarActionCardLoadingProps) {\n const isMobile = useIsMobile();\n\n return (\n <div\n className=\"nhui:w-full nhui:min-h-[80px] nhui:box-border nhui:flex nhui:flex-col nhui:sm:flex-row nhui:flex-wrap nhui:justify-start nhui:sm:justify-between nhui:items-start\n nhui:sm:items-center nhui:gap-2 nhui:p-4 nhui:sm:p-6 nhui:sm:gap-y-5 nhui:rounded-2xl nhui:border nhui:border-gray-200 nhui:text-sm nhui:bg-white\"\n >\n <LabeledField fieldLabel=\"Name\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </LabeledField>\n\n <LabeledField fieldLabel=\"Registrar action\" className=\"nhui:w-[15%] nhui:min-w-[110px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/5 nhui:sm:w-3/4\" />\n </LabeledField>\n\n <LabeledField fieldLabel=\"Duration\" className=\"nhui:w-[10%] nhui:min-w-[110px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-2/3\" />\n </LabeledField>\n\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-10 nhui:h-10 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <LabeledField fieldLabel=\"Registrant\" className=\"nhui:sm:min-w-[110px]\">\n <div className=\"nhui:w-full nhui:flex nhui:flex-row nhui:flex-nowrap nhui:max-sm:justify-end nhui:justify-start nhui:items-center nhui:gap-2\">\n {isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-5 nhui:h-5 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </div>\n </LabeledField>\n </div>\n\n {showReferrer && (\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-10 nhui:h-10 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <LabeledField fieldLabel=\"Referrer\" className=\"nhui:sm:min-w-[110px]\">\n <div className=\"nhui:w-full nhui:flex nhui:flex-row nhui:flex-nowrap nhui:max-sm:justify-end nhui:justify-start nhui:items-center nhui:gap-2\">\n {isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-5 nhui:h-5 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-3/5\" />\n </div>\n </LabeledField>\n </div>\n )}\n\n {showReferralProgramField && (\n <LabeledField fieldLabel=\"Incentive program\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </LabeledField>\n )}\n </div>\n );\n}\n\nexport interface RegistrarActionCardProps {\n namespaceId: ENSNamespaceId;\n namedRegistrarAction: NamedRegistrarAction;\n now: UnixTimestamp;\n links: {\n name: IdentityLinkDetails;\n registrant: IdentityLinkDetails;\n referrerLinkFunction: ReferrerLinkFunction;\n };\n showIdentityTooltips?: {\n registrant: boolean;\n referrer: boolean;\n };\n showReferrer?: boolean;\n referralProgramField?: ReactNode;\n}\n\n/**\n * Display a single Registrar Action\n */\nexport function RegistrarActionCard({\n namespaceId,\n namedRegistrarAction,\n now,\n links,\n showIdentityTooltips = {\n registrant: false,\n referrer: false,\n },\n showReferrer = true,\n referralProgramField,\n}: RegistrarActionCardProps) {\n const isMobile = useIsMobile();\n const { registrant, registrationLifecycle, type, referral, transactionHash } =\n namedRegistrarAction.action;\n const { chainId } = registrationLifecycle.subregistry.subregistryId;\n\n const transactionDetailUrl = getBlockExplorerTransactionDetailsUrl(chainId, transactionHash);\n const withTransactionLink = ({ children }: PropsWithChildren) =>\n // wrap `children` content with a transaction link only if the URL is defined\n transactionDetailUrl ? (\n <a\n target=\"_blank\"\n className=\"nhui:w-fit nhui:text-blue-600 nhui:font-medium nhui:hover:underline nhui:hover:underline-offset-[25%]\"\n href={transactionDetailUrl.toString()}\n >\n {children}\n </a>\n ) : (\n children\n );\n\n const registrantIdentity = buildUnresolvedIdentity(registrant, namespaceId, chainId);\n\n return (\n <div\n className=\"nhui:w-full nhui:min-h-[80px] nhui:box-border nhui:flex nhui:flex-col nhui:sm:flex-row nhui:flex-wrap nhui:justify-start nhui:sm:justify-between\n nhui:items-start nhui:gap-2 nhui:p-4 nhui:sm:p-6 nhui:sm:gap-y-5 nhui:rounded-2xl nhui:border nhui:border-gray-200 nhui:text-sm nhui:bg-white\"\n >\n <LabeledField fieldLabel=\"Name\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n {links.name.link !== null ? (\n <a\n target={links.name.isExternal ? \"_blank\" : \"_self\"}\n href={links.name.link.href}\n className=\"nhui:max-sm:max-w-3/4 nhui:sm:w-full nhui:box-border nhui:overflow-x-auto nhui:text-blue-600 nhui:font-medium nhui:hover:underline nhui:hover:underline-offset-[25%] nhui:whitespace-nowrap\"\n >\n <NameDisplay name={namedRegistrarAction.name} className=\"nhui:h-[21px]\" />\n </a>\n ) : (\n <p className=\"nhui:max-sm:max-w-3/4 nhui:sm:w-full nhui:box-border nhui:overflow-x-auto nhui:font-medium nhui:whitespace-nowrap\">\n <NameDisplay name={namedRegistrarAction.name} className=\"nhui:h-[21px]\" />\n </p>\n )}\n </LabeledField>\n\n <LabeledField\n fieldLabel={type === RegistrarActionTypes.Registration ? \"Registered\" : \"Renewed\"}\n className=\"nhui:w-[15%] nhui:min-w-[110px]\"\n >\n <p className=\"nhui:h-[21px] nhui:font-medium\">\n <RelativeTime\n timestamp={namedRegistrarAction.action.block.timestamp}\n tooltipPosition=\"top\"\n conciseFormatting={true}\n contentWrapper={withTransactionLink}\n relativeTo={now}\n />\n </p>\n </LabeledField>\n\n <LabeledField fieldLabel=\"Duration\" className=\"nhui:w-[10%] nhui:min-w-[110px]\">\n <p className=\"nhui:h-[21px] nhui:font-medium\">\n <DisplayDuration duration={namedRegistrarAction.action.incrementalDuration} />\n </p>\n </LabeledField>\n\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <ResolveAndDisplayIdentity\n identity={registrantIdentity}\n namespaceId={namespaceId}\n withAvatar={true}\n withTooltip={showIdentityTooltips.registrant}\n withIdentifier={false}\n identityLinkDetails={links.registrant}\n />\n )}\n <LabeledField fieldLabel=\"Registrant\" className=\"nhui:sm:min-w-[110px]\">\n <ResolveAndDisplayIdentity\n identity={registrantIdentity}\n namespaceId={namespaceId}\n withAvatar={isMobile}\n withTooltip={showIdentityTooltips.registrant}\n className=\"nhui:font-medium nhui:sm:max-[1220px]:max-w-[110px] nhui:min-[1220px]:max-w-[140px]\"\n identityLinkDetails={links.registrant}\n />\n </LabeledField>\n </div>\n\n {showReferrer && (\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <ResolveAndDisplayReferrerIdentity\n chainId={chainId}\n namespaceId={namespaceId}\n referral={referral}\n withAvatar={true}\n withIdentifier={false}\n withTooltip={showIdentityTooltips.referrer}\n getReferrerLink={links.referrerLinkFunction}\n />\n )}\n <LabeledField fieldLabel=\"Referrer\" className=\"nhui:w-[15%] nhui:min-w-[110px]\">\n <ResolveAndDisplayReferrerIdentity\n chainId={chainId}\n namespaceId={namespaceId}\n referral={referral}\n withAvatar={isMobile}\n withIdentifier={true}\n withTooltip={showIdentityTooltips.referrer}\n getReferrerLink={links.referrerLinkFunction}\n />\n </LabeledField>\n </div>\n )}\n\n {referralProgramField !== undefined && referralProgramField}\n </div>\n );\n}\n\nexport const RegistrarActionCardMemo = memo(RegistrarActionCard);\n","import { useEffect, useState } from \"react\";\n\nimport type { Duration, UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { useSystemClock } from \"./useSystemClock\";\n\n/** Default time to refresh: `1` second. */\nexport const DEFAULT_TIME_TO_REFRESH: Duration = 1;\n\nexport interface UseNowProps {\n /**\n * Duration after which time value will be refreshed.\n *\n * Defaults to {@link DEFAULT_TIME_TO_REFRESH}.\n */\n timeToRefresh?: Duration;\n}\n\n/**\n * Use now\n *\n * This hook returns the current system time while following `timeToRefresh` param.\n *\n * @param timeToRefresh Duration after which time value will be refreshed.\n *\n * @example\n * ```ts\n * // `now` will be updated each second (by default)\n * const now = useNow();\n * ```\n * @example\n * ```ts\n * // `now` will be updated each 5 seconds\n * const now = useNow({ timeToRefresh: 5 });\n * ```\n */\nexport function useNow(props?: UseNowProps): UnixTimestamp {\n const clock = useSystemClock();\n const [throttledClock, setThrottledClock] = useState(clock);\n const { timeToRefresh = DEFAULT_TIME_TO_REFRESH } = props || {};\n\n useEffect(() => {\n if (clock - throttledClock >= timeToRefresh) {\n setThrottledClock(clock);\n }\n }, [timeToRefresh, clock, throttledClock]);\n\n return throttledClock;\n}\n","import { getUnixTime } from \"date-fns\";\nimport { useSyncExternalStore } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { systemClock } from \"../utils/systemClock\";\n\n/**\n * Use System Clock\n *\n * Allows reading the current system time {@link UnixTimestamp} which stays\n * exactly the same across all callers of this hook.\n *\n * @see https://react.dev/reference/react/useSyncExternalStore\n */\nexport function useSystemClock(): UnixTimestamp {\n const subscribe = (callback: () => void) => {\n systemClock.addListener(callback);\n\n return () => {\n systemClock.removeListener(callback);\n };\n };\n const getSnapshot = () => getUnixTime(new Date(systemClock.currentTime));\n const getServerSnapshot = () => getUnixTime(new Date());\n\n const syncedSystemClock = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n\n // syncedSystemClock will be undefined on the initial render,\n // so we return the snapshot result to ensure there's always\n // some UnixTime value returned.\n return syncedSystemClock ?? getSnapshot();\n}\n","type SyncedClockListener = () => void;\n\n/**\n * Create Now\n *\n * Helper type defining a factory function for unix timestamp values in milliseconds.\n * An example factory is `Date.now`.\n */\ntype CreateNow = () => number;\n\nexport interface SyncedClock {\n /**\n * Current time of the synced clock as a unix timestamp value in milliseconds.\n */\n currentTime: ReturnType<CreateNow>;\n\n /**\n * Adds a new listener to all listeners tracking the synced clock.\n * @param callback to notify the listener about clock updates.\n */\n addListener(callback: SyncedClockListener): void;\n\n /**\n * Removes a listener from all listeners tracking the synced clock.\n * @param callback to notify the listener about clock updates.\n */\n removeListener(callback: SyncedClockListener): void;\n}\n\n/**\n * Default tick rate frequency in milliseconds.\n */\nexport const DEFAULT_TICK_RATE = 16;\n\n/**\n * High-resolution clock that updates with `tickRate` frequency.\n */\nexport class HighResolutionSyncedClock implements SyncedClock {\n #listeners = new Set<SyncedClockListener>();\n\n #currentTime = Date.now();\n\n #timerId: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Tick rate frequency in milliseconds.\n */\n #tickRate: number;\n\n /**\n * Clock's tick handler.\n *\n * Runs at `tickRate` frequency, and notifies all listeners about\n * the current time updates.\n */\n #tick = () => {\n this.#currentTime = Date.now();\n\n this.#listeners.forEach((listener) => listener());\n\n this.#timerId = setTimeout(this.#tick, this.#tickRate);\n };\n\n /**\n * Starts the clock.\n */\n private start = () => {\n if (this.#timerId === null) {\n this.#currentTime = Date.now();\n this.#timerId = setTimeout(this.#tick, this.#tickRate);\n }\n };\n\n /**\n * Stops the clock.\n */\n private stop = () => {\n if (this.#timerId !== null) {\n clearTimeout(this.#timerId);\n this.#timerId = null;\n }\n };\n\n public constructor(tickRate = DEFAULT_TICK_RATE) {\n this.#tickRate = tickRate;\n }\n\n /**\n * Adds a new listener to all listeners tracking the synced clock.\n *\n * Starts the clock (or restarts it, which is a noop) if there's at\n * least one listener.\n *\n * @param callback to notify the listener about clock updates.\n */\n public addListener(callback: SyncedClockListener) {\n this.#listeners.add(callback);\n\n // start (or restart, which is a noop) when anyone is listening\n if (this.#listeners.size > 0) {\n this.start();\n }\n }\n\n /**\n * Removes a listener from all listeners tracking the synced clock.\n *\n * Stops the clock if there's no listener.\n *\n * @param callback to notify the listener about clock updates.\n */\n public removeListener(callback: SyncedClockListener) {\n this.#listeners.delete(callback);\n\n // stop when no one is listening anymore\n if (this.#listeners.size === 0) {\n this.stop();\n }\n }\n\n get currentTime() {\n return this.#currentTime;\n }\n}\n","import { HighResolutionSyncedClock, type SyncedClock } from \"./syncedClock\";\n\n/**\n * Synced System Clock\n *\n * There is just one instance of it in ENSAdmin.\n */\nexport const systemClock: SyncedClock = new HighResolutionSyncedClock();\n"],"mappings":";;;;;;AAAA,IAAa;AAAb;;;AAAO,IAAM,UAAU;;;;;ACoFvB,SAAS,KACP,KACA,IAA4C;AAE5C,MAAI,KAAK,GAAG;AAAG,WAAO;AACtB,MACE,OACA,OAAO,QAAQ,YACf,WAAW,OACX,IAAI,UAAU;AAEd,WAAO,KAAK,IAAI,OAAO,EAAE;AAC3B,SAAO,KAAK,OAAO;AACrB;AAjGA,IAOI,aA6BS;AApCb;;;;AAOA,IAAI,cAA2B;MAC7B,YAAY,CAAC,EACX,aACA,WAAW,IACX,SAAQ,MAER,WACI,GAAG,eAAe,iBAAiB,GAAG,QAAQ,GAC5C,WAAW,IAAI,QAAQ,KAAK,EAC9B,KACA;MACN,SAAS,QAAQ,OAAO;;AAkBpB,IAAO,YAAP,MAAO,mBAAkB,MAAK;MASlC,YAAY,cAAsB,OAA4B,CAAA,GAAE;AAC9D,cAAM,WAAW,MAAK;AACpB,cAAI,KAAK,iBAAiB;AAAW,mBAAO,KAAK,MAAM;AACvD,cAAI,KAAK,OAAO;AAAS,mBAAO,KAAK,MAAM;AAC3C,iBAAO,KAAK;QACd,GAAE;AACF,cAAM,YAAY,MAAK;AACrB,cAAI,KAAK,iBAAiB;AACxB,mBAAO,KAAK,MAAM,YAAY,KAAK;AACrC,iBAAO,KAAK;QACd,GAAE;AACF,cAAM,UAAU,YAAY,aAAa,EAAE,GAAG,MAAM,SAAQ,CAAE;AAE9D,cAAM,UAAU;UACd,gBAAgB;UAChB;U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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUO,YAAY,UAA+B;AAChD,SAAK,WAAW,IAAI,QAAQ;AAG5B,QAAI,KAAK,WAAW,OAAO,GAAG;AAC5B,WAAK,MAAM;AAAA,IACb;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,eAAe,UAA+B;AACnD,SAAK,WAAW,OAAO,QAAQ;AAG/B,QAAI,KAAK,WAAW,SAAS,GAAG;AAC9B,WAAK,KAAK;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,IAAI,cAAc;AAChB,WAAO,KAAK;AAAA,EACd;AACF;;;ACpHO,IAAM,cAA2B,IAAI,0BAA0B;;;AFQ/D,SAAS,iBAAgC;AAC9C,QAAM,YAAY,CAAC,aAAyB;AAC1C,gBAAY,YAAY,QAAQ;AAEhC,WAAO,MAAM;AACX,kBAAY,eAAe,QAAQ;AAAA,IACrC;AAAA,EACF;AACA,QAAM,cAAc,MAAM,YAAY,IAAI,KAAK,YAAY,WAAW,CAAC;AACvE,QAAM,oBAAoB,MAAM,YAAY,oBAAI,KAAK,CAAC;AAEtD,QAAM,oBAAoB,qBAAqB,WAAW,aAAa,iBAAiB;AAKxF,SAAO,qBAAqB,YAAY;AAC1C;;;ADzBO,IAAM,0BAAoC;AA6B1C,SAAS,OAAO,OAAoC;AACzD,QAAM,QAAQ,eAAe;AAC7B,QAAM,CAAC,gBAAgB,iBAAiB,IAAIC,UAAS,KAAK;AAC1D,QAAM,EAAE,gBAAgB,wBAAwB,IAAI,SAAS,CAAC;AAE9D,EAAAC,WAAU,MAAM;AACd,QAAI,QAAQ,kBAAkB,eAAe;AAC3C,wBAAkB,KAAK;AAAA,IACzB;AAAA,EACF,GAAG,CAAC,eAAe,OAAO,cAAc,CAAC;AAEzC,SAAO;AACT;","names":["size","size","size","size","encoder","size","formatAuthorizationList","init_cursor","size","toBytes","isLE","_32n","toBytes","size","toBytes","cause","formatted","init_cursor","sha256","sha256","version","sha256","version","size","version","init_cursor","size","version","blobs","commitments","proofs","v","serializeTransaction","sourceId","chainConfig","chainConfig","chainConfig","sourceId","sourceId","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","ensTestEnvL1Chain","jsx","jsx","fromUnixTime","useEffect","useState","formatDistanceStrict","fromUnixTime","useEffect","useState","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","fromUnixTime","formatDistanceStrict","useState","useEffect","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","React","jsx","jsxs","jsx","jsxs","jsx","React","jsx","jsx","jsxs","chain","ENSNamespaceIds","React","jsx","size","jsx","jsxs","size","Fragment","jsx","jsxs","jsx","isResolvedIdentity","ResolutionStatusIds","translateDefaultableChainIdToChainId","React","jsx","jsx","jsxs","isResolvedIdentity","ResolutionStatusIds","translateDefaultableChainIdToChainId","InfoIcon","jsx","jsxs","className","InfoIcon","useEffect","useState","useState","useEffect"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/version.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/base.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/encoding.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/isHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/size.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/trim.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/data.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/pad.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toBytes.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/fromHex.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/formatter.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transactionRequest.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/number.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/concat.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/cursor.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/cursor.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/unit.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatUnits.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatEther.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/unit/formatGwei.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/transaction.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/utils.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/_md.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/_u64.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha2.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/address.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/chain.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/node.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/lru.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha3.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/hash/keccak256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/address/getAddress.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/address/isAddress.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/data/slice.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/accounts/utils/parseAccount.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/stateOverride.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/contract.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/errors/getNodeError.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/errors/getCallError.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/extract.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/assertRequest.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/chain/defineChain.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/block.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/log.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/formatters/transactionReceipt.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/encoding/toRlp.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/serializeTransaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/authorization/serializeAuthorizationList.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/blobsToCommitments.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/blobsToProofs.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/commitmentToVersionedHash.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/sha256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/hash/sha256.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/commitmentsToVersionedHashes.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/blob.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/kzg.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/blob.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/toBlobs.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/blob/toBlobSidecars.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/assertTransaction.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/getTransactionType.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/utils/transaction/serializeAccessList.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/contracts.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/formatters.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/serializers.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/op-stack/chainConfig.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/arbitrum.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/arbitrumSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/base.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/baseSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/linea/actions/estimateGas.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/errors/account.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/linea/chainConfig.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/linea.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/lineaSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/mainnet.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/optimism.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/optimismSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/scroll.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/scrollSepolia.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/chains/definitions/sepolia.ts","../src/components/chains/ChainIcon.tsx","../src/components/chains/icons/ArbitrumIcon.tsx","../src/components/chains/icons/ArbitrumTestnetIcon.tsx","../src/components/chains/icons/BaseIcon.tsx","../src/components/chains/icons/BaseTestnetIcon.tsx","../src/components/chains/icons/EthereumIcon.tsx","../src/components/chains/icons/EthereumLocalIcon.tsx","../src/components/chains/icons/EthereumTestnetIcon.tsx","../src/components/chains/icons/LineaIcon.tsx","../src/components/chains/icons/LineaTestnetIcon.tsx","../src/components/chains/icons/OptimismIcon.tsx","../src/components/chains/icons/OptimismTestnetIcon.tsx","../src/components/chains/icons/ScrollIcon.tsx","../src/components/chains/icons/ScrollTestnetIcon.tsx","../src/components/chains/icons/UnrecognizedChainIcon.tsx","../src/utils/chains.ts","../src/components/chains/ChainName.tsx","../src/components/datetime/AbsoluteTime.tsx","../src/components/datetime/DisplayDuration.tsx","../src/components/datetime/RelativeTime.tsx","../src/utils/cn.ts","../src/components/ui/tooltip.tsx","../src/components/icons/ens/EnsServiceProviderIcon.tsx","../src/components/icons/namehash/NameHashLabsIcon.tsx","../src/components/icons/socials/EfpIcon.tsx","../src/components/icons/socials/EmailIcon.tsx","../src/components/icons/socials/FarcasterIcon.tsx","../src/components/icons/socials/GitHubIcon.tsx","../src/components/icons/socials/TelegramIcon.tsx","../src/components/icons/socials/TwitterIcon.tsx","../src/components/footer/Footer.tsx","../src/components/icons/ChainExplorerIcon.tsx","../src/components/icons/ens/EnsIcon.tsx","../src/components/icons/InfoIcon.tsx","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/constants/address.ts","../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@3.25.76/node_modules/viem/index.ts","../src/components/identity/Address.tsx","../src/components/identity/EnsAvatar.tsx","../src/utils/ensMetadata.ts","../src/components/ui/avatar.tsx","../src/components/identity/Identity.tsx","../src/utils/blockExplorers.ts","../src/utils/ensManager.ts","../src/components/special-buttons/CopyButton.tsx","../src/components/ui/button.tsx","../src/components/identity/Name.tsx","../src/components/identity/ResolveAndDisplayIdentity.tsx","../src/hooks/useIsMobile.tsx","../src/components/ui/skeleton.tsx","../src/components/registrar-actions/RegistrarActionCard.tsx","../src/hooks/useNow.ts","../src/hooks/useSystemClock.ts","../src/utils/syncedClock.ts","../src/utils/systemClock.ts"],"sourcesContent":["export const version = '2.38.5'\n","import { version } from './version.js'\n\ntype ErrorConfig = {\n getDocsUrl?: ((args: BaseErrorParameters) => string | undefined) | undefined\n version?: string | undefined\n}\n\nlet errorConfig: ErrorConfig = {\n getDocsUrl: ({\n docsBaseUrl,\n docsPath = '',\n docsSlug,\n }: BaseErrorParameters) =>\n docsPath\n ? `${docsBaseUrl ?? 'https://viem.sh'}${docsPath}${\n docsSlug ? `#${docsSlug}` : ''\n }`\n : undefined,\n version: `viem@${version}`,\n}\n\nexport function setErrorConfig(config: ErrorConfig) {\n errorConfig = config\n}\n\ntype BaseErrorParameters = {\n cause?: BaseError | Error | undefined\n details?: string | undefined\n docsBaseUrl?: string | undefined\n docsPath?: string | undefined\n docsSlug?: string | undefined\n metaMessages?: string[] | undefined\n name?: string | undefined\n}\n\nexport type BaseErrorType = BaseError & { name: 'BaseError' }\nexport class BaseError extends Error {\n details: string\n docsPath?: string | undefined\n metaMessages?: string[] | undefined\n shortMessage: string\n version: string\n\n override name = 'BaseError'\n\n constructor(shortMessage: string, args: BaseErrorParameters = {}) {\n const details = (() => {\n if (args.cause instanceof BaseError) return args.cause.details\n if (args.cause?.message) 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\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\n super(message, args.cause ? { cause: args.cause } : undefined)\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\n walk(): Error\n walk(fn: (err: unknown) => boolean): Error | null\n walk(fn?: any): any {\n return walk(this, fn)\n }\n}\n\nfunction walk(\n err: unknown,\n fn?: ((err: unknown) => boolean) | undefined,\n): unknown {\n if (fn?.(err)) return err\n if (\n err &&\n typeof err === 'object' &&\n 'cause' in err &&\n err.cause !== undefined\n )\n return walk(err.cause, fn)\n return fn ? null : err\n}\n","import type { ByteArray, Hex } from '../types/misc.js'\n\nimport { BaseError } from './base.js'\n\nexport type IntegerOutOfRangeErrorType = IntegerOutOfRangeError & {\n name: 'IntegerOutOfRangeError'\n}\nexport class IntegerOutOfRangeError extends BaseError {\n constructor({\n max,\n min,\n signed,\n size,\n value,\n }: {\n max?: string | undefined\n min: string\n signed?: boolean | undefined\n size?: number | undefined\n value: string\n }) {\n super(\n `Number \"${value}\" is not in safe ${\n size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''\n }integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`,\n { name: 'IntegerOutOfRangeError' },\n )\n }\n}\n\nexport type InvalidBytesBooleanErrorType = InvalidBytesBooleanError & {\n name: 'InvalidBytesBooleanError'\n}\nexport class InvalidBytesBooleanError extends BaseError {\n constructor(bytes: ByteArray) {\n super(\n `Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,\n {\n name: 'InvalidBytesBooleanError',\n },\n )\n }\n}\n\nexport type InvalidHexBooleanErrorType = InvalidHexBooleanError & {\n name: 'InvalidHexBooleanError'\n}\nexport class InvalidHexBooleanError extends BaseError {\n constructor(hex: Hex) {\n super(\n `Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`,\n { name: 'InvalidHexBooleanError' },\n )\n }\n}\n\nexport type InvalidHexValueErrorType = InvalidHexValueError & {\n name: 'InvalidHexValueError'\n}\nexport class InvalidHexValueError extends BaseError {\n constructor(value: Hex) {\n super(\n `Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`,\n { name: 'InvalidHexValueError' },\n )\n }\n}\n\nexport type SizeOverflowErrorType = SizeOverflowError & {\n name: 'SizeOverflowError'\n}\nexport class SizeOverflowError extends BaseError {\n constructor({ givenSize, maxSize }: { givenSize: number; maxSize: number }) {\n super(\n `Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`,\n { name: 'SizeOverflowError' },\n )\n }\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Hex } from '../../types/misc.js'\n\nexport type IsHexErrorType = ErrorType\n\nexport function isHex(\n value: unknown,\n { strict = true }: { strict?: boolean | undefined } = {},\n): value is Hex {\n if (!value) return false\n if (typeof value !== 'string') return false\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x')\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nimport { type IsHexErrorType, isHex } from './isHex.js'\n\nexport type SizeErrorType = IsHexErrorType | ErrorType\n\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: Hex | ByteArray) {\n if (isHex(value, { strict: false })) return Math.ceil((value.length - 2) / 2)\n return value.length\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\ntype TrimOptions = {\n dir?: 'left' | 'right' | undefined\n}\nexport type TrimReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type TrimErrorType = ErrorType\n\nexport function trim<value extends ByteArray | Hex>(\n hexOrBytes: value,\n { dir = 'left' }: TrimOptions = {},\n): TrimReturnType<value> {\n let data: any =\n typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes\n\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 break\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength)\n\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right') data = `${data}0`\n return `0x${\n data.length % 2 === 1 ? `0${data}` : data\n }` as TrimReturnType<value>\n }\n return data as TrimReturnType<value>\n}\n","import { BaseError } from './base.js'\n\nexport type SliceOffsetOutOfBoundsErrorType = SliceOffsetOutOfBoundsError & {\n name: 'SliceOffsetOutOfBoundsError'\n}\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n constructor({\n offset,\n position,\n size,\n }: { offset: number; position: 'start' | 'end'; size: number }) {\n super(\n `Slice ${\n position === 'start' ? 'starting' : 'ending'\n } at offset \"${offset}\" is out-of-bounds (size: ${size}).`,\n { name: 'SliceOffsetOutOfBoundsError' },\n )\n }\n}\n\nexport type SizeExceedsPaddingSizeErrorType = SizeExceedsPaddingSizeError & {\n name: 'SizeExceedsPaddingSizeError'\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n constructor({\n size,\n targetSize,\n type,\n }: {\n size: number\n targetSize: number\n type: 'hex' | 'bytes'\n }) {\n super(\n `${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`,\n { name: 'SizeExceedsPaddingSizeError' },\n )\n }\n}\n\nexport type InvalidBytesLengthErrorType = InvalidBytesLengthError & {\n name: 'InvalidBytesLengthError'\n}\nexport class InvalidBytesLengthError extends BaseError {\n constructor({\n size,\n targetSize,\n type,\n }: {\n size: number\n targetSize: number\n type: 'hex' | 'bytes'\n }) {\n super(\n `${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`,\n { name: 'InvalidBytesLengthError' },\n )\n }\n}\n","import {\n SizeExceedsPaddingSizeError,\n type SizeExceedsPaddingSizeErrorType,\n} from '../../errors/data.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\ntype PadOptions = {\n dir?: 'left' | 'right' | undefined\n size?: number | null | undefined\n}\nexport type PadReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type PadErrorType = PadHexErrorType | PadBytesErrorType | ErrorType\n\nexport function pad<value extends ByteArray | Hex>(\n hexOrBytes: value,\n { dir, size = 32 }: PadOptions = {},\n): PadReturnType<value> {\n if (typeof hexOrBytes === 'string')\n return padHex(hexOrBytes, { dir, size }) as PadReturnType<value>\n return padBytes(hexOrBytes, { dir, size }) as PadReturnType<value>\n}\n\nexport type PadHexErrorType = SizeExceedsPaddingSizeErrorType | ErrorType\n\nexport function padHex(hex_: Hex, { dir, size = 32 }: PadOptions = {}) {\n if (size === null) 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\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](\n size * 2,\n '0',\n )}` as Hex\n}\n\nexport type PadBytesErrorType = SizeExceedsPaddingSizeErrorType | ErrorType\n\nexport function padBytes(\n bytes: ByteArray,\n { dir, size = 32 }: PadOptions = {},\n) {\n if (size === null) 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","import {\n IntegerOutOfRangeError,\n type IntegerOutOfRangeErrorType,\n} from '../../errors/encoding.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type PadErrorType, pad } from '../data/pad.js'\n\nimport { type AssertSizeErrorType, assertSize } from './fromHex.js'\n\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) =>\n i.toString(16).padStart(2, '0'),\n)\n\nexport type ToHexParameters = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type ToHexErrorType =\n | BoolToHexErrorType\n | BytesToHexErrorType\n | NumberToHexErrorType\n | StringToHexErrorType\n | ErrorType\n\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(\n value: string | number | bigint | boolean | ByteArray,\n opts: ToHexParameters = {},\n): Hex {\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') return boolToHex(value, opts)\n return bytesToHex(value, opts)\n}\n\nexport type BoolToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type BoolToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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: boolean, opts: BoolToHexOpts = {}): Hex {\n const hex: 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\nexport type BytesToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type BytesToHexErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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: ByteArray, opts: BytesToHexOpts = {}): Hex {\n let string = ''\n for (let i = 0; i < value.length; i++) {\n string += hexes[value[i]]\n }\n const hex = `0x${string}` as const\n\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\nexport type NumberToHexOpts =\n | {\n /** Whether or not the number of a signed representation. */\n signed?: boolean | undefined\n /** The size (in bytes) of the output hex value. */\n size: number\n }\n | {\n signed?: undefined\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n }\n\nexport type NumberToHexErrorType =\n | IntegerOutOfRangeErrorType\n | PadErrorType\n | ErrorType\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(\n value_: number | bigint,\n opts: NumberToHexOpts = {},\n): Hex {\n const { signed, size } = opts\n\n const value = BigInt(value_)\n\n let maxValue: bigint | number | undefined\n if (size) {\n if (signed) maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n\n else maxValue = 2n ** (BigInt(size) * 8n) - 1n\n } else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER)\n }\n\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0\n\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\n const hex = `0x${(\n signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value\n ).toString(16)}` as Hex\n if (size) return pad(hex, { size }) as Hex\n return hex\n}\n\nexport type StringToHexOpts = {\n /** The size (in bytes) of the output hex value. */\n size?: number | undefined\n}\n\nexport type StringToHexErrorType = BytesToHexErrorType | ErrorType\n\nconst encoder = /*#__PURE__*/ new TextEncoder()\n\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_: string, opts: StringToHexOpts = {}): Hex {\n const value = encoder.encode(value_)\n return bytesToHex(value, opts)\n}\n","import { BaseError } from '../../errors/base.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type PadErrorType, pad } from '../data/pad.js'\n\nimport { type AssertSizeErrorType, assertSize } from './fromHex.js'\nimport {\n type NumberToHexErrorType,\n type NumberToHexOpts,\n numberToHex,\n} from './toHex.js'\n\nconst encoder = /*#__PURE__*/ new TextEncoder()\n\nexport type ToBytesParameters = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type ToBytesErrorType =\n | NumberToBytesErrorType\n | BoolToBytesErrorType\n | HexToBytesErrorType\n | StringToBytesErrorType\n | IsHexErrorType\n | ErrorType\n\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(\n value: string | bigint | number | boolean | Hex,\n opts: ToBytesParameters = {},\n): ByteArray {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts)\n if (typeof value === 'boolean') return boolToBytes(value, opts)\n if (isHex(value)) return hexToBytes(value, opts)\n return stringToBytes(value, opts)\n}\n\nexport type BoolToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type BoolToBytesErrorType =\n | AssertSizeErrorType\n | PadErrorType\n | ErrorType\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: boolean, opts: BoolToBytesOpts = {}) {\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\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} as const\n\nfunction charCodeToBase16(char: number) {\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\nexport type HexToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type HexToBytesErrorType = AssertSizeErrorType | PadErrorType | ErrorType\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_: Hex, opts: HexToBytesOpts = {}): ByteArray {\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\n let hexString = hex.slice(2) as string\n if (hexString.length % 2) hexString = `0${hexString}`\n\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(\n `Invalid byte sequence (\"${hexString[j - 2]}${\n hexString[j - 1]\n }\" in \"${hexString}\").`,\n )\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight\n }\n return bytes\n}\n\nexport type NumberToBytesErrorType =\n | NumberToHexErrorType\n | HexToBytesErrorType\n | ErrorType\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(\n value: bigint | number,\n opts?: NumberToHexOpts | undefined,\n) {\n const hex = numberToHex(value, opts)\n return hexToBytes(hex)\n}\n\nexport type StringToBytesOpts = {\n /** Size of the output bytes. */\n size?: number | undefined\n}\n\nexport type StringToBytesErrorType =\n | AssertSizeErrorType\n | PadErrorType\n | ErrorType\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(\n value: string,\n opts: StringToBytesOpts = {},\n): ByteArray {\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","import {\n InvalidHexBooleanError,\n type InvalidHexBooleanErrorType,\n SizeOverflowError,\n type SizeOverflowErrorType,\n} from '../../errors/encoding.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type SizeErrorType, size as size_ } from '../data/size.js'\nimport { type TrimErrorType, trim } from '../data/trim.js'\n\nimport { type HexToBytesErrorType, hexToBytes } from './toBytes.js'\n\nexport type AssertSizeErrorType =\n | SizeOverflowErrorType\n | SizeErrorType\n | ErrorType\n\nexport function assertSize(\n hexOrBytes: Hex | ByteArray,\n { size }: { size: number },\n): void {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n })\n}\n\nexport type FromHexParameters<\n to extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean',\n> =\n | to\n | {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n /** Type to convert to. */\n to: to\n }\n\nexport type FromHexReturnType<to> = to extends 'string'\n ? string\n : to extends 'bigint'\n ? bigint\n : to extends 'number'\n ? number\n : to extends 'bytes'\n ? ByteArray\n : to extends 'boolean'\n ? boolean\n : never\n\nexport type FromHexErrorType =\n | HexToNumberErrorType\n | HexToBigIntErrorType\n | HexToBoolErrorType\n | HexToStringErrorType\n | HexToBytesErrorType\n | ErrorType\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<\n to extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean',\n>(hex: Hex, toOrOpts: FromHexParameters<to>): FromHexReturnType<to> {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts\n const to = opts.to\n\n if (to === 'number') return hexToNumber(hex, opts) as FromHexReturnType<to>\n if (to === 'bigint') return hexToBigInt(hex, opts) as FromHexReturnType<to>\n if (to === 'string') return hexToString(hex, opts) as FromHexReturnType<to>\n if (to === 'boolean') return hexToBool(hex, opts) as FromHexReturnType<to>\n return hexToBytes(hex, opts) as FromHexReturnType<to>\n}\n\nexport type HexToBigIntOpts = {\n /** Whether or not the number of a signed representation. */\n signed?: boolean | undefined\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToBigIntErrorType = AssertSizeErrorType | ErrorType\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: Hex, opts: HexToBigIntOpts = {}): bigint {\n const { signed } = opts\n\n if (opts.size) assertSize(hex, { size: opts.size })\n\n const value = BigInt(hex)\n if (!signed) return value\n\n const size = (hex.length - 2) / 2\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n\n if (value <= max) return value\n\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n\n}\n\nexport type HexToBoolOpts = {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToBoolErrorType =\n | AssertSizeErrorType\n | InvalidHexBooleanErrorType\n | TrimErrorType\n | ErrorType\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_: Hex, opts: HexToBoolOpts = {}): boolean {\n let hex = hex_\n if (opts.size) {\n assertSize(hex, { size: opts.size })\n hex = trim(hex)\n }\n if (trim(hex) === '0x00') return false\n if (trim(hex) === '0x01') return true\n throw new InvalidHexBooleanError(hex)\n}\n\nexport type HexToNumberOpts = HexToBigIntOpts\n\nexport type HexToNumberErrorType = HexToBigIntErrorType | ErrorType\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: Hex, opts: HexToNumberOpts = {}): number {\n return Number(hexToBigInt(hex, opts))\n}\n\nexport type HexToStringOpts = {\n /** Size (in bytes) of the hex value. */\n size?: number | undefined\n}\n\nexport type HexToStringErrorType =\n | AssertSizeErrorType\n | HexToBytesErrorType\n | TrimErrorType\n | ErrorType\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: Hex, opts: HexToStringOpts = {}): string {\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","import type { ErrorType } from '../../errors/utils.js'\nimport type { Prettify } from '../../types/utils.js'\n\nexport type DefineFormatterErrorType = ErrorType\n\nexport function defineFormatter<type extends string, parameters, returnType>(\n type: type,\n format: (args: parameters, action?: string | undefined) => returnType,\n) {\n return <\n parametersOverride,\n returnTypeOverride,\n exclude extends (keyof parameters | keyof parametersOverride)[] = [],\n >({\n exclude,\n format: overrides,\n }: {\n exclude?: exclude | undefined\n format: (\n args: parametersOverride,\n action?: string | undefined,\n ) => returnTypeOverride\n }) => {\n return {\n exclude,\n format: (args: parametersOverride, action?: string | undefined) => {\n const formatted = format(args as any, action)\n if (exclude) {\n for (const key of exclude) {\n delete (formatted as any)[key]\n }\n }\n return {\n ...formatted,\n ...overrides(args, action),\n } as Prettify<returnTypeOverride> & {\n [_key in exclude[number]]: never\n }\n },\n type,\n }\n }\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Account } from '../../types/account.js'\nimport type { AuthorizationList } from '../../types/authorization.js'\nimport type {\n Chain,\n ExtractChainFormatterParameters,\n} from '../../types/chain.js'\nimport type { ByteArray } from '../../types/misc.js'\nimport type {\n RpcAuthorizationList,\n RpcTransactionRequest,\n} from '../../types/rpc.js'\nimport type { TransactionRequest } from '../../types/transaction.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { bytesToHex, numberToHex } from '../encoding/toHex.js'\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\n\nexport type FormattedTransactionRequest<\n chain extends Chain | undefined = Chain | undefined,\n> = ExtractChainFormatterParameters<\n chain,\n 'transactionRequest',\n TransactionRequest\n>\n\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n} as const\n\nexport type FormatTransactionRequestErrorType = ErrorType\n\nexport function formatTransactionRequest(\n request: ExactPartial<TransactionRequest> & { account?: Account | undefined },\n _?: string | undefined,\n) {\n const rpcRequest = {} as RpcTransactionRequest\n\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(\n request.authorizationList,\n )\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = (request.blobs as ByteArray[]).map((x) =>\n bytesToHex(x),\n )\n else rpcRequest.blobs = request.blobs\n }\n if (typeof request.data !== 'undefined') rpcRequest.data = request.data\n if (request.account) rpcRequest.from = request.account.address\n if (typeof request.from !== 'undefined') rpcRequest.from = request.from\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas)\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice)\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas)\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas)\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas)\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce)\n if (typeof request.to !== 'undefined') rpcRequest.to = request.to\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type]\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value)\n\n return rpcRequest\n}\n\nexport type DefineTransactionRequestErrorType =\n | DefineFormatterErrorType\n | ErrorType\n\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter(\n 'transactionRequest',\n formatTransactionRequest,\n)\n\n//////////////////////////////////////////////////////////////////////////////\n\nfunction formatAuthorizationList(\n authorizationList: AuthorizationList<number, boolean>,\n): RpcAuthorizationList {\n return authorizationList.map(\n (authorization) =>\n ({\n address: authorization.address,\n r: authorization.r\n ? numberToHex(BigInt(authorization.r))\n : authorization.r,\n s: authorization.s\n ? numberToHex(BigInt(authorization.s))\n : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }) as any,\n ) as RpcAuthorizationList\n}\n","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\n\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))\n\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","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nexport type ConcatReturnType<value extends Hex | ByteArray> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type ConcatErrorType =\n | ConcatBytesErrorType\n | ConcatHexErrorType\n | ErrorType\n\nexport function concat<value extends Hex | ByteArray>(\n values: readonly value[],\n): ConcatReturnType<value> {\n if (typeof values[0] === 'string')\n return concatHex(values as readonly Hex[]) as ConcatReturnType<value>\n return concatBytes(values as readonly ByteArray[]) as ConcatReturnType<value>\n}\n\nexport type ConcatBytesErrorType = ErrorType\n\nexport function concatBytes(values: readonly ByteArray[]): ByteArray {\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}\n\nexport type ConcatHexErrorType = ErrorType\n\nexport function concatHex(values: readonly Hex[]): Hex {\n return `0x${(values as Hex[]).reduce(\n (acc, x) => acc + x.replace('0x', ''),\n '',\n )}`\n}\n","import { BaseError } from './base.js'\n\nexport type NegativeOffsetErrorType = NegativeOffsetError & {\n name: 'NegativeOffsetError'\n}\nexport class NegativeOffsetError extends BaseError {\n constructor({ offset }: { offset: number }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: 'NegativeOffsetError',\n })\n }\n}\n\nexport type PositionOutOfBoundsErrorType = PositionOutOfBoundsError & {\n name: 'PositionOutOfBoundsError'\n}\nexport class PositionOutOfBoundsError extends BaseError {\n constructor({ length, position }: { length: number; position: number }) {\n super(\n `Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`,\n { name: 'PositionOutOfBoundsError' },\n )\n }\n}\n\nexport type RecursiveReadLimitExceededErrorType =\n RecursiveReadLimitExceededError & {\n name: 'RecursiveReadLimitExceededError'\n }\nexport class RecursiveReadLimitExceededError extends BaseError {\n constructor({ count, limit }: { count: number; limit: number }) {\n super(\n `Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`,\n { name: 'RecursiveReadLimitExceededError' },\n )\n }\n}\n","import {\n NegativeOffsetError,\n type NegativeOffsetErrorType,\n PositionOutOfBoundsError,\n type PositionOutOfBoundsErrorType,\n RecursiveReadLimitExceededError,\n type RecursiveReadLimitExceededErrorType,\n} from '../errors/cursor.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ByteArray } from '../types/misc.js'\n\nexport type Cursor = {\n bytes: ByteArray\n dataView: DataView\n position: number\n positionReadCount: Map<number, number>\n recursiveReadCount: number\n recursiveReadLimit: number\n remaining: number\n assertReadLimit(position?: number): void\n assertPosition(position: number): void\n decrementPosition(offset: number): void\n getReadCount(position?: number): number\n incrementPosition(offset: number): void\n inspectByte(position?: number): ByteArray[number]\n inspectBytes(length: number, position?: number): ByteArray\n inspectUint8(position?: number): number\n inspectUint16(position?: number): number\n inspectUint24(position?: number): number\n inspectUint32(position?: number): number\n pushByte(byte: ByteArray[number]): void\n pushBytes(bytes: ByteArray): void\n pushUint8(value: number): void\n pushUint16(value: number): void\n pushUint24(value: number): void\n pushUint32(value: number): void\n readByte(): ByteArray[number]\n readBytes(length: number, size?: number): ByteArray\n readUint8(): number\n readUint16(): number\n readUint24(): number\n readUint32(): number\n setPosition(position: number): () => void\n _touch(): void\n}\n\ntype CursorErrorType =\n | CursorAssertPositionErrorType\n | CursorDecrementPositionErrorType\n | CursorIncrementPositionErrorType\n | ErrorType\n\ntype CursorAssertPositionErrorType = PositionOutOfBoundsErrorType | ErrorType\n\ntype CursorDecrementPositionErrorType = NegativeOffsetErrorType | ErrorType\n\ntype CursorIncrementPositionErrorType = NegativeOffsetErrorType | ErrorType\n\ntype StaticCursorErrorType =\n | NegativeOffsetErrorType\n | RecursiveReadLimitExceededErrorType\n\nconst staticCursor: Cursor = {\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) 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) 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 (\n (this.dataView.getUint16(position) << 8) +\n this.dataView.getUint8(position + 2)\n )\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: ByteArray[number]) {\n this.assertPosition(this.position)\n this.bytes[this.position] = byte\n this.position++\n },\n pushBytes(bytes: ByteArray) {\n this.assertPosition(this.position + bytes.length - 1)\n this.bytes.set(bytes, this.position)\n this.position += bytes.length\n },\n pushUint8(value: number) {\n this.assertPosition(this.position)\n this.bytes[this.position] = value\n this.position++\n },\n pushUint16(value: number) {\n this.assertPosition(this.position + 1)\n this.dataView.setUint16(this.position, value)\n this.position += 2\n },\n pushUint24(value: number) {\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: number) {\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) return\n const count = this.getReadCount()\n this.positionReadCount.set(this.position, count + 1)\n if (count > 0) this.recursiveReadCount++\n },\n}\n\ntype CursorConfig = { recursiveReadLimit?: number | undefined }\n\nexport type CreateCursorErrorType =\n | CursorErrorType\n | StaticCursorErrorType\n | ErrorType\n\nexport function createCursor(\n bytes: ByteArray,\n { recursiveReadLimit = 8_192 }: CursorConfig = {},\n): Cursor {\n const cursor: Cursor = Object.create(staticCursor)\n cursor.bytes = bytes\n cursor.dataView = new DataView(\n bytes.buffer,\n bytes.byteOffset,\n bytes.byteLength,\n )\n cursor.positionReadCount = new Map()\n cursor.recursiveReadLimit = recursiveReadLimit\n return cursor\n}\n","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","import type { ErrorType } from '../../errors/utils.js'\n\nexport type FormatUnitsErrorType = ErrorType\n\n/**\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: bigint, decimals: number) {\n let display = value.toString()\n\n const negative = display.startsWith('-')\n if (negative) display = display.slice(1)\n\n display = display.padStart(decimals, '0')\n\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'}${\n fraction ? `.${fraction}` : ''\n }`\n}\n","import { etherUnits } from '../../constants/unit.js'\n\nimport { type FormatUnitsErrorType, formatUnits } from './formatUnits.js'\n\nexport type FormatEtherErrorType = FormatUnitsErrorType\n\n/**\n * Converts numerical wei to a string representation of ether.\n *\n * - Docs: https://viem.sh/docs/utilities/formatEther\n *\n * @example\n * import { formatEther } from 'viem'\n *\n * formatEther(1000000000000000000n)\n * // '1'\n */\nexport function formatEther(wei: bigint, unit: 'wei' | 'gwei' = 'wei') {\n return formatUnits(wei, etherUnits[unit])\n}\n","import { gweiUnits } from '../../constants/unit.js'\n\nimport { type FormatUnitsErrorType, formatUnits } from './formatUnits.js'\n\nexport type FormatGweiErrorType = FormatUnitsErrorType\n\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: bigint, unit: 'wei' = 'wei') {\n return formatUnits(wei, gweiUnits[unit])\n}\n","import type { Account } from '../accounts/types.js'\nimport type { SendTransactionParameters } from '../actions/wallet/sendTransaction.js'\nimport type { BlockTag } from '../types/block.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Hash, Hex } from '../types/misc.js'\nimport type {\n TransactionReceipt,\n TransactionType,\n} from '../types/transaction.js'\nimport { formatEther } from '../utils/unit/formatEther.js'\nimport { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { BaseError } from './base.js'\n\nexport function prettyPrint(\n args: Record<string, bigint | number | string | undefined | false | unknown>,\n) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false) return null\n return [key, value]\n })\n .filter(Boolean) as [string, string][]\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}\n\nexport type FeeConflictErrorType = FeeConflictError & {\n name: 'FeeConflictError'\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super(\n [\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'),\n { name: 'FeeConflictError' },\n )\n }\n}\n\nexport type InvalidLegacyVErrorType = InvalidLegacyVError & {\n name: 'InvalidLegacyVError'\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }: { v: bigint }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n name: 'InvalidLegacyVError',\n })\n }\n}\n\nexport type InvalidSerializableTransactionErrorType =\n InvalidSerializableTransactionError & {\n name: 'InvalidSerializableTransactionError'\n }\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }: { transaction: Record<string, unknown> }) {\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}\n\nexport type InvalidSerializedTransactionTypeErrorType =\n InvalidSerializedTransactionTypeError & {\n name: 'InvalidSerializedTransactionTypeError'\n }\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n serializedType: Hex\n\n constructor({ serializedType }: { serializedType: Hex }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n name: 'InvalidSerializedTransactionType',\n })\n\n this.serializedType = serializedType\n }\n}\n\nexport type InvalidSerializedTransactionErrorType =\n InvalidSerializedTransactionError & {\n name: 'InvalidSerializedTransactionError'\n }\nexport class InvalidSerializedTransactionError extends BaseError {\n serializedTransaction: Hex\n type: TransactionType\n\n constructor({\n attributes,\n serializedTransaction,\n type,\n }: {\n attributes: Record<string, unknown>\n serializedTransaction: Hex\n type: TransactionType\n }) {\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\n this.serializedTransaction = serializedTransaction\n this.type = type\n }\n}\n\nexport type InvalidStorageKeySizeErrorType = InvalidStorageKeySizeError & {\n name: 'InvalidStorageKeySizeError'\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }: { storageKey: Hex }) {\n super(\n `Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor(\n (storageKey.length - 2) / 2,\n )} bytes.`,\n { name: 'InvalidStorageKeySizeError' },\n )\n }\n}\n\nexport type TransactionExecutionErrorType = TransactionExecutionError & {\n name: 'TransactionExecutionError'\n}\nexport class TransactionExecutionError extends BaseError {\n override cause: BaseError\n\n constructor(\n cause: BaseError,\n {\n account,\n docsPath,\n chain,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n }: Omit<SendTransactionParameters, 'account' | 'chain'> & {\n account: Account | null\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n ) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value:\n typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice:\n typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas:\n typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas:\n typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n })\n\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'TransactionExecutionError',\n })\n this.cause = cause\n }\n}\n\nexport type TransactionNotFoundErrorType = TransactionNotFoundError & {\n name: 'TransactionNotFoundError'\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({\n blockHash,\n blockNumber,\n blockTag,\n hash,\n index,\n }: {\n blockHash?: Hash | undefined\n blockNumber?: bigint | undefined\n blockTag?: BlockTag | undefined\n hash?: Hash | undefined\n index?: number | undefined\n }) {\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) identifier = `Transaction with hash \"${hash}\"`\n super(`${identifier} could not be found.`, {\n name: 'TransactionNotFoundError',\n })\n }\n}\n\nexport type TransactionReceiptNotFoundErrorType =\n TransactionReceiptNotFoundError & {\n name: 'TransactionReceiptNotFoundError'\n }\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }: { hash: Hash }) {\n super(\n `Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`,\n {\n name: 'TransactionReceiptNotFoundError',\n },\n )\n }\n}\n\nexport type TransactionReceiptRevertedErrorType =\n TransactionReceiptRevertedError & {\n name: 'TransactionReceiptRevertedError'\n }\nexport class TransactionReceiptRevertedError extends BaseError {\n receipt: TransactionReceipt\n\n constructor({ receipt }: { receipt: TransactionReceipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n ' ',\n 'You can attempt to extract the revert reason by:',\n '- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract',\n '- using the `call` Action with raw `data`',\n ],\n name: 'TransactionReceiptRevertedError',\n })\n\n this.receipt = receipt\n }\n}\n\nexport type WaitForTransactionReceiptTimeoutErrorType =\n WaitForTransactionReceiptTimeoutError & {\n name: 'WaitForTransactionReceiptTimeoutError'\n }\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }: { hash: Hash }) {\n super(\n `Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`,\n { name: 'WaitForTransactionReceiptTimeoutError' },\n )\n }\n}\n","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\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';\n\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n/** Asserts something is positive integer. */\nexport function anumber(n: number): void {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);\n}\n\n/** Asserts something is Uint8Array. */\nexport function abytes(b: Uint8Array | undefined, ...lengths: number[]): void {\n if (!isBytes(b)) 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\n/** Asserts something is hash */\nexport function ahash(h: IHash): void {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.createHasher');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n\n/** Asserts a hash instance has not been destroyed / finished */\nexport function aexists(instance: any, checkFinished = true): void {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\n\n/** Asserts output is properly-sized byte array */\nexport function aoutput(out: any, instance: any): void {\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}\n\n/** Generic type encompassing 8/16/32-byte arrays - but not 64-byte. */\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr: TypedArray): Uint8Array {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr: TypedArray): Uint32Array {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays: TypedArray[]): void {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n}\n\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr: TypedArray): DataView {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word: number, shift: number): number {\n return (word << (32 - shift)) | (word >>> shift);\n}\n\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word: number, shift: number): number {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE: boolean = /* @__PURE__ */ (() =>\n new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n\n/** The byte swap operation for uint32 */\nexport function byteSwap(word: number): number {\n return (\n ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff)\n );\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const swap8IfBE: (n: number) => number = isLE\n ? (n: number) => n\n : (n: number) => byteSwap(n);\n\n/** @deprecated */\nexport const byteSwapIfBE: typeof swap8IfBE = swap8IfBE;\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr: Uint32Array): Uint32Array {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n}\n\nexport const swap32IfBE: (u: Uint32Array) => Uint32Array = isLE\n ? (u: Uint32Array) => u\n : byteSwap32;\n\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin: boolean = /* @__PURE__ */ (() =>\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n\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: Uint8Array): string {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin) 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\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 } as const;\nfunction asciiToBase16(ch: number): number | undefined {\n if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\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: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin) return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) 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/**\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 (): Promise<void> => {};\n\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(\n iters: number,\n tick: number,\n cb: (i: number) => void\n): Promise<void> {\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) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols, but ts doesn't see them: https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\ndeclare const TextDecoder: any;\n\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes: Uint8Array): string {\n return new TextDecoder().decode(bytes);\n}\n\n/** Accepted input of hash functions. Strings are converted to byte arrays. */\nexport type Input = string | Uint8Array;\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: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** KDFs can accept string or Uint8Array for user convenience. */\nexport type KDFInput = string | Uint8Array;\n/**\n * Helper for KDFs: consumes uint8array or string.\n * When string is passed, does utf8 decoding, using TextDecoder.\n */\nexport function kdfInputToBytes(data: KDFInput): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** Copies several Uint8Arrays into one. */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\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\ntype EmptyObj = {};\nexport function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\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 as T1 & T2;\n}\n\n/** Hash interface. */\nexport type IHash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\n\n/** For runtime check if class implements interface */\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n /**\n * Resets internal state. Makes Hash instance unusable.\n * Reset is impossible for keyed hashes if key is consumed into state. If digest is not consumed\n * by user, they will need to manually call `destroy()` when zeroing is necessary.\n */\n abstract destroy(): void;\n /**\n * Clones hash instance. Unsafe: doesn't check whether `to` is valid. Can be used as `clone()`\n * when no options are passed.\n * Reasons to use `_cloneInto` instead of clone: 1) performance 2) reuse instance => all internal\n * buffers are overwritten => causes buffer overwrite which is used for digest in some cases.\n * There are no guarantees for clean-up because it's impossible in JS.\n */\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n abstract clone(): T;\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot\n * destroy state, next call can require more bytes.\n */\nexport type HashXOF<T extends Hash<T>> = Hash<T> & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\n/** Hash function */\nexport type CHash = ReturnType<typeof createHasher>;\n/** Hash function with output */\nexport type CHashO = ReturnType<typeof createOptHasher>;\n/** XOF with output */\nexport type CHashXO = ReturnType<typeof createXOFer>;\n\n/** Wraps hash function, creating an interface on top of it */\nexport function createHasher<T extends Hash<T>>(\n hashCons: () => Hash<T>\n): {\n (msg: Input): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(): Hash<T>;\n} {\n const hashC = (msg: Input): Uint8Array => 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}\n\nexport function createOptHasher<H extends Hash<H>, T extends Object>(\n hashCons: (opts?: T) => Hash<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): Hash<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\n\nexport function createXOFer<H extends HashXOF<H>, T extends Object>(\n hashCons: (opts?: T) => HashXOF<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): HashXOF<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\nexport const wrapConstructor: typeof createHasher = createHasher;\nexport const wrapConstructorWithOpts: typeof createOptHasher = createOptHasher;\nexport const wrapXOFConstructorWithOpts: typeof createXOFer = createXOFer;\n\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32): Uint8Array {\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","/**\n * Internal Merkle-Damgard hash utils.\n * @module\n */\nimport { type Input, Hash, abytes, aexists, aoutput, clean, createView, toBytes } from './utils.ts';\n\n/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */\nexport function setBigUint64(\n view: DataView,\n byteOffset: number,\n value: bigint,\n isLE: boolean\n): void {\n if (typeof view.setBigUint64 === 'function') 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\n/** Choice: a ? b : c */\nexport function Chi(a: number, b: number, c: number): number {\n return (a & b) ^ (~a & c);\n}\n\n/** Majority function, true if any two inputs is true. */\nexport function Maj(a: number, b: number, c: number): number {\n return (a & b) ^ (a & c) ^ (b & c);\n}\n\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport abstract class HashMD<T extends HashMD<T>> extends Hash<T> {\n protected abstract process(buf: DataView, offset: number): void;\n protected abstract get(): number[];\n protected abstract set(...args: number[]): void;\n abstract destroy(): void;\n protected abstract roundClean(): void;\n\n readonly blockLen: number;\n readonly outputLen: number;\n readonly padOffset: number;\n readonly isLE: boolean;\n\n // For partial updates less than block size\n protected buffer: Uint8Array;\n protected view: DataView;\n protected finished = false;\n protected length = 0;\n protected pos = 0;\n protected destroyed = false;\n\n constructor(blockLen: number, outputLen: number, padOffset: number, isLE: boolean) {\n super();\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: Input): this {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\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) 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: Uint8Array): void {\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 clean(this.buffer.subarray(pos));\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++) 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) 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) throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);\n }\n digest(): Uint8Array {\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?: T): T {\n to ||= new (this.constructor as any)() as T;\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen) to.buffer.set(buffer);\n return to;\n }\n clone(): T {\n return this._cloneInto();\n }\n}\n\n/**\n * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.\n * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.\n */\n\n/** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */\nexport const SHA256_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,\n]);\n\n/** Initial SHA224 state. Bits 32..64 of frac part of sqrt of primes 23..53 */\nexport const SHA224_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4,\n]);\n\n/** Initial SHA384 state. Bits 0..64 of frac part of sqrt of primes 23..53 */\nexport const SHA384_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0xcbbb9d5d, 0xc1059ed8, 0x629a292a, 0x367cd507, 0x9159015a, 0x3070dd17, 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31, 0x8eb44a87, 0x68581511, 0xdb0c2e0d, 0x64f98fa7, 0x47b5481d, 0xbefa4fa4,\n]);\n\n/** Initial SHA512 state. Bits 0..64 of frac part of sqrt of primes 2..19 */\nexport const SHA512_IV: Uint32Array = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xf3bcc908, 0xbb67ae85, 0x84caa73b, 0x3c6ef372, 0xfe94f82b, 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1, 0x9b05688c, 0x2b3e6c1f, 0x1f83d9ab, 0xfb41bd6b, 0x5be0cd19, 0x137e2179,\n]);\n","/**\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);\n\nfunction fromBig(\n n: bigint,\n le = false\n): {\n h: number;\n l: number;\n} {\n if (le) 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}\n\nfunction split(lst: bigint[], le = false): Uint32Array[] {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n\nconst toBig = (h: number, l: number): bigint => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h: number, _l: number, s: number): number => h >>> s;\nconst shrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h: number, l: number, s: number): number => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h: number, l: number, s: number): number => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h: number, l: number, s: number): number => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h: number, l: number): number => l;\nconst rotr32L = (h: number, _l: number): number => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h: number, l: number, s: number): number => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h: number, l: number, s: number): number => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h: number, l: number, s: number): number => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h: number, l: number, s: number): number => (h << (s - 32)) | (l >>> (64 - s));\n\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(\n Ah: number,\n Al: number,\n Bh: number,\n Bl: number\n): {\n h: number;\n l: number;\n} {\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: number, Bl: number, Cl: number): number => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low: number, Ah: number, Bh: number, Ch: number): number =>\n (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al: number, Bl: number, Cl: number, Dl: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number): number =>\n (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al: number, Bl: number, Cl: number, Dl: number, El: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number): number =>\n (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n\n// prettier-ignore\nexport {\n add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig\n};\n// prettier-ignore\nconst u64: { fromBig: typeof fromBig; split: typeof split; toBig: (h: number, l: number) => bigint; shrSH: (h: number, _l: number, s: number) => number; shrSL: (h: number, l: number, s: number) => number; rotrSH: (h: number, l: number, s: number) => number; rotrSL: (h: number, l: number, s: number) => number; rotrBH: (h: number, l: number, s: number) => number; rotrBL: (h: number, l: number, s: number) => number; rotr32H: (_h: number, l: number) => number; rotr32L: (h: number, _l: number) => number; rotlSH: (h: number, l: number, s: number) => number; rotlSL: (h: number, l: number, s: number) => number; rotlBH: (h: number, l: number, s: number) => number; rotlBL: (h: number, l: number, s: number) => number; add: typeof add; add3L: (Al: number, Bl: number, Cl: number) => number; add3H: (low: number, Ah: number, Bh: number, Ch: number) => number; add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number; add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number; add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number; add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number; } = {\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","/**\n * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.\n * SHA256 is the fastest hash implementable in JS, even faster than Blake3.\n * Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and\n * [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).\n * @module\n */\nimport { Chi, HashMD, Maj, SHA224_IV, SHA256_IV, SHA384_IV, SHA512_IV } from './_md.ts';\nimport * as u64 from './_u64.ts';\nimport { type CHash, clean, createHasher, rotr } from './utils.ts';\n\n/**\n * Round constants:\n * First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)\n */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ Uint32Array.from([\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\n/** Reusable temporary buffer. \"W\" comes straight from spec. */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nexport class SHA256 extends HashMD<SHA256> {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n protected A: number = SHA256_IV[0] | 0;\n protected B: number = SHA256_IV[1] | 0;\n protected C: number = SHA256_IV[2] | 0;\n protected D: number = SHA256_IV[3] | 0;\n protected E: number = SHA256_IV[4] | 0;\n protected F: number = SHA256_IV[5] | 0;\n protected G: number = SHA256_IV[6] | 0;\n protected H: number = SHA256_IV[7] | 0;\n\n constructor(outputLen: number = 32) {\n super(64, outputLen, 8, false);\n }\n protected get(): [number, number, number, number, number, number, number, number] {\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 protected set(\n A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number\n ): void {\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 protected process(view: DataView, offset: number): void {\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) 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 protected roundClean(): void {\n clean(SHA256_W);\n }\n destroy(): void {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n}\n\nexport class SHA224 extends SHA256 {\n protected A: number = SHA224_IV[0] | 0;\n protected B: number = SHA224_IV[1] | 0;\n protected C: number = SHA224_IV[2] | 0;\n protected D: number = SHA224_IV[3] | 0;\n protected E: number = SHA224_IV[4] | 0;\n protected F: number = SHA224_IV[5] | 0;\n protected G: number = SHA224_IV[6] | 0;\n protected H: number = SHA224_IV[7] | 0;\n constructor() {\n super(28);\n }\n}\n\n// SHA2-512 is slower than sha256 in js because u64 operations are slow.\n\n// Round contants\n// First 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409\n// prettier-ignore\nconst K512 = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\nconst SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\nconst SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n\n// Reusable temporary buffers\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n\nexport class SHA512 extends HashMD<SHA512> {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n // h -- high 32 bits, l -- low 32 bits\n protected Ah: number = SHA512_IV[0] | 0;\n protected Al: number = SHA512_IV[1] | 0;\n protected Bh: number = SHA512_IV[2] | 0;\n protected Bl: number = SHA512_IV[3] | 0;\n protected Ch: number = SHA512_IV[4] | 0;\n protected Cl: number = SHA512_IV[5] | 0;\n protected Dh: number = SHA512_IV[6] | 0;\n protected Dl: number = SHA512_IV[7] | 0;\n protected Eh: number = SHA512_IV[8] | 0;\n protected El: number = SHA512_IV[9] | 0;\n protected Fh: number = SHA512_IV[10] | 0;\n protected Fl: number = SHA512_IV[11] | 0;\n protected Gh: number = SHA512_IV[12] | 0;\n protected Gl: number = SHA512_IV[13] | 0;\n protected Hh: number = SHA512_IV[14] | 0;\n protected Hl: number = SHA512_IV[15] | 0;\n\n constructor(outputLen: number = 64) {\n super(128, outputLen, 16, false);\n }\n // prettier-ignore\n protected get(): [\n number, number, number, number, number, number, number, number,\n number, number, number, number, number, number, number, number\n ] {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n protected set(\n Ah: number, Al: number, Bh: number, Bl: number, Ch: number, Cl: number, Dh: number, Dl: number,\n Eh: number, El: number, Fh: number, Fl: number, Gh: number, Gl: number, Hh: number, Hl: number\n ): void {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n protected process(view: DataView, offset: number): void {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n protected roundClean(): void {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy(): void {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\n\nexport class SHA384 extends SHA512 {\n protected Ah: number = SHA384_IV[0] | 0;\n protected Al: number = SHA384_IV[1] | 0;\n protected Bh: number = SHA384_IV[2] | 0;\n protected Bl: number = SHA384_IV[3] | 0;\n protected Ch: number = SHA384_IV[4] | 0;\n protected Cl: number = SHA384_IV[5] | 0;\n protected Dh: number = SHA384_IV[6] | 0;\n protected Dl: number = SHA384_IV[7] | 0;\n protected Eh: number = SHA384_IV[8] | 0;\n protected El: number = SHA384_IV[9] | 0;\n protected Fh: number = SHA384_IV[10] | 0;\n protected Fl: number = SHA384_IV[11] | 0;\n protected Gh: number = SHA384_IV[12] | 0;\n protected Gl: number = SHA384_IV[13] | 0;\n protected Hh: number = SHA384_IV[14] | 0;\n protected Hl: number = SHA384_IV[15] | 0;\n\n constructor() {\n super(48);\n }\n}\n\n/**\n * Truncated SHA512/256 and SHA512/224.\n * SHA512_IV is XORed with 0xa5a5a5a5a5a5a5a5, then used as \"intermediary\" IV of SHA512/t.\n * Then t hashes string to produce result IV.\n * See `test/misc/sha2-gen-iv.js`.\n */\n\n/** SHA512/224 IV */\nconst T224_IV = /* @__PURE__ */ Uint32Array.from([\n 0x8c3d37c8, 0x19544da2, 0x73e19966, 0x89dcd4d6, 0x1dfab7ae, 0x32ff9c82, 0x679dd514, 0x582f9fcf,\n 0x0f6d2b69, 0x7bd44da8, 0x77e36f73, 0x04c48942, 0x3f9d85a8, 0x6a1d36c8, 0x1112e6ad, 0x91d692a1,\n]);\n\n/** SHA512/256 IV */\nconst T256_IV = /* @__PURE__ */ Uint32Array.from([\n 0x22312194, 0xfc2bf72c, 0x9f555fa3, 0xc84c64c2, 0x2393b86b, 0x6f53b151, 0x96387719, 0x5940eabd,\n 0x96283ee2, 0xa88effe3, 0xbe5e1e25, 0x53863992, 0x2b0199fc, 0x2c85b8aa, 0x0eb72ddc, 0x81c52ca2,\n]);\n\nexport class SHA512_224 extends SHA512 {\n protected Ah: number = T224_IV[0] | 0;\n protected Al: number = T224_IV[1] | 0;\n protected Bh: number = T224_IV[2] | 0;\n protected Bl: number = T224_IV[3] | 0;\n protected Ch: number = T224_IV[4] | 0;\n protected Cl: number = T224_IV[5] | 0;\n protected Dh: number = T224_IV[6] | 0;\n protected Dl: number = T224_IV[7] | 0;\n protected Eh: number = T224_IV[8] | 0;\n protected El: number = T224_IV[9] | 0;\n protected Fh: number = T224_IV[10] | 0;\n protected Fl: number = T224_IV[11] | 0;\n protected Gh: number = T224_IV[12] | 0;\n protected Gl: number = T224_IV[13] | 0;\n protected Hh: number = T224_IV[14] | 0;\n protected Hl: number = T224_IV[15] | 0;\n\n constructor() {\n super(28);\n }\n}\n\nexport class SHA512_256 extends SHA512 {\n protected Ah: number = T256_IV[0] | 0;\n protected Al: number = T256_IV[1] | 0;\n protected Bh: number = T256_IV[2] | 0;\n protected Bl: number = T256_IV[3] | 0;\n protected Ch: number = T256_IV[4] | 0;\n protected Cl: number = T256_IV[5] | 0;\n protected Dh: number = T256_IV[6] | 0;\n protected Dl: number = T256_IV[7] | 0;\n protected Eh: number = T256_IV[8] | 0;\n protected El: number = T256_IV[9] | 0;\n protected Fh: number = T256_IV[10] | 0;\n protected Fl: number = T256_IV[11] | 0;\n protected Gh: number = T256_IV[12] | 0;\n protected Gl: number = T256_IV[13] | 0;\n protected Hh: number = T256_IV[14] | 0;\n protected Hl: number = T256_IV[15] | 0;\n\n constructor() {\n super(32);\n }\n}\n\n/**\n * SHA2-256 hash function from RFC 4634.\n *\n * It is the fastest JS hash, even faster than Blake3.\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 */\nexport const sha256: CHash = /* @__PURE__ */ createHasher(() => new SHA256());\n/** SHA2-224 hash function from RFC 4634 */\nexport const sha224: CHash = /* @__PURE__ */ createHasher(() => new SHA224());\n\n/** SHA2-512 hash function from RFC 4634. */\nexport const sha512: CHash = /* @__PURE__ */ createHasher(() => new SHA512());\n/** SHA2-384 hash function from RFC 4634. */\nexport const sha384: CHash = /* @__PURE__ */ createHasher(() => new SHA384());\n\n/**\n * SHA2-512/256 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).\n */\nexport const sha512_256: CHash = /* @__PURE__ */ createHasher(() => new SHA512_256());\n/**\n * SHA2-512/224 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).\n */\nexport const sha512_224: CHash = /* @__PURE__ */ createHasher(() => new SHA512_224());\n","import { BaseError } from './base.js'\n\nexport type InvalidAddressErrorType = InvalidAddressError & {\n name: 'InvalidAddressError'\n}\nexport class InvalidAddressError extends BaseError {\n constructor({ address }: { address: string }) {\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","import type { Chain } from '../types/chain.js'\n\nimport { BaseError } from './base.js'\n\nexport type ChainDoesNotSupportContractErrorType =\n ChainDoesNotSupportContract & {\n name: 'ChainDoesNotSupportContract'\n }\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({\n blockNumber,\n chain,\n contract,\n }: {\n blockNumber?: bigint | undefined\n chain: Chain\n contract: { name: string; blockCreated?: number | undefined }\n }) {\n super(\n `Chain \"${chain.name}\" does not support contract \"${contract.name}\".`,\n {\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 }\n}\n\nexport type ChainMismatchErrorType = ChainMismatchError & {\n name: 'ChainMismatchError'\n}\nexport class ChainMismatchError extends BaseError {\n constructor({\n chain,\n currentChainId,\n }: {\n chain: Chain\n currentChainId: number\n }) {\n super(\n `The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`,\n {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n name: 'ChainMismatchError',\n },\n )\n }\n}\n\nexport type ChainNotFoundErrorType = ChainNotFoundError & {\n name: 'ChainNotFoundError'\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super(\n [\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 {\n name: 'ChainNotFoundError',\n },\n )\n }\n}\n\nexport type ClientChainNotConfiguredErrorType =\n ClientChainNotConfiguredError & {\n name: 'ClientChainNotConfiguredError'\n }\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.', {\n name: 'ClientChainNotConfiguredError',\n })\n }\n}\n\nexport type InvalidChainIdErrorType = InvalidChainIdError & {\n name: 'InvalidChainIdError'\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }: { chainId?: number | undefined }) {\n super(\n typeof chainId === 'number'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.',\n { name: 'InvalidChainIdError' },\n )\n }\n}\n","import { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { BaseError } from './base.js'\n\n/**\n * geth: https://github.com/ethereum/go-ethereum/blob/master/core/error.go\n * https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction.go#L34-L41\n *\n * erigon: https://github.com/ledgerwatch/erigon/blob/master/core/error.go\n * https://github.com/ledgerwatch/erigon/blob/master/core/types/transaction.go#L41-L46\n *\n * anvil: https://github.com/foundry-rs/foundry/blob/master/anvil/src/eth/error.rs#L108\n */\nexport type ExecutionRevertedErrorType = ExecutionRevertedError & {\n code: 3\n name: 'ExecutionRevertedError'\n}\nexport class ExecutionRevertedError extends BaseError {\n static code = 3\n static nodeMessage = /execution reverted/\n\n constructor({\n cause,\n message,\n }: { cause?: BaseError | undefined; message?: string | undefined } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '')\n super(\n `Execution reverted ${\n reason ? `with reason: ${reason}` : 'for an unknown reason'\n }.`,\n {\n cause,\n name: 'ExecutionRevertedError',\n },\n )\n }\n}\n\nexport type FeeCapTooHighErrorType = FeeCapTooHighError & {\n name: 'FeeCapTooHighError'\n}\nexport class FeeCapTooHighError extends BaseError {\n static nodeMessage =\n /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n constructor({\n cause,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n `The fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''\n }) cannot be higher than the maximum allowed value (2^256-1).`,\n {\n cause,\n name: 'FeeCapTooHighError',\n },\n )\n }\n}\n\nexport type FeeCapTooLowErrorType = FeeCapTooLowError & {\n name: 'FeeCapTooLowError'\n}\nexport class FeeCapTooLowError extends BaseError {\n static nodeMessage =\n /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n constructor({\n cause,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n `The fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''\n } gwei) cannot be lower than the block base fee.`,\n {\n cause,\n name: 'FeeCapTooLowError',\n },\n )\n }\n}\n\nexport type NonceTooHighErrorType = NonceTooHighError & {\n name: 'NonceTooHighError'\n}\nexport class NonceTooHighError extends BaseError {\n static nodeMessage = /nonce too high/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }is higher than the next one expected.`,\n { cause, name: 'NonceTooHighError' },\n )\n }\n}\n\nexport type NonceTooLowErrorType = NonceTooLowError & {\n name: 'NonceTooLowError'\n}\nexport class NonceTooLowError extends BaseError {\n static nodeMessage =\n /nonce too low|transaction already imported|already known/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n [\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'),\n { cause, name: 'NonceTooLowError' },\n )\n }\n}\n\nexport type NonceMaxValueErrorType = NonceMaxValueError & {\n name: 'NonceMaxValueError'\n}\nexport class NonceMaxValueError extends BaseError {\n static nodeMessage = /nonce has max value/\n constructor({\n cause,\n nonce,\n }: { cause?: BaseError | undefined; nonce?: number | undefined } = {}) {\n super(\n `Nonce provided for the transaction ${\n nonce ? `(${nonce}) ` : ''\n }exceeds the maximum allowed nonce.`,\n { cause, name: 'NonceMaxValueError' },\n )\n }\n}\n\nexport type InsufficientFundsErrorType = InsufficientFundsError & {\n name: 'InsufficientFundsError'\n}\nexport class InsufficientFundsError extends BaseError {\n static nodeMessage =\n /insufficient funds|exceeds transaction sender account balance/\n constructor({ cause }: { cause?: BaseError | undefined } = {}) {\n super(\n [\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'),\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 }\n}\n\nexport type IntrinsicGasTooHighErrorType = IntrinsicGasTooHighError & {\n name: 'IntrinsicGasTooHighError'\n}\nexport class IntrinsicGasTooHighError extends BaseError {\n static nodeMessage = /intrinsic gas too high|gas limit reached/\n constructor({\n cause,\n gas,\n }: { cause?: BaseError | undefined; gas?: bigint | undefined } = {}) {\n super(\n `The amount of gas ${\n gas ? `(${gas}) ` : ''\n }provided for the transaction exceeds the limit allowed for the block.`,\n {\n cause,\n name: 'IntrinsicGasTooHighError',\n },\n )\n }\n}\n\nexport type IntrinsicGasTooLowErrorType = IntrinsicGasTooLowError & {\n name: 'IntrinsicGasTooLowError'\n}\nexport class IntrinsicGasTooLowError extends BaseError {\n static nodeMessage = /intrinsic gas too low/\n constructor({\n cause,\n gas,\n }: { cause?: BaseError | undefined; gas?: bigint | undefined } = {}) {\n super(\n `The amount of gas ${\n gas ? `(${gas}) ` : ''\n }provided for the transaction is too low.`,\n {\n cause,\n name: 'IntrinsicGasTooLowError',\n },\n )\n }\n}\n\nexport type TransactionTypeNotSupportedErrorType =\n TransactionTypeNotSupportedError & {\n name: 'TransactionTypeNotSupportedError'\n }\nexport class TransactionTypeNotSupportedError extends BaseError {\n static nodeMessage = /transaction type not valid/\n constructor({ cause }: { cause?: BaseError | undefined }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n name: 'TransactionTypeNotSupportedError',\n })\n }\n}\n\nexport type TipAboveFeeCapErrorType = TipAboveFeeCapError & {\n name: 'TipAboveFeeCapError'\n}\nexport class TipAboveFeeCapError extends BaseError {\n static nodeMessage =\n /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n constructor({\n cause,\n maxPriorityFeePerGas,\n maxFeePerGas,\n }: {\n cause?: BaseError | undefined\n maxPriorityFeePerGas?: bigint | undefined\n maxFeePerGas?: bigint | undefined\n } = {}) {\n super(\n [\n `The provided tip (\\`maxPriorityFeePerGas\\`${\n maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''\n }) cannot be higher than the fee cap (\\`maxFeePerGas\\`${\n maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''\n }).`,\n ].join('\\n'),\n {\n cause,\n name: 'TipAboveFeeCapError',\n },\n )\n }\n}\n\nexport type UnknownNodeErrorType = UnknownNodeError & {\n name: 'UnknownNodeError'\n}\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }: { cause?: BaseError | undefined }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: 'UnknownNodeError',\n })\n }\n}\n","/**\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<value = unknown> extends Map<string, value> {\n maxSize: number\n\n constructor(size: number) {\n super()\n this.maxSize = size\n }\n\n override get(key: string) {\n const value = super.get(key)\n\n if (super.has(key) && value !== undefined) {\n this.delete(key)\n super.set(key, value)\n }\n\n return value\n }\n\n override set(key: string, value: value) {\n super.set(key, value)\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value\n if (firstKey) this.delete(firstKey)\n }\n return this\n }\n}\n","/**\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 { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.ts';\n// prettier-ignore\nimport {\n abytes, aexists, anumber, aoutput,\n clean, createHasher, createXOFer, Hash,\n swap32IfBE,\n toBytes, u32,\n type CHash, type CHashXO, type HashXOF, type Input\n} from './utils.ts';\n\n// No __PURE__ annotations in sha3 header:\n// EVERYTHING is in fact used on every export.\n// Various per round constants calculations\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nconst SHA3_PI: number[] = [];\nconst SHA3_ROTL: number[] = [];\nconst _SHA3_IOTA: bigint[] = [];\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) t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst IOTAS = split(_SHA3_IOTA, true);\nconst SHA3_IOTA_H = IOTAS[0];\nconst SHA3_IOTA_L = IOTAS[1];\n\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h: number, l: number, s: number) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h: number, l: number, s: number) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n\n/** `keccakf1600` internal function, additionally allows to adjust round count. */\nexport function keccakP(s: Uint32Array, rounds: number = 24): void {\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++) 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++) B[x] = s[y + x];\n for (let x = 0; x < 10; x++) 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 clean(B);\n}\n\n/** Keccak sponge function. */\nexport class Keccak extends Hash<Keccak> implements HashXOF<Keccak> {\n protected state: Uint8Array;\n protected pos = 0;\n protected posOut = 0;\n protected finished = false;\n protected state32: Uint32Array;\n protected destroyed = false;\n\n public blockLen: number;\n public suffix: number;\n public outputLen: number;\n protected enableXOF = false;\n protected rounds: number;\n\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(\n blockLen: number,\n suffix: number,\n outputLen: number,\n enableXOF = false,\n rounds: number = 24\n ) {\n super();\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 < blockLen && blockLen < 200))\n throw new Error('only keccak-f1600 function is supported');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone(): Keccak {\n return this._cloneInto();\n }\n protected keccak(): void {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data: Input): this {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\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++) state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen) this.keccak();\n }\n return this;\n }\n protected finish(): void {\n if (this.finished) 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) this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n protected writeInto(out: Uint8Array): Uint8Array {\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) 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: Uint8Array): Uint8Array {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF) throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes: number): Uint8Array {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out: Uint8Array): Uint8Array {\n aoutput(out, this);\n if (this.finished) throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest(): Uint8Array {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy(): void {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to?: Keccak): Keccak {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n 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}\n\nconst gen = (suffix: number, blockLen: number, outputLen: number) =>\n createHasher(() => new Keccak(blockLen, suffix, outputLen));\n\n/** SHA3-224 hash function. */\nexport const sha3_224: CHash = /* @__PURE__ */ (() => gen(0x06, 144, 224 / 8))();\n/** SHA3-256 hash function. Different from keccak-256. */\nexport const sha3_256: CHash = /* @__PURE__ */ (() => gen(0x06, 136, 256 / 8))();\n/** SHA3-384 hash function. */\nexport const sha3_384: CHash = /* @__PURE__ */ (() => gen(0x06, 104, 384 / 8))();\n/** SHA3-512 hash function. */\nexport const sha3_512: CHash = /* @__PURE__ */ (() => gen(0x06, 72, 512 / 8))();\n\n/** keccak-224 hash function. */\nexport const keccak_224: CHash = /* @__PURE__ */ (() => gen(0x01, 144, 224 / 8))();\n/** keccak-256 hash function. Different from SHA3-256. */\nexport const keccak_256: CHash = /* @__PURE__ */ (() => gen(0x01, 136, 256 / 8))();\n/** keccak-384 hash function. */\nexport const keccak_384: CHash = /* @__PURE__ */ (() => gen(0x01, 104, 384 / 8))();\n/** keccak-512 hash function. */\nexport const keccak_512: CHash = /* @__PURE__ */ (() => gen(0x01, 72, 512 / 8))();\n\nexport type ShakeOpts = { dkLen?: number };\n\nconst genShake = (suffix: number, blockLen: number, outputLen: number) =>\n createXOFer<HashXOF<Keccak>, ShakeOpts>(\n (opts: ShakeOpts = {}) =>\n new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true)\n );\n\n/** SHAKE128 XOF with 128-bit security. */\nexport const shake128: CHashXO = /* @__PURE__ */ (() => genShake(0x1f, 168, 128 / 8))();\n/** SHAKE256 XOF with 256-bit security. */\nexport const shake256: CHashXO = /* @__PURE__ */ (() => genShake(0x1f, 136, 256 / 8))();\n","import { keccak_256 } from '@noble/hashes/sha3'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'\nimport { type ToHexErrorType, toHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type Keccak256Hash<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type Keccak256ErrorType =\n | IsHexErrorType\n | ToBytesErrorType\n | ToHexErrorType\n | ErrorType\n\nexport function keccak256<to extends To = 'hex'>(\n value: Hex | ByteArray,\n to_?: to | undefined,\n): Keccak256Hash<to> {\n const to = to_ || 'hex'\n const bytes = keccak_256(\n isHex(value, { strict: false }) ? toBytes(value) : value,\n )\n if (to === 'bytes') return bytes as Keccak256Hash<to>\n return toHex(bytes) as Keccak256Hash<to>\n}\n","import type { Address } from 'abitype'\n\nimport { InvalidAddressError } from '../../errors/address.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport {\n type StringToBytesErrorType,\n stringToBytes,\n} from '../encoding/toBytes.js'\nimport { type Keccak256ErrorType, keccak256 } from '../hash/keccak256.js'\nimport { LruMap } from '../lru.js'\nimport { type IsAddressErrorType, isAddress } from './isAddress.js'\n\nconst checksumAddressCache = /*#__PURE__*/ new LruMap<Address>(8192)\n\nexport type ChecksumAddressErrorType =\n | Keccak256ErrorType\n | StringToBytesErrorType\n | ErrorType\n\nexport function checksumAddress(\n address_: 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 */\n chainId?: number | undefined,\n): Address {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`)!\n\n const hexAddress = chainId\n ? `${chainId}${address_.toLowerCase()}`\n : address_.substring(2).toLowerCase()\n const hash = keccak256(stringToBytes(hexAddress), 'bytes')\n\n const address = (\n chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress\n ).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\n const result = `0x${address.join('')}` as const\n checksumAddressCache.set(`${address_}.${chainId}`, result)\n return result\n}\n\nexport type GetAddressErrorType =\n | ChecksumAddressErrorType\n | IsAddressErrorType\n | ErrorType\n\nexport function getAddress(\n address: string,\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 */\n chainId?: number,\n): Address {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address })\n return checksumAddress(address, chainId)\n}\n","import type { Address } from 'abitype'\nimport type { ErrorType } from '../../errors/utils.js'\nimport { LruMap } from '../lru.js'\nimport { checksumAddress } from './getAddress.js'\n\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/\n\n/** @internal */\nexport const isAddressCache = /*#__PURE__*/ new LruMap<boolean>(8192)\n\nexport type IsAddressOptions = {\n /**\n * Enables strict mode. Whether or not to compare the address against its checksum.\n *\n * @default true\n */\n strict?: boolean | undefined\n}\n\nexport type IsAddressErrorType = ErrorType\n\nexport function isAddress(\n address: string,\n options?: IsAddressOptions | undefined,\n): address is Address {\n const { strict = true } = options ?? {}\n const cacheKey = `${address}.${strict}`\n\n if (isAddressCache.has(cacheKey)) return isAddressCache.get(cacheKey)!\n\n const result = (() => {\n if (!addressRegex.test(address)) return false\n if (address.toLowerCase() === address) return true\n if (strict) return checksumAddress(address as Address) === address\n return true\n })()\n isAddressCache.set(cacheKey, result)\n return result\n}\n","import {\n SliceOffsetOutOfBoundsError,\n type SliceOffsetOutOfBoundsErrorType,\n} from '../../errors/data.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\n\nimport { type IsHexErrorType, isHex } from './isHex.js'\nimport { type SizeErrorType, size } from './size.js'\n\nexport type SliceReturnType<value extends ByteArray | Hex> = value extends Hex\n ? Hex\n : ByteArray\n\nexport type SliceErrorType =\n | IsHexErrorType\n | SliceBytesErrorType\n | SliceHexErrorType\n | ErrorType\n\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 extends ByteArray | Hex>(\n value: value,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): SliceReturnType<value> {\n if (isHex(value, { strict: false }))\n return sliceHex(value as Hex, start, end, {\n strict,\n }) as SliceReturnType<value>\n return sliceBytes(value as ByteArray, start, end, {\n strict,\n }) as SliceReturnType<value>\n}\n\nexport type AssertStartOffsetErrorType =\n | SliceOffsetOutOfBoundsErrorType\n | SizeErrorType\n | ErrorType\n\nfunction assertStartOffset(value: Hex | ByteArray, start?: number | undefined) {\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}\n\nexport type AssertEndOffsetErrorType =\n | SliceOffsetOutOfBoundsErrorType\n | SizeErrorType\n | ErrorType\n\nfunction assertEndOffset(\n value: Hex | ByteArray,\n start?: number | undefined,\n end?: number | undefined,\n) {\n if (\n typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start\n ) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n })\n }\n}\n\nexport type SliceBytesErrorType =\n | AssertStartOffsetErrorType\n | AssertEndOffsetErrorType\n | ErrorType\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(\n value_: ByteArray,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): ByteArray {\n assertStartOffset(value_, start)\n const value = value_.slice(start, end)\n if (strict) assertEndOffset(value, start, end)\n return value\n}\n\nexport type SliceHexErrorType =\n | AssertStartOffsetErrorType\n | AssertEndOffsetErrorType\n | ErrorType\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(\n value_: Hex,\n start?: number | undefined,\n end?: number | undefined,\n { strict }: { strict?: boolean | undefined } = {},\n): Hex {\n assertStartOffset(value_, start)\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}` as const\n if (strict) assertEndOffset(value, start, end)\n return value\n}\n","import type { Address } from 'abitype'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Account } from '../types.js'\n\nexport type ParseAccountErrorType = ErrorType\n\nexport function parseAccount<accountOrAddress extends Address | Account>(\n account: accountOrAddress,\n): accountOrAddress extends Address ? Account : accountOrAddress {\n if (typeof account === 'string')\n return { address: account, type: 'json-rpc' } as any\n return account as any\n}\n","import type { StateMapping, StateOverride } from '../types/stateOverride.js'\nimport { BaseError } from './base.js'\n\nexport type AccountStateConflictErrorType = AccountStateConflictError & {\n name: 'AccountStateConflictError'\n}\n\nexport class AccountStateConflictError extends BaseError {\n constructor({ address }: { address: string }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: 'AccountStateConflictError',\n })\n }\n}\n\nexport type StateAssignmentConflictErrorType = StateAssignmentConflictError & {\n name: 'StateAssignmentConflictError'\n}\n\nexport class StateAssignmentConflictError extends BaseError {\n constructor() {\n super('state and stateDiff are set on the same account.', {\n name: 'StateAssignmentConflictError',\n })\n }\n}\n\n/** @internal */\nexport function prettyStateMapping(stateMapping: StateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\\n`\n }, '')\n}\n\nexport function prettyStateOverride(stateOverride: StateOverride) {\n return stateOverride\n .reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\\n`\n if (state.nonce) val += ` nonce: ${state.nonce}\\n`\n if (state.balance) val += ` balance: ${state.balance}\\n`\n if (state.code) val += ` code: ${state.code}\\n`\n if (state.state) {\n val += ' state:\\n'\n val += prettyStateMapping(state.state)\n }\n if (state.stateDiff) {\n val += ' stateDiff:\\n'\n val += prettyStateMapping(state.stateDiff)\n }\n return val\n }, ' State Override:\\n')\n .slice(0, -1)\n}\n","import type { Abi, Address } from 'abitype'\n\nimport { parseAccount } from '../accounts/utils/parseAccount.js'\nimport type { CallParameters } from '../actions/public/call.js'\nimport { panicReasons } from '../constants/solidity.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Hex } from '../types/misc.js'\nimport {\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n} from '../utils/abi/decodeErrorResult.js'\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js'\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js'\nimport { getAbiItem } from '../utils/abi/getAbiItem.js'\nimport { formatEther } from '../utils/unit/formatEther.js'\nimport { formatGwei } from '../utils/unit/formatGwei.js'\n\nimport { AbiErrorSignatureNotFoundError } from './abi.js'\nimport { BaseError } from './base.js'\nimport { prettyStateOverride } from './stateOverride.js'\nimport { prettyPrint } from './transaction.js'\nimport { getContractAddress } from './utils.js'\n\nexport type CallExecutionErrorType = CallExecutionError & {\n name: 'CallExecutionError'\n}\nexport class CallExecutionError extends BaseError {\n override cause: BaseError\n\n constructor(\n cause: BaseError,\n {\n account: account_,\n docsPath,\n chain,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n stateOverride,\n }: CallParameters & {\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n ) {\n const account = account_ ? parseAccount(account_) : undefined\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value:\n typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice:\n typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas:\n typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas:\n typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n })\n\n if (stateOverride) {\n prettyArgs += `\\n${prettyStateOverride(stateOverride)}`\n }\n\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'CallExecutionError',\n })\n this.cause = cause\n }\n}\n\nexport type ContractFunctionExecutionErrorType =\n ContractFunctionExecutionError & {\n name: 'ContractFunctionExecutionError'\n }\nexport class ContractFunctionExecutionError extends BaseError {\n abi: Abi\n args?: unknown[] | undefined\n override cause: BaseError\n contractAddress?: Address | undefined\n formattedArgs?: string | undefined\n functionName: string\n sender?: Address | undefined\n\n constructor(\n cause: BaseError,\n {\n abi,\n args,\n contractAddress,\n docsPath,\n functionName,\n sender,\n }: {\n abi: Abi\n args?: any | undefined\n contractAddress?: Address | undefined\n docsPath?: string | undefined\n functionName: string\n sender?: Address | undefined\n },\n ) {\n const abiItem = getAbiItem({ abi, args, name: functionName })\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined\n\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args:\n formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n })\n\n super(\n cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`,\n {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n prettyArgs && 'Contract Call:',\n prettyArgs,\n ].filter(Boolean) as string[],\n name: 'ContractFunctionExecutionError',\n },\n )\n this.abi = abi\n this.args = args\n this.cause = cause\n this.contractAddress = contractAddress\n this.functionName = functionName\n this.sender = sender\n }\n}\n\nexport type ContractFunctionRevertedErrorType =\n ContractFunctionRevertedError & {\n name: 'ContractFunctionRevertedError'\n }\nexport class ContractFunctionRevertedError extends BaseError {\n data?: DecodeErrorResultReturnType | undefined\n raw?: Hex | undefined\n reason?: string | undefined\n signature?: Hex | undefined\n\n constructor({\n abi,\n data,\n functionName,\n message,\n }: {\n abi: Abi\n data?: Hex | undefined\n functionName: string\n message?: string | undefined\n }) {\n let cause: Error | undefined\n let decodedData: DecodeErrorResultReturnType | undefined\n let metaMessages: string[] | undefined\n let reason: string | undefined\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data })\n const { abiItem, errorName, args: errorArgs } = decodedData\n if (errorName === 'Error') {\n reason = (errorArgs as [string])[0]\n } else if (errorName === 'Panic') {\n const [firstArg] = errorArgs as [number]\n reason = panicReasons[firstArg as keyof typeof panicReasons]\n } else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined\n const formattedArgs =\n abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined\n\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ]\n }\n } catch (err) {\n cause = err as Error\n }\n } else if (message) reason = message\n\n let signature: Hex | undefined\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ]\n }\n\n super(\n (reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${\n signature ? 'signature' : 'reason'\n }:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`,\n {\n cause,\n metaMessages,\n name: 'ContractFunctionRevertedError',\n },\n )\n\n this.data = decodedData\n this.raw = data\n this.reason = reason\n this.signature = signature\n }\n}\n\nexport type ContractFunctionZeroDataErrorType =\n ContractFunctionZeroDataError & {\n name: 'ContractFunctionZeroDataError'\n }\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName }: { functionName: string }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n name: 'ContractFunctionZeroDataError',\n })\n }\n}\n\nexport type CounterfactualDeploymentFailedErrorType =\n CounterfactualDeploymentFailedError & {\n name: 'CounterfactualDeploymentFailedError'\n }\nexport class CounterfactualDeploymentFailedError extends BaseError {\n constructor({ factory }: { factory?: Address | undefined }) {\n super(\n `Deployment for counterfactual contract call failed${\n factory ? ` for factory \"${factory}\".` : ''\n }`,\n {\n metaMessages: [\n 'Please ensure:',\n '- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).',\n '- The `factoryData` is a valid encoded function call for contract deployment function on the factory.',\n ],\n name: 'CounterfactualDeploymentFailedError',\n },\n )\n }\n}\n\nexport type RawContractErrorType = RawContractError & {\n name: 'RawContractError'\n}\nexport class RawContractError extends BaseError {\n code = 3\n\n data?: Hex | { data?: Hex | undefined } | undefined\n\n constructor({\n data,\n message,\n }: {\n data?: Hex | { data?: Hex | undefined } | undefined\n message?: string | undefined\n }) {\n super(message || '', { name: 'RawContractError' })\n this.data = data\n }\n}\n","import type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'\nimport { BaseError } from '../../errors/base.js'\nimport {\n ExecutionRevertedError,\n type ExecutionRevertedErrorType,\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n FeeCapTooLowError,\n type FeeCapTooLowErrorType,\n InsufficientFundsError,\n type InsufficientFundsErrorType,\n IntrinsicGasTooHighError,\n type IntrinsicGasTooHighErrorType,\n IntrinsicGasTooLowError,\n type IntrinsicGasTooLowErrorType,\n NonceMaxValueError,\n type NonceMaxValueErrorType,\n NonceTooHighError,\n type NonceTooHighErrorType,\n NonceTooLowError,\n type NonceTooLowErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n TransactionTypeNotSupportedError,\n type TransactionTypeNotSupportedErrorType,\n UnknownNodeError,\n type UnknownNodeErrorType,\n} from '../../errors/node.js'\nimport { RpcRequestError } from '../../errors/request.js'\nimport {\n InvalidInputRpcError,\n TransactionRejectedRpcError,\n} from '../../errors/rpc.js'\nimport type { ExactPartial } from '../../types/utils.js'\n\nexport function containsNodeError(err: BaseError) {\n return (\n err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code)\n )\n}\n\nexport type GetNodeErrorParameters = ExactPartial<\n SendTransactionParameters<any>\n>\n\nexport type GetNodeErrorReturnType =\n | ExecutionRevertedErrorType\n | FeeCapTooHighErrorType\n | FeeCapTooLowErrorType\n | NonceTooHighErrorType\n | NonceTooLowErrorType\n | NonceMaxValueErrorType\n | InsufficientFundsErrorType\n | IntrinsicGasTooHighErrorType\n | IntrinsicGasTooLowErrorType\n | TransactionTypeNotSupportedErrorType\n | TipAboveFeeCapErrorType\n | UnknownNodeErrorType\n\nexport function getNodeError(\n err: BaseError,\n args: GetNodeErrorParameters,\n): GetNodeErrorReturnType {\n const message = (err.details || '').toLowerCase()\n\n const executionRevertedError =\n err instanceof BaseError\n ? err.walk(\n (e) =>\n (e as { code: number } | null | undefined)?.code ===\n ExecutionRevertedError.code,\n )\n : err\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n }) as any\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n }) as any\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n }) as any\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n }) as any\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce }) as any\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce }) as any\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce }) as any\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err }) as any\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas }) as any\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas }) as any\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err }) as any\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n }) as any\n return new UnknownNodeError({\n cause: err,\n }) as any\n}\n","import type { CallParameters } from '../../actions/public/call.js'\nimport type { BaseError } from '../../errors/base.js'\nimport {\n CallExecutionError,\n type CallExecutionErrorType,\n} from '../../errors/contract.js'\nimport { UnknownNodeError } from '../../errors/node.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Chain } from '../../types/chain.js'\n\nimport {\n type GetNodeErrorParameters,\n type GetNodeErrorReturnType,\n getNodeError,\n} from './getNodeError.js'\n\nexport type GetCallErrorReturnType<cause = ErrorType> = Omit<\n CallExecutionErrorType,\n 'cause'\n> & {\n cause: cause | GetNodeErrorReturnType\n}\n\nexport function getCallError<err extends ErrorType<string>>(\n err: err,\n {\n docsPath,\n ...args\n }: CallParameters & {\n chain?: Chain | undefined\n docsPath?: string | undefined\n },\n): GetCallErrorReturnType<err> {\n const cause = (() => {\n const cause = getNodeError(\n err as {} as BaseError,\n args as GetNodeErrorParameters,\n )\n if (cause instanceof UnknownNodeError) return err as {} as BaseError\n return cause\n })()\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n }) as GetCallErrorReturnType<err>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ChainFormatter } from '../../types/chain.js'\n\nexport type ExtractErrorType = ErrorType\n\n/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(\n value_: Record<string, unknown>,\n { format }: { format?: ChainFormatter['format'] | undefined },\n) {\n if (!format) return {}\n\n const value: Record<string, unknown> = {}\n function extract_(formatted: Record<string, any>) {\n const keys = Object.keys(formatted)\n for (const key of keys) {\n if (key in value_) value[key] = value_[key]\n if (\n formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key])\n )\n extract_(formatted[key])\n }\n }\n\n const formatted = format(value_ || {})\n extract_(formatted)\n\n return value\n}\n","import {\n type ParseAccountErrorType,\n parseAccount,\n} from '../../accounts/utils/parseAccount.js'\nimport type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'\nimport { maxUint256 } from '../../constants/number.js'\nimport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport {\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n} from '../../errors/node.js'\nimport {\n FeeConflictError,\n type FeeConflictErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Chain } from '../../types/chain.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { isAddress } from '../address/isAddress.js'\n\nexport type AssertRequestParameters = ExactPartial<\n SendTransactionParameters<Chain>\n>\n\nexport type AssertRequestErrorType =\n | InvalidAddressErrorType\n | FeeConflictErrorType\n | FeeCapTooHighErrorType\n | ParseAccountErrorType\n | TipAboveFeeCapErrorType\n | ErrorType\n\nexport function assertRequest(args: AssertRequestParameters) {\n const {\n account: account_,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n } = args\n const account = account_ ? parseAccount(account_) : undefined\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (\n typeof gasPrice !== 'undefined' &&\n (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined')\n )\n throw new FeeConflictError()\n\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas })\n if (\n maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas\n )\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas })\n}\n","import type { Chain, ChainFormatters } from '../../types/chain.js'\nimport type { Assign, Prettify } from '../../types/utils.js'\n\nexport function defineChain<\n formatters extends ChainFormatters,\n const chain extends Chain<formatters>,\n>(chain: chain): Prettify<Assign<Chain<undefined>, chain>> {\n return {\n formatters: undefined,\n fees: undefined,\n serializers: undefined,\n ...chain,\n } as Assign<Chain<undefined>, chain>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Block, BlockTag } from '../../types/block.js'\nimport type {\n Chain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { Hash } from '../../types/misc.js'\nimport type { RpcBlock } from '../../types/rpc.js'\nimport type { ExactPartial, Prettify } from '../../types/utils.js'\n\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\nimport { type FormattedTransaction, formatTransaction } from './transaction.js'\n\ntype BlockPendingDependencies = 'hash' | 'logsBloom' | 'nonce' | 'number'\n\nexport type FormattedBlock<\n chain extends Chain | undefined = undefined,\n includeTransactions extends boolean = boolean,\n blockTag extends BlockTag = BlockTag,\n _FormatterReturnType = ExtractChainFormatterReturnType<\n chain,\n 'block',\n Block<bigint, includeTransactions>\n >,\n _ExcludedPendingDependencies extends string = BlockPendingDependencies &\n ExtractChainFormatterExclude<chain, 'block'>,\n _Formatted = Omit<_FormatterReturnType, BlockPendingDependencies> & {\n [_key in _ExcludedPendingDependencies]: never\n } & Pick<\n Block<bigint, includeTransactions, blockTag>,\n BlockPendingDependencies\n >,\n _Transactions = includeTransactions extends true\n ? Prettify<FormattedTransaction<chain, blockTag>>[]\n : Hash[],\n> = Omit<_Formatted, 'transactions'> & {\n transactions: _Transactions\n}\n\nexport type FormatBlockErrorType = ErrorType\n\nexport function formatBlock(\n block: ExactPartial<RpcBlock>,\n _?: string | undefined,\n) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === 'string') 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 } as Block\n}\n\nexport type DefineBlockErrorType = DefineFormatterErrorType | ErrorType\n\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock)\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { SignedAuthorizationList } from '../../types/authorization.js'\nimport type { BlockTag } from '../../types/block.js'\nimport type {\n Chain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { Hex } from '../../types/misc.js'\nimport type { RpcAuthorizationList, RpcTransaction } from '../../types/rpc.js'\nimport type { Transaction, TransactionType } from '../../types/transaction.js'\nimport type { ExactPartial, UnionLooseOmit } from '../../types/utils.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\n\ntype TransactionPendingDependencies =\n | 'blockHash'\n | 'blockNumber'\n | 'transactionIndex'\n\nexport type FormattedTransaction<\n chain extends Chain | undefined = undefined,\n blockTag extends BlockTag = BlockTag,\n _FormatterReturnType = ExtractChainFormatterReturnType<\n chain,\n 'transaction',\n Transaction\n >,\n _ExcludedPendingDependencies extends string = TransactionPendingDependencies &\n ExtractChainFormatterExclude<chain, 'transaction'>,\n> = UnionLooseOmit<_FormatterReturnType, TransactionPendingDependencies> & {\n [_K in _ExcludedPendingDependencies]: never\n} & Pick<\n Transaction<bigint, number, blockTag extends 'pending' ? true : false>,\n TransactionPendingDependencies\n >\n\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n} as const satisfies Record<Hex, TransactionType>\n\nexport type FormatTransactionErrorType = ErrorType\n\nexport function formatTransaction(\n transaction: ExactPartial<RpcTransaction>,\n _?: string | undefined,\n) {\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 as any)[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 } as Transaction\n\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(\n transaction.authorizationList,\n )\n\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity) return Number(transaction.yParity)\n\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n) return 0\n if (transaction_.v === 1n || transaction_.v === 28n) return 1\n if (transaction_.v >= 35n) return transaction_.v % 2n === 0n ? 1 : 0\n }\n\n return undefined\n })()\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}\n\nexport type DefineTransactionErrorType = DefineFormatterErrorType | ErrorType\n\nexport const defineTransaction = /*#__PURE__*/ defineFormatter(\n 'transaction',\n formatTransaction,\n)\n\n//////////////////////////////////////////////////////////////////////////////\n\nfunction formatAuthorizationList(\n authorizationList: RpcAuthorizationList,\n): SignedAuthorizationList {\n return authorizationList.map((authorization) => ({\n address: (authorization as any).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 })) as SignedAuthorizationList\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Log } from '../../types/log.js'\nimport type { RpcLog } from '../../types/rpc.js'\nimport type { ExactPartial } from '../../types/utils.js'\n\nexport type FormatLogErrorType = ErrorType\n\nexport function formatLog(\n log: ExactPartial<RpcLog>,\n {\n args,\n eventName,\n }: { args?: unknown | undefined; eventName?: string | undefined } = {},\n) {\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 } as Log\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type {\n Chain,\n ExtractChainFormatterReturnType,\n} from '../../types/chain.js'\nimport type { RpcTransactionReceipt } from '../../types/rpc.js'\nimport type { TransactionReceipt } from '../../types/transaction.js'\nimport type { ExactPartial } from '../../types/utils.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\n\nimport { type DefineFormatterErrorType, defineFormatter } from './formatter.js'\nimport { formatLog } from './log.js'\nimport { transactionType } from './transaction.js'\n\nexport type FormattedTransactionReceipt<\n chain extends Chain | undefined = undefined,\n> = ExtractChainFormatterReturnType<\n chain,\n 'transactionReceipt',\n TransactionReceipt\n>\n\nexport const receiptStatuses = {\n '0x0': 'reverted',\n '0x1': 'success',\n} as const\n\nexport type FormatTransactionReceiptErrorType = ErrorType\n\nexport function formatTransactionReceipt(\n transactionReceipt: ExactPartial<RpcTransactionReceipt>,\n _?: string | undefined,\n) {\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[\n transactionReceipt.type as keyof typeof transactionType\n ] || transactionReceipt.type\n : null,\n } as TransactionReceipt\n\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice)\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed)\n\n return receipt\n}\n\nexport type DefineTransactionReceiptErrorType =\n | DefineFormatterErrorType\n | ErrorType\n\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter(\n 'transactionReceipt',\n formatTransactionReceipt,\n)\n","import { BaseError } from '../../errors/base.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport {\n type CreateCursorErrorType,\n type Cursor,\n createCursor,\n} from '../cursor.js'\n\nimport { type HexToBytesErrorType, hexToBytes } from './toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from './toHex.js'\n\nexport type RecursiveArray<T> = T | readonly RecursiveArray<T>[]\n\ntype To = 'hex' | 'bytes'\n\ntype Encodable = {\n length: number\n encode(cursor: Cursor): void\n}\n\nexport type ToRlpReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type ToRlpErrorType =\n | CreateCursorErrorType\n | BytesToHexErrorType\n | HexToBytesErrorType\n | ErrorType\n\nexport function toRlp<to extends To = 'hex'>(\n bytes: RecursiveArray<ByteArray> | RecursiveArray<Hex>,\n to: to | To | undefined = 'hex',\n): ToRlpReturnType<to> {\n const encodable = getEncodable(bytes)\n const cursor = createCursor(new Uint8Array(encodable.length))\n encodable.encode(cursor)\n\n if (to === 'hex') return bytesToHex(cursor.bytes) as ToRlpReturnType<to>\n return cursor.bytes as ToRlpReturnType<to>\n}\n\nexport type BytesToRlpErrorType = ToRlpErrorType | ErrorType\n\nexport function bytesToRlp<to extends To = 'bytes'>(\n bytes: RecursiveArray<ByteArray>,\n to: to | To | undefined = 'bytes',\n): ToRlpReturnType<to> {\n return toRlp(bytes, to)\n}\n\nexport type HexToRlpErrorType = ToRlpErrorType | ErrorType\n\nexport function hexToRlp<to extends To = 'hex'>(\n hex: RecursiveArray<Hex>,\n to: to | To | undefined = 'hex',\n): ToRlpReturnType<to> {\n return toRlp(hex, to)\n}\n\nfunction getEncodable(\n bytes: RecursiveArray<ByteArray> | RecursiveArray<Hex>,\n): Encodable {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)))\n return getEncodableBytes(bytes as any)\n}\n\nfunction getEncodableList(list: Encodable[]): Encodable {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0)\n\n const sizeOfBodyLength = getSizeOfLength(bodyLength)\n const length = (() => {\n if (bodyLength <= 55) return 1 + bodyLength\n return 1 + sizeOfBodyLength + bodyLength\n })()\n\n return {\n length,\n encode(cursor: Cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength)\n } else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength)\n if (sizeOfBodyLength === 1) cursor.pushUint8(bodyLength)\n else if (sizeOfBodyLength === 2) cursor.pushUint16(bodyLength)\n else if (sizeOfBodyLength === 3) cursor.pushUint24(bodyLength)\n else cursor.pushUint32(bodyLength)\n }\n for (const { encode } of list) {\n encode(cursor)\n }\n },\n }\n}\n\nfunction getEncodableBytes(bytesOrHex: ByteArray | Hex): Encodable {\n const bytes =\n typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex\n\n const sizeOfBytesLength = getSizeOfLength(bytes.length)\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80) return 1\n if (bytes.length <= 55) return 1 + bytes.length\n return 1 + sizeOfBytesLength + bytes.length\n })()\n\n return {\n length,\n encode(cursor: Cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes)\n } else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length)\n cursor.pushBytes(bytes)\n } else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength)\n if (sizeOfBytesLength === 1) cursor.pushUint8(bytes.length)\n else if (sizeOfBytesLength === 2) cursor.pushUint16(bytes.length)\n else if (sizeOfBytesLength === 3) cursor.pushUint24(bytes.length)\n else cursor.pushUint32(bytes.length)\n cursor.pushBytes(bytes)\n }\n },\n }\n}\n\nfunction getSizeOfLength(length: number) {\n if (length < 2 ** 8) return 1\n if (length < 2 ** 16) return 2\n if (length < 2 ** 24) return 3\n if (length < 2 ** 32) return 4\n throw new BaseError('Length is too large.')\n}\n","import {\n InvalidLegacyVError,\n type InvalidLegacyVErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n ByteArray,\n Hex,\n Signature,\n SignatureLegacy,\n} from '../../types/misc.js'\nimport type {\n TransactionSerializable,\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n TransactionSerializableLegacy,\n TransactionSerialized,\n TransactionSerializedEIP1559,\n TransactionSerializedEIP2930,\n TransactionSerializedEIP4844,\n TransactionSerializedEIP7702,\n TransactionSerializedLegacy,\n TransactionType,\n} from '../../types/transaction.js'\nimport type { MaybePromise, OneOf } from '../../types/utils.js'\nimport {\n type SerializeAuthorizationListErrorType,\n serializeAuthorizationList,\n} from '../authorization/serializeAuthorizationList.js'\nimport {\n type BlobsToCommitmentsErrorType,\n blobsToCommitments,\n} from '../blob/blobsToCommitments.js'\nimport {\n blobsToProofs,\n type blobsToProofsErrorType,\n} from '../blob/blobsToProofs.js'\nimport {\n type CommitmentsToVersionedHashesErrorType,\n commitmentsToVersionedHashes,\n} from '../blob/commitmentsToVersionedHashes.js'\nimport {\n type ToBlobSidecarsErrorType,\n toBlobSidecars,\n} from '../blob/toBlobSidecars.js'\nimport { type ConcatHexErrorType, concatHex } from '../data/concat.js'\nimport { trim } from '../data/trim.js'\nimport {\n bytesToHex,\n type NumberToHexErrorType,\n numberToHex,\n} from '../encoding/toHex.js'\nimport { type ToRlpErrorType, toRlp } from '../encoding/toRlp.js'\n\nimport {\n type AssertTransactionEIP1559ErrorType,\n type AssertTransactionEIP2930ErrorType,\n type AssertTransactionEIP4844ErrorType,\n type AssertTransactionEIP7702ErrorType,\n type AssertTransactionLegacyErrorType,\n assertTransactionEIP1559,\n assertTransactionEIP2930,\n assertTransactionEIP4844,\n assertTransactionEIP7702,\n assertTransactionLegacy,\n} from './assertTransaction.js'\nimport {\n type GetTransactionType,\n type GetTransactionTypeErrorType,\n getTransactionType,\n} from './getTransactionType.js'\nimport {\n type SerializeAccessListErrorType,\n serializeAccessList,\n} from './serializeAccessList.js'\n\nexport type SerializedTransactionReturnType<\n transaction extends TransactionSerializable = TransactionSerializable,\n ///\n _transactionType extends TransactionType = GetTransactionType<transaction>,\n> = TransactionSerialized<_transactionType>\n\nexport type SerializeTransactionFn<\n transaction extends TransactionSerializableGeneric = TransactionSerializable,\n ///\n _transactionType extends TransactionType = never,\n> = (\n transaction: OneOf<TransactionSerializable | transaction>,\n signature?: Signature | undefined,\n) => MaybePromise<\n SerializedTransactionReturnType<\n OneOf<TransactionSerializable | transaction>,\n _transactionType\n >\n>\n\nexport type SerializeTransactionErrorType =\n | GetTransactionTypeErrorType\n | SerializeTransactionEIP1559ErrorType\n | SerializeTransactionEIP2930ErrorType\n | SerializeTransactionEIP4844ErrorType\n | SerializeTransactionEIP7702ErrorType\n | SerializeTransactionLegacyErrorType\n | ErrorType\n\nexport function serializeTransaction<\n const transaction extends TransactionSerializable,\n ///\n _transactionType extends TransactionType = GetTransactionType<transaction>,\n>(\n transaction: transaction,\n signature?: Signature | undefined,\n): SerializedTransactionReturnType<transaction, _transactionType> {\n const type = getTransactionType(transaction) as GetTransactionType\n\n if (type === 'eip1559')\n return serializeTransactionEIP1559(\n transaction as TransactionSerializableEIP1559,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip2930')\n return serializeTransactionEIP2930(\n transaction as TransactionSerializableEIP2930,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip4844')\n return serializeTransactionEIP4844(\n transaction as TransactionSerializableEIP4844,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n if (type === 'eip7702')\n return serializeTransactionEIP7702(\n transaction as TransactionSerializableEIP7702,\n signature,\n ) as SerializedTransactionReturnType<transaction>\n\n return serializeTransactionLegacy(\n transaction as TransactionSerializableLegacy,\n signature as SignatureLegacy,\n ) as SerializedTransactionReturnType<transaction>\n}\n\ntype SerializeTransactionEIP7702ErrorType =\n | AssertTransactionEIP7702ErrorType\n | SerializeAuthorizationListErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP7702(\n transaction: TransactionSerializableEIP7702,\n signature?: Signature | undefined,\n): TransactionSerializedEIP7702 {\n const {\n authorizationList,\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP7702(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n const serializedAuthorizationList =\n serializeAuthorizationList(authorizationList)\n\n return concatHex([\n '0x04',\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature),\n ]),\n ]) as TransactionSerializedEIP7702\n}\n\ntype SerializeTransactionEIP4844ErrorType =\n | AssertTransactionEIP4844ErrorType\n | BlobsToCommitmentsErrorType\n | CommitmentsToVersionedHashesErrorType\n | blobsToProofsErrorType\n | ToBlobSidecarsErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP4844(\n transaction: TransactionSerializableEIP4844,\n signature?: Signature | undefined,\n): TransactionSerializedEIP4844 {\n const {\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP4844(transaction)\n\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 (\n transaction.blobs &&\n (typeof blobVersionedHashes === 'undefined' ||\n typeof sidecars === 'undefined')\n ) {\n const blobs = (\n typeof transaction.blobs[0] === 'string'\n ? transaction.blobs\n : (transaction.blobs as ByteArray[]).map((x) => bytesToHex(x))\n ) as Hex[]\n const kzg = transaction.kzg!\n const commitments = blobsToCommitments({\n blobs,\n kzg,\n })\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\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : '0x',\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature),\n ] as const\n\n const blobs: Hex[] = []\n const commitments: Hex[] = []\n const proofs: Hex[] = []\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\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 ]) as TransactionSerializedEIP4844\n}\n\ntype SerializeTransactionEIP1559ErrorType =\n | AssertTransactionEIP1559ErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP1559(\n transaction: TransactionSerializableEIP1559,\n signature?: Signature | undefined,\n): TransactionSerializedEIP1559 {\n const {\n chainId,\n gas,\n nonce,\n to,\n value,\n maxFeePerGas,\n maxPriorityFeePerGas,\n accessList,\n data,\n } = transaction\n\n assertTransactionEIP1559(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ]\n\n return concatHex([\n '0x02',\n toRlp(serializedTransaction),\n ]) as TransactionSerializedEIP1559\n}\n\ntype SerializeTransactionEIP2930ErrorType =\n | AssertTransactionEIP2930ErrorType\n | ConcatHexErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | SerializeAccessListErrorType\n | ErrorType\n\nfunction serializeTransactionEIP2930(\n transaction: TransactionSerializableEIP2930,\n signature?: Signature | undefined,\n): TransactionSerializedEIP2930 {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } =\n transaction\n\n assertTransactionEIP2930(transaction)\n\n const serializedAccessList = serializeAccessList(accessList)\n\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ]\n\n return concatHex([\n '0x01',\n toRlp(serializedTransaction),\n ]) as TransactionSerializedEIP2930\n}\n\ntype SerializeTransactionLegacyErrorType =\n | AssertTransactionLegacyErrorType\n | InvalidLegacyVErrorType\n | NumberToHexErrorType\n | ToRlpErrorType\n | ErrorType\n\nfunction serializeTransactionLegacy(\n transaction: TransactionSerializableLegacy,\n signature?: SignatureLegacy | undefined,\n): TransactionSerializedLegacy {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction\n\n assertTransactionLegacy(transaction)\n\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n ]\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) return signature.v\n return 27n + (signature.v === 35n ? 0n : 1n)\n }\n\n // EIP-155 (explicit chainId)\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n)\n\n // Pre-EIP-155 (no chainId)\n const v = 27n + (signature.v === 27n ? 0n : 1n)\n if (signature.v !== v) throw new InvalidLegacyVError({ v: signature.v })\n return v\n })()\n\n const r = trim(signature.r)\n const s = trim(signature.s)\n\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v),\n r === '0x00' ? '0x' : r,\n s === '0x00' ? '0x' : s,\n ]\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n '0x',\n '0x',\n ]\n }\n\n return toRlp(serializedTransaction) as TransactionSerializedLegacy\n}\n\nexport function toYParitySignatureArray(\n transaction: TransactionSerializableGeneric,\n signature_?: Signature | undefined,\n) {\n const signature = signature_ ?? transaction\n const { v, yParity } = signature\n\n if (typeof signature.r === 'undefined') return []\n if (typeof signature.s === 'undefined') return []\n if (typeof v === 'undefined' && typeof yParity === 'undefined') return []\n\n const r = trim(signature.r)\n const s = trim(signature.s)\n\n const yParity_ = (() => {\n if (typeof yParity === 'number') return yParity ? numberToHex(1) : '0x'\n if (v === 0n) return '0x'\n if (v === 1n) return numberToHex(1)\n\n return v === 27n ? '0x' : numberToHex(1)\n })()\n\n return [yParity_, r === '0x00' ? '0x' : r, s === '0x00' ? '0x' : s]\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type {\n AuthorizationList,\n SerializedAuthorizationList,\n} from '../../types/authorization.js'\nimport { toHex } from '../encoding/toHex.js'\nimport { toYParitySignatureArray } from '../transaction/serializeTransaction.js'\n\nexport type SerializeAuthorizationListReturnType = SerializedAuthorizationList\n\nexport type SerializeAuthorizationListErrorType = ErrorType\n\n/*\n * Serializes an EIP-7702 authorization list.\n */\nexport function serializeAuthorizationList(\n authorizationList?: AuthorizationList<number, true> | undefined,\n): SerializeAuthorizationListReturnType {\n if (!authorizationList || authorizationList.length === 0) return []\n\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\n return serializedAuthorizationList as {} as SerializeAuthorizationListReturnType\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type BlobsToCommitmentsParameters<\n blobs extends readonly ByteArray[] | readonly Hex[] =\n | readonly ByteArray[]\n | readonly Hex[],\n to extends To | undefined = undefined,\n> = {\n /** Blobs to transform into commitments. */\n blobs: blobs | readonly ByteArray[] | readonly Hex[]\n /** KZG implementation. */\n kzg: Pick<Kzg, 'blobToKzgCommitment'>\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type BlobsToCommitmentsReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type BlobsToCommitmentsErrorType =\n | HexToBytesErrorType\n | BytesToHexErrorType\n | ErrorType\n\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<\n const blobs extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: BlobsToCommitmentsParameters<blobs, to>,\n): BlobsToCommitmentsReturnType<to> {\n const { kzg } = parameters\n\n const to =\n parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes')\n const blobs = (\n typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x as any))\n : parameters.blobs\n ) as ByteArray[]\n\n const commitments: ByteArray[] = []\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)))\n\n return (to === 'bytes'\n ? commitments\n : commitments.map((x) =>\n bytesToHex(x),\n )) as {} as BlobsToCommitmentsReturnType<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type blobsToProofsParameters<\n blobs extends readonly ByteArray[] | readonly Hex[],\n commitments extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n ///\n _blobsType =\n | (blobs extends readonly Hex[] ? readonly Hex[] : never)\n | (blobs extends readonly ByteArray[] ? readonly ByteArray[] : never),\n> = {\n /** Blobs to transform into proofs. */\n blobs: blobs\n /** Commitments for the blobs. */\n commitments: commitments &\n (commitments extends _blobsType\n ? {}\n : `commitments must be the same type as blobs`)\n /** KZG implementation. */\n kzg: Pick<Kzg, 'computeBlobKzgProof'>\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type blobsToProofsReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray[] : never)\n | (to extends 'hex' ? Hex[] : never)\n\nexport type blobsToProofsErrorType =\n | BytesToHexErrorType\n | HexToBytesErrorType\n | ErrorType\n\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<\n const blobs extends readonly ByteArray[] | readonly Hex[],\n const commitments extends readonly ByteArray[] | readonly Hex[],\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: blobsToProofsParameters<blobs, commitments, to>,\n): blobsToProofsReturnType<to> {\n const { kzg } = parameters\n\n const to =\n parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes')\n\n const blobs = (\n typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x as any))\n : parameters.blobs\n ) as ByteArray[]\n const commitments = (\n typeof parameters.commitments[0] === 'string'\n ? parameters.commitments.map((x) => hexToBytes(x as any))\n : parameters.commitments\n ) as ByteArray[]\n\n const proofs: ByteArray[] = []\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\n return (to === 'bytes'\n ? proofs\n : proofs.map((x) => bytesToHex(x))) as {} as blobsToProofsReturnType<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\nimport { type Sha256ErrorType, sha256 } from '../hash/sha256.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type CommitmentToVersionedHashParameters<\n commitment extends Uint8Array | Hex = Uint8Array | Hex,\n to extends To | undefined = undefined,\n> = {\n /** Commitment from blob. */\n commitment: commitment | Uint8Array | Hex\n /** Return type. */\n to?: to | To | undefined\n /** Version to tag onto the hash. */\n version?: number | undefined\n}\n\nexport type CommitmentToVersionedHashReturnType<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type CommitmentToVersionedHashErrorType =\n | Sha256ErrorType\n | BytesToHexErrorType\n | ErrorType\n\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<\n const commitment extends Hex | ByteArray,\n to extends To =\n | (commitment extends Hex ? 'hex' : never)\n | (commitment extends ByteArray ? 'bytes' : never),\n>(\n parameters: CommitmentToVersionedHashParameters<commitment, to>,\n): CommitmentToVersionedHashReturnType<to> {\n const { commitment, version = 1 } = parameters\n const to = parameters.to ?? (typeof commitment === 'string' ? 'hex' : 'bytes')\n\n const versionedHash = sha256(commitment, 'bytes')\n versionedHash.set([version], 0)\n return (\n to === 'bytes' ? versionedHash : bytesToHex(versionedHash)\n ) as CommitmentToVersionedHashReturnType<to>\n}\n","/**\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 * @deprecated\n */\nimport {\n SHA224 as SHA224n,\n sha224 as sha224n,\n SHA256 as SHA256n,\n sha256 as sha256n,\n} from './sha2.ts';\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const SHA256: typeof SHA256n = SHA256n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const sha256: typeof sha256n = sha256n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const SHA224: typeof SHA224n = SHA224n;\n/** @deprecated Use import from `noble/hashes/sha2` module */\nexport const sha224: typeof sha224n = sha224n;\n","import { sha256 as noble_sha256 } from '@noble/hashes/sha256'\n\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type IsHexErrorType, isHex } from '../data/isHex.js'\nimport { type ToBytesErrorType, toBytes } from '../encoding/toBytes.js'\nimport { type ToHexErrorType, toHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type Sha256Hash<to extends To> =\n | (to extends 'bytes' ? ByteArray : never)\n | (to extends 'hex' ? Hex : never)\n\nexport type Sha256ErrorType =\n | IsHexErrorType\n | ToBytesErrorType\n | ToHexErrorType\n | ErrorType\n\nexport function sha256<to extends To = 'hex'>(\n value: Hex | ByteArray,\n to_?: to | undefined,\n): Sha256Hash<to> {\n const to = to_ || 'hex'\n const bytes = noble_sha256(\n isHex(value, { strict: false }) ? toBytes(value) : value,\n )\n if (to === 'bytes') return bytes as Sha256Hash<to>\n return toHex(bytes) as Sha256Hash<to>\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport {\n type CommitmentToVersionedHashErrorType,\n commitmentToVersionedHash,\n} from './commitmentToVersionedHash.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type CommitmentsToVersionedHashesParameters<\n commitments extends readonly Uint8Array[] | readonly Hex[] =\n | readonly Uint8Array[]\n | readonly Hex[],\n to extends To | undefined = undefined,\n> = {\n /** Commitments from blobs. */\n commitments: commitments | readonly Uint8Array[] | readonly Hex[]\n /** Return type. */\n to?: to | To | undefined\n /** Version to tag onto the hashes. */\n version?: number | undefined\n}\n\nexport type CommitmentsToVersionedHashesReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type CommitmentsToVersionedHashesErrorType =\n | CommitmentToVersionedHashErrorType\n | ErrorType\n\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<\n const commitments extends readonly Uint8Array[] | readonly Hex[],\n to extends To =\n | (commitments extends readonly Hex[] ? 'hex' : never)\n | (commitments extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: CommitmentsToVersionedHashesParameters<commitments, to>,\n): CommitmentsToVersionedHashesReturnType<to> {\n const { commitments, version } = parameters\n\n const to =\n parameters.to ?? (typeof commitments[0] === 'string' ? 'hex' : 'bytes')\n\n const hashes: Uint8Array[] | Hex[] = []\n for (const commitment of commitments) {\n hashes.push(\n commitmentToVersionedHash({\n commitment,\n to,\n version,\n }) as any,\n )\n }\n return hashes as any\n}\n","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n\n/** Blob limit per transaction. */\nconst blobsPerTransaction = 6\n\n/** The number of bytes in a BLS scalar field element. */\nexport const bytesPerFieldElement = 32\n\n/** The number of field elements in a blob. */\nexport const fieldElementsPerBlob = 4096\n\n/** The number of bytes in a blob. */\nexport const bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob\n\n/** Blob bytes limit per transaction. */\nexport const maxBytesPerTransaction =\n bytesPerBlob * blobsPerTransaction -\n // terminator byte (0x80).\n 1 -\n // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction\n","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n\nexport const versionedHashVersionKzg = 1\n","import { versionedHashVersionKzg } from '../constants/kzg.js'\nimport type { Hash } from '../types/misc.js'\n\nimport { BaseError } from './base.js'\n\nexport type BlobSizeTooLargeErrorType = BlobSizeTooLargeError & {\n name: 'BlobSizeTooLargeError'\n}\nexport class BlobSizeTooLargeError extends BaseError {\n constructor({ maxSize, size }: { maxSize: number; size: number }) {\n super('Blob size is too large.', {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size} bytes`],\n name: 'BlobSizeTooLargeError',\n })\n }\n}\n\nexport type EmptyBlobErrorType = EmptyBlobError & {\n name: 'EmptyBlobError'\n}\nexport class EmptyBlobError extends BaseError {\n constructor() {\n super('Blob data must not be empty.', { name: 'EmptyBlobError' })\n }\n}\n\nexport type InvalidVersionedHashSizeErrorType =\n InvalidVersionedHashSizeError & {\n name: 'InvalidVersionedHashSizeError'\n }\nexport class InvalidVersionedHashSizeError extends BaseError {\n constructor({\n hash,\n size,\n }: {\n hash: Hash\n size: number\n }) {\n super(`Versioned hash \"${hash}\" size is invalid.`, {\n metaMessages: ['Expected: 32', `Received: ${size}`],\n name: 'InvalidVersionedHashSizeError',\n })\n }\n}\n\nexport type InvalidVersionedHashVersionErrorType =\n InvalidVersionedHashVersionError & {\n name: 'InvalidVersionedHashVersionError'\n }\nexport class InvalidVersionedHashVersionError extends BaseError {\n constructor({\n hash,\n version,\n }: {\n hash: Hash\n version: number\n }) {\n super(`Versioned hash \"${hash}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version}`,\n ],\n name: 'InvalidVersionedHashVersionError',\n })\n }\n}\n","import {\n bytesPerBlob,\n bytesPerFieldElement,\n fieldElementsPerBlob,\n maxBytesPerTransaction,\n} from '../../constants/blob.js'\nimport {\n BlobSizeTooLargeError,\n type BlobSizeTooLargeErrorType,\n EmptyBlobError,\n type EmptyBlobErrorType,\n} from '../../errors/blob.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport { type CreateCursorErrorType, createCursor } from '../cursor.js'\nimport { type SizeErrorType, size } from '../data/size.js'\nimport { type HexToBytesErrorType, hexToBytes } from '../encoding/toBytes.js'\nimport { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type ToBlobsParameters<\n data extends Hex | ByteArray = Hex | ByteArray,\n to extends To | undefined = undefined,\n> = {\n /** Data to transform to a blob. */\n data: data | Hex | ByteArray\n /** Return type. */\n to?: to | To | undefined\n}\n\nexport type ToBlobsReturnType<to extends To> =\n | (to extends 'bytes' ? readonly ByteArray[] : never)\n | (to extends 'hex' ? readonly Hex[] : never)\n\nexport type ToBlobsErrorType =\n | BlobSizeTooLargeErrorType\n | BytesToHexErrorType\n | CreateCursorErrorType\n | EmptyBlobErrorType\n | HexToBytesErrorType\n | SizeErrorType\n | ErrorType\n\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<\n const data extends Hex | ByteArray,\n to extends To =\n | (data extends Hex ? 'hex' : never)\n | (data extends ByteArray ? 'bytes' : never),\n>(parameters: ToBlobsParameters<data, to>): ToBlobsReturnType<to> {\n const to =\n parameters.to ?? (typeof parameters.data === 'string' ? 'hex' : 'bytes')\n const data = (\n typeof parameters.data === 'string'\n ? hexToBytes(parameters.data)\n : parameters.data\n ) as ByteArray\n\n const size_ = size(data)\n if (!size_) throw new EmptyBlobError()\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_,\n })\n\n const blobs = []\n\n let active = true\n let position = 0\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob))\n\n let size = 0\n while (size < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1))\n\n // Push a zero byte so the field element doesn't overflow the BLS modulus.\n blob.pushByte(0x00)\n\n // Push the current segment of data bytes.\n blob.pushBytes(bytes)\n\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\n size++\n position += 31\n }\n\n blobs.push(blob)\n }\n\n return (\n to === 'bytes'\n ? blobs.map((x) => x.bytes)\n : blobs.map((x) => bytesToHex(x.bytes))\n ) as any\n}\n","import type { ErrorType } from '../../errors/utils.js'\nimport type { BlobSidecars } from '../../types/eip4844.js'\nimport type { Kzg } from '../../types/kzg.js'\nimport type { ByteArray, Hex } from '../../types/misc.js'\nimport type { OneOf } from '../../types/utils.js'\nimport {\n type BlobsToCommitmentsErrorType,\n blobsToCommitments,\n} from './blobsToCommitments.js'\nimport { blobsToProofs, type blobsToProofsErrorType } from './blobsToProofs.js'\nimport { type ToBlobsErrorType, toBlobs } from './toBlobs.js'\n\ntype To = 'hex' | 'bytes'\n\nexport type ToBlobSidecarsParameters<\n data extends Hex | ByteArray | undefined = undefined,\n blobs extends readonly Hex[] | readonly ByteArray[] | undefined = undefined,\n to extends To =\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n ///\n _blobsType =\n | (blobs extends readonly Hex[] ? readonly Hex[] : never)\n | (blobs extends readonly ByteArray[] ? readonly ByteArray[] : never),\n> = {\n /** Return type. */\n to?: to | To | undefined\n} & OneOf<\n | {\n /** Data to transform into blobs. */\n data: data | Hex | ByteArray\n /** KZG implementation. */\n kzg: Kzg\n }\n | {\n /** Blobs. */\n blobs: blobs | readonly Hex[] | readonly ByteArray[]\n /** Commitment for each blob. */\n commitments: _blobsType | readonly Hex[] | readonly ByteArray[]\n /** Proof for each blob. */\n proofs: _blobsType | readonly Hex[] | readonly ByteArray[]\n }\n>\n\nexport type ToBlobSidecarsReturnType<to extends To> =\n | (to extends 'bytes' ? BlobSidecars<ByteArray> : never)\n | (to extends 'hex' ? BlobSidecars<Hex> : never)\n\nexport type ToBlobSidecarsErrorType =\n | BlobsToCommitmentsErrorType\n | ToBlobsErrorType\n | blobsToProofsErrorType\n | ErrorType\n\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<\n const data extends Hex | ByteArray | undefined = undefined,\n const blobs extends\n | readonly Hex[]\n | readonly ByteArray[]\n | undefined = undefined,\n to extends To =\n | (data extends Hex ? 'hex' : never)\n | (data extends ByteArray ? 'bytes' : never)\n | (blobs extends readonly Hex[] ? 'hex' : never)\n | (blobs extends readonly ByteArray[] ? 'bytes' : never),\n>(\n parameters: ToBlobSidecarsParameters<data, blobs, to>,\n): ToBlobSidecarsReturnType<to> {\n const { data, kzg, to } = parameters\n const blobs = parameters.blobs ?? toBlobs({ data: data!, to })\n const commitments =\n parameters.commitments ?? blobsToCommitments({ blobs, kzg: kzg!, to })\n const proofs =\n parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg: kzg!, to })\n\n const sidecars: BlobSidecars = []\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\n return sidecars as ToBlobSidecarsReturnType<to>\n}\n","import { versionedHashVersionKzg } from '../../constants/kzg.js'\nimport { maxUint256 } from '../../constants/number.js'\nimport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport { BaseError, type BaseErrorType } from '../../errors/base.js'\nimport {\n EmptyBlobError,\n type EmptyBlobErrorType,\n InvalidVersionedHashSizeError,\n type InvalidVersionedHashSizeErrorType,\n InvalidVersionedHashVersionError,\n type InvalidVersionedHashVersionErrorType,\n} from '../../errors/blob.js'\nimport {\n InvalidChainIdError,\n type InvalidChainIdErrorType,\n} from '../../errors/chain.js'\nimport {\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n} from '../../errors/node.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableLegacy,\n} from '../../types/transaction.js'\nimport { type IsAddressErrorType, isAddress } from '../address/isAddress.js'\nimport { size } from '../data/size.js'\nimport { slice } from '../data/slice.js'\nimport { hexToNumber } from '../encoding/fromHex.js'\n\nexport type AssertTransactionEIP7702ErrorType =\n | AssertTransactionEIP1559ErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | ErrorType\n\nexport function assertTransactionEIP7702(\n transaction: TransactionSerializableEIP7702,\n) {\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)) throw new InvalidAddressError({ address })\n if (chainId < 0) throw new InvalidChainIdError({ chainId })\n }\n }\n assertTransactionEIP1559(transaction as {} as TransactionSerializableEIP1559)\n}\n\nexport type AssertTransactionEIP4844ErrorType =\n | AssertTransactionEIP1559ErrorType\n | EmptyBlobErrorType\n | InvalidVersionedHashSizeErrorType\n | InvalidVersionedHashVersionErrorType\n | ErrorType\n\nexport function assertTransactionEIP4844(\n transaction: TransactionSerializableEIP4844,\n) {\n const { blobVersionedHashes } = transaction\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0) 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 as {} as TransactionSerializableEIP1559)\n}\n\nexport type AssertTransactionEIP1559ErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | TipAboveFeeCapErrorType\n | ErrorType\n\nexport function assertTransactionEIP1559(\n transaction: TransactionSerializableEIP1559,\n) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction\n if (chainId <= 0) throw new InvalidChainIdError({ chainId })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas })\n if (\n maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas\n )\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas })\n}\n\nexport type AssertTransactionEIP2930ErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | ErrorType\n\nexport function assertTransactionEIP2930(\n transaction: TransactionSerializableEIP2930,\n) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } =\n transaction\n if (chainId <= 0) throw new InvalidChainIdError({ chainId })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError(\n '`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.',\n )\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice })\n}\n\nexport type AssertTransactionLegacyErrorType =\n | BaseErrorType\n | IsAddressErrorType\n | InvalidAddressErrorType\n | InvalidChainIdErrorType\n | FeeCapTooHighErrorType\n | ErrorType\n\nexport function assertTransactionLegacy(\n transaction: TransactionSerializableLegacy,\n) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } =\n transaction\n if (to && !isAddress(to)) 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(\n '`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.',\n )\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice })\n}\n","import {\n InvalidSerializableTransactionError,\n type InvalidSerializableTransactionErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type {\n FeeValuesEIP1559,\n FeeValuesEIP4844,\n FeeValuesLegacy,\n} from '../../index.js'\nimport type {\n TransactionRequestGeneric,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n} from '../../types/transaction.js'\nimport type { Assign, ExactPartial, IsNever, OneOf } from '../../types/utils.js'\n\nexport type GetTransactionType<\n transaction extends OneOf<\n TransactionSerializableGeneric | TransactionRequestGeneric\n > = TransactionSerializableGeneric,\n result =\n | (transaction extends LegacyProperties ? 'legacy' : never)\n | (transaction extends EIP1559Properties ? 'eip1559' : never)\n | (transaction extends EIP2930Properties ? 'eip2930' : never)\n | (transaction extends EIP4844Properties ? 'eip4844' : never)\n | (transaction extends EIP7702Properties ? 'eip7702' : never)\n | (transaction['type'] extends TransactionSerializableGeneric['type']\n ? Extract<transaction['type'], string>\n : never),\n> = IsNever<keyof transaction> extends true\n ? string\n : IsNever<result> extends false\n ? result\n : string\n\nexport type GetTransactionTypeErrorType =\n | InvalidSerializableTransactionErrorType\n | ErrorType\n\nexport function getTransactionType<\n const transaction extends OneOf<\n TransactionSerializableGeneric | TransactionRequestGeneric\n >,\n>(transaction: transaction): GetTransactionType<transaction> {\n if (transaction.type)\n return transaction.type as GetTransactionType<transaction>\n\n if (typeof transaction.authorizationList !== 'undefined')\n return 'eip7702' as any\n\n if (\n typeof transaction.blobs !== 'undefined' ||\n typeof transaction.blobVersionedHashes !== 'undefined' ||\n typeof transaction.maxFeePerBlobGas !== 'undefined' ||\n typeof transaction.sidecars !== 'undefined'\n )\n return 'eip4844' as any\n\n if (\n typeof transaction.maxFeePerGas !== 'undefined' ||\n typeof transaction.maxPriorityFeePerGas !== 'undefined'\n ) {\n return 'eip1559' as any\n }\n\n if (typeof transaction.gasPrice !== 'undefined') {\n if (typeof transaction.accessList !== 'undefined') return 'eip2930' as any\n return 'legacy' as any\n }\n\n throw new InvalidSerializableTransactionError({ transaction })\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////\n// Types\n\ntype BaseProperties = {\n accessList?: undefined\n authorizationList?: undefined\n blobs?: undefined\n blobVersionedHashes?: undefined\n gasPrice?: undefined\n maxFeePerBlobGas?: undefined\n maxFeePerGas?: undefined\n maxPriorityFeePerGas?: undefined\n sidecars?: undefined\n}\n\ntype LegacyProperties = Assign<BaseProperties, FeeValuesLegacy>\ntype EIP1559Properties = Assign<\n BaseProperties,\n OneOf<\n | {\n maxFeePerGas: FeeValuesEIP1559['maxFeePerGas']\n }\n | {\n maxPriorityFeePerGas: FeeValuesEIP1559['maxPriorityFeePerGas']\n },\n FeeValuesEIP1559\n > & {\n accessList?: TransactionSerializableEIP2930['accessList'] | undefined\n }\n>\ntype EIP2930Properties = Assign<\n ExactPartial<LegacyProperties>,\n {\n accessList: TransactionSerializableEIP2930['accessList']\n }\n>\ntype EIP4844Properties = Assign<\n ExactPartial<EIP1559Properties>,\n ExactPartial<FeeValuesEIP4844> &\n OneOf<\n | {\n blobs: TransactionSerializableEIP4844['blobs']\n }\n | {\n blobVersionedHashes: TransactionSerializableEIP4844['blobVersionedHashes']\n }\n | {\n sidecars: TransactionSerializableEIP4844['sidecars']\n },\n TransactionSerializableEIP4844\n >\n>\ntype EIP7702Properties = Assign<\n ExactPartial<EIP1559Properties>,\n {\n authorizationList: TransactionSerializableEIP7702['authorizationList']\n }\n>\n","import {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from '../../errors/address.js'\nimport {\n InvalidStorageKeySizeError,\n type InvalidStorageKeySizeErrorType,\n} from '../../errors/transaction.js'\nimport type { ErrorType } from '../../errors/utils.js'\nimport type { Hex } from '../../types/misc.js'\nimport type { AccessList } from '../../types/transaction.js'\nimport { type IsAddressErrorType, isAddress } from '../address/isAddress.js'\nimport type { RecursiveArray } from '../encoding/toRlp.js'\n\nexport type SerializeAccessListErrorType =\n | InvalidStorageKeySizeErrorType\n | InvalidAddressErrorType\n | IsAddressErrorType\n | ErrorType\n\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(\n accessList?: AccessList | undefined,\n): RecursiveArray<Hex> {\n if (!accessList || accessList.length === 0) return []\n\n const serializedAccessList = []\n for (let i = 0; i < accessList.length; i++) {\n const { address, storageKeys } = accessList[i]\n\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\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address })\n }\n\n serializedAccessList.push([address, storageKeys])\n }\n return serializedAccessList\n}\n","import type { Chain } from '../types/chain.js'\n\n/**\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} as const satisfies Chain['contracts']\n","import type { ChainFormatters } from '../types/chain.js'\nimport type { RpcTransaction } from '../types/rpc.js'\nimport { hexToBigInt } from '../utils/encoding/fromHex.js'\nimport { defineBlock } from '../utils/formatters/block.js'\nimport {\n defineTransaction,\n formatTransaction,\n} from '../utils/formatters/transaction.js'\nimport { defineTransactionReceipt } from '../utils/formatters/transactionReceipt.js'\nimport type { OpStackBlock, OpStackRpcBlock } from './types/block.js'\nimport type {\n OpStackRpcTransaction,\n OpStackRpcTransactionReceipt,\n OpStackTransaction,\n OpStackTransactionReceipt,\n} from './types/transaction.js'\n\nexport const formatters = {\n block: /*#__PURE__*/ defineBlock({\n format(args: OpStackRpcBlock): OpStackBlock {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === 'string') return transaction\n const formatted = formatTransaction(\n transaction as RpcTransaction,\n ) as OpStackTransaction\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 } as OpStackBlock\n },\n }),\n transaction: /*#__PURE__*/ defineTransaction({\n format(args: OpStackRpcTransaction): OpStackTransaction {\n const transaction = {} as OpStackTransaction\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: OpStackRpcTransactionReceipt): OpStackTransactionReceipt {\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 } as OpStackTransactionReceipt\n },\n }),\n} as const satisfies ChainFormatters\n","import { InvalidAddressError } from '../errors/address.js'\nimport type { ErrorType } from '../errors/utils.js'\nimport type { ChainSerializers } from '../types/chain.js'\nimport type { Hex, Signature } from '../types/misc.js'\nimport type { TransactionSerializable } from '../types/transaction.js'\nimport type { RequiredBy } from '../types/utils.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 {\n type SerializeTransactionErrorType as SerializeTransactionErrorType_,\n serializeTransaction as serializeTransaction_,\n} from '../utils/transaction/serializeTransaction.js'\nimport type {\n OpStackTransactionSerializable,\n TransactionSerializableDeposit,\n TransactionSerializedDeposit,\n} from './types/transaction.js'\n\nexport type SerializeTransactionReturnType = ReturnType<\n typeof serializeTransaction\n>\n\nexport type SerializeTransactionErrorType =\n | SerializeTransactionErrorType_\n | ErrorType\n\nexport function serializeTransaction(\n transaction: OpStackTransactionSerializable,\n signature?: Signature,\n) {\n if (isDeposit(transaction)) return serializeTransactionDeposit(transaction)\n return serializeTransaction_(\n transaction as TransactionSerializable,\n signature,\n )\n}\n\nexport const serializers = {\n transaction: serializeTransaction,\n} as const satisfies ChainSerializers\n\n//////////////////////////////////////////////////////////////////////////////\n// Serializers\n\nexport type SerializeTransactionDepositReturnType = TransactionSerializedDeposit\n\nfunction serializeTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n): SerializeTransactionDepositReturnType {\n assertTransactionDeposit(transaction)\n\n const { sourceHash, data, from, gas, isSystemTx, mint, to, value } =\n transaction\n\n const serializedTransaction: Hex[] = [\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\n return concatHex([\n '0x7e',\n toRlp(serializedTransaction),\n ]) as SerializeTransactionDepositReturnType\n}\n\nfunction isDeposit(\n transaction: OpStackTransactionSerializable,\n): transaction is RequiredBy<TransactionSerializableDeposit, 'type'> {\n if (transaction.type === 'deposit') return true\n if (typeof transaction.sourceHash !== 'undefined') return true\n return false\n}\n\nexport function assertTransactionDeposit(\n transaction: TransactionSerializableDeposit,\n) {\n const { from, to } = transaction\n if (from && !isAddress(from)) throw new InvalidAddressError({ address: from })\n if (to && !isAddress(to)) throw new InvalidAddressError({ address: to })\n}\n","import { contracts } from './contracts.js'\nimport { formatters } from './formatters.js'\nimport { serializers } from './serializers.js'\n\nexport const chainConfig = {\n blockTime: 2_000,\n contracts,\n formatters,\n serializers,\n} as const\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const arbitrum = /*#__PURE__*/ defineChain({\n id: 42_161,\n name: 'Arbitrum One',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: ['https://arb1.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://arbiscan.io',\n apiUrl: 'https://api.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 7654707,\n },\n },\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const arbitrumSepolia = /*#__PURE__*/ defineChain({\n id: 421_614,\n name: 'Arbitrum Sepolia',\n blockTime: 250,\n nativeCurrency: {\n name: 'Arbitrum Sepolia Ether',\n symbol: 'ETH',\n decimals: 18,\n },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rollup.arbitrum.io/rpc'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Arbiscan',\n url: 'https://sepolia.arbiscan.io',\n apiUrl: 'https://api-sepolia.arbiscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 81930,\n },\n },\n testnet: true,\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 1 // mainnet\n\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\nexport const basePreconf = /*#__PURE__*/ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: ['https://mainnet-preconf.base.org'],\n },\n },\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 11_155_111 // sepolia\n\nexport const baseSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 84532,\n network: 'base-sepolia',\n name: 'Base Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.base.org'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Basescan',\n url: 'https://sepolia.basescan.org',\n apiUrl: 'https://api-sepolia.basescan.org/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254',\n },\n },\n portal: {\n [sourceId]: {\n address: '0x49f53e41452c74589e85ca1677426ba426459e85',\n blockCreated: 4446677,\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xfd0Bf71F60660E2f608ed56e1659C450eB113120',\n blockCreated: 4446677,\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1059647,\n },\n },\n testnet: true,\n sourceId,\n})\n\nexport const baseSepoliaPreconf = /*#__PURE__*/ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: ['https://sepolia-preconf.base.org'],\n },\n },\n})\n","import type { Account } from '../../accounts/types.js'\nimport { parseAccount } from '../../accounts/utils/parseAccount.js'\nimport type { EstimateGasParameters as EstimateGasParameters_base } from '../../actions/public/estimateGas.js'\nimport type { Client } from '../../clients/createClient.js'\nimport type { Transport } from '../../clients/transports/createTransport.js'\nimport { AccountNotFoundError } from '../../errors/account.js'\nimport type { BaseError } from '../../errors/base.js'\nimport type { GetAccountParameter } from '../../types/account.js'\nimport type { Chain } from '../../types/chain.js'\nimport type { TransactionRequest } from '../../types/transaction.js'\nimport type { Filter } from '../../types/utils.js'\nimport { numberToHex } from '../../utils/encoding/toHex.js'\nimport { getCallError } from '../../utils/errors/getCallError.js'\nimport { extract } from '../../utils/formatters/extract.js'\nimport { formatTransactionRequest } from '../../utils/formatters/transactionRequest.js'\nimport {\n type AssertRequestParameters,\n assertRequest,\n} from '../../utils/transaction/assertRequest.js'\nimport type { LineaRpcSchema } from '../types/rpc.js'\n\nexport type EstimateGasParameters<\n chain extends Chain | undefined = Chain | undefined,\n account extends Account | undefined = Account | undefined,\n> = EstimateGasParameters_base<chain> & GetAccountParameter<account>\n\nexport type EstimateGasReturnType = {\n gasLimit: bigint\n baseFeePerGas: bigint\n priorityFeePerGas: bigint\n}\n\n/**\n * Estimates the gas and fees per gas necessary to complete a transaction without submitting it to the network.\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateGasParameters}\n * @returns A gas estimate and fees per gas (in wei). {@link EstimateGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseEther } from 'viem'\n * import { linea } from 'viem/chains'\n * import { estimateGas } from 'viem/linea'\n *\n * const client = createPublicClient({\n * chain: linea,\n * transport: http(),\n * })\n * const gasEstimate = await estimateGas(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 0n,\n * })\n */\nexport async function estimateGas<\n chain extends Chain | undefined,\n account extends Account | undefined,\n>(\n client: Client<Transport, chain, account>,\n args: EstimateGasParameters<chain>,\n): Promise<EstimateGasReturnType> {\n const { account: account_ = client.account } = args\n\n if (!account_) throw new AccountNotFoundError()\n const account = parseAccount(account_)\n\n try {\n const {\n accessList,\n blockNumber,\n blockTag,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n ...rest\n } = args\n\n const blockNumberHex =\n typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined\n const block = blockNumberHex || blockTag\n\n assertRequest(args as AssertRequestParameters)\n\n const chainFormat = client.chain?.formatters?.transactionRequest?.format\n const format = chainFormat || formatTransactionRequest\n\n const request = format(\n {\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n } as TransactionRequest,\n 'estimateGas',\n )\n\n type LineaEstimateGasSchema = Filter<\n LineaRpcSchema,\n { Method: 'linea_estimateGas' }\n >[0]\n const { baseFeePerGas, gasLimit, priorityFeePerGas } =\n await client.request<LineaEstimateGasSchema>({\n method: 'linea_estimateGas',\n params: block ? [request, block] : [request],\n })\n return {\n baseFeePerGas: BigInt(baseFeePerGas),\n gasLimit: BigInt(gasLimit),\n priorityFeePerGas: BigInt(priorityFeePerGas),\n }\n } catch (err) {\n throw getCallError(err as BaseError, {\n ...args,\n account,\n chain: client.chain,\n })\n }\n}\n","import { BaseError } from './base.js'\n\nexport type AccountNotFoundErrorType = AccountNotFoundError & {\n name: 'AccountNotFoundError'\n}\nexport class AccountNotFoundError extends BaseError {\n constructor({ docsPath }: { docsPath?: string | undefined } = {}) {\n super(\n [\n 'Could not find an Account to execute with this Action.',\n 'Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.',\n ].join('\\n'),\n {\n docsPath,\n docsSlug: 'account',\n name: 'AccountNotFoundError',\n },\n )\n }\n}\n\nexport type AccountTypeNotSupportedErrorType = AccountTypeNotSupportedError & {\n name: 'AccountTypeNotSupportedError'\n}\nexport class AccountTypeNotSupportedError extends BaseError {\n constructor({\n docsPath,\n metaMessages,\n type,\n }: {\n docsPath?: string | undefined\n metaMessages?: string[] | undefined\n type: string\n }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath,\n metaMessages,\n name: 'AccountTypeNotSupportedError',\n })\n }\n}\n","import type { ChainConfig, ChainEstimateFeesPerGasFn } from '../types/chain.js'\nimport { estimateGas } from './actions/estimateGas.js'\n\nexport const chainConfig = {\n fees: {\n estimateFeesPerGas,\n async maxPriorityFeePerGas({ block, client, request }) {\n const response = await estimateFeesPerGas({\n block,\n client,\n multiply: (x) => x,\n request,\n type: 'eip1559',\n })\n // Returning `null` will trigger the base `estimateMaxPriorityFeePerGas` to perform\n // fallback mechanisms to estimate priority fee.\n if (!response?.maxPriorityFeePerGas) return null\n return response.maxPriorityFeePerGas\n },\n },\n} as const satisfies ChainConfig\n\n///////////////////////////////////////////////////////////////////////////\n// Internal\n///////////////////////////////////////////////////////////////////////////\n\nasync function estimateFeesPerGas({\n client,\n multiply,\n request,\n type,\n}: Parameters<ChainEstimateFeesPerGasFn>[0]): ReturnType<ChainEstimateFeesPerGasFn> {\n try {\n const response = await estimateGas(client, {\n ...request,\n account: request?.account!,\n })\n const { priorityFeePerGas: maxPriorityFeePerGas } = response\n\n const baseFeePerGas = multiply(BigInt(response.baseFeePerGas))\n const maxFeePerGas = baseFeePerGas + maxPriorityFeePerGas\n\n if (type === 'legacy') return { gasPrice: maxFeePerGas }\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n }\n } catch {\n // Returning `null` will trigger the base `estimateFeesPerGas` to perform\n // fallback mechanisms to estimate fees.\n return null\n }\n}\n","import { chainConfig } from '../../linea/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const linea = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_144,\n name: 'Linea Mainnet',\n blockTime: 2000,\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.linea.build'],\n webSocket: ['wss://rpc.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://lineascan.build',\n apiUrl: 'https://api.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xcA11bde05977b3631167028862bE2a173976CA11',\n blockCreated: 42,\n },\n ensRegistry: {\n address: '0x50130b669B28C339991d8676FA73CF122a121267',\n blockCreated: 6682888,\n },\n ensUniversalResolver: {\n address: '0x4D41762915F83c76EcaF6776d9b08076aA32b492',\n blockCreated: 22_222_151,\n },\n },\n ensTlds: ['.linea.eth'],\n testnet: false,\n})\n","import { chainConfig } from '../../linea/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const lineaSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 59_141,\n name: 'Linea Sepolia Testnet',\n nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.sepolia.linea.build'],\n webSocket: ['wss://rpc.sepolia.linea.build'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.lineascan.build',\n apiUrl: 'https://api-sepolia.lineascan.build/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 227427,\n },\n ensRegistry: {\n address: '0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7',\n blockCreated: 2395094,\n },\n ensUniversalResolver: {\n address: '0x4D41762915F83c76EcaF6776d9b08076aA32b492',\n blockCreated: 17_168_484,\n },\n },\n ensTlds: ['.linea.eth'],\n testnet: true,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const mainnet = /*#__PURE__*/ defineChain({\n id: 1,\n name: 'Ethereum',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n blockTime: 12_000,\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 ensUniversalResolver: {\n address: '0xeeeeeeee14d718c2b47d9923deab1335e144eeee',\n blockCreated: 23_085_558,\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14_353_601,\n },\n },\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 1 // mainnet\n\nexport const optimism = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 10,\n name: 'OP Mainnet',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://mainnet.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Optimism Explorer',\n url: 'https://optimistic.etherscan.io',\n apiUrl: 'https://api-optimistic.etherscan.io/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0xe5965Ab5962eDc7477C8520243A95517CD252fA9',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0xdfe97868233d1aa22e815a266982f2cf17685a27',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 4286263,\n },\n portal: {\n [sourceId]: {\n address: '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',\n },\n },\n },\n sourceId,\n})\n","import { chainConfig } from '../../op-stack/chainConfig.js'\nimport { defineChain } from '../../utils/chain/defineChain.js'\n\nconst sourceId = 11_155_111 // sepolia\n\nexport const optimismSepolia = /*#__PURE__*/ defineChain({\n ...chainConfig,\n id: 11155420,\n name: 'OP Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia.optimism.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Blockscout',\n url: 'https://optimism-sepolia.blockscout.com',\n apiUrl: 'https://optimism-sepolia.blockscout.com/api',\n },\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: '0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1',\n },\n },\n l2OutputOracle: {\n [sourceId]: {\n address: '0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F',\n },\n },\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 1620204,\n },\n portal: {\n [sourceId]: {\n address: '0x16Fc5058F25648194471939df75CF27A2fdC48BC',\n },\n },\n l1StandardBridge: {\n [sourceId]: {\n address: '0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1',\n },\n },\n },\n testnet: true,\n sourceId,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const scroll = /*#__PURE__*/ defineChain({\n id: 534_352,\n name: 'Scroll',\n blockTime: 3000,\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://rpc.scroll.io'],\n webSocket: ['wss://wss-rpc.scroll.io/ws'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://scrollscan.com',\n apiUrl: 'https://api.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 14,\n },\n },\n testnet: false,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const scrollSepolia = /*#__PURE__*/ defineChain({\n id: 534_351,\n name: 'Scroll Sepolia',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://sepolia-rpc.scroll.io'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Scrollscan',\n url: 'https://sepolia.scrollscan.com',\n apiUrl: 'https://api-sepolia.scrollscan.com/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 9473,\n },\n },\n testnet: true,\n})\n","import { defineChain } from '../../utils/chain/defineChain.js'\n\nexport const sepolia = /*#__PURE__*/ defineChain({\n id: 11_155_111,\n name: 'Sepolia',\n nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 },\n rpcUrls: {\n default: {\n http: ['https://11155111.rpc.thirdweb.com'],\n },\n },\n blockExplorers: {\n default: {\n name: 'Etherscan',\n url: 'https://sepolia.etherscan.io',\n apiUrl: 'https://api-sepolia.etherscan.io/api',\n },\n },\n contracts: {\n multicall3: {\n address: '0xca11bde05977b3631167028862be2a173976ca11',\n blockCreated: 751532,\n },\n ensUniversalResolver: {\n address: '0xeeeeeeee14d718c2b47d9923deab1335e144eeee',\n blockCreated: 8_928_790,\n },\n },\n testnet: true,\n})\n","import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n scroll,\n scrollSepolia,\n sepolia,\n} from \"viem/chains\";\n\nimport { ensTestEnvL1Chain } from \"@ensnode/datasources\";\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { ArbitrumIcon } from \"./icons/ArbitrumIcon\";\nimport { ArbitrumTestnetIcon } from \"./icons/ArbitrumTestnetIcon\";\nimport { BaseIcon } from \"./icons/BaseIcon\";\nimport { BaseTestnetIcon } from \"./icons/BaseTestnetIcon\";\nimport { EthereumIcon } from \"./icons/EthereumIcon\";\nimport { EthereumLocalIcon } from \"./icons/EthereumLocalIcon\";\nimport { EthereumTestnetIcon } from \"./icons/EthereumTestnetIcon\";\nimport { LineaIcon } from \"./icons/LineaIcon\";\nimport { LineaTestnetIcon } from \"./icons/LineaTestnetIcon\";\nimport { OptimismIcon } from \"./icons/OptimismIcon\";\nimport { OptimismTestnetIcon } from \"./icons/OptimismTestnetIcon\";\nimport { ScrollIcon } from \"./icons/ScrollIcon\";\nimport { ScrollTestnetIcon } from \"./icons/ScrollTestnetIcon\";\nimport { UnrecognizedChainIcon } from \"./icons/UnrecognizedChainIcon\";\n\nexport interface ChainIconProps {\n chainId: ChainId;\n width?: number;\n height?: number;\n}\n\n/**\n * Mapping of {@link ChainId} to chain icon.\n */\nconst chainIcons = new Map<number, React.ComponentType<React.SVGProps<SVGSVGElement>>>([\n // mainnet\n [mainnet.id, EthereumIcon],\n [base.id, BaseIcon],\n [linea.id, LineaIcon],\n [optimism.id, OptimismIcon],\n [arbitrum.id, ArbitrumIcon],\n [scroll.id, ScrollIcon],\n\n // sepolia\n [sepolia.id, EthereumTestnetIcon],\n [baseSepolia.id, BaseTestnetIcon],\n [lineaSepolia.id, LineaTestnetIcon],\n [optimismSepolia.id, OptimismTestnetIcon],\n [arbitrumSepolia.id, ArbitrumTestnetIcon],\n [scrollSepolia.id, ScrollTestnetIcon],\n\n // ens-test-env\n [ensTestEnvL1Chain.id, EthereumLocalIcon],\n]);\n\n/**\n * Renders an icon for the provided chain ID.\n */\nexport function ChainIcon({ chainId, width = 20, height = 20 }: ChainIconProps) {\n const Icon = chainIcons.get(chainId) || UnrecognizedChainIcon;\n return <Icon width={width} height={height} />;\n}\n","import type React from \"react\";\n\nexport const ArbitrumIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask id=\"mask0_1105_4046\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"18\" height=\"20\">\n <path d=\"M18 0H0V20H18V0Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_1105_4046)\">\n <path\n d=\"M10.5066 11.5199L9.52179 14.1748C9.49274 14.2484 9.49274 14.3302 9.52179 14.4039L11.2129 18.9734L13.17 17.8606L10.8224 11.5199C10.7683 11.3726 10.5606 11.3726 10.5066 11.5199Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M12.4786 7.05258C12.4246 6.90533 12.2169 6.90533 12.1629 7.05258L11.1781 9.70751C11.149 9.7812 11.149 9.86301 11.1781 9.93664L13.9495 17.4188L15.9066 16.306L12.4786 7.05258Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M9 1.23952C9.04984 1.23952 9.09559 1.25179 9.14127 1.27634L16.6039 5.51851C16.6912 5.5676 16.7452 5.6576 16.7452 5.75578V14.2401C16.7452 14.3383 16.6912 14.4283 16.6039 14.4774L9.14127 18.7237C9.09974 18.7482 9.04984 18.7605 9 18.7605C8.95016 18.7605 8.90441 18.7482 8.85873 18.7237L1.40028 14.4815C1.31302 14.4324 1.259 14.3424 1.259 14.2443V5.75578C1.259 5.6576 1.31302 5.5676 1.40028 5.51851L8.86289 1.27634C8.90441 1.25179 8.95432 1.23952 9 1.23952ZM9 0C8.7341 0 8.46813 0.0695437 8.23128 0.204541L0.768699 4.44672C0.295014 4.71671 0 5.21579 0 5.75578V14.2401C0 14.7801 0.295014 15.2833 0.768699 15.5533L8.23128 19.7954C8.46813 19.9304 8.7341 20 9 20C9.2659 20 9.53187 19.9304 9.76872 19.7954L17.2313 15.5533C17.7091 15.2833 18 14.7842 18 14.2401V5.75578C18 5.21579 17.705 4.71262 17.2313 4.44263L9.77288 0.204541C9.53187 0.0695437 9.2659 0 9 0Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M4.07031 17.4269L4.75591 15.5779L6.13541 16.7069L4.84732 17.8687L4.07031 17.4269Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M8.37115 5.15039H6.48059C6.33932 5.15039 6.21046 5.2363 6.16477 5.3672L2.10938 16.3142L4.06644 17.4269L8.53321 5.3713C8.57057 5.26493 8.49162 5.15039 8.37115 5.15039Z\"\n fill=\"#1B4ADD\"\n />\n <path\n d=\"M11.6831 5.15039H9.79251C9.65125 5.15039 9.52239 5.2363 9.47671 5.3672L4.84375 17.8687L6.80079 18.9815L11.841 5.37538C11.8825 5.26493 11.7995 5.15039 11.6831 5.15039Z\"\n fill=\"#1B4ADD\"\n />\n </g>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ArbitrumTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <mask id=\"mask0_1105_4086\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"18\" height=\"20\">\n <path d=\"M18 0H0V20H18V0Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_1105_4086)\">\n <path\n d=\"M10.5066 11.5199L9.52179 14.1748C9.49274 14.2484 9.49274 14.3302 9.52179 14.4039L11.2129 18.9734L13.17 17.8606L10.8224 11.5199C10.7683 11.3726 10.5606 11.3726 10.5066 11.5199Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M12.4786 7.05258C12.4246 6.90533 12.2169 6.90533 12.1629 7.05258L11.1781 9.70751C11.149 9.7812 11.149 9.86301 11.1781 9.93664L13.9495 17.4188L15.9066 16.306L12.4786 7.05258Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M9 1.23952C9.04984 1.23952 9.09559 1.25179 9.14127 1.27634L16.6039 5.51851C16.6912 5.5676 16.7452 5.6576 16.7452 5.75578V14.2401C16.7452 14.3383 16.6912 14.4283 16.6039 14.4774L9.14127 18.7237C9.09974 18.7482 9.04984 18.7605 9 18.7605C8.95016 18.7605 8.90441 18.7482 8.85873 18.7237L1.40028 14.4815C1.31302 14.4324 1.259 14.3424 1.259 14.2443V5.75578C1.259 5.6576 1.31302 5.5676 1.40028 5.51851L8.86289 1.27634C8.90441 1.25179 8.95432 1.23952 9 1.23952ZM9 0C8.7341 0 8.46813 0.0695437 8.23128 0.204541L0.768699 4.44672C0.295014 4.71671 0 5.21579 0 5.75578V14.2401C0 14.7801 0.295014 15.2833 0.768699 15.5533L8.23128 19.7954C8.46813 19.9304 8.7341 20 9 20C9.2659 20 9.53187 19.9304 9.76872 19.7954L17.2313 15.5533C17.7091 15.2833 18 14.7842 18 14.2401V5.75578C18 5.21579 17.705 4.71262 17.2313 4.44263L9.77288 0.204541C9.53187 0.0695437 9.2659 0 9 0Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M4.07031 17.4269L4.75591 15.5779L6.13541 16.7069L4.84732 17.8687L4.07031 17.4269Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M8.37115 5.15039H6.48059C6.33932 5.15039 6.21046 5.2363 6.16477 5.3672L2.10938 16.3142L4.06644 17.4269L8.53321 5.3713C8.57057 5.26493 8.49162 5.15039 8.37115 5.15039Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M11.6831 5.15039H9.79251C9.65125 5.15039 9.52239 5.2363 9.47671 5.3672L4.84375 17.8687L6.80079 18.9815L11.841 5.37538C11.8825 5.26493 11.7995 5.15039 11.6831 5.15039Z\"\n fill=\"#FFB300\"\n />\n </g>\n </svg>\n);\n","import type React from \"react\";\n\nexport const BaseIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"146\"\n height=\"146\"\n viewBox=\"0 0 146 146\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <circle cx=\"73\" cy=\"73\" r=\"73\" fill=\"#0052FF\" />\n <path\n d=\"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z\"\n fill=\"white\"\n />\n </svg>\n);\n","import type React from \"react\";\n\nexport const BaseTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_75_249)\">\n <path\n d=\"M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M10.0442 16.9491C13.9201 16.9491 17.062 13.8125 17.062 9.94339C17.062 6.07428 13.9201 2.93774 10.0442 2.93774C6.36701 2.93774 3.35038 5.76096 3.05078 9.35451H12.3268V10.5323H3.05078C3.35038 14.1258 6.36701 16.9491 10.0442 16.9491Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_75_249\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"12\"\n height=\"20\"\n viewBox=\"0 0 12 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M6.12793 19.2568L0.425781 11.3174L6.12793 14.6455L11.834 11.3174L6.12793 19.2568ZM11.8311 10.0029L6.12891 13.333L6.12793 13.332V13.333L0.425781 10.0029L6.12793 0.900391V0.904297L6.12891 0.900391L11.8311 10.0029Z\"\n fill=\"#272727\"\n />\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumLocalIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M10.1285 0.900879L10.0039 1.31915V13.2105L10.1285 13.3333L15.8311 10.0031L10.1285 0.900879Z\"\n fill=\"#B22222\"\n />\n <path\n d=\"M10.1285 0.900879L4.42578 10.0031L10.1285 13.3333L10.1285 7.68823V0.900879Z\"\n fill=\"#FA8072\"\n />\n <path\n d=\"M10.1288 14.6459L10.0586 14.7305V19.054L10.1288 19.2566L15.8349 11.3174L10.1288 14.6459Z\"\n fill=\"#DC143C\"\n />\n <path d=\"M10.1285 19.2566V14.6459L4.42578 11.3174L10.1285 19.2566Z\" fill=\"#FA8072\" />\n <path d=\"M10.1289 13.3333L15.8315 10.0032L10.1289 7.68799V13.3333Z\" fill=\"#8B0000\" />\n <path d=\"M4.42578 10.0032L10.1284 13.3333V7.68799L4.42578 10.0032Z\" fill=\"#CD5C5C\" />\n </svg>\n);\n","import type React from \"react\";\n\nexport const EthereumTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M10.1285 0.900879L10.0039 1.31915V13.2105L10.1285 13.3333L15.8311 10.0031L10.1285 0.900879Z\"\n fill=\"#FFD700\"\n />\n <path\n d=\"M10.1285 0.900879L4.42578 10.0031L10.1285 13.3333L10.1285 7.68823V0.900879Z\"\n fill=\"#FFEA70\"\n />\n <path\n d=\"M10.1288 14.6459L10.0586 14.7305V19.054L10.1288 19.2566L15.8349 11.3174L10.1288 14.6459Z\"\n fill=\"#FFC300\"\n />\n <path d=\"M10.1285 19.2566V14.6459L4.42578 11.3174L10.1285 19.2566Z\" fill=\"#FFEA70\" />\n <path d=\"M10.1289 13.3333L15.8315 10.0032L10.1289 7.68799V13.3333Z\" fill=\"#FFB300\" />\n <path d=\"M4.42578 10.0032L10.1284 13.3333V7.68799L4.42578 10.0032Z\" fill=\"#FFD54F\" />\n </svg>\n);\n","import type React from \"react\";\n\nexport const LineaIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"200\"\n height=\"208\"\n viewBox=\"0 0 200 208\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect width=\"199.4\" height=\"207.623\" fill=\"#61DFFF\" />\n <g clipPath=\"url(#clip0_2318_291)\">\n <path\n d=\"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z\"\n fill=\"#121212\"\n />\n <path\n d=\"M132.369 85.7575C141.687 85.7575 149.241 78.2037 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2037 123.05 85.7575 132.369 85.7575Z\"\n fill=\"#121212\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_2318_291\">\n <rect\n width=\"99.5407\"\n height=\"103.977\"\n fill=\"white\"\n transform=\"translate(49.7001 52.0134)\"\n />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const LineaTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_75_253)\">\n <path d=\"M20 0H0V20H20V0Z\" fill=\"#FFB300\" />\n <mask\n id=\"mask0_75_253\"\n style={{ maskType: \"luminance\" }}\n maskUnits=\"userSpaceOnUse\"\n x=\"5\"\n y=\"5\"\n width=\"11\"\n height=\"10\"\n >\n <path d=\"M15.1779 5.00134H5.72156V14.9991H15.1779V5.00134Z\" fill=\"white\" />\n </mask>\n <g mask=\"url(#mask0_75_253)\">\n <path\n d=\"M13.5751 14.9991H5.72156V6.62366H7.51845V13.3759H13.5751V14.9982V14.9991Z\"\n fill=\"#121212\"\n />\n <path\n d=\"M13.5751 8.24597C14.4603 8.24597 15.178 7.51964 15.178 6.62366C15.178 5.72768 14.4603 5.00134 13.5751 5.00134C12.6898 5.00134 11.9723 5.72768 11.9723 6.62366C11.9723 7.51964 12.6898 8.24597 13.5751 8.24597Z\"\n fill=\"#121212\"\n />\n </g>\n </g>\n <defs>\n <clipPath id=\"clip0_75_253\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const OptimismIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_68_566)\">\n <path\n d=\"M9.99876 15.0916V18.8278C6.15551 18.8278 3.03906 15.7113 3.03906 11.8681C3.03906 8.02486 6.15551 4.90841 9.99876 4.90841V1.17212C13.842 1.17212 16.9585 4.28861 16.9585 8.13181C16.9585 11.9751 13.842 15.0916 9.99876 15.0916Z\"\n fill=\"white\"\n />\n <path\n d=\"M10 0C4.47766 0 0 4.47765 0 9.99999C0 15.5223 4.47766 20 10 20C15.5224 20 20 15.5223 20 9.99999C20 4.47765 15.5224 0 10 0ZM10 15.0916V18.8278C6.15676 18.8278 3.04031 15.7113 3.04031 11.8681C3.04031 8.0249 6.15676 4.90845 10 4.90845V1.17216C13.8432 1.17216 16.9597 4.28865 16.9597 8.13185C16.9597 11.9751 13.8432 15.0916 10 15.0916ZM13.4432 9.96774V10.0322C11.9253 10.7883 10.7883 11.9252 10.0323 13.4432H9.96775C9.21171 11.9252 8.07471 10.7883 6.55676 10.0322V9.96774C8.07471 9.2117 9.21171 8.07475 9.96775 6.5568H10.0323C10.7883 8.07475 11.9253 9.2117 13.4432 9.96774Z\"\n fill=\"#FF0420\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_68_566\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const OptimismTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4080)\">\n <path\n d=\"M9.99876 15.0916V18.8278C6.15551 18.8278 3.03906 15.7113 3.03906 11.8681C3.03906 8.02486 6.15551 4.90841 9.99876 4.90841V1.17212C13.842 1.17212 16.9585 4.28861 16.9585 8.13181C16.9585 11.9751 13.842 15.0916 9.99876 15.0916Z\"\n fill=\"white\"\n />\n <path\n d=\"M10 0C4.47766 0 0 4.47765 0 9.99999C0 15.5223 4.47766 20 10 20C15.5224 20 20 15.5223 20 9.99999C20 4.47765 15.5224 0 10 0ZM10 15.0916V18.8278C6.15676 18.8278 3.04031 15.7113 3.04031 11.8681C3.04031 8.0249 6.15676 4.90845 10 4.90845V1.17216C13.8432 1.17216 16.9597 4.28865 16.9597 8.13185C16.9597 11.9751 13.8432 15.0916 10 15.0916ZM13.4432 9.96774V10.0322C11.9253 10.7883 10.7883 11.9252 10.0323 13.4432H9.96775C9.21171 11.9252 8.07471 10.7883 6.55676 10.0322V9.96774C8.07471 9.2117 9.21171 8.07475 9.96775 6.5568H10.0323C10.7883 8.07475 11.9253 9.2117 13.4432 9.96774Z\"\n fill=\"#FFB300\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4080\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ScrollIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4058)\">\n <path\n d=\"M18.0834 13.185V2.11004C18.0684 1.18504 17.3484 0.439209 16.4434 0.439209H5.1626C2.72927 0.475042 0.773438 2.51671 0.773438 5.01838C0.773438 5.86254 0.993438 6.58504 1.33177 7.21837C1.61927 7.74587 2.0676 8.24337 2.50844 8.61171C2.63344 8.71754 2.5751 8.67171 2.9576 8.91337C3.31224 9.12703 3.69285 9.29423 4.0901 9.41088L4.08177 16.0325C4.09677 16.3492 4.12677 16.65 4.20677 16.9284C4.45677 17.8634 5.0901 18.5784 5.9501 18.925C6.31094 19.0684 6.71511 19.1667 7.14927 19.1742L16.1576 19.2042C17.9518 19.2042 19.4076 17.7125 19.4076 15.8667C19.4098 15.3478 19.2914 14.8354 19.0618 14.37C18.8321 13.9046 18.4967 13.499 18.0834 13.185Z\"\n fill=\"#FFEEDA\"\n />\n <path\n d=\"M18.3037 15.95C18.267 17.1325 17.3187 18.0816 16.1562 18.0816L9.95703 18.0591C10.4699 17.4495 10.7511 16.6783 10.7512 15.8816C10.7512 14.5783 9.9937 13.6816 9.9937 13.6816H16.1637C17.3479 13.6816 18.3112 14.6691 18.3112 15.8816L18.3037 15.95Z\"\n fill=\"#EBC28E\"\n />\n <path\n d=\"M3.09594 7.67732C2.3826 6.98399 1.8826 6.08816 1.8826 5.02566V4.91232C1.94094 3.09732 3.39844 1.63566 5.1701 1.58316H16.4509C16.7451 1.59899 16.9801 1.80982 16.9801 2.11816V11.8965C17.2384 11.9423 17.3634 11.9798 17.6134 12.0698C17.8118 12.1448 18.0834 12.3032 18.0834 12.3032V2.11816C18.0684 1.19149 17.3484 0.444824 16.4434 0.444824H5.1626C2.72927 0.483158 0.773438 2.52482 0.773438 5.02566C0.773438 6.47982 1.4201 7.72232 2.47927 8.59649C2.5526 8.65649 2.61927 8.73232 2.8101 8.73232C3.14094 8.73232 3.37677 8.46066 3.36177 8.16732C3.35427 7.91816 3.25094 7.82816 3.09594 7.67732Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M16.1561 12.5366H7.30943C7.02046 12.5421 6.74538 12.6616 6.54417 12.8691C6.34295 13.0765 6.23191 13.3551 6.23526 13.6441V14.9474C6.25026 15.5499 6.75026 16.0624 7.34609 16.0624H8.00026V14.9474H7.34609V13.6741H7.70609C8.82443 13.6741 9.64776 14.7366 9.64776 15.8741C9.64776 16.8833 8.75026 18.1716 7.25026 18.0658C5.91943 17.9758 5.19859 16.7633 5.19859 15.8741V4.82995C5.19859 4.33245 4.80109 3.92578 4.31609 3.92578H3.43359V5.05578H4.08776V15.8808C4.05109 18.0808 5.61776 19.1891 7.25026 19.1891L16.1636 19.2191C17.9578 19.2191 19.4136 17.7274 19.4136 15.8816C19.4136 14.0358 17.9511 12.5366 16.1561 12.5366ZM18.3028 15.9491C18.2661 17.1324 17.3169 18.0816 16.1553 18.0816L9.95526 18.0591C10.4684 17.4495 10.7499 16.6784 10.7503 15.8816C10.7503 14.5783 9.99193 13.6816 9.99193 13.6816H16.1644C17.3478 13.6816 18.3111 14.6683 18.3111 15.8816L18.3028 15.9491ZM13.7728 5.25911H7.10276V4.12911H13.7728C13.8461 4.12998 13.9185 4.14529 13.9859 4.17416C14.0533 4.20302 14.1144 4.24488 14.1656 4.29735C14.2168 4.34982 14.2572 4.41186 14.2845 4.47994C14.3117 4.54801 14.3253 4.62079 14.3244 4.69411C14.3253 4.76744 14.3117 4.84022 14.2845 4.90829C14.2572 4.97637 14.2168 5.03841 14.1656 5.09088C14.1144 5.14335 14.0533 5.18521 13.9859 5.21407C13.9185 5.24294 13.8461 5.25824 13.7728 5.25911Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M13.7755 10.5775H7.10547V9.4475H13.7755C13.8488 9.44837 13.9212 9.46367 13.9886 9.49254C14.056 9.5214 14.1171 9.56327 14.1683 9.61573C14.2196 9.6682 14.2599 9.73024 14.2872 9.79832C14.3144 9.8664 14.328 9.93917 14.3271 10.0125C14.328 10.0858 14.3144 10.1586 14.2872 10.2267C14.2599 10.2948 14.2196 10.3568 14.1683 10.4093C14.1171 10.4617 14.056 10.5036 13.9886 10.5325C13.9212 10.5613 13.8488 10.5766 13.7755 10.5775ZM14.9521 7.91833H7.10547V6.78833H14.9446C15.018 6.7892 15.0904 6.80451 15.1578 6.83337C15.2252 6.86224 15.2863 6.9041 15.3375 6.95656C15.3887 7.00903 15.4291 7.07107 15.4564 7.13915C15.4836 7.20723 15.4972 7.28001 15.4963 7.35333C15.4983 7.42632 15.4857 7.49898 15.4594 7.56706C15.433 7.63515 15.3933 7.6973 15.3427 7.7499C15.292 7.80249 15.2314 7.84447 15.1643 7.87339C15.0973 7.9023 15.0251 7.91758 14.9521 7.91833Z\"\n fill=\"#101010\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4058\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const ScrollTestnetIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_1105_4096)\">\n <path\n d=\"M18.0834 13.185V2.11004C18.0684 1.18504 17.3484 0.439209 16.4434 0.439209H5.1626C2.72927 0.475042 0.773438 2.51671 0.773438 5.01838C0.773438 5.86254 0.993438 6.58504 1.33177 7.21837C1.61927 7.74587 2.0676 8.24337 2.50844 8.61171C2.63344 8.71754 2.5751 8.67171 2.9576 8.91337C3.31224 9.12703 3.69285 9.29423 4.0901 9.41088L4.08177 16.0325C4.09677 16.3492 4.12677 16.65 4.20677 16.9284C4.45677 17.8634 5.0901 18.5784 5.9501 18.925C6.31094 19.0684 6.71511 19.1667 7.14927 19.1742L16.1576 19.2042C17.9518 19.2042 19.4076 17.7125 19.4076 15.8667C19.4098 15.3478 19.2914 14.8354 19.0618 14.37C18.8321 13.9046 18.4967 13.499 18.0834 13.185Z\"\n fill=\"#FFB300\"\n />\n <path\n d=\"M18.3037 15.95C18.267 17.1325 17.3187 18.0816 16.1562 18.0816L9.95703 18.0591C10.4699 17.4495 10.7511 16.6783 10.7512 15.8816C10.7512 14.5783 9.9937 13.6816 9.9937 13.6816H16.1637C17.3479 13.6816 18.3112 14.6691 18.3112 15.8816L18.3037 15.95Z\"\n fill=\"#DF9C00\"\n />\n <path\n d=\"M3.09594 7.67732C2.3826 6.98399 1.8826 6.08816 1.8826 5.02566V4.91232C1.94094 3.09732 3.39844 1.63566 5.1701 1.58316H16.4509C16.7451 1.59899 16.9801 1.80982 16.9801 2.11816V11.8965C17.2384 11.9423 17.3634 11.9798 17.6134 12.0698C17.8118 12.1448 18.0834 12.3032 18.0834 12.3032V2.11816C18.0684 1.19149 17.3484 0.444824 16.4434 0.444824H5.1626C2.72927 0.483158 0.773438 2.52482 0.773438 5.02566C0.773438 6.47982 1.4201 7.72232 2.47927 8.59649C2.5526 8.65649 2.61927 8.73232 2.8101 8.73232C3.14094 8.73232 3.37677 8.46066 3.36177 8.16732C3.35427 7.91816 3.25094 7.82816 3.09594 7.67732Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M16.1561 12.5366H7.30943C7.02046 12.5421 6.74538 12.6616 6.54417 12.8691C6.34295 13.0765 6.23191 13.3551 6.23526 13.6441V14.9474C6.25026 15.5499 6.75026 16.0624 7.34609 16.0624H8.00026V14.9474H7.34609V13.6741H7.70609C8.82443 13.6741 9.64776 14.7366 9.64776 15.8741C9.64776 16.8833 8.75026 18.1716 7.25026 18.0658C5.91943 17.9758 5.19859 16.7633 5.19859 15.8741V4.82995C5.19859 4.33245 4.80109 3.92578 4.31609 3.92578H3.43359V5.05578H4.08776V15.8808C4.05109 18.0808 5.61776 19.1891 7.25026 19.1891L16.1636 19.2191C17.9578 19.2191 19.4136 17.7274 19.4136 15.8816C19.4136 14.0358 17.9511 12.5366 16.1561 12.5366ZM18.3028 15.9491C18.2661 17.1324 17.3169 18.0816 16.1553 18.0816L9.95526 18.0591C10.4684 17.4495 10.7499 16.6784 10.7503 15.8816C10.7503 14.5783 9.99193 13.6816 9.99193 13.6816H16.1644C17.3478 13.6816 18.3111 14.6683 18.3111 15.8816L18.3028 15.9491ZM13.7728 5.25911H7.10276V4.12911H13.7728C13.8461 4.12998 13.9185 4.14529 13.9859 4.17416C14.0533 4.20302 14.1144 4.24488 14.1656 4.29735C14.2168 4.34982 14.2572 4.41186 14.2845 4.47994C14.3117 4.54801 14.3253 4.62079 14.3244 4.69411C14.3253 4.76744 14.3117 4.84022 14.2845 4.90829C14.2572 4.97637 14.2168 5.03841 14.1656 5.09088C14.1144 5.14335 14.0533 5.18521 13.9859 5.21407C13.9185 5.24294 13.8461 5.25824 13.7728 5.25911Z\"\n fill=\"#101010\"\n />\n <path\n d=\"M13.7755 10.5775H7.10547V9.4475H13.7755C13.8488 9.44837 13.9212 9.46367 13.9886 9.49254C14.056 9.5214 14.1171 9.56327 14.1683 9.61573C14.2196 9.6682 14.2599 9.73024 14.2872 9.79832C14.3144 9.8664 14.328 9.93917 14.3271 10.0125C14.328 10.0858 14.3144 10.1586 14.2872 10.2267C14.2599 10.2948 14.2196 10.3568 14.1683 10.4093C14.1171 10.4617 14.056 10.5036 13.9886 10.5325C13.9212 10.5613 13.8488 10.5766 13.7755 10.5775ZM14.9521 7.91833H7.10547V6.78833H14.9446C15.018 6.7892 15.0904 6.80451 15.1578 6.83337C15.2252 6.86224 15.2863 6.9041 15.3375 6.95656C15.3887 7.00903 15.4291 7.07107 15.4564 7.13915C15.4836 7.20723 15.4972 7.28001 15.4963 7.35333C15.4983 7.42632 15.4857 7.49898 15.4594 7.56706C15.433 7.63515 15.3933 7.6973 15.3427 7.7499C15.292 7.80249 15.2314 7.84447 15.1643 7.87339C15.0973 7.9023 15.0251 7.91758 14.9521 7.91833Z\"\n fill=\"#101010\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_1105_4096\">\n <rect width=\"20\" height=\"20\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import type React from \"react\";\n\nexport const UnrecognizedChainIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width=\"18\"\n height=\"20\"\n viewBox=\"0 0 18 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M1.75004 5.83325L9.00004 9.99992M9.00004 9.99992L16.25 5.83325M9.00004 9.99992L9 18.3333M16.5 6.6665C16.4997 6.37423 16.4225 6.08718 16.2763 5.83414C16.13 5.5811 15.9198 5.37097 15.6667 5.22484L9.83333 1.8915C9.57997 1.74522 9.29256 1.66821 9 1.66821C8.70744 1.66821 8.42003 1.74522 8.16667 1.8915L2.33333 5.22484C2.08022 5.37097 1.86998 5.5811 1.72372 5.83414C1.57745 6.08718 1.5003 6.37423 1.5 6.6665V13.3332C1.5003 13.6254 1.57745 13.9125 1.72372 14.1655C1.86998 14.4186 2.08022 14.6287 2.33333 14.7748L8.16667 18.1082C8.42003 18.2545 8.70744 18.3315 9 18.3315C9.29256 18.3315 9.57997 18.2545 9.83333 18.1082L15.6667 14.7748C15.9198 14.6287 16.13 14.4186 16.2763 14.1655C16.4225 13.9125 16.4997 13.6254 16.5 13.3332V6.6665Z\"\n stroke=\"#737373\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n","import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n scroll,\n scrollSepolia,\n sepolia,\n} from \"viem/chains\";\n\nimport { ensTestEnvL1Chain } from \"@ensnode/datasources\";\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nexport const SUPPORTED_CHAINS = [\n ensTestEnvL1Chain,\n mainnet,\n sepolia,\n base,\n baseSepolia,\n linea,\n lineaSepolia,\n optimism,\n optimismSepolia,\n arbitrum,\n arbitrumSepolia,\n scroll,\n scrollSepolia,\n];\n\n/**\n * Mapping of {@link ChainId} to prettified chain name.\n *\n * NOTE: We prefer our custom names here, rather than those provided by default in `Chain#name`.\n */\nconst CUSTOM_CHAIN_NAMES = new Map<ChainId, string>([\n [ensTestEnvL1Chain.id, \"Ethereum Local (ens-test-env)\"],\n [mainnet.id, \"Mainnet\"],\n [sepolia.id, \"Ethereum Sepolia\"],\n [base.id, \"Base\"],\n [baseSepolia.id, \"Base Sepolia\"],\n [linea.id, \"Linea\"],\n [lineaSepolia.id, \"Linea Sepolia\"],\n [optimism.id, \"Optimism\"],\n [optimismSepolia.id, \"Optimism Sepolia\"],\n [arbitrum.id, \"Arbitrum\"],\n [arbitrumSepolia.id, \"Arbitrum Sepolia\"],\n [scroll.id, \"Scroll\"],\n [scrollSepolia.id, \"Scroll Sepolia\"],\n]);\n\n/**\n * Returns a prettified chain name for the provided chain id.\n */\nexport function getChainName(chainId: ChainId): string {\n const name = CUSTOM_CHAIN_NAMES.get(chainId);\n return name || `Unknown Chain (${chainId})`;\n}\n","import type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { getChainName } from \"../../utils/chains\";\n\nexport interface ChainNameProps {\n chainId: ChainId;\n className: string;\n}\n\n/**\n * Renders a prettified chain name for the provided {@link ChainId}.\n */\nexport const ChainName = ({ chainId, className }: ChainNameProps) => (\n <p className={className}>{getChainName(chainId)}</p>\n);\n","import { fromUnixTime, intlFormat } from \"date-fns\";\nimport { useEffect, useState } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Client-only absolute time component\n */\nexport function AbsoluteTime({\n timestamp,\n options,\n}: {\n timestamp: UnixTimestamp;\n options: Intl.DateTimeFormatOptions;\n}) {\n const date = fromUnixTime(timestamp);\n const [absoluteTime, setAbsoluteTime] = useState<string>(\"\");\n\n useEffect(() => {\n setAbsoluteTime(intlFormat(date, options));\n }, [date, options]);\n\n return <>{absoluteTime}</>;\n}\n","import { formatDistanceStrict, fromUnixTime } from \"date-fns\";\nimport { useEffect, useState } from \"react\";\n\nimport type { Duration } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Display Duration component\n */\nexport function DisplayDuration({ duration }: { duration: Duration }) {\n const [timeDistance, setTimeDistance] = useState<string>(\"\");\n\n // formatDistanceStrict needs two UnixTimestamp values\n // so we create `beginsAt` and `endsAt` timestamps\n // where `beginsAt = endsAt - duration`\n const beginsAt = fromUnixTime(0);\n const endsAt = fromUnixTime(duration);\n\n useEffect(() => {\n setTimeDistance(formatDistanceStrict(beginsAt, endsAt));\n }, [beginsAt, endsAt]);\n\n return timeDistance;\n}\n","import { formatDistance, formatDistanceStrict, fromUnixTime } from \"date-fns\";\nimport { millisecondsInSecond } from \"date-fns/constants\";\nimport type * as React from \"react\";\nimport { useEffect, useState } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { cn } from \"../../utils/cn\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport { AbsoluteTime } from \"./AbsoluteTime\";\n\n/**\n * Formats a Unix timestamp as its relative distance with now\n *\n * @param timestamp - the timestamp to format as a relative time\n * @param enforcePast - if true, enforces that the return value won't relate to the future.\n * Helpful for UI contexts where it's nonsensical for a value to relate to the future. Ex: how long ago an event happened.\n * Note how different systems may have misaligned clocks. `enforcePast` aims to protect from UI confusion when\n * the client's clock is set incorrectly in the past, such that events happening \"now\" might otherwise appear to\n * be coming from the future.\n * @param includeSeconds - if true includes seconds in the result\n * @param conciseFormatting - if true removes special prefixes / suffixes such as \"about ...\" or \"in almost ...\"\n * @param relativeTo - if defined represents the timestamp to compare with. Otherwise, the timestamp param is compared with the present.\n */\nexport function formatRelativeTime(\n timestamp: UnixTimestamp,\n enforcePast = false,\n includeSeconds = false,\n conciseFormatting = false,\n relativeTo?: UnixTimestamp,\n): string {\n const date = fromUnixTime(timestamp);\n const compareWith = typeof relativeTo !== \"undefined\" ? fromUnixTime(relativeTo) : new Date();\n\n if (\n (enforcePast && date >= compareWith) ||\n (!includeSeconds &&\n !conciseFormatting &&\n Math.abs(date.getTime() - compareWith.getTime()) < 60 * millisecondsInSecond)\n ) {\n return \"just now\";\n }\n\n if (conciseFormatting) {\n return formatDistanceStrict(date, compareWith, { addSuffix: true });\n }\n\n return formatDistance(date, compareWith, {\n addSuffix: true,\n includeSeconds,\n });\n}\n\n/**\n * Client-only relative time component\n */\nexport function RelativeTime({\n timestamp,\n enforcePast = false,\n includeSeconds = false,\n conciseFormatting = false,\n tooltipPosition = \"top\",\n tooltipStyles,\n relativeTo,\n prefix,\n contentWrapper,\n}: {\n timestamp: UnixTimestamp;\n enforcePast?: boolean;\n includeSeconds?: boolean;\n conciseFormatting?: boolean;\n tooltipPosition?: React.ComponentProps<typeof TooltipContent>[\"side\"];\n tooltipStyles?: string;\n relativeTo?: UnixTimestamp;\n prefix?: string;\n /**\n * A component to be rendered as a wrapper for the Relative Time component content.\n */\n contentWrapper?: ({ children }: React.PropsWithChildren) => React.ReactNode;\n}) {\n const [relativeTime, setRelativeTime] = useState<string>(\"\");\n\n useEffect(() => {\n setRelativeTime(\n formatRelativeTime(timestamp, enforcePast, includeSeconds, conciseFormatting, relativeTo),\n );\n }, [timestamp, conciseFormatting, enforcePast, includeSeconds, relativeTo]);\n\n const tooltipTriggerContent = (\n <>\n {prefix}\n {relativeTime}\n </>\n );\n\n return (\n <Tooltip delayDuration={250}>\n <TooltipTrigger className=\"nhui:cursor-text\">\n {typeof contentWrapper === \"function\"\n ? contentWrapper({ children: tooltipTriggerContent })\n : tooltipTriggerContent}\n </TooltipTrigger>\n <TooltipContent\n side={tooltipPosition}\n className={cn(\n \"nhui:bg-[#171717] nhui:text-xs nhui:text-white nhui:text-left nhui:shadow-md nhui:outline-none nhui:w-fit nhui:duration-0\",\n tooltipStyles,\n )}\n >\n <AbsoluteTime\n timestamp={timestamp}\n options={{\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n }}\n />{\" \"}\n (Local time)\n <br />\n <AbsoluteTime\n timestamp={timestamp}\n options={{\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n timeZone: \"UTC\",\n }}\n />{\" \"}\n (UTC)\n </TooltipContent>\n </Tooltip>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nconst TooltipArrow = TooltipPrimitive.Arrow;\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"nhui:bg-foreground nhui:text-background nhui:animate-in nhui:fade-in-0 nhui:zoom-in-95 nhui:data-[state=closed]:animate-out nhui:data-[state=closed]:fade-out-0 nhui:data-[state=closed]:zoom-out-95 nhui:data-[side=bottom]:slide-in-from-top-2 nhui:data-[side=left]:slide-in-from-right-2 nhui:data-[side=right]:slide-in-from-left-2 nhui:data-[side=top]:slide-in-from-bottom-2 nhui:z-50 nhui:w-fit nhui:origin-(--radix-tooltip-content-transform-origin) nhui:rounded-md nhui:px-3 nhui:py-1.5 nhui:text-xs nhui:text-balance\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"nhui:bg-foreground nhui:fill-foreground nhui:z-50 nhui:size-2.5 nhui:translate-y-[calc(-50%_-_2px)] nhui:rotate-45 nhui:rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, TooltipArrow };\n","import type React from \"react\";\n\nexport const EnsServiceProviderIcon = (props: React.SVGAttributes<SVGElement>) => {\n return (\n <svg\n width=\"175\"\n height=\"45\"\n viewBox=\"0 0 175 45\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect x=\"0.229241\" y=\"0.955803\" width=\"174.437\" height=\"43.5415\" rx=\"21.7708\" fill=\"white\" />\n <rect\n x=\"0.229241\"\n y=\"0.955803\"\n width=\"174.437\"\n height=\"43.5415\"\n rx=\"21.7708\"\n stroke=\"#DBDBDB\"\n strokeWidth=\"0.458482\"\n />\n <g clipPath=\"url(#clip0_5306_7300)\">\n <path\n d=\"M14.4666 19.8652C14.7642 20.501 15.5084 21.7728 15.5084 21.7728L24.0291 7.59668L15.7317 13.4317C15.248 13.7683 14.8387 14.2172 14.541 14.7408C13.7596 16.3492 13.7596 18.2194 14.4666 19.8652Z\"\n fill=\"url(#paint0_linear_5306_7300)\"\n />\n <path\n d=\"M11.1168 24.5033C11.3028 27.2337 12.6795 29.7772 14.8376 31.423L24.0281 37.8565C24.0281 37.8565 18.2608 29.5154 13.4237 21.2117C12.94 20.3514 12.6051 19.3789 12.4563 18.369C12.3819 17.9202 12.3819 17.4713 12.4563 17.0225C12.3447 17.2469 12.0842 17.7331 12.0842 17.7331C11.6005 18.743 11.2656 19.8278 11.0796 20.9499C10.9679 22.1468 10.9679 23.3437 11.1168 24.5033Z\"\n fill=\"#A0A8D4\"\n />\n <path\n d=\"M34.5625 25.6254C34.2649 24.9895 33.5207 23.7178 33.5207 23.7178L25 37.8565L33.3347 32.0589C33.8184 31.7222 34.2277 31.2734 34.5253 30.7497C35.2695 29.1413 35.3067 27.2712 34.5625 25.6254Z\"\n fill=\"url(#paint1_linear_5306_7300)\"\n />\n <path\n d=\"M37.9425 20.9499C37.7565 18.2194 36.3798 15.6759 34.2217 14.0302L25.0312 7.59668C25.0312 7.59668 30.7985 15.9378 35.6356 24.2414C36.1193 25.1017 36.4542 26.0742 36.603 27.0841C36.6774 27.533 36.6774 27.9818 36.603 28.4307C36.7147 28.2063 36.9751 27.72 36.9751 27.72C37.4588 26.7101 37.7937 25.6254 37.9797 24.5407C38.0542 23.3063 38.0542 22.1468 37.9425 20.9499Z\"\n fill=\"#A0A8D4\"\n />\n <path\n d=\"M14.5399 14.7408C14.8376 14.2172 15.2097 13.7683 15.7306 13.4317L24.0281 7.59668L15.5074 21.7354C15.5074 21.7354 14.7632 20.4636 14.4655 19.8278C13.7586 18.2194 13.7586 16.3492 14.5399 14.7408ZM11.1168 24.5033C11.3028 27.2338 12.6795 29.7772 14.8376 31.423L24.0281 37.8565C24.0281 37.8565 18.2608 29.5154 13.4237 21.2117C12.94 20.3514 12.6051 19.3789 12.4563 18.369C12.3819 17.9202 12.3819 17.4713 12.4563 17.0225C12.3446 17.2469 12.0842 17.7332 12.0842 17.7332C11.6005 18.7431 11.2656 19.8278 11.0796 20.9499C10.9679 22.1468 10.9679 23.3438 11.1168 24.5033ZM34.558 25.6254C34.2603 24.9895 33.5162 23.7178 33.5162 23.7178L24.9955 37.8565L33.3301 32.0589C33.8138 31.7222 34.2231 31.2734 34.5208 30.7497C35.265 29.1414 35.3022 27.2712 34.558 25.6254ZM37.9068 20.9873C37.7207 18.2568 36.344 15.7133 34.1859 14.0676L25.0327 7.59668C25.0327 7.59668 30.8 15.9378 35.637 24.2414C36.1208 25.1017 36.4556 26.0742 36.6045 27.0841C36.6789 27.533 36.6789 27.9818 36.6045 28.4307C36.7161 28.2063 36.9765 27.72 36.9765 27.72C37.4603 26.7101 37.7951 25.6254 37.9812 24.5407C38.0556 23.3063 38.0556 22.1468 37.9068 20.9873Z\"\n fill=\"url(#paint2_linear_5306_7300)\"\n />\n <path\n d=\"M20.6328 23.185L23.3837 25.9359L28.427 19.9756\"\n stroke=\"black\"\n strokeWidth=\"1.83393\"\n strokeLinecap=\"square\"\n />\n </g>\n <path\n d=\"M55.1627 14.7253C55.1627 15.5875 55.0012 16.326 54.6782 16.9408C54.3578 17.553 53.9201 18.0219 53.3653 18.3475C52.813 18.6732 52.1865 18.836 51.4858 18.836C50.785 18.836 50.1572 18.6732 49.6023 18.3475C49.0501 18.0193 48.6124 17.5491 48.2894 16.9369C47.969 16.3221 47.8088 15.5849 47.8088 14.7253C47.8088 13.863 47.969 13.1258 48.2894 12.5136C48.6124 11.8988 49.0501 11.4286 49.6023 11.103C50.1572 10.7774 50.785 10.6146 51.4858 10.6146C52.1865 10.6146 52.813 10.7774 53.3653 11.103C53.9201 11.4286 54.3578 11.8988 54.6782 12.5136C55.0012 13.1258 55.1627 13.863 55.1627 14.7253ZM53.7052 14.7253C53.7052 14.1183 53.6101 13.6064 53.42 13.1896C53.2324 12.7702 52.9719 12.4537 52.6385 12.2401C52.305 12.0239 51.9208 11.9158 51.4858 11.9158C51.0507 11.9158 50.6665 12.0239 50.333 12.2401C49.9996 12.4537 49.7378 12.7702 49.5476 13.1896C49.3601 13.6064 49.2663 14.1183 49.2663 14.7253C49.2663 15.3322 49.3601 15.8454 49.5476 16.2648C49.7378 16.6816 49.9996 16.9981 50.333 17.2144C50.6665 17.428 51.0507 17.5348 51.4858 17.5348C51.9208 17.5348 52.305 17.428 52.6385 17.2144C52.9719 16.9981 53.2324 16.6816 53.42 16.2648C53.6101 15.8454 53.7052 15.3322 53.7052 14.7253ZM57.0835 18.7266V10.724H62.2101V11.9392H58.5332V14.1118H61.8585V15.327H58.5332V18.7266H57.0835ZM64.0811 18.7266V10.724H69.2077V11.9392H65.5307V14.1118H68.856V15.327H65.5307V18.7266H64.0811ZM72.5283 10.724V18.7266H71.0786V10.724H72.5283ZM81.4982 13.4241H80.0368C79.9951 13.1844 79.9183 12.9721 79.8063 12.7871C79.6942 12.5996 79.5549 12.4407 79.3882 12.3104C79.2214 12.1802 79.0313 12.0825 78.8177 12.0174C78.6067 11.9496 78.3787 11.9158 78.1338 11.9158C77.6988 11.9158 77.3133 12.0252 76.9772 12.244C76.6412 12.4602 76.3781 12.778 76.1879 13.1974C75.9977 13.6142 75.9027 14.1235 75.9027 14.7253C75.9027 15.3374 75.9977 15.8532 76.1879 16.2726C76.3807 16.6894 76.6438 17.0047 76.9772 17.2183C77.3133 17.4293 77.6975 17.5348 78.1299 17.5348C78.3696 17.5348 78.5936 17.5035 78.802 17.441C79.013 17.3759 79.2019 17.2808 79.3686 17.1557C79.5379 17.0307 79.6799 16.877 79.7945 16.6947C79.9118 16.5123 79.9925 16.3039 80.0368 16.0695L81.4982 16.0773C81.4435 16.4576 81.325 16.8145 81.1426 17.1479C80.9629 17.4814 80.7271 17.7757 80.4354 18.031C80.1436 18.2837 79.8024 18.4817 79.4116 18.625C79.0209 18.7656 78.5871 18.836 78.1104 18.836C77.407 18.836 76.7792 18.6732 76.227 18.3475C75.6747 18.0219 75.2397 17.5517 74.9219 16.9369C74.6041 16.3221 74.4452 15.5849 74.4452 14.7253C74.4452 13.863 74.6054 13.1258 74.9258 12.5136C75.2462 11.8988 75.6825 11.4286 76.2348 11.103C76.7871 10.7774 77.4123 10.6146 78.1104 10.6146C78.5559 10.6146 78.9701 10.6771 79.353 10.8021C79.7359 10.9272 80.0772 11.1108 80.3768 11.3531C80.6763 11.5927 80.9225 11.8871 81.1153 12.2362C81.3107 12.5826 81.4383 12.9786 81.4982 13.4241ZM84.8257 10.724V18.7266H83.376V10.724H84.8257ZM87.9734 18.7266H86.426L89.2433 10.724H91.0329L93.8542 18.7266H92.3068L90.1694 12.3651H90.1069L87.9734 18.7266ZM88.0242 15.5888H92.2443V16.7533H88.0242V15.5888ZM95.4584 18.7266V10.724H96.9081V17.5113H100.433V18.7266H95.4584Z\"\n fill=\"black\"\n />\n <path\n d=\"M48.012 33.7266V25.724H53.2168V26.9392H49.4617V29.1118H52.9472V30.327H49.4617V32.5113H53.248V33.7266H48.012ZM61.2721 25.724V33.7266H59.9827L56.2119 28.2756H56.1455V33.7266H54.6958V25.724H55.9931L59.7599 31.1789H59.8303V25.724H61.2721ZM67.2008 27.9239C67.1643 27.5826 67.0106 27.3169 66.7397 27.1268C66.4714 26.9366 66.1223 26.8415 65.6925 26.8415C65.3903 26.8415 65.1311 26.8871 64.9149 26.9783C64.6987 27.0695 64.5333 27.1932 64.4187 27.3495C64.304 27.5058 64.2454 27.6842 64.2428 27.8848C64.2428 28.0515 64.2806 28.1961 64.3561 28.3186C64.4343 28.441 64.5398 28.5452 64.6726 28.6312C64.8055 28.7145 64.9527 28.7849 65.1142 28.8422C65.2757 28.8995 65.4385 28.9477 65.6026 28.9867L66.3529 29.1743C66.6551 29.2446 66.9455 29.3397 67.2243 29.4596C67.5056 29.5794 67.757 29.7305 67.9784 29.9128C68.2024 30.0952 68.3796 30.3153 68.5098 30.5732C68.6401 30.8311 68.7052 31.1333 68.7052 31.4797C68.7052 31.9486 68.5854 32.3615 68.3457 32.7184C68.1061 33.0727 67.7596 33.3501 67.3063 33.5507C66.8556 33.7487 66.3099 33.8477 65.6691 33.8477C65.0465 33.8477 64.5059 33.7513 64.0474 33.5585C63.5916 33.3658 63.2347 33.0844 62.9768 32.7145C62.7215 32.3446 62.5834 31.8939 62.5626 31.3625H63.9888C64.0097 31.6413 64.0956 31.8731 64.2467 32.0581C64.3978 32.243 64.5945 32.3811 64.8368 32.4722C65.0816 32.5634 65.3552 32.609 65.6573 32.609C65.9725 32.609 66.2487 32.5621 66.4857 32.4683C66.7254 32.372 66.913 32.2391 67.0484 32.0698C67.1839 31.8978 67.2529 31.6973 67.2555 31.468C67.2529 31.2596 67.1917 31.0877 67.0719 30.9522C66.952 30.8142 66.784 30.6995 66.5678 30.6084C66.3542 30.5146 66.1041 30.4312 65.8176 30.3583L64.9071 30.1238C64.248 29.9545 63.727 29.6979 63.3441 29.3541C62.9638 29.0076 62.7736 28.5478 62.7736 27.9747C62.7736 27.5032 62.9012 27.0903 63.1565 26.736C63.4144 26.3817 63.7648 26.1069 64.2077 25.9115C64.6505 25.7135 65.152 25.6146 65.712 25.6146C66.2799 25.6146 66.7775 25.7135 67.2047 25.9115C67.6345 26.1069 67.9719 26.3791 68.2168 26.7282C68.4616 27.0747 68.588 27.4732 68.5958 27.9239H67.2008ZM77.0761 27.9239C77.0396 27.5826 76.8859 27.3169 76.615 27.1268C76.3467 26.9366 75.9976 26.8415 75.5678 26.8415C75.2656 26.8415 75.0064 26.8871 74.7902 26.9783C74.574 27.0695 74.4086 27.1932 74.2939 27.3495C74.1793 27.5058 74.1207 27.6842 74.1181 27.8848C74.1181 28.0515 74.1559 28.1961 74.2314 28.3186C74.3096 28.441 74.4151 28.5452 74.5479 28.6312C74.6808 28.7145 74.828 28.7849 74.9895 28.8422C75.151 28.8995 75.3138 28.9477 75.4779 28.9867L76.2282 29.1743C76.5303 29.2446 76.8208 29.3397 77.0995 29.4596C77.3809 29.5794 77.6323 29.7305 77.8537 29.9128C78.0777 30.0952 78.2549 30.3153 78.3851 30.5732C78.5154 30.8311 78.5805 31.1333 78.5805 31.4797C78.5805 31.9486 78.4606 32.3615 78.221 32.7184C77.9813 33.0727 77.6349 33.3501 77.1816 33.5507C76.7309 33.7487 76.1852 33.8477 75.5443 33.8477C74.9217 33.8477 74.3812 33.7513 73.9227 33.5585C73.4668 33.3658 73.11 33.0844 72.8521 32.7145C72.5968 32.3446 72.4587 31.8939 72.4379 31.3625H73.8641C73.8849 31.6413 73.9709 31.8731 74.122 32.0581C74.2731 32.243 74.4698 32.3811 74.712 32.4722C74.9569 32.5634 75.2304 32.609 75.5326 32.609C75.8478 32.609 76.124 32.5621 76.361 32.4683C76.6007 32.372 76.7882 32.2391 76.9237 32.0698C77.0592 31.8978 77.1282 31.6973 77.1308 31.468C77.1282 31.2596 77.067 31.0877 76.9471 30.9522C76.8273 30.8142 76.6593 30.6995 76.4431 30.6084C76.2295 30.5146 75.9794 30.4312 75.6928 30.3583L74.7824 30.1238C74.1233 29.9545 73.6023 29.6979 73.2194 29.3541C72.839 29.0076 72.6489 28.5478 72.6489 27.9747C72.6489 27.5032 72.7765 27.0903 73.0318 26.736C73.2897 26.3817 73.6401 26.1069 74.0829 25.9115C74.5258 25.7135 75.0272 25.6146 75.5873 25.6146C76.1552 25.6146 76.6528 25.7135 77.08 25.9115C77.5098 26.1069 77.8472 26.3791 78.092 26.7282C78.3369 27.0747 78.4633 27.4732 78.4711 27.9239H77.0761ZM82.4675 33.8438C81.8657 33.8438 81.346 33.7187 80.9084 33.4687C80.4733 33.216 80.1386 32.8591 79.9041 32.398C79.6697 31.9343 79.5525 31.3886 79.5525 30.7608C79.5525 30.1434 79.6697 29.6015 79.9041 29.1352C80.1412 28.6663 80.472 28.3016 80.8967 28.0411C81.3213 27.778 81.8201 27.6465 82.3932 27.6465C82.7631 27.6465 83.1122 27.7064 83.4405 27.8262C83.7713 27.9434 84.063 28.1258 84.3157 28.3733C84.571 28.6207 84.7716 28.9359 84.9175 29.3189C85.0634 29.6992 85.1363 30.1525 85.1363 30.6787V31.1124H80.2168V30.159H83.7804C83.7778 29.8881 83.7192 29.6471 83.6046 29.4361C83.4899 29.2225 83.3297 29.0545 83.1239 28.932C82.9208 28.8096 82.6837 28.7484 82.4128 28.7484C82.1236 28.7484 81.8696 28.8187 81.6508 28.9594C81.432 29.0975 81.2614 29.2798 81.1389 29.5064C81.0191 29.7305 80.9579 29.9766 80.9553 30.245V31.0773C80.9553 31.4263 81.0191 31.7259 81.1467 31.976C81.2744 32.2235 81.4528 32.4136 81.6821 32.5465C81.9113 32.6767 82.1796 32.7419 82.487 32.7419C82.6928 32.7419 82.8791 32.7132 83.0458 32.6559C83.2125 32.596 83.3571 32.5087 83.4795 32.3941C83.602 32.2795 83.6944 32.1375 83.757 31.9682L85.0777 32.1167C84.9943 32.4657 84.8354 32.7705 84.601 33.031C84.3691 33.2889 84.0722 33.4895 83.7101 33.6328C83.348 33.7735 82.9338 33.8438 82.4675 33.8438ZM86.333 33.7266V27.7246H87.7045V28.7249H87.7671C87.8765 28.3785 88.064 28.1115 88.3297 27.9239C88.598 27.7337 88.9041 27.6387 89.248 27.6387C89.3261 27.6387 89.4134 27.6426 89.5098 27.6504C89.6088 27.6556 89.6909 27.6647 89.756 27.6777V28.9789C89.6961 28.9581 89.601 28.9399 89.4707 28.9242C89.3431 28.906 89.2193 28.8969 89.0995 28.8969C88.8416 28.8969 88.6098 28.9529 88.404 29.0649C88.2008 29.1743 88.0406 29.3267 87.9234 29.5221C87.8061 29.7175 87.7475 29.9428 87.7475 30.1981V33.7266H86.333ZM96.2395 27.7246L94.1021 33.7266H92.5391L90.4017 27.7246H91.91L93.2893 32.1831H93.3519L94.7351 27.7246H96.2395ZM97.2184 33.7266V27.7246H98.6329V33.7266H97.2184ZM97.9295 26.8728C97.7055 26.8728 97.5127 26.7985 97.3512 26.65C97.1897 26.499 97.1089 26.3179 97.1089 26.1069C97.1089 25.8933 97.1897 25.7122 97.3512 25.5638C97.5127 25.4127 97.7055 25.3371 97.9295 25.3371C98.1562 25.3371 98.3489 25.4127 98.5078 25.5638C98.6693 25.7122 98.7501 25.8933 98.7501 26.1069C98.7501 26.3179 98.6693 26.499 98.5078 26.65C98.3489 26.7985 98.1562 26.8728 97.9295 26.8728ZM102.705 33.8438C102.106 33.8438 101.592 33.7122 101.162 33.4491C100.735 33.186 100.405 32.8226 100.173 32.3589C99.9442 31.8926 99.8296 31.356 99.8296 30.749C99.8296 30.1395 99.9468 29.6015 100.181 29.1352C100.416 28.6663 100.747 28.3016 101.174 28.0411C101.604 27.778 102.112 27.6465 102.698 27.6465C103.185 27.6465 103.616 27.7363 103.991 27.9161C104.369 28.0932 104.67 28.3446 104.894 28.6702C105.118 28.9933 105.245 29.371 105.277 29.8034H103.925C103.87 29.5143 103.74 29.2733 103.534 29.0805C103.331 28.8851 103.058 28.7875 102.717 28.7875C102.428 28.7875 102.174 28.8656 101.955 29.0219C101.736 29.1756 101.566 29.397 101.443 29.6862C101.324 29.9753 101.264 30.3218 101.264 30.7256C101.264 31.1346 101.324 31.4863 101.443 31.7806C101.563 32.0724 101.731 32.2977 101.947 32.4566C102.166 32.6129 102.423 32.6911 102.717 32.6911C102.926 32.6911 103.112 32.652 103.276 32.5738C103.443 32.4931 103.582 32.3772 103.694 32.2261C103.806 32.075 103.883 31.8913 103.925 31.6751H105.277C105.243 32.0997 105.118 32.4762 104.902 32.8044C104.685 33.13 104.391 33.3853 104.018 33.5703C103.646 33.7526 103.208 33.8438 102.705 33.8438ZM109.095 33.8438C108.493 33.8438 107.974 33.7187 107.536 33.4687C107.101 33.216 106.766 32.8591 106.532 32.398C106.297 31.9343 106.18 31.3886 106.18 30.7608C106.18 30.1434 106.297 29.6015 106.532 29.1352C106.769 28.6663 107.1 28.3016 107.524 28.0411C107.949 27.778 108.448 27.6465 109.021 27.6465C109.391 27.6465 109.74 27.7064 110.068 27.8262C110.399 27.9434 110.691 28.1258 110.944 28.3733C111.199 28.6207 111.399 28.9359 111.545 29.3189C111.691 29.6992 111.764 30.1525 111.764 30.6787V31.1124H106.845V30.159H110.408C110.406 29.8881 110.347 29.6471 110.232 29.4361C110.118 29.2225 109.958 29.0545 109.752 28.932C109.549 28.8096 109.311 28.7484 109.041 28.7484C108.751 28.7484 108.497 28.8187 108.279 28.9594C108.06 29.0975 107.889 29.2798 107.767 29.5064C107.647 29.7305 107.586 29.9766 107.583 30.245V31.0773C107.583 31.4263 107.647 31.7259 107.775 31.976C107.902 32.2235 108.081 32.4136 108.31 32.5465C108.539 32.6767 108.807 32.7419 109.115 32.7419C109.321 32.7419 109.507 32.7132 109.674 32.6559C109.84 32.596 109.985 32.5087 110.107 32.3941C110.23 32.2795 110.322 32.1375 110.385 31.9682L111.705 32.1167C111.622 32.4657 111.463 32.7705 111.229 33.031C110.997 33.2889 110.7 33.4895 110.338 33.6328C109.976 33.7735 109.562 33.8438 109.095 33.8438ZM115.753 33.7266V25.724H118.754C119.368 25.724 119.884 25.8386 120.301 26.0678C120.72 26.2971 121.037 26.6123 121.251 27.0134C121.467 27.412 121.575 27.8653 121.575 28.3733C121.575 28.8865 121.467 29.3423 121.251 29.7409C121.034 30.1395 120.715 30.4534 120.293 30.6826C119.871 30.9092 119.352 31.0226 118.734 31.0226H116.745V29.8308H118.539C118.898 29.8308 119.193 29.7682 119.422 29.6432C119.651 29.5182 119.82 29.3462 119.93 29.1274C120.042 28.9086 120.098 28.6572 120.098 28.3733C120.098 28.0893 120.042 27.8392 119.93 27.623C119.82 27.4068 119.65 27.2388 119.418 27.119C119.189 26.9965 118.893 26.9353 118.531 26.9353H117.202V33.7266H115.753ZM122.772 33.7266V27.7246H124.143V28.7249H124.206C124.315 28.3785 124.503 28.1115 124.768 27.9239C125.037 27.7337 125.343 27.6387 125.687 27.6387C125.765 27.6387 125.852 27.6426 125.948 27.6504C126.047 27.6556 126.129 27.6647 126.195 27.6777V28.9789C126.135 28.9581 126.04 28.9399 125.909 28.9242C125.782 28.906 125.658 28.8969 125.538 28.8969C125.28 28.8969 125.048 28.9529 124.843 29.0649C124.639 29.1743 124.479 29.3267 124.362 29.5221C124.245 29.7175 124.186 29.9428 124.186 30.1981V33.7266H122.772ZM129.505 33.8438C128.919 33.8438 128.411 33.7148 127.981 33.4569C127.551 33.199 127.218 32.8383 126.981 32.3746C126.746 31.9109 126.629 31.369 126.629 30.749C126.629 30.129 126.746 29.5859 126.981 29.1196C127.218 28.6533 127.551 28.2912 127.981 28.0333C128.411 27.7754 128.919 27.6465 129.505 27.6465C130.091 27.6465 130.599 27.7754 131.029 28.0333C131.459 28.2912 131.791 28.6533 132.026 29.1196C132.263 29.5859 132.381 30.129 132.381 30.749C132.381 31.369 132.263 31.9109 132.026 32.3746C131.791 32.8383 131.459 33.199 131.029 33.4569C130.599 33.7148 130.091 33.8438 129.505 33.8438ZM129.513 32.7106C129.831 32.7106 130.097 32.6233 130.31 32.4488C130.524 32.2717 130.683 32.0346 130.787 31.7376C130.894 31.4407 130.947 31.1098 130.947 30.7451C130.947 30.3778 130.894 30.0457 130.787 29.7487C130.683 29.4491 130.524 29.2108 130.31 29.0336C130.097 28.8565 129.831 28.7679 129.513 28.7679C129.187 28.7679 128.916 28.8565 128.7 29.0336C128.487 29.2108 128.326 29.4491 128.22 29.7487C128.115 30.0457 128.063 30.3778 128.063 30.7451C128.063 31.1098 128.115 31.4407 128.22 31.7376C128.326 32.0346 128.487 32.2717 128.7 32.4488C128.916 32.6233 129.187 32.7106 129.513 32.7106ZM138.739 27.7246L136.601 33.7266H135.038L132.901 27.7246H134.409L135.788 32.1831H135.851L137.234 27.7246H138.739ZM139.717 33.7266V27.7246H141.132V33.7266H139.717ZM140.429 26.8728C140.205 26.8728 140.012 26.7985 139.85 26.65C139.689 26.499 139.608 26.3179 139.608 26.1069C139.608 25.8933 139.689 25.7122 139.85 25.5638C140.012 25.4127 140.205 25.3371 140.429 25.3371C140.655 25.3371 140.848 25.4127 141.007 25.5638C141.168 25.7122 141.249 25.8933 141.249 26.1069C141.249 26.3179 141.168 26.499 141.007 26.65C140.848 26.7985 140.655 26.8728 140.429 26.8728ZM144.814 33.8321C144.342 33.8321 143.92 33.7109 143.548 33.4687C143.175 33.2264 142.881 32.8747 142.665 32.4136C142.449 31.9525 142.34 31.3925 142.34 30.7334C142.34 30.0665 142.45 29.5038 142.669 29.0454C142.89 28.5843 143.188 28.2365 143.563 28.0021C143.939 27.765 144.357 27.6465 144.818 27.6465C145.169 27.6465 145.459 27.7064 145.685 27.8262C145.912 27.9434 146.092 28.0854 146.224 28.2521C146.357 28.4162 146.46 28.5712 146.533 28.7171H146.592V25.724H148.01V33.7266H146.619V32.7809H146.533C146.46 32.9268 146.355 33.0818 146.217 33.2459C146.079 33.4074 145.896 33.5455 145.67 33.6601C145.443 33.7748 145.158 33.8321 144.814 33.8321ZM145.209 32.6715C145.508 32.6715 145.763 32.5908 145.974 32.4293C146.185 32.2652 146.346 32.0372 146.455 31.7455C146.564 31.4537 146.619 31.1137 146.619 30.7256C146.619 30.3374 146.564 30.0001 146.455 29.7135C146.348 29.427 146.189 29.2043 145.978 29.0454C145.77 28.8865 145.513 28.807 145.209 28.807C144.893 28.807 144.63 28.8891 144.419 29.0532C144.208 29.2173 144.049 29.4439 143.942 29.7331C143.836 30.0222 143.782 30.3531 143.782 30.7256C143.782 31.1007 143.836 31.4355 143.942 31.7298C144.052 32.0216 144.212 32.2521 144.423 32.4215C144.637 32.5882 144.899 32.6715 145.209 32.6715ZM152.175 33.8438C151.573 33.8438 151.053 33.7187 150.616 33.4687C150.181 33.216 149.846 32.8591 149.611 32.398C149.377 31.9343 149.26 31.3886 149.26 30.7608C149.26 30.1434 149.377 29.6015 149.611 29.1352C149.848 28.6663 150.179 28.3016 150.604 28.0411C151.028 27.778 151.527 27.6465 152.1 27.6465C152.47 27.6465 152.819 27.7064 153.148 27.8262C153.478 27.9434 153.77 28.1258 154.023 28.3733C154.278 28.6207 154.479 28.9359 154.625 29.3189C154.771 29.6992 154.843 30.1525 154.843 30.6787V31.1124H149.924V30.159H153.488C153.485 29.8881 153.426 29.6471 153.312 29.4361C153.197 29.2225 153.037 29.0545 152.831 28.932C152.628 28.8096 152.391 28.7484 152.12 28.7484C151.831 28.7484 151.577 28.8187 151.358 28.9594C151.139 29.0975 150.969 29.2798 150.846 29.5064C150.726 29.7305 150.665 29.9766 150.662 30.245V31.0773C150.662 31.4263 150.726 31.7259 150.854 31.976C150.982 32.2235 151.16 32.4136 151.389 32.5465C151.618 32.6767 151.887 32.7419 152.194 32.7419C152.4 32.7419 152.586 32.7132 152.753 32.6559C152.92 32.596 153.064 32.5087 153.187 32.3941C153.309 32.2795 153.402 32.1375 153.464 31.9682L154.785 32.1167C154.702 32.4657 154.543 32.7705 154.308 33.031C154.076 33.2889 153.779 33.4895 153.417 33.6328C153.055 33.7735 152.641 33.8438 152.175 33.8438ZM156.04 33.7266V27.7246H157.412V28.7249H157.474C157.584 28.3785 157.771 28.1115 158.037 27.9239C158.305 27.7337 158.611 27.6387 158.955 27.6387C159.033 27.6387 159.121 27.6426 159.217 27.6504C159.316 27.6556 159.398 27.6647 159.463 27.6777V28.9789C159.403 28.9581 159.308 28.9399 159.178 28.9242C159.05 28.906 158.927 28.8969 158.807 28.8969C158.549 28.8969 158.317 28.9529 158.111 29.0649C157.908 29.1743 157.748 29.3267 157.631 29.5221C157.513 29.7175 157.455 29.9428 157.455 30.1981V33.7266H156.04Z\"\n fill=\"#538FFF\"\n />\n <defs>\n <linearGradient\n id=\"paint0_linear_5306_7300\"\n x1=\"24.4167\"\n y1=\"7.95131\"\n x2=\"13.4223\"\n y2=\"19.8077\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.58\" stopColor=\"#A0A8D4\" />\n <stop offset=\"0.73\" stopColor=\"#8791C7\" />\n <stop offset=\"0.91\" stopColor=\"#6470B4\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_5306_7300\"\n x1=\"24.6497\"\n y1=\"37.5268\"\n x2=\"35.64\"\n y2=\"25.6789\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.58\" stopColor=\"#A0A8D4\" />\n <stop offset=\"0.73\" stopColor=\"#8791C7\" />\n <stop offset=\"0.91\" stopColor=\"#6470B4\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_5306_7300\"\n x1=\"24.5202\"\n y1=\"7.4471\"\n x2=\"24.5202\"\n y2=\"37.9687\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#513EFF\" />\n <stop offset=\"0.18\" stopColor=\"#5157FF\" />\n <stop offset=\"0.57\" stopColor=\"#5298FF\" />\n <stop offset=\"1\" stopColor=\"#52E5FF\" />\n </linearGradient>\n <clipPath id=\"clip0_5306_7300\">\n <rect\n width=\"27.0504\"\n height=\"30.2598\"\n fill=\"white\"\n transform=\"translate(11.0039 7.59668)\"\n />\n </clipPath>\n </defs>\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const NameHashLabsIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"128\"\n height=\"31\"\n viewBox=\"0 0 128 31\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M29.0511 0.258789H17.872C17.78 0.258789 17.7065 0.332341 17.7065 0.424275V7.76061C17.7065 7.85254 17.7616 7.9077 17.8536 7.92608C18.2765 7.98124 18.9568 8.01802 19.5452 8.03641C19.8393 8.03641 20.0968 8.05479 20.3174 8.05479H20.5932C20.6851 8.05479 20.7587 7.98124 20.7587 7.88931V3.47648C20.7587 3.38454 20.8322 3.311 20.9242 3.311H25.9989C26.0909 3.311 26.1644 3.38454 26.1644 3.47648V27.6919C26.1644 27.7838 26.0909 27.8574 25.9989 27.8574H20.869C20.869 27.8574 20.869 27.8574 20.8506 27.8574C20.7771 27.8574 20.7035 27.8022 20.7035 27.7287C20.7035 27.7103 20.7035 27.7103 20.7035 27.6919C20.2806 23.371 17.2468 19.804 13.2569 18.5169C12.2272 18.1859 11.1424 18.0204 10.0392 18.0204H4.98282C4.89089 18.0204 4.81734 18.094 4.81734 18.1859V20.9072C4.81734 20.9991 4.89089 21.0726 4.98282 21.0726H8.40277C8.40277 21.0726 8.43954 21.0726 8.53148 21.0726C9.02792 21.0726 10.9218 21.091 11.5837 21.2197L11.6756 21.2381C11.9146 21.2933 12.1353 21.3484 12.3559 21.422C13.7717 21.8633 15.0404 22.7274 15.9781 23.8858C17.0997 25.2464 17.7065 26.9564 17.7065 28.7216V30.7441C17.7065 30.836 17.78 30.9096 17.872 30.9096H29.0695C29.1614 30.9096 29.235 30.836 29.235 30.7441V0.424275C29.2166 0.332341 29.1431 0.258789 29.0511 0.258789ZM24.2889 9.78316H20.7403C20.7403 9.78316 20.1887 9.78315 19.5268 9.76476C18.8648 9.74638 18.111 9.7096 17.6881 9.63605L17.6329 9.61767L17.5778 9.59929C16.9158 9.45219 16.2723 9.21316 15.6655 8.90058C14.7462 8.42252 13.9188 7.7606 13.2569 6.95159C12.1537 5.59096 11.5285 3.86261 11.5285 2.11586V0.424275C11.5285 0.332341 11.455 0.258789 11.363 0.258789H0.165486C0.0735516 0.258789 0 0.332341 0 0.424275V30.7441C0 30.836 0.0735516 30.9096 0.165486 30.9096H11.363C11.455 30.9096 11.5285 30.836 11.5285 30.7441V23.0584C11.5285 22.9665 11.4734 22.9113 11.3814 22.8929C10.8666 22.8194 9.94726 22.7826 9.26695 22.7642H8.67857C8.58663 22.7642 8.51309 22.8378 8.51309 22.9297V27.6735C8.51309 27.7654 8.43954 27.839 8.34761 27.839H3.27285C3.18092 27.839 3.10737 27.7654 3.10737 27.6735V3.47648C3.10737 3.38454 3.18092 3.311 3.27285 3.311H8.43954C8.51309 3.311 8.58663 3.36617 8.60502 3.43971C9.06469 7.11707 11.3814 10.2244 14.5991 11.7689C15.5368 12.2286 16.5665 12.5412 17.6329 12.7066C18.1478 12.7802 18.6994 12.8354 19.2326 12.8354H24.2889C24.3809 12.8354 24.4544 12.7618 24.4544 12.6699V9.94863C24.4544 9.8567 24.3809 9.78316 24.2889 9.78316Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M76.532 23.3515L74.373 23.5871C74.3119 23.369 74.205 23.164 74.0524 22.9721C73.9041 22.7802 73.7034 22.6253 73.4505 22.5076C73.1975 22.3898 72.8878 22.3309 72.5214 22.3309C72.0286 22.3309 71.6142 22.4378 71.2784 22.6515C70.9469 22.8652 70.7833 23.1422 70.7877 23.4824C70.7833 23.7746 70.8902 24.0123 71.1083 24.1955C71.3307 24.3787 71.6971 24.5292 72.2074 24.6469L73.9215 25.0133C74.8724 25.2183 75.5789 25.5433 76.0413 25.9882C76.508 26.433 76.7435 27.0153 76.7479 27.735C76.7435 28.3674 76.5581 28.9257 76.1918 29.4099C75.8297 29.8896 75.326 30.2647 74.6804 30.5352C74.0349 30.8056 73.2934 30.9408 72.456 30.9408C71.226 30.9408 70.2359 30.6835 69.4857 30.1688C68.7355 29.6497 68.2885 28.9279 68.1445 28.0032L70.454 27.7808C70.5587 28.2344 70.7811 28.5768 71.1214 28.808C71.4616 29.0391 71.9043 29.1547 72.4495 29.1547C73.0121 29.1547 73.4636 29.0391 73.8038 28.808C74.1483 28.5768 74.3206 28.2911 74.3206 27.9509C74.3206 27.663 74.2094 27.4253 73.9869 27.2378C73.7689 27.0502 73.4287 26.9063 72.9663 26.806L71.2522 26.4461C70.2883 26.2455 69.5752 25.9075 69.1128 25.432C68.6505 24.9523 68.4215 24.346 68.4259 23.6132C68.4215 22.9939 68.5894 22.4574 68.9296 22.0038C69.2742 21.5458 69.7518 21.1925 70.3624 20.9439C70.9774 20.6909 71.6862 20.5645 72.4887 20.5645C73.6664 20.5645 74.5932 20.8152 75.2693 21.3168C75.9497 21.8184 76.3706 22.4967 76.532 23.3515Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M57.8281 30.7447V17.3457H60.1965V22.3572H60.2946C60.4168 22.113 60.589 21.8535 60.8115 21.5787C61.0339 21.2995 61.3349 21.0618 61.7143 20.8655C62.0938 20.6649 62.578 20.5646 63.1668 20.5646C63.9431 20.5646 64.6432 20.763 65.2669 21.16C65.895 21.5525 66.3922 22.1348 66.7586 22.9068C67.1293 23.6744 67.3147 24.6166 67.3147 25.7331C67.3147 26.8366 67.1337 27.7744 66.7717 28.5464C66.4096 29.3184 65.9168 29.9072 65.2931 30.3129C64.6694 30.7185 63.9628 30.9213 63.1733 30.9213C62.5976 30.9213 62.12 30.8254 61.7405 30.6334C61.3611 30.4415 61.0557 30.2104 60.8246 29.9399C60.5978 29.6652 60.4211 29.4056 60.2946 29.1614H60.1572V30.7447H57.8281ZM60.1507 25.7201C60.1507 26.3699 60.2423 26.9391 60.4255 27.4276C60.613 27.9161 60.8813 28.2978 61.2302 28.5726C61.5835 28.843 62.0109 28.9782 62.5125 28.9782C63.0359 28.9782 63.4743 28.8386 63.8276 28.5595C64.1809 28.276 64.4469 27.89 64.6257 27.4015C64.8089 26.9086 64.9005 26.3481 64.9005 25.7201C64.9005 25.0963 64.8111 24.5424 64.6323 24.0583C64.4535 23.5741 64.1874 23.1947 63.8341 22.9199C63.4808 22.6451 63.0403 22.5077 62.5125 22.5077C62.0066 22.5077 61.577 22.6407 61.2237 22.9068C60.8704 23.1729 60.6021 23.5458 60.4189 24.0256C60.2401 24.5053 60.1507 25.0702 60.1507 25.7201Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M50.773 30.9473C50.1362 30.9473 49.5626 30.8339 49.0523 30.6071C48.5464 30.376 48.1451 30.0358 47.8485 29.5865C47.5563 29.1373 47.4102 28.5833 47.4102 27.9247C47.4102 27.3577 47.5148 26.8888 47.7242 26.5181C47.9336 26.1474 48.2192 25.8508 48.5813 25.6283C48.9433 25.4059 49.3511 25.2379 49.8047 25.1245C50.2627 25.0068 50.7359 24.9217 51.2244 24.8694C51.8132 24.8083 52.2908 24.7538 52.6572 24.7058C53.0236 24.6535 53.2896 24.575 53.4554 24.4703C53.6255 24.3613 53.7105 24.1933 53.7105 23.9665V23.9273C53.7105 23.4344 53.5644 23.0528 53.2722 22.7823C52.98 22.5119 52.5591 22.3767 52.0095 22.3767C51.4294 22.3767 50.9693 22.5032 50.629 22.7562C50.2932 23.0092 50.0664 23.3079 49.9486 23.6525L47.7373 23.3385C47.9117 22.7278 48.1996 22.2175 48.6009 21.8075C49.0022 21.3932 49.4928 21.0835 50.0729 20.8785C50.653 20.6691 51.2942 20.5645 51.9964 20.5645C52.4806 20.5645 52.9625 20.6212 53.4423 20.7346C53.9221 20.848 54.3604 21.0355 54.7573 21.2972C55.1542 21.5545 55.4726 21.9057 55.7125 22.3505C55.9568 22.7954 56.0789 23.3515 56.0789 24.0189V30.7445H53.8021V29.3641H53.7236C53.5797 29.6432 53.3769 29.9049 53.1152 30.1492C52.8578 30.389 52.5329 30.5831 52.1404 30.7314C51.7522 30.8754 51.2964 30.9473 50.773 30.9473ZM51.388 29.207C51.8634 29.207 52.2756 29.1133 52.6245 28.9257C52.9734 28.7338 53.2417 28.4808 53.4292 28.1668C53.6211 27.8528 53.7171 27.5104 53.7171 27.1396V25.9554C53.6429 26.0165 53.5165 26.0732 53.3376 26.1255C53.1632 26.1779 52.9669 26.2237 52.7488 26.2629C52.5307 26.3022 52.3148 26.3371 52.1011 26.3676C51.8874 26.3981 51.702 26.4243 51.545 26.4461C51.1917 26.4941 50.8755 26.5726 50.5963 26.6817C50.3172 26.7907 50.0969 26.9434 49.9355 27.1396C49.7742 27.3315 49.6935 27.5802 49.6935 27.8855C49.6935 28.3216 49.8527 28.6509 50.1711 28.8734C50.4895 29.0958 50.8951 29.207 51.388 29.207Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M38.2871 30.7447V17.3457H40.7144V28.71H46.6157V30.7447H38.2871Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M121.482 7.74902V13.6372H119.113V0.238281H121.429V5.2956H121.547C121.783 4.72859 122.147 4.28152 122.64 3.9544C123.137 3.62291 123.769 3.45717 124.537 3.45717C125.235 3.45717 125.843 3.60329 126.362 3.89552C126.881 4.18775 127.283 4.61519 127.566 5.17784C127.854 5.74049 127.998 6.42745 127.998 7.23871V13.6372H125.63V7.60509C125.63 6.92904 125.455 6.40346 125.106 6.02836C124.762 5.6489 124.277 5.45916 123.654 5.45916C123.235 5.45916 122.86 5.55076 122.528 5.73395C122.201 5.91277 121.944 6.17229 121.756 6.5125C121.573 6.85271 121.482 7.26488 121.482 7.74902Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M117.682 6.24412L115.523 6.47965C115.462 6.26156 115.355 6.05657 115.203 5.86466C115.054 5.67274 114.854 5.51791 114.601 5.40014C114.348 5.28238 114.038 5.22349 113.672 5.22349C113.179 5.22349 112.765 5.33035 112.429 5.54407C112.097 5.7578 111.934 6.03476 111.938 6.37497C111.934 6.6672 112.041 6.90491 112.259 7.0881C112.481 7.27128 112.847 7.42176 113.358 7.53953L115.072 7.9059C116.023 8.1109 116.729 8.43584 117.192 8.88073C117.658 9.32562 117.894 9.9079 117.898 10.6276C117.894 11.26 117.709 11.8183 117.342 12.3024C116.98 12.7822 116.476 13.1573 115.831 13.4277C115.185 13.6982 114.444 13.8334 113.606 13.8334C112.376 13.8334 111.386 13.576 110.636 13.0614C109.886 12.5423 109.439 11.8205 109.295 10.8958L111.604 10.6734C111.709 11.127 111.932 11.4694 112.272 11.7005C112.612 11.9317 113.055 12.0473 113.6 12.0473C114.163 12.0473 114.614 11.9317 114.954 11.7005C115.299 11.4694 115.471 11.1837 115.471 10.8435C115.471 10.5556 115.36 10.3179 115.137 10.1303C114.919 9.94279 114.579 9.79885 114.117 9.69854L112.403 9.3387C111.439 9.13807 110.726 8.80004 110.263 8.32462C109.801 7.84484 109.572 7.23857 109.576 6.50582C109.572 5.88646 109.74 5.34998 110.08 4.89637C110.425 4.4384 110.902 4.08511 111.513 3.83649C112.128 3.58352 112.837 3.45703 113.639 3.45703C114.817 3.45703 115.744 3.70783 116.42 4.20941C117.1 4.711 117.521 5.38924 117.682 6.24412Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M102.789 13.8399C102.152 13.8399 101.578 13.7265 101.068 13.4997C100.562 13.2685 100.161 12.9283 99.8641 12.4791C99.5719 12.0298 99.4258 11.4759 99.4258 10.8173C99.4258 10.2503 99.5305 9.78141 99.7398 9.41067C99.9492 9.03993 100.235 8.74334 100.597 8.52089C100.959 8.29845 101.367 8.13053 101.82 8.01713C102.278 7.89936 102.752 7.81431 103.24 7.76197C103.829 7.70091 104.306 7.64639 104.673 7.59841C105.039 7.54607 105.305 7.46756 105.471 7.36288C105.641 7.25384 105.726 7.08591 105.726 6.85911V6.81986C105.726 6.32699 105.58 5.94535 105.288 5.67492C104.996 5.4045 104.575 5.26929 104.025 5.26929C103.445 5.26929 102.985 5.39578 102.645 5.64876C102.309 5.90173 102.082 6.2005 101.964 6.54507L99.7529 6.23103C99.9274 5.6204 100.215 5.11009 100.617 4.7001C101.018 4.28574 101.508 3.97607 102.089 3.77107C102.669 3.56171 103.31 3.45703 104.012 3.45703C104.496 3.45703 104.978 3.51373 105.458 3.62713C105.938 3.74054 106.376 3.92809 106.773 4.18979C107.17 4.44712 107.488 4.79823 107.728 5.24312C107.972 5.68801 108.095 6.24412 108.095 6.91145V13.6371H105.818V12.2566H105.739C105.595 12.5358 105.393 12.7975 105.131 13.0417C104.873 13.2816 104.549 13.4757 104.156 13.624C103.768 13.7679 103.312 13.8399 102.789 13.8399ZM103.404 12.0996C103.879 12.0996 104.291 12.0058 104.64 11.8183C104.989 11.6264 105.257 11.3734 105.445 11.0594C105.637 10.7453 105.733 10.4029 105.733 10.0322V8.84802C105.659 8.90908 105.532 8.96578 105.353 9.01812C105.179 9.07046 104.983 9.11626 104.764 9.15551C104.546 9.19477 104.33 9.22966 104.117 9.26019C103.903 9.29072 103.718 9.31689 103.561 9.3387C103.207 9.38668 102.891 9.46519 102.612 9.57423C102.333 9.68327 102.113 9.83593 101.951 10.0322C101.79 10.2241 101.709 10.4727 101.709 10.778C101.709 11.2142 101.868 11.5435 102.187 11.766C102.505 11.9884 102.911 12.0996 103.404 12.0996Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M87.0293 13.6372V0.238281H89.4565V5.91059H95.6653V0.238281H98.0991V13.6372H95.6653V7.9453H89.4565V13.6372H87.0293Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M81.1893 13.8334C80.1817 13.8334 79.3116 13.624 78.5788 13.2053C77.8504 12.7822 77.29 12.1847 76.8974 11.4127C76.5049 10.6363 76.3086 9.72253 76.3086 8.67137C76.3086 7.63766 76.5049 6.73044 76.8974 5.94971C77.2943 5.16461 77.8483 4.55398 78.5592 4.11782C79.2701 3.67729 80.1054 3.45703 81.065 3.45703C81.6843 3.45703 82.2688 3.55735 82.8183 3.75798C83.3723 3.95426 83.8608 4.25957 84.2839 4.67393C84.7113 5.08828 85.0471 5.61604 85.2914 6.2572C85.5356 6.894 85.6578 7.65293 85.6578 8.53398V9.26019H77.4208V7.66383H83.3875C83.3832 7.21022 83.285 6.80677 83.0931 6.45348C82.9012 6.09582 82.633 5.8145 82.2884 5.6095C81.9482 5.4045 81.5513 5.302 81.0977 5.302C80.6135 5.302 80.1883 5.41977 79.8219 5.6553C79.4555 5.88646 79.1698 6.19178 78.9648 6.57124C78.7642 6.94634 78.6617 7.35852 78.6573 7.80777V9.20131C78.6573 9.78577 78.7642 10.2874 78.9779 10.7061C79.1916 11.1204 79.4904 11.4388 79.8742 11.6613C80.2581 11.8794 80.7073 11.9884 81.222 11.9884C81.5666 11.9884 81.8784 11.9404 82.1576 11.8445C82.4367 11.7441 82.6788 11.598 82.8838 11.4061C83.0888 11.2142 83.2436 10.9765 83.3483 10.693L85.5596 10.9416C85.4201 11.5261 85.154 12.0364 84.7615 12.4725C84.3733 12.9043 83.876 13.2402 83.2698 13.4801C82.6635 13.7156 81.97 13.8334 81.1893 13.8334Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M60.9434 13.6371V3.58788H63.2071V5.29546H63.3248C63.5342 4.71973 63.8809 4.27048 64.3651 3.94772C64.8492 3.62059 65.4271 3.45703 66.0988 3.45703C66.7792 3.45703 67.3528 3.62277 67.8195 3.95426C68.2905 4.28138 68.622 4.72845 68.8139 5.29546H68.9186C69.1411 4.73717 69.5162 4.29229 70.0439 3.9608C70.576 3.62495 71.2063 3.45703 71.9347 3.45703C72.8594 3.45703 73.6139 3.74926 74.1984 4.33372C74.7828 4.91818 75.0751 5.77088 75.0751 6.89182V13.6371H72.7002V7.2582C72.7002 6.63449 72.5344 6.17869 72.2029 5.89083C71.8714 5.5986 71.4658 5.45248 70.986 5.45248C70.4147 5.45248 69.9676 5.63131 69.6448 5.98896C69.3264 6.34226 69.1672 6.80241 69.1672 7.36942V13.6371H66.8447V7.16006C66.8447 6.64103 66.6876 6.22667 66.3736 5.917C66.0639 5.60732 65.6583 5.45248 65.1567 5.45248C64.8165 5.45248 64.5068 5.53971 64.2277 5.71418C63.9485 5.88428 63.7261 6.12635 63.5603 6.44039C63.3946 6.75007 63.3117 7.11208 63.3117 7.52644V13.6371H60.9434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M53.9937 13.8399C53.3569 13.8399 52.7833 13.7265 52.273 13.4997C51.7671 13.2685 51.3658 12.9283 51.0692 12.4791C50.777 12.0298 50.6309 11.4759 50.6309 10.8173C50.6309 10.2503 50.7355 9.78141 50.9449 9.41067C51.1543 9.03993 51.4399 8.74334 51.802 8.52089C52.164 8.29845 52.5718 8.13053 53.0254 8.01713C53.4834 7.89936 53.9566 7.81431 54.4451 7.76197C55.0339 7.70091 55.5115 7.64639 55.8779 7.59841C56.2443 7.54607 56.5103 7.46756 56.6761 7.36288C56.8462 7.25384 56.9312 7.08591 56.9312 6.85911V6.81986C56.9312 6.32699 56.7851 5.94535 56.4929 5.67492C56.2007 5.4045 55.7798 5.26929 55.2302 5.26929C54.6501 5.26929 54.19 5.39578 53.8497 5.64876C53.5139 5.90173 53.2871 6.2005 53.1693 6.54507L50.958 6.23103C51.1324 5.6204 51.4203 5.11009 51.8216 4.7001C52.2229 4.28574 52.7135 3.97607 53.2936 3.77107C53.8737 3.56171 54.5149 3.45703 55.2171 3.45703C55.7013 3.45703 56.1832 3.51373 56.663 3.62713C57.1428 3.74054 57.5811 3.92809 57.978 4.18979C58.3749 4.44712 58.6934 4.79823 58.9332 5.24312C59.1775 5.68801 59.2996 6.24412 59.2996 6.91145V13.6371H57.0228V12.2566H56.9443C56.8004 12.5358 56.5976 12.7975 56.3359 13.0417C56.0785 13.2816 55.7536 13.4757 55.3611 13.624C54.9729 13.7679 54.5171 13.8399 53.9937 13.8399ZM54.6087 12.0996C55.0841 12.0996 55.4963 12.0058 55.8452 11.8183C56.1941 11.6264 56.4624 11.3734 56.6499 11.0594C56.8418 10.7453 56.9378 10.4029 56.9378 10.0322V8.84802C56.8636 8.90908 56.7372 8.96578 56.5583 9.01812C56.3839 9.07046 56.1876 9.11626 55.9695 9.15551C55.7514 9.19477 55.5355 9.22966 55.3218 9.26019C55.1081 9.29072 54.9227 9.31689 54.7657 9.3387C54.4124 9.38668 54.0962 9.46519 53.817 9.57423C53.5379 9.68327 53.3176 9.83593 53.1562 10.0322C52.9949 10.2241 52.9142 10.4727 52.9142 10.778C52.9142 11.2142 53.0734 11.5435 53.3918 11.766C53.7102 11.9884 54.1158 12.0996 54.6087 12.0996Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M49.2981 0.238281V13.6372H47.1391L40.8256 4.51051H40.7144V13.6372H38.2871V0.238281H40.4592L46.7661 9.37156H46.8839V0.238281H49.2981Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const EfpIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#clip0_510_2632)\">\n <path\n d=\"M6 11.3515L11.6189 2L17.1971 11.3515L11.6189 14.7559L6 11.3515Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.6189 15.7813L6 12.377L11.6189 20.2927L17.1971 12.377L11.6189 15.7813ZM18.7967 16.6837H17.1971V19.0627H14.9825V20.5387H17.1971V22.9999H18.7967V20.5387H20.9705V19.0627H18.7967V16.6837Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_510_2632\">\n <rect width=\"14.9999\" height=\"20.9998\" fill=\"white\" transform=\"translate(6 2)\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const EmailIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n className=\"group\"\n {...props}\n >\n <path\n d=\"M1.5 8.6691V17.25C1.5 18.9069 2.84315 20.25 4.5 20.25H19.5C21.1569 20.25 22.5 18.9069 22.5 17.25V8.6691L13.5723 14.1631C12.6081 14.7564 11.3919 14.7564 10.4277 14.1631L1.5 8.6691Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M22.5 6.90783V6.75C22.5 5.09315 21.1569 3.75 19.5 3.75H4.5C2.84315 3.75 1.5 5.09315 1.5 6.75V6.90783L11.2139 12.8856C11.696 13.1823 12.304 13.1823 12.7861 12.8856L22.5 6.90783Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const FarcasterIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M5.43195 3H18.3314V21H16.4379V12.7548H16.4193C16.21 10.4761 14.2584 8.69032 11.8817 8.69032C9.50495 8.69032 7.55328 10.4761 7.34402 12.7548H7.32544V21H5.43195V3Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2 5.55484L2.76923 8.10968H3.42012V18.4452C3.09332 18.4452 2.8284 18.7051 2.8284 19.0258V19.7226H2.71006C2.38326 19.7226 2.11834 19.9825 2.11834 20.3032V21H8.74556V20.3032C8.74556 19.9825 8.48064 19.7226 8.15385 19.7226H8.0355V19.0258C8.0355 18.7051 7.77058 18.4452 7.44379 18.4452H6.73373V5.55484H2Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M16.5562 18.4452C16.2294 18.4452 15.9645 18.7051 15.9645 19.0258V19.7226H15.8462C15.5194 19.7226 15.2544 19.9825 15.2544 20.3032V21H21.8817V20.3032C21.8817 19.9825 21.6167 19.7226 21.2899 19.7226H21.1716V19.0258C21.1716 18.7051 20.9067 18.4452 20.5799 18.4452V8.10968H21.2308L22 5.55484H17.2663V18.4452H16.5562Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const GitHubIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.0413 2.25977C6.51859 2.25977 2 6.77836 2 12.3011C2 16.736 4.84504 20.5015 8.86156 21.8403C9.36363 21.924 9.53099 21.5893 9.53099 21.3383C9.53099 21.0872 9.53099 20.5015 9.53099 19.6647C6.76962 20.2505 6.18388 18.3259 6.18388 18.3259C5.76549 17.1544 5.09607 16.8197 5.09607 16.8197C4.09194 16.2339 5.09607 16.2339 5.09607 16.2339C6.1002 16.3176 6.60227 17.2381 6.60227 17.2381C7.52272 18.7443 8.94524 18.3259 9.53099 18.0748C9.61466 17.4054 9.8657 16.987 10.2004 16.736C7.94111 16.485 5.59814 15.6482 5.59814 11.799C5.59814 10.7112 6.01653 9.79075 6.60227 9.12133C6.60227 8.78662 6.18388 7.78249 6.76962 6.44365C6.76962 6.44365 7.6064 6.19261 9.53099 7.44778C10.3678 7.19674 11.2045 7.11307 12.0413 7.11307C12.8781 7.11307 13.7149 7.19674 14.5516 7.44778C16.4762 6.10894 17.313 6.44365 17.313 6.44365C17.8987 7.86617 17.4804 8.8703 17.3967 9.12133C18.0661 9.79075 18.4008 10.7112 18.4008 11.799C18.4008 15.6482 16.0578 16.485 13.7985 16.736C14.1333 17.0707 14.468 17.6564 14.468 18.5769C14.468 19.9157 14.468 21.0036 14.468 21.3383C14.468 21.5893 14.6353 21.924 15.1374 21.8403C19.1539 20.5015 21.9989 16.736 21.9989 12.3011C22.0826 6.77836 17.564 2.25977 12.0413 2.25977Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const TelegramIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M21.9597 4.33581C21.9435 4.26415 21.9081 4.19792 21.857 4.14382C21.806 4.08972 21.7411 4.04967 21.6689 4.02773C21.4062 3.97723 21.1343 3.99594 20.8815 4.08191C20.8815 4.08191 3.35842 10.1941 2.35765 10.8709C2.14267 11.0165 2.07017 11.1014 2.03434 11.2008C1.86102 11.686 2.40015 11.8946 2.40015 11.8946L6.91653 13.3226C6.9929 13.3359 7.07142 13.3315 7.14568 13.3097C8.17228 12.6798 17.4784 6.97509 18.0192 6.78345C18.1025 6.75919 18.1666 6.78345 18.15 6.84409C17.935 7.57588 9.89301 14.508 9.84884 14.5501C9.82733 14.5672 9.81057 14.5892 9.80009 14.6142C9.78961 14.6392 9.78575 14.6664 9.78885 14.6932L9.36721 18.9723C9.36721 18.9723 9.19055 20.3041 10.563 18.9723C11.5362 18.0271 12.4703 17.2443 12.937 16.8635C14.4902 17.9042 16.1609 19.0548 16.8817 19.6572C17.003 19.7711 17.1466 19.8601 17.3041 19.9189C17.4616 19.9776 17.6297 20.005 17.7983 19.9993C18.006 19.9747 18.201 19.8894 18.3575 19.7546C18.5139 19.6198 18.6244 19.442 18.6741 19.2448C18.6741 19.2448 21.8656 6.77375 21.9722 5.10317C21.9831 4.94145 21.9972 4.83472 21.9989 4.72232C22.0041 4.59235 21.9909 4.46231 21.9597 4.33581Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n","import type React from \"react\";\n\nexport const TwitterIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M13.5222 10.7749L19.4785 4H18.0671L12.8952 9.88256L8.76437 4H4L10.2466 12.8955L4 20H5.41155L10.8732 13.7878L15.2356 20H20L13.5218 10.7749H13.5222ZM11.5889 12.9738L10.956 12.0881L5.92015 5.03974H8.0882L12.1522 10.728L12.7851 11.6137L18.0677 19.0075H15.8997L11.5889 12.9742V12.9738Z\"\n />\n </svg>\n );\n};\n","import { EnsServiceProviderIcon } from \"../icons/ens/EnsServiceProviderIcon\";\nimport { NameHashLabsIcon } from \"../icons/namehash/NameHashLabsIcon\";\nimport { EfpIcon } from \"../icons/socials/EfpIcon\";\nimport { EmailIcon } from \"../icons/socials/EmailIcon\";\nimport { FarcasterIcon } from \"../icons/socials/FarcasterIcon\";\nimport { GitHubIcon } from \"../icons/socials/GitHubIcon\";\nimport { TelegramIcon } from \"../icons/socials/TelegramIcon\";\nimport { TwitterIcon } from \"../icons/socials/TwitterIcon\";\n\nconst footerProducts = [\n {\n name: \"ENSNode\",\n href: \"https://ensnode.io/\",\n },\n {\n name: \"ENSRainbow\",\n href: \"https://ensrainbow.io\",\n },\n {\n name: \"ENSAdmin\",\n href: \"https://ensadmin.io\",\n },\n {\n name: \"ENS Referral Program\",\n href: \"/ens-referral-awards\",\n },\n {\n name: \"ENSAwards\",\n href: \"https://ensawards.org/\",\n },\n {\n name: \"NameGraph\",\n href: \"https://namegraph.dev\",\n },\n {\n name: \"NameAI\",\n href: \"https://nameai.io/\",\n },\n {\n name: \"NameGuard\",\n href: \"https://nameguard.io\",\n },\n {\n name: \"NameKit\",\n href: \"https://namekit.io\",\n },\n];\n\nconst footerResources = [\n {\n name: \"Contact us\",\n href: \"https://namehashlabs.org/contact\",\n },\n {\n name: \"Careers\",\n href: \"https://namehashlabs.org/careers\",\n },\n {\n name: \"Partners\",\n href: \"https://namehashlabs.org/partners\",\n },\n {\n name: \"Brand assets\",\n href: \"https://namehashlabs.org/brand-assets\",\n },\n];\n\nexport function Footer() {\n return (\n <section className=\"nhui:lg:px-[50px] nhui:px-5 nhui:flex nhui:items-center nhui:justify-center nhui:w-full nhui:border-t nhui:border-gray-200\">\n <div className=\"nhui:pt-8 nhui:pb-5 nhui:flex nhui:flex-col nhui:gap-10 nhui:items-start nhui:justify-between nhui:w-full nhui:max-w-[1216px]\">\n <div className=\"nhui:w-full nhui:gap-5 nhui:flex nhui:flex-col nhui:lg:flex-row nhui:lg:justify-between\">\n <div className=\"nhui:flex nhui:flex-col nhui:gap-5\">\n <NameHashLabsIcon />\n\n <p className=\"nhui:text-sm nhui:font-light nhui:text-gray-500 nhui:max-w-[339px] nhui:leading-6\">\n Founded in 2022, Namehash Labs is dedicated to developing open source infrastructure\n that helps the Ethereum Name Service (ENS) Protocol grow.\n </p>\n\n <EnsServiceProviderIcon />\n </div>\n\n <div className=\"nhui:flex nhui:justify-start\">\n <div className=\"nhui:flex nhui:flex-col nhui:w-[228px] nhui:pr-5\">\n <span className=\"nhui:mb-2 nhui:text-sm nhui:font-semibold\">Products</span>\n <ul className=\"nhui:flex nhui:flex-col\">\n {footerProducts.map((product) => {\n return (\n <li key={product.name} className=\"nhui:my-2\">\n <a\n href={product.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"nhui:transition nhui:cursor-pointer nhui:text-gray-500 nhui:hover:text-black nhui:text-sm\"\n >\n {product.name}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n <div className=\"nhui:flex nhui:flex-col nhui:w-[228px]\">\n <span className=\"nhui:mb-2 nhui:text-sm nhui:font-semibold\">Resources</span>\n <ul className=\"nhui:flex nhui:flex-col\">\n {footerResources.map((resource) => {\n return (\n <li key={resource.name} className=\"nhui:my-2\">\n <a\n href={resource.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"nhui:transition nhui:cursor-pointer nhui:text-gray-500 nhui:hover:text-black nhui:text-sm\"\n >\n {resource.name}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n </div>\n </div>\n\n <div className=\"nhui:lg:border-t nhui:lg:border-gray-200 nhui:w-full nhui:flex nhui:flex-col nhui:lg:flex-row nhui:lg:justify-between nhui:gap-5 nhui:pt-5\">\n <p className=\"nhui:text-gray-500 nhui:text-sm nhui:leading-5 nhui:font-normal\">\n © NameHash Labs. All Rights Reserved\n </p>\n\n <div className=\"nhui:flex nhui:gap-3\">\n <a\n href=\"https://x.com/NamehashLabs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Twitter\"\n >\n <TwitterIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://github.com/namehash\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Github\"\n >\n <GitHubIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://warpcast.com/namehash\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"Farcaster\"\n >\n <FarcasterIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a\n href=\"https://efp.app/namehashlabs.eth\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label=\"EFP\"\n >\n <EfpIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200 nhui:w-6 nhui:h-6\" />\n </a>\n\n <a href=\"https://t.me/namehash\" target=\"_blank\" rel=\"noreferrer\" aria-label=\"Telegram\">\n <TelegramIcon className=\"nhui:hover:text-black nhui:text-[#AFAFAF] nhui:transition-all nhui:duration-200\" />\n </a>\n\n <a href=\"mailto:hello@namehashlabs.org\" aria-label=\"Email\">\n <EmailIcon className=\"nhui:hover:text-black nhui:text-[#9CA3AF] nhui:transition-all nhui:duration-200\" />\n </a>\n </div>\n\n <div className=\"nhui:flex nhui:space-x-1 nhui:not-italic nhui:font-normal nhui:text-gray-500 nhui:text-sm nhui:xSmall:font-light\">\n <span>\n Made with\n <span className=\"nhui:text-[#EF4444] nhui:mx-1\">{\"❤️\"}</span>\n by\n </span>\n <a\n className=\"nhui:!text-black nhui:text-sm nhui:text-current nhui:underline nhui:decoration-current nhui:underline-offset-[4px] nhui:transition-all nhui:duration-200 nhui:hover:underline-offset-[2px]\"\n href=\"https://namehashlabs.org/\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n NameHash Labs\n </a>\n </div>\n </div>\n </div>\n </section>\n );\n}\n","import type { LucideIcon, LucideProps } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport const ChainExplorerIcon: LucideIcon = React.forwardRef<SVGSVGElement, LucideProps>(\n (props, ref) => {\n return (\n <svg\n ref={ref}\n width={24}\n height={24}\n viewBox=\"-2.19622685 .37688013 124.38617733 125.52740941\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"m25.79 58.415a5.157 5.157 0 0 1 5.181-5.156l8.59.028a5.164 5.164 0 0 1 5.164 5.164v32.48c.967-.287 2.209-.593 3.568-.913a4.3 4.3 0 0 0 3.317-4.187v-40.291a5.165 5.165 0 0 1 5.164-5.165h8.607a5.165 5.165 0 0 1 5.164 5.165v37.393s2.155-.872 4.254-1.758a4.311 4.311 0 0 0 2.632-3.967v-44.578a5.164 5.164 0 0 1 5.163-5.164h8.606a5.164 5.164 0 0 1 5.164 5.164v36.71c7.462-5.408 15.024-11.912 21.025-19.733a8.662 8.662 0 0 0 1.319-8.092 60.792 60.792 0 0 0 -58.141-40.829 60.788 60.788 0 0 0 -51.99 91.064 7.688 7.688 0 0 0 7.334 3.8c1.628-.143 3.655-.346 6.065-.63a4.3 4.3 0 0 0 3.815-4.268z\"\n fill=\"currentColor\"\n />\n <path\n d=\"m25.602 110.51a60.813 60.813 0 0 0 63.371 5.013 60.815 60.815 0 0 0 33.212-54.203c0-1.4-.065-2.785-.158-4.162-22.219 33.138-63.244 48.63-96.423 53.347\"\n fill=\"currentColor\"\n />\n </svg>\n );\n },\n);\n","import type { LucideIcon, LucideProps } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport const EnsIcon: LucideIcon = React.forwardRef<SVGSVGElement, LucideProps>((props, ref) => {\n return (\n <svg\n ref={ref}\n width={24}\n height={24}\n viewBox=\"0 0 202 231\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"m98.3592 2.80337-63.5239 104.52363c-.4982.82-1.6556.911-2.2736.178-5.5924-6.641-26.42692-34.89-.6463-60.6377 23.5249-23.4947 53.4891-40.24601 64.5942-46.035595 1.2599-.656858 2.587.758365 1.8496 1.971665z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m94.8459 230.385c1.2678.888 2.8299-.626 1.9802-1.918-14.1887-21.581-61.3548-93.386-67.8702-104.165-6.4264-10.632-19.06614-28.301-20.12056-43.4178-.10524-1.5091-2.19202-1.8155-2.71696-.3963-.8466 2.2888-1.74793 5.0206-2.58796 8.1413-10.60469 39.3938 4.79656 81.1968 38.24488 104.6088l53.0706 37.148z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m103.571 228.526 63.524-104.523c.498-.82 1.656-.911 2.274-.178 5.592 6.64 26.427 34.89.646 60.638-23.525 23.494-53.489 40.246-64.594 46.035-1.26.657-2.587-.758-1.85-1.972z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n <path\n d=\"m107.154.930762c-1.268-.8873666-2.83.625938-1.98 1.918258 14.189 21.58108 61.355 93.38638 67.87 104.16498 6.427 10.632 19.066 28.301 20.121 43.418.105 1.509 2.192 1.815 2.717.396.846-2.289 1.748-5.02 2.588-8.141 10.604-39.394-4.797-81.1965-38.245-104.609z\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n />\n </svg>\n );\n});\n","import type { SVGProps } from \"react\";\n\nexport const InfoIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"17\"\n height=\"16\"\n viewBox=\"0 0 17 16\"\n fill=\"none\"\n {...props}\n >\n <g clipPath=\"url(#clip0_876_7239)\">\n <path\n d=\"M8.2487 10.6666V7.99992M8.2487 5.33325H8.25536M14.9154 7.99992C14.9154 11.6818 11.9306 14.6666 8.2487 14.6666C4.5668 14.6666 1.58203 11.6818 1.58203 7.99992C1.58203 4.31802 4.5668 1.33325 8.2487 1.33325C11.9306 1.33325 14.9154 4.31802 14.9154 7.99992Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_876_7239\">\n <rect width=\"16\" height=\"16\" fill=\"white\" transform=\"translate(0.25)\" />\n </clipPath>\n </defs>\n </svg>\n);\n","export const entryPoint06Address =\n '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789' as const\nexport const entryPoint07Address =\n '0x0000000071727De22E5E9d8BAf0edAc6f37da032' as const\nexport const entryPoint08Address =\n '0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108' as const\n\nexport const ethAddress = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' as const\n\nexport const zeroAddress = '0x0000000000000000000000000000000000000000' as const\n","// biome-ignore lint/performance/noBarrelFile: entrypoint module\nexport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n type AbiParameter,\n type AbiParameterKind,\n type AbiParameterToPrimitiveType,\n type AbiStateMutability,\n type Address,\n CircularReferenceError,\n InvalidAbiItemError,\n InvalidAbiParameterError,\n InvalidAbiParametersError,\n InvalidAbiTypeParameterError,\n InvalidFunctionModifierError,\n InvalidModifierError,\n InvalidParameterError,\n InvalidParenthesisError,\n InvalidSignatureError,\n InvalidStructSignatureError,\n type Narrow,\n type ParseAbi,\n type ParseAbiItem,\n type ParseAbiParameter,\n type ParseAbiParameters,\n parseAbi,\n parseAbiItem,\n parseAbiParameter,\n parseAbiParameters,\n SolidityProtectedKeywordError,\n type TypedData,\n type TypedDataDomain,\n type TypedDataParameter,\n UnknownSignatureError,\n UnknownTypeError,\n} from 'abitype'\nexport type {\n BlockOverrides,\n Rpc as RpcBlockOverrides,\n} from 'ox/BlockOverrides'\nexport type {\n RpcEstimateUserOperationGasReturnType,\n RpcGetUserOperationByHashReturnType,\n RpcUserOperation,\n RpcUserOperationReceipt,\n RpcUserOperationRequest,\n} from './account-abstraction/types/rpc.js'\nexport type {\n Account,\n AccountSource,\n CustomSource,\n HDAccount,\n HDOptions,\n JsonRpcAccount,\n LocalAccount,\n PrivateKeyAccount,\n} from './accounts/types.js'\nexport type {\n GetEnsAddressErrorType,\n GetEnsAddressParameters,\n GetEnsAddressReturnType,\n} from './actions/ens/getEnsAddress.js'\nexport type {\n GetEnsAvatarErrorType,\n GetEnsAvatarParameters,\n GetEnsAvatarReturnType,\n} from './actions/ens/getEnsAvatar.js'\nexport type {\n GetEnsNameErrorType,\n GetEnsNameParameters,\n GetEnsNameReturnType,\n} from './actions/ens/getEnsName.js'\nexport type {\n GetEnsResolverErrorType,\n GetEnsResolverParameters,\n GetEnsResolverReturnType,\n} from './actions/ens/getEnsResolver.js'\nexport type {\n GetEnsTextErrorType,\n GetEnsTextParameters,\n GetEnsTextReturnType,\n} from './actions/ens/getEnsText.js'\nexport {\n type GetContractErrorType,\n type GetContractParameters,\n type GetContractReturnType,\n getContract,\n} from './actions/getContract.js'\nexport type {\n CallErrorType,\n CallParameters,\n CallReturnType,\n} from './actions/public/call.js'\nexport type {\n CreateAccessListErrorType,\n CreateAccessListParameters,\n CreateAccessListReturnType,\n} from './actions/public/createAccessList.js'\nexport type {\n CreateBlockFilterErrorType,\n CreateBlockFilterReturnType,\n} from './actions/public/createBlockFilter.js'\nexport type {\n CreateContractEventFilterErrorType,\n CreateContractEventFilterParameters,\n CreateContractEventFilterReturnType,\n} from './actions/public/createContractEventFilter.js'\nexport type {\n CreateEventFilterErrorType,\n CreateEventFilterParameters,\n CreateEventFilterReturnType,\n} from './actions/public/createEventFilter.js'\nexport type {\n CreatePendingTransactionFilterErrorType,\n CreatePendingTransactionFilterReturnType,\n} from './actions/public/createPendingTransactionFilter.js'\nexport type {\n EstimateContractGasErrorType,\n EstimateContractGasParameters,\n EstimateContractGasReturnType,\n} from './actions/public/estimateContractGas.js'\nexport type {\n EstimateFeesPerGasErrorType,\n EstimateFeesPerGasParameters,\n EstimateFeesPerGasReturnType,\n} from './actions/public/estimateFeesPerGas.js'\nexport type {\n EstimateGasErrorType,\n EstimateGasParameters,\n EstimateGasReturnType,\n} from './actions/public/estimateGas.js'\nexport type {\n EstimateMaxPriorityFeePerGasErrorType,\n EstimateMaxPriorityFeePerGasParameters,\n EstimateMaxPriorityFeePerGasReturnType,\n} from './actions/public/estimateMaxPriorityFeePerGas.js'\nexport type {\n GetBalanceErrorType,\n GetBalanceParameters,\n GetBalanceReturnType,\n} from './actions/public/getBalance.js'\nexport type {\n GetBlobBaseFeeErrorType,\n GetBlobBaseFeeReturnType,\n} from './actions/public/getBlobBaseFee.js'\nexport type {\n GetBlockErrorType,\n GetBlockParameters,\n GetBlockReturnType,\n} from './actions/public/getBlock.js'\nexport type {\n GetBlockNumberErrorType,\n GetBlockNumberParameters,\n GetBlockNumberReturnType,\n} from './actions/public/getBlockNumber.js'\nexport type {\n GetBlockTransactionCountErrorType,\n GetBlockTransactionCountParameters,\n GetBlockTransactionCountReturnType,\n} from './actions/public/getBlockTransactionCount.js'\nexport type {\n GetChainIdErrorType,\n GetChainIdReturnType,\n} from './actions/public/getChainId.js'\nexport type {\n /** @deprecated Use `GetCodeErrorType` instead */\n GetCodeErrorType as GetBytecodeErrorType,\n GetCodeErrorType,\n /** @deprecated Use `GetCodeParameters` instead */\n GetCodeParameters as GetBytecodeParameters,\n GetCodeParameters,\n /** @deprecated Use `GetCodeReturnType` instead */\n GetCodeReturnType as GetBytecodeReturnType,\n GetCodeReturnType,\n} from './actions/public/getCode.js'\nexport type {\n GetContractEventsErrorType,\n GetContractEventsParameters,\n GetContractEventsReturnType,\n} from './actions/public/getContractEvents.js'\nexport type {\n GetEip712DomainErrorType,\n GetEip712DomainParameters,\n GetEip712DomainReturnType,\n} from './actions/public/getEip712Domain.js'\nexport type {\n GetFeeHistoryErrorType,\n GetFeeHistoryParameters,\n GetFeeHistoryReturnType,\n} from './actions/public/getFeeHistory.js'\nexport type {\n GetFilterChangesErrorType,\n GetFilterChangesParameters,\n GetFilterChangesReturnType,\n} from './actions/public/getFilterChanges.js'\nexport type {\n GetFilterLogsErrorType,\n GetFilterLogsParameters,\n GetFilterLogsReturnType,\n} from './actions/public/getFilterLogs.js'\nexport type {\n GetGasPriceErrorType,\n GetGasPriceReturnType,\n} from './actions/public/getGasPrice.js'\nexport type {\n GetLogsErrorType,\n GetLogsParameters,\n GetLogsReturnType,\n} from './actions/public/getLogs.js'\nexport type {\n GetProofErrorType,\n GetProofParameters,\n GetProofReturnType,\n} from './actions/public/getProof.js'\nexport type {\n GetStorageAtErrorType,\n GetStorageAtParameters,\n GetStorageAtReturnType,\n} from './actions/public/getStorageAt.js'\nexport type {\n GetTransactionErrorType,\n GetTransactionParameters,\n GetTransactionReturnType,\n} from './actions/public/getTransaction.js'\nexport type {\n GetTransactionConfirmationsErrorType,\n GetTransactionConfirmationsParameters,\n GetTransactionConfirmationsReturnType,\n} from './actions/public/getTransactionConfirmations.js'\nexport type {\n GetTransactionCountErrorType,\n GetTransactionCountParameters,\n GetTransactionCountReturnType,\n} from './actions/public/getTransactionCount.js'\nexport type {\n GetTransactionReceiptErrorType,\n GetTransactionReceiptParameters,\n GetTransactionReceiptReturnType,\n} from './actions/public/getTransactionReceipt.js'\nexport type {\n MulticallErrorType,\n MulticallParameters,\n MulticallReturnType,\n} from './actions/public/multicall.js'\nexport type {\n ReadContractErrorType,\n ReadContractParameters,\n ReadContractReturnType,\n} from './actions/public/readContract.js'\nexport type {\n SimulateBlocksErrorType,\n SimulateBlocksParameters,\n SimulateBlocksReturnType,\n} from './actions/public/simulateBlocks.js'\nexport type {\n SimulateCallsErrorType,\n SimulateCallsParameters,\n SimulateCallsReturnType,\n} from './actions/public/simulateCalls.js'\nexport type {\n GetMutabilityAwareValue,\n SimulateContractErrorType,\n SimulateContractParameters,\n SimulateContractReturnType,\n} from './actions/public/simulateContract.js'\nexport type {\n UninstallFilterErrorType,\n UninstallFilterParameters,\n UninstallFilterReturnType,\n} from './actions/public/uninstallFilter.js'\nexport type {\n VerifyHashErrorType as VerifyHashActionErrorType,\n VerifyHashParameters as VerifyHashActionParameters,\n VerifyHashReturnType as VerifyHashActionReturnType,\n} from './actions/public/verifyHash.js'\nexport type {\n VerifyMessageErrorType as VerifyMessageActionErrorType,\n VerifyMessageParameters as VerifyMessageActionParameters,\n VerifyMessageReturnType as VerifyMessageActionReturnType,\n} from './actions/public/verifyMessage.js'\nexport type {\n VerifyTypedDataErrorType as VerifyTypedDataActionErrorType,\n VerifyTypedDataParameters as VerifyTypedDataActionParameters,\n VerifyTypedDataReturnType as VerifyTypedDataActionReturnType,\n} from './actions/public/verifyTypedData.js'\nexport type {\n ReplacementReason,\n ReplacementReturnType,\n WaitForTransactionReceiptErrorType,\n WaitForTransactionReceiptParameters,\n WaitForTransactionReceiptReturnType,\n} from './actions/public/waitForTransactionReceipt.js'\nexport type {\n OnBlockNumberFn,\n OnBlockNumberParameter,\n WatchBlockNumberErrorType,\n WatchBlockNumberParameters,\n WatchBlockNumberReturnType,\n} from './actions/public/watchBlockNumber.js'\nexport type {\n OnBlock,\n OnBlockParameter,\n WatchBlocksErrorType,\n WatchBlocksParameters,\n WatchBlocksReturnType,\n} from './actions/public/watchBlocks.js'\nexport type {\n WatchContractEventErrorType,\n WatchContractEventOnLogsFn,\n WatchContractEventOnLogsParameter,\n WatchContractEventParameters,\n WatchContractEventReturnType,\n} from './actions/public/watchContractEvent.js'\nexport type {\n WatchEventErrorType,\n WatchEventOnLogsFn,\n WatchEventOnLogsParameter,\n WatchEventParameters,\n WatchEventReturnType,\n} from './actions/public/watchEvent.js'\nexport type {\n OnTransactionsFn,\n OnTransactionsParameter,\n WatchPendingTransactionsErrorType,\n WatchPendingTransactionsParameters,\n WatchPendingTransactionsReturnType,\n} from './actions/public/watchPendingTransactions.js'\nexport type {\n DropTransactionErrorType,\n DropTransactionParameters,\n} from './actions/test/dropTransaction.js'\nexport type {\n DumpStateErrorType,\n DumpStateReturnType,\n} from './actions/test/dumpState.js'\nexport type {\n GetAutomineErrorType,\n GetAutomineReturnType,\n} from './actions/test/getAutomine.js'\nexport type {\n GetTxpoolContentErrorType,\n GetTxpoolContentReturnType,\n} from './actions/test/getTxpoolContent.js'\nexport type {\n GetTxpoolStatusErrorType,\n GetTxpoolStatusReturnType,\n} from './actions/test/getTxpoolStatus.js'\nexport type {\n ImpersonateAccountErrorType,\n ImpersonateAccountParameters,\n} from './actions/test/impersonateAccount.js'\nexport type {\n IncreaseTimeErrorType,\n IncreaseTimeParameters,\n} from './actions/test/increaseTime.js'\nexport type {\n InspectTxpoolErrorType,\n InspectTxpoolReturnType,\n} from './actions/test/inspectTxpool.js'\nexport type {\n LoadStateErrorType,\n LoadStateParameters,\n LoadStateReturnType,\n} from './actions/test/loadState.js'\nexport type { MineErrorType, MineParameters } from './actions/test/mine.js'\nexport type { RemoveBlockTimestampIntervalErrorType } from './actions/test/removeBlockTimestampInterval.js'\nexport type { ResetErrorType, ResetParameters } from './actions/test/reset.js'\nexport type {\n RevertErrorType,\n RevertParameters,\n} from './actions/test/revert.js'\nexport type {\n SendUnsignedTransactionErrorType,\n SendUnsignedTransactionParameters,\n SendUnsignedTransactionReturnType,\n} from './actions/test/sendUnsignedTransaction.js'\nexport type { SetAutomineErrorType } from './actions/test/setAutomine.js'\nexport type {\n SetBalanceErrorType,\n SetBalanceParameters,\n} from './actions/test/setBalance.js'\nexport type {\n SetBlockGasLimitErrorType,\n SetBlockGasLimitParameters,\n} from './actions/test/setBlockGasLimit.js'\nexport type {\n SetBlockTimestampIntervalErrorType,\n SetBlockTimestampIntervalParameters,\n} from './actions/test/setBlockTimestampInterval.js'\nexport type {\n SetCodeErrorType,\n SetCodeParameters,\n} from './actions/test/setCode.js'\nexport type {\n SetCoinbaseErrorType,\n SetCoinbaseParameters,\n} from './actions/test/setCoinbase.js'\nexport type {\n SetIntervalMiningErrorType,\n SetIntervalMiningParameters,\n} from './actions/test/setIntervalMining.js'\nexport type { SetLoggingEnabledErrorType } from './actions/test/setLoggingEnabled.js'\nexport type {\n SetMinGasPriceErrorType,\n SetMinGasPriceParameters,\n} from './actions/test/setMinGasPrice.js'\nexport type {\n SetNextBlockBaseFeePerGasErrorType,\n SetNextBlockBaseFeePerGasParameters,\n} from './actions/test/setNextBlockBaseFeePerGas.js'\nexport type {\n SetNextBlockTimestampErrorType,\n SetNextBlockTimestampParameters,\n} from './actions/test/setNextBlockTimestamp.js'\nexport type {\n SetNonceErrorType,\n SetNonceParameters,\n} from './actions/test/setNonce.js'\nexport type { SetRpcUrlErrorType } from './actions/test/setRpcUrl.js'\nexport type {\n SetStorageAtErrorType,\n SetStorageAtParameters,\n} from './actions/test/setStorageAt.js'\nexport type { SnapshotErrorType } from './actions/test/snapshot.js'\nexport type {\n StopImpersonatingAccountErrorType,\n StopImpersonatingAccountParameters,\n} from './actions/test/stopImpersonatingAccount.js'\nexport type {\n AddChainErrorType,\n AddChainParameters,\n} from './actions/wallet/addChain.js'\nexport type {\n DeployContractErrorType,\n DeployContractParameters,\n DeployContractReturnType,\n} from './actions/wallet/deployContract.js'\nexport type {\n GetAddressesErrorType,\n GetAddressesReturnType,\n} from './actions/wallet/getAddresses.js'\nexport type {\n GetCallsStatusErrorType,\n GetCallsStatusParameters,\n GetCallsStatusReturnType,\n} from './actions/wallet/getCallsStatus.js'\nexport type {\n GetCapabilitiesErrorType,\n GetCapabilitiesParameters,\n GetCapabilitiesReturnType,\n} from './actions/wallet/getCapabilities.js'\nexport type {\n GetPermissionsErrorType,\n GetPermissionsReturnType,\n} from './actions/wallet/getPermissions.js'\nexport type {\n PrepareAuthorizationErrorType,\n PrepareAuthorizationParameters,\n PrepareAuthorizationReturnType,\n} from './actions/wallet/prepareAuthorization.js'\nexport type {\n PrepareTransactionRequestErrorType,\n PrepareTransactionRequestParameters,\n PrepareTransactionRequestParameterType,\n PrepareTransactionRequestRequest,\n PrepareTransactionRequestReturnType,\n} from './actions/wallet/prepareTransactionRequest.js'\nexport type {\n RequestAddressesErrorType,\n RequestAddressesReturnType,\n} from './actions/wallet/requestAddresses.js'\nexport type {\n RequestPermissionsErrorType,\n RequestPermissionsParameters,\n RequestPermissionsReturnType,\n} from './actions/wallet/requestPermissions.js'\nexport type {\n SendCallsErrorType,\n SendCallsParameters,\n SendCallsReturnType,\n} from './actions/wallet/sendCalls.js'\nexport type {\n SendCallsSyncErrorType,\n SendCallsSyncParameters,\n SendCallsSyncReturnType,\n} from './actions/wallet/sendCallsSync.js'\nexport type {\n SendRawTransactionErrorType,\n SendRawTransactionParameters,\n SendRawTransactionReturnType,\n} from './actions/wallet/sendRawTransaction.js'\nexport type {\n SendRawTransactionSyncErrorType,\n SendRawTransactionSyncParameters,\n SendRawTransactionSyncReturnType,\n} from './actions/wallet/sendRawTransactionSync.js'\nexport type {\n SendTransactionErrorType,\n SendTransactionParameters,\n SendTransactionRequest,\n SendTransactionReturnType,\n} from './actions/wallet/sendTransaction.js'\nexport type {\n SendTransactionSyncErrorType,\n SendTransactionSyncParameters,\n SendTransactionSyncRequest,\n SendTransactionSyncReturnType,\n} from './actions/wallet/sendTransactionSync.js'\nexport type {\n ShowCallsStatusErrorType,\n ShowCallsStatusParameters,\n ShowCallsStatusReturnType,\n} from './actions/wallet/showCallsStatus.js'\nexport type {\n SignAuthorizationErrorType,\n SignAuthorizationParameters,\n SignAuthorizationReturnType,\n} from './actions/wallet/signAuthorization.js'\nexport type {\n SignMessageErrorType,\n SignMessageParameters,\n SignMessageReturnType,\n} from './actions/wallet/signMessage.js'\nexport type {\n SignTransactionErrorType,\n SignTransactionParameters,\n SignTransactionReturnType,\n} from './actions/wallet/signTransaction.js'\nexport type {\n SignTypedDataErrorType,\n SignTypedDataParameters,\n SignTypedDataReturnType,\n} from './actions/wallet/signTypedData.js'\nexport type {\n SwitchChainErrorType,\n SwitchChainParameters,\n} from './actions/wallet/switchChain.js'\nexport type {\n WaitForCallsStatusErrorType,\n WaitForCallsStatusParameters,\n WaitForCallsStatusReturnType,\n WaitForCallsStatusTimeoutErrorType,\n} from './actions/wallet/waitForCallsStatus.js'\nexport { WaitForCallsStatusTimeoutError } from './actions/wallet/waitForCallsStatus.js'\nexport type {\n WatchAssetErrorType,\n WatchAssetParameters,\n WatchAssetReturnType,\n} from './actions/wallet/watchAsset.js'\nexport type {\n WriteContractErrorType,\n WriteContractParameters,\n WriteContractReturnType,\n} from './actions/wallet/writeContract.js'\nexport type {\n WriteContractSyncErrorType,\n WriteContractSyncParameters,\n WriteContractSyncReturnType,\n} from './actions/wallet/writeContractSync.js'\nexport {\n type Client,\n type ClientConfig,\n type CreateClientErrorType,\n createClient,\n type MulticallBatchOptions,\n rpcSchema,\n} from './clients/createClient.js'\nexport {\n type CreatePublicClientErrorType,\n createPublicClient,\n type PublicClient,\n type PublicClientConfig,\n} from './clients/createPublicClient.js'\nexport {\n type CreateTestClientErrorType,\n createTestClient,\n type TestClient,\n type TestClientConfig,\n} from './clients/createTestClient.js'\nexport {\n type CreateWalletClientErrorType,\n createWalletClient,\n type WalletClient,\n type WalletClientConfig,\n} from './clients/createWalletClient.js'\nexport {\n type PublicActions,\n publicActions,\n} from './clients/decorators/public.js'\nexport {\n type TestActions,\n testActions,\n} from './clients/decorators/test.js'\nexport {\n type WalletActions,\n walletActions,\n} from './clients/decorators/wallet.js'\nexport {\n type CreateTransportErrorType,\n createTransport,\n type Transport,\n type TransportConfig,\n} from './clients/transports/createTransport.js'\nexport {\n type CustomTransport,\n type CustomTransportConfig,\n type CustomTransportErrorType,\n custom,\n} from './clients/transports/custom.js'\nexport {\n type FallbackTransport,\n type FallbackTransportConfig,\n type FallbackTransportErrorType,\n fallback,\n shouldThrow,\n} from './clients/transports/fallback.js'\nexport {\n type HttpTransport,\n type HttpTransportConfig,\n type HttpTransportErrorType,\n http,\n} from './clients/transports/http.js'\nexport {\n type WebSocketTransport,\n type WebSocketTransportConfig,\n type WebSocketTransportErrorType,\n webSocket,\n} from './clients/transports/webSocket.js'\nexport {\n erc20Abi,\n erc20Abi_bytes32,\n erc721Abi,\n erc1155Abi,\n erc4626Abi,\n erc6492SignatureValidatorAbi,\n /** @deprecated use `erc6492SignatureValidatorAbi` instead. */\n erc6492SignatureValidatorAbi as universalSignatureValidatorAbi,\n multicall3Abi,\n} from './constants/abis.js'\nexport { ethAddress, zeroAddress } from './constants/address.js'\nexport { zeroHash } from './constants/bytes.js'\nexport {\n deploylessCallViaBytecodeBytecode,\n deploylessCallViaFactoryBytecode,\n erc6492SignatureValidatorByteCode,\n /** @deprecated use `erc6492SignatureValidatorByteCode` instead. */\n erc6492SignatureValidatorByteCode as universalSignatureValidatorByteCode,\n} from './constants/contracts.js'\nexport {\n maxInt8,\n maxInt16,\n maxInt24,\n maxInt32,\n maxInt40,\n maxInt48,\n maxInt56,\n maxInt64,\n maxInt72,\n maxInt80,\n maxInt88,\n maxInt96,\n maxInt104,\n maxInt112,\n maxInt120,\n maxInt128,\n maxInt136,\n maxInt144,\n maxInt152,\n maxInt160,\n maxInt168,\n maxInt176,\n maxInt184,\n maxInt192,\n maxInt200,\n maxInt208,\n maxInt216,\n maxInt224,\n maxInt232,\n maxInt240,\n maxInt248,\n maxInt256,\n maxUint8,\n maxUint16,\n maxUint24,\n maxUint32,\n maxUint40,\n maxUint48,\n maxUint56,\n maxUint64,\n maxUint72,\n maxUint80,\n maxUint88,\n maxUint96,\n maxUint104,\n maxUint112,\n maxUint120,\n maxUint128,\n maxUint136,\n maxUint144,\n maxUint152,\n maxUint160,\n maxUint168,\n maxUint176,\n maxUint184,\n maxUint192,\n maxUint200,\n maxUint208,\n maxUint216,\n maxUint224,\n maxUint232,\n maxUint240,\n maxUint248,\n maxUint256,\n minInt8,\n minInt16,\n minInt24,\n minInt32,\n minInt40,\n minInt48,\n minInt56,\n minInt64,\n minInt72,\n minInt80,\n minInt88,\n minInt96,\n minInt104,\n minInt112,\n minInt120,\n minInt128,\n minInt136,\n minInt144,\n minInt152,\n minInt160,\n minInt168,\n minInt176,\n minInt184,\n minInt192,\n minInt200,\n minInt208,\n minInt216,\n minInt224,\n minInt232,\n minInt240,\n minInt248,\n minInt256,\n} from './constants/number.js'\nexport { presignMessagePrefix } from './constants/strings.js'\nexport { etherUnits, gweiUnits, weiUnits } from './constants/unit.js'\nexport {\n AbiConstructorNotFoundError,\n type AbiConstructorNotFoundErrorType,\n AbiConstructorParamsNotFoundError,\n type AbiConstructorParamsNotFoundErrorType,\n AbiDecodingDataSizeInvalidError,\n type AbiDecodingDataSizeInvalidErrorType,\n AbiDecodingDataSizeTooSmallError,\n type AbiDecodingDataSizeTooSmallErrorType,\n AbiDecodingZeroDataError,\n type AbiDecodingZeroDataErrorType,\n AbiEncodingArrayLengthMismatchError,\n type AbiEncodingArrayLengthMismatchErrorType,\n AbiEncodingBytesSizeMismatchError,\n type AbiEncodingBytesSizeMismatchErrorType,\n AbiEncodingLengthMismatchError,\n type AbiEncodingLengthMismatchErrorType,\n AbiErrorInputsNotFoundError,\n type AbiErrorInputsNotFoundErrorType,\n AbiErrorNotFoundError,\n type AbiErrorNotFoundErrorType,\n AbiErrorSignatureNotFoundError,\n type AbiErrorSignatureNotFoundErrorType,\n AbiEventNotFoundError,\n type AbiEventNotFoundErrorType,\n AbiEventSignatureEmptyTopicsError,\n type AbiEventSignatureEmptyTopicsErrorType,\n AbiEventSignatureNotFoundError,\n type AbiEventSignatureNotFoundErrorType,\n AbiFunctionNotFoundError,\n type AbiFunctionNotFoundErrorType,\n AbiFunctionOutputsNotFoundError,\n type AbiFunctionOutputsNotFoundErrorType,\n AbiFunctionSignatureNotFoundError,\n type AbiFunctionSignatureNotFoundErrorType,\n BytesSizeMismatchError,\n type BytesSizeMismatchErrorType,\n DecodeLogDataMismatch,\n type DecodeLogDataMismatchErrorType,\n DecodeLogTopicsMismatch,\n type DecodeLogTopicsMismatchErrorType,\n InvalidAbiDecodingTypeError,\n type InvalidAbiDecodingTypeErrorType,\n InvalidAbiEncodingTypeError,\n type InvalidAbiEncodingTypeErrorType,\n InvalidArrayError,\n type InvalidArrayErrorType,\n InvalidDefinitionTypeError,\n type InvalidDefinitionTypeErrorType,\n UnsupportedPackedAbiType,\n type UnsupportedPackedAbiTypeErrorType,\n} from './errors/abi.js'\nexport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from './errors/address.js'\nexport { BaseError, type BaseErrorType, setErrorConfig } from './errors/base.js'\nexport {\n BlockNotFoundError,\n type BlockNotFoundErrorType,\n} from './errors/block.js'\nexport {\n BundleFailedError,\n type BundleFailedErrorType,\n} from './errors/calls.js'\nexport {\n ChainDoesNotSupportContract,\n type ChainDoesNotSupportContractErrorType,\n ChainMismatchError,\n type ChainMismatchErrorType,\n ChainNotFoundError,\n type ChainNotFoundErrorType,\n ClientChainNotConfiguredError,\n type ClientChainNotConfiguredErrorType,\n InvalidChainIdError,\n type InvalidChainIdErrorType,\n} from './errors/chain.js'\nexport {\n CallExecutionError,\n type CallExecutionErrorType,\n ContractFunctionExecutionError,\n type ContractFunctionExecutionErrorType,\n ContractFunctionRevertedError,\n type ContractFunctionRevertedErrorType,\n ContractFunctionZeroDataError,\n type ContractFunctionZeroDataErrorType,\n CounterfactualDeploymentFailedError,\n type CounterfactualDeploymentFailedErrorType,\n RawContractError,\n type RawContractErrorType,\n} from './errors/contract.js'\nexport {\n SizeExceedsPaddingSizeError,\n type SizeExceedsPaddingSizeErrorType,\n SliceOffsetOutOfBoundsError,\n type SliceOffsetOutOfBoundsErrorType,\n} from './errors/data.js'\nexport {\n IntegerOutOfRangeError,\n type IntegerOutOfRangeErrorType,\n InvalidBytesBooleanError,\n type InvalidBytesBooleanErrorType,\n InvalidHexBooleanError,\n type InvalidHexBooleanErrorType,\n InvalidHexValueError,\n type InvalidHexValueErrorType,\n SizeOverflowError,\n type SizeOverflowErrorType,\n} from './errors/encoding.js'\nexport {\n type EnsAvatarInvalidMetadataError,\n type EnsAvatarInvalidMetadataErrorType,\n EnsAvatarInvalidNftUriError,\n type EnsAvatarInvalidNftUriErrorType,\n EnsAvatarUnsupportedNamespaceError,\n type EnsAvatarUnsupportedNamespaceErrorType,\n EnsAvatarUriResolutionError,\n type EnsAvatarUriResolutionErrorType,\n EnsInvalidChainIdError,\n type EnsInvalidChainIdErrorType,\n} from './errors/ens.js'\nexport {\n EstimateGasExecutionError,\n type EstimateGasExecutionErrorType,\n} from './errors/estimateGas.js'\nexport {\n BaseFeeScalarError,\n type BaseFeeScalarErrorType,\n Eip1559FeesNotSupportedError,\n type Eip1559FeesNotSupportedErrorType,\n MaxFeePerGasTooLowError,\n type MaxFeePerGasTooLowErrorType,\n} from './errors/fee.js'\nexport {\n FilterTypeNotSupportedError,\n type FilterTypeNotSupportedErrorType,\n} from './errors/log.js'\nexport {\n ExecutionRevertedError,\n type ExecutionRevertedErrorType,\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n FeeCapTooLowError,\n type FeeCapTooLowErrorType,\n InsufficientFundsError,\n type InsufficientFundsErrorType,\n IntrinsicGasTooHighError,\n type IntrinsicGasTooHighErrorType,\n IntrinsicGasTooLowError,\n type IntrinsicGasTooLowErrorType,\n NonceMaxValueError,\n type NonceMaxValueErrorType,\n NonceTooHighError,\n type NonceTooHighErrorType,\n NonceTooLowError,\n type NonceTooLowErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n TransactionTypeNotSupportedError,\n type TransactionTypeNotSupportedErrorType,\n UnknownNodeError,\n type UnknownNodeErrorType,\n} from './errors/node.js'\nexport {\n HttpRequestError,\n type HttpRequestErrorType,\n RpcRequestError,\n type RpcRequestErrorType,\n SocketClosedError,\n type SocketClosedErrorType,\n TimeoutError,\n type TimeoutErrorType,\n WebSocketRequestError,\n type WebSocketRequestErrorType,\n} from './errors/request.js'\nexport {\n AtomicityNotSupportedError,\n type AtomicityNotSupportedErrorType,\n AtomicReadyWalletRejectedUpgradeError,\n type AtomicReadyWalletRejectedUpgradeErrorType,\n BundleTooLargeError,\n type BundleTooLargeErrorType,\n ChainDisconnectedError,\n type ChainDisconnectedErrorType,\n DuplicateIdError,\n type DuplicateIdErrorType,\n InternalRpcError,\n type InternalRpcErrorType,\n InvalidInputRpcError,\n type InvalidInputRpcErrorType,\n InvalidParamsRpcError,\n type InvalidParamsRpcErrorType,\n InvalidRequestRpcError,\n type InvalidRequestRpcErrorType,\n JsonRpcVersionUnsupportedError,\n type JsonRpcVersionUnsupportedErrorType,\n LimitExceededRpcError,\n type LimitExceededRpcErrorType,\n MethodNotFoundRpcError,\n type MethodNotFoundRpcErrorType,\n MethodNotSupportedRpcError,\n type MethodNotSupportedRpcErrorType,\n ParseRpcError,\n type ParseRpcErrorType,\n ProviderDisconnectedError,\n type ProviderDisconnectedErrorType,\n ProviderRpcError,\n type ProviderRpcErrorCode,\n type ProviderRpcErrorType,\n ResourceNotFoundRpcError,\n type ResourceNotFoundRpcErrorType,\n ResourceUnavailableRpcError,\n type ResourceUnavailableRpcErrorType,\n RpcError,\n type RpcErrorCode,\n type RpcErrorType,\n SwitchChainError,\n TransactionRejectedRpcError,\n type TransactionRejectedRpcErrorType,\n UnauthorizedProviderError,\n type UnauthorizedProviderErrorType,\n UnknownBundleIdError,\n type UnknownBundleIdErrorType,\n UnknownRpcError,\n type UnknownRpcErrorType,\n UnsupportedChainIdError,\n type UnsupportedChainIdErrorType,\n UnsupportedNonOptionalCapabilityError,\n type UnsupportedNonOptionalCapabilityErrorType,\n UnsupportedProviderMethodError,\n type UnsupportedProviderMethodErrorType,\n UserRejectedRequestError,\n type UserRejectedRequestErrorType,\n} from './errors/rpc.js'\nexport {\n AccountStateConflictError,\n type AccountStateConflictErrorType,\n StateAssignmentConflictError,\n type StateAssignmentConflictErrorType,\n} from './errors/stateOverride.js'\nexport {\n FeeConflictError,\n type FeeConflictErrorType,\n InvalidLegacyVError,\n type InvalidLegacyVErrorType,\n InvalidSerializableTransactionError,\n type InvalidSerializableTransactionErrorType,\n InvalidSerializedTransactionError,\n type InvalidSerializedTransactionErrorType,\n InvalidSerializedTransactionTypeError,\n type InvalidSerializedTransactionTypeErrorType,\n InvalidStorageKeySizeError,\n type InvalidStorageKeySizeErrorType,\n TransactionExecutionError,\n type TransactionExecutionErrorType,\n TransactionNotFoundError,\n type TransactionNotFoundErrorType,\n TransactionReceiptNotFoundError,\n type TransactionReceiptNotFoundErrorType,\n WaitForTransactionReceiptTimeoutError,\n type WaitForTransactionReceiptTimeoutErrorType,\n} from './errors/transaction.js'\nexport {\n UrlRequiredError,\n type UrlRequiredErrorType,\n} from './errors/transport.js'\nexport {\n InvalidDomainError,\n type InvalidDomainErrorType,\n InvalidPrimaryTypeError,\n type InvalidPrimaryTypeErrorType,\n InvalidStructTypeError,\n type InvalidStructTypeErrorType,\n} from './errors/typedData.js'\nexport {\n InvalidDecimalNumberError,\n type InvalidDecimalNumberErrorType,\n} from './errors/unit.js'\nexport type {\n DeriveAccount,\n HDKey,\n ParseAccount,\n} from './types/account.js'\nexport type {\n Authorization,\n AuthorizationList,\n AuthorizationRequest,\n SerializedAuthorization,\n SerializedAuthorizationList,\n SignedAuthorization,\n SignedAuthorizationList,\n} from './types/authorization.js'\nexport type {\n Block,\n BlockIdentifier,\n BlockNumber,\n BlockTag,\n Uncle,\n} from './types/block.js'\nexport type { Call, Calls } from './types/calls.js'\nexport type {\n Capabilities,\n /** @deprecated Use `Capabilities` instead. */\n Capabilities as WalletCapabilities,\n CapabilitiesSchema,\n /** @deprecated Use `ChainIdToCapabilities` instead. */\n ChainIdToCapabilities as WalletCapabilitiesRecord,\n ChainIdToCapabilities,\n ExtractCapabilities,\n} from './types/capabilities.js'\nexport type {\n Chain,\n ChainConfig,\n ChainContract,\n ChainEstimateFeesPerGasFn,\n ChainEstimateFeesPerGasFnParameters,\n ChainFees,\n ChainFeesFnParameters,\n ChainFormatter,\n ChainFormatters,\n ChainMaxPriorityFeePerGasFn,\n ChainSerializers,\n DeriveChain,\n ExtractChainFormatterExclude,\n ExtractChainFormatterParameters,\n ExtractChainFormatterReturnType,\n GetChainParameter,\n} from './types/chain.js'\nexport type {\n AbiEventParametersToPrimitiveTypes,\n AbiEventParameterToPrimitiveType,\n AbiEventTopicToPrimitiveType,\n AbiItem,\n AbiItemArgs,\n AbiItemName,\n ContractConstructorArgs,\n ContractErrorArgs,\n ContractErrorName,\n ContractEventArgs,\n ContractEventArgsFromTopics,\n ContractEventName,\n ContractFunctionArgs,\n ContractFunctionName,\n ContractFunctionParameters,\n ContractFunctionReturnType,\n EventDefinition,\n ExtractAbiFunctionForArgs,\n ExtractAbiItem,\n ExtractAbiItemForArgs,\n ExtractAbiItemNames,\n GetEventArgs,\n GetValue,\n LogTopicType,\n MaybeAbiEventName,\n MaybeExtractEventArgsFromAbi,\n UnionWiden,\n Widen,\n} from './types/contract.js'\nexport type {\n AddEthereumChainParameter,\n BundlerRpcSchema,\n DebugBundlerRpcSchema,\n EIP1193EventMap,\n EIP1193Events,\n EIP1193Parameters,\n EIP1193Provider,\n EIP1193RequestFn,\n EIP1474Methods,\n NetworkSync,\n PaymasterRpcSchema,\n ProviderConnectInfo,\n ProviderMessage,\n ProviderRpcErrorType as EIP1193ProviderRpcErrorType,\n PublicRpcSchema,\n RpcSchema,\n RpcSchemaOverride,\n TestRpcSchema,\n WalletCallReceipt,\n WalletGetAssetsParameters,\n WalletGetAssetsReturnType,\n WalletGetCallsStatusReturnType,\n WalletGrantPermissionsParameters,\n WalletGrantPermissionsReturnType,\n WalletPermission,\n WalletPermissionCaveat,\n WalletRpcSchema,\n WalletSendCallsParameters,\n WalletSendCallsReturnType,\n WatchAssetParams,\n} from './types/eip1193.js'\nexport { ProviderRpcError as EIP1193ProviderRpcError } from './types/eip1193.js'\nexport type { BlobSidecar, BlobSidecars } from './types/eip4844.js'\nexport type { AssetGateway, AssetGatewayUrls } from './types/ens.js'\nexport type {\n FeeHistory,\n FeeValues,\n FeeValuesEIP1559,\n FeeValuesEIP4844,\n FeeValuesLegacy,\n FeeValuesType,\n} from './types/fee.js'\nexport type { Filter, FilterType } from './types/filter.js'\nexport type { GetTransactionRequestKzgParameter, Kzg } from './types/kzg.js'\nexport type { Log } from './types/log.js'\nexport type {\n ByteArray,\n CompactSignature,\n Hash,\n Hex,\n LogTopic,\n SignableMessage,\n Signature,\n} from './types/misc.js'\nexport type {\n MulticallContracts,\n MulticallResponse,\n MulticallResults,\n} from './types/multicall.js'\nexport type { Register, ResolvedRegister } from './types/register.js'\nexport type {\n Index,\n Quantity,\n RpcAccountStateOverride,\n RpcAuthorization,\n RpcAuthorizationList,\n RpcBlock,\n RpcBlockIdentifier,\n RpcBlockNumber,\n RpcFeeHistory,\n RpcFeeValues,\n RpcLog,\n RpcProof,\n RpcStateMapping,\n RpcStateOverride,\n RpcTransaction,\n RpcTransactionReceipt,\n RpcTransactionRequest,\n RpcUncle,\n Status,\n} from './types/rpc.js'\nexport type {\n StateMapping,\n StateOverride,\n} from './types/stateOverride.js'\nexport type {\n AccessList,\n Transaction,\n TransactionBase,\n TransactionEIP1559,\n TransactionEIP2930,\n TransactionEIP4844,\n TransactionEIP7702,\n TransactionLegacy,\n TransactionReceipt,\n TransactionRequest,\n TransactionRequestBase,\n TransactionRequestEIP1559,\n TransactionRequestEIP2930,\n TransactionRequestEIP4844,\n TransactionRequestEIP7702,\n TransactionRequestGeneric,\n TransactionRequestLegacy,\n TransactionSerializable,\n TransactionSerializableBase,\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n TransactionSerializableLegacy,\n TransactionSerialized,\n TransactionSerializedEIP1559,\n TransactionSerializedEIP2930,\n TransactionSerializedEIP4844,\n TransactionSerializedEIP7702,\n TransactionSerializedGeneric,\n TransactionSerializedLegacy,\n TransactionType,\n} from './types/transaction.js'\nexport type { GetPollOptions, GetTransportConfig } from './types/transport.js'\nexport type { TypedDataDefinition } from './types/typedData.js'\nexport type {\n Assign,\n Branded,\n Evaluate,\n ExactPartial,\n ExactRequired,\n IsNarrowable,\n IsNever,\n IsUndefined,\n IsUnion,\n LooseOmit,\n MaybePartial,\n MaybePromise,\n MaybeRequired,\n Mutable,\n NoInfer,\n NoUndefined,\n Omit,\n OneOf,\n Or,\n PartialBy,\n Prettify,\n RequiredBy,\n Some,\n UnionEvaluate,\n UnionLooseOmit,\n UnionOmit,\n UnionPartialBy,\n UnionPick,\n UnionRequiredBy,\n UnionToTuple,\n ValueOf,\n} from './types/utils.js'\nexport type { Withdrawal } from './types/withdrawal.js'\nexport {\n type DecodeAbiParametersErrorType,\n type DecodeAbiParametersReturnType,\n decodeAbiParameters,\n} from './utils/abi/decodeAbiParameters.js'\nexport {\n type DecodeDeployDataErrorType,\n type DecodeDeployDataParameters,\n type DecodeDeployDataReturnType,\n decodeDeployData,\n} from './utils/abi/decodeDeployData.js'\nexport {\n type DecodeErrorResultErrorType,\n type DecodeErrorResultParameters,\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n} from './utils/abi/decodeErrorResult.js'\nexport {\n type DecodeEventLogErrorType,\n type DecodeEventLogParameters,\n type DecodeEventLogReturnType,\n decodeEventLog,\n} from './utils/abi/decodeEventLog.js'\nexport {\n type DecodeFunctionDataErrorType,\n type DecodeFunctionDataParameters,\n type DecodeFunctionDataReturnType,\n decodeFunctionData,\n} from './utils/abi/decodeFunctionData.js'\nexport {\n type DecodeFunctionResultErrorType,\n type DecodeFunctionResultParameters,\n type DecodeFunctionResultReturnType,\n decodeFunctionResult,\n} from './utils/abi/decodeFunctionResult.js'\nexport {\n type EncodeAbiParametersErrorType,\n type EncodeAbiParametersReturnType,\n encodeAbiParameters,\n} from './utils/abi/encodeAbiParameters.js'\nexport {\n type EncodeDeployDataErrorType,\n type EncodeDeployDataParameters,\n type EncodeDeployDataReturnType,\n encodeDeployData,\n} from './utils/abi/encodeDeployData.js'\nexport {\n type EncodeErrorResultErrorType,\n type EncodeErrorResultParameters,\n type EncodeErrorResultReturnType,\n encodeErrorResult,\n} from './utils/abi/encodeErrorResult.js'\nexport {\n type EncodeEventTopicsErrorType,\n type EncodeEventTopicsParameters,\n type EncodeEventTopicsReturnType,\n encodeEventTopics,\n} from './utils/abi/encodeEventTopics.js'\nexport {\n type EncodeFunctionDataErrorType,\n type EncodeFunctionDataParameters,\n type EncodeFunctionDataReturnType,\n encodeFunctionData,\n} from './utils/abi/encodeFunctionData.js'\nexport {\n type EncodeFunctionResultErrorType,\n type EncodeFunctionResultParameters,\n type EncodeFunctionResultReturnType,\n encodeFunctionResult,\n} from './utils/abi/encodeFunctionResult.js'\nexport {\n type EncodePackedErrorType,\n encodePacked,\n} from './utils/abi/encodePacked.js'\nexport {\n type GetAbiItemErrorType,\n type GetAbiItemParameters,\n type GetAbiItemReturnType,\n getAbiItem,\n} from './utils/abi/getAbiItem.js'\nexport {\n type ParseEventLogsErrorType,\n type ParseEventLogsParameters,\n type ParseEventLogsReturnType,\n parseEventLogs,\n} from './utils/abi/parseEventLogs.js'\nexport {\n type PrepareEncodeFunctionDataErrorType,\n type PrepareEncodeFunctionDataParameters,\n type PrepareEncodeFunctionDataReturnType,\n prepareEncodeFunctionData,\n} from './utils/abi/prepareEncodeFunctionData.js'\nexport {\n type ChecksumAddressErrorType,\n checksumAddress,\n type GetAddressErrorType,\n getAddress,\n} from './utils/address/getAddress.js'\nexport {\n type GetContractAddressOptions,\n type GetCreate2AddressErrorType,\n type GetCreate2AddressOptions,\n type GetCreateAddressErrorType,\n type GetCreateAddressOptions,\n getContractAddress,\n getCreate2Address,\n getCreateAddress,\n} from './utils/address/getContractAddress.js'\nexport {\n type IsAddressErrorType,\n type IsAddressOptions,\n isAddress,\n} from './utils/address/isAddress.js'\nexport {\n type IsAddressEqualErrorType,\n type IsAddressEqualReturnType,\n isAddressEqual,\n} from './utils/address/isAddressEqual.js'\nexport {\n type BlobsToCommitmentsErrorType,\n type BlobsToCommitmentsParameters,\n type BlobsToCommitmentsReturnType,\n blobsToCommitments,\n} from './utils/blob/blobsToCommitments.js'\nexport {\n blobsToProofs,\n type blobsToProofsErrorType,\n type blobsToProofsParameters,\n type blobsToProofsReturnType,\n} from './utils/blob/blobsToProofs.js'\nexport {\n type CommitmentsToVersionedHashesErrorType,\n type CommitmentsToVersionedHashesParameters,\n type CommitmentsToVersionedHashesReturnType,\n commitmentsToVersionedHashes,\n} from './utils/blob/commitmentsToVersionedHashes.js'\nexport {\n type CommitmentToVersionedHashErrorType,\n type CommitmentToVersionedHashParameters,\n type CommitmentToVersionedHashReturnType,\n commitmentToVersionedHash,\n} from './utils/blob/commitmentToVersionedHash.js'\nexport {\n type FromBlobsErrorType,\n type FromBlobsParameters,\n type FromBlobsReturnType,\n fromBlobs,\n} from './utils/blob/fromBlobs.js'\nexport {\n type SidecarsToVersionedHashesErrorType,\n type SidecarsToVersionedHashesParameters,\n type SidecarsToVersionedHashesReturnType,\n sidecarsToVersionedHashes,\n} from './utils/blob/sidecarsToVersionedHashes.js'\nexport {\n type ToBlobSidecarsErrorType,\n type ToBlobSidecarsParameters,\n type ToBlobSidecarsReturnType,\n toBlobSidecars,\n} from './utils/blob/toBlobSidecars.js'\nexport {\n type ToBlobsErrorType,\n type ToBlobsParameters,\n type ToBlobsReturnType,\n toBlobs,\n} from './utils/blob/toBlobs.js'\nexport {\n type CcipRequestErrorType,\n type CcipRequestParameters,\n ccipRequest,\n /** @deprecated Use `ccipRequest`. */\n ccipRequest as ccipFetch,\n type OffchainLookupErrorType,\n offchainLookup,\n offchainLookupAbiItem,\n offchainLookupSignature,\n} from './utils/ccip.js'\nexport {\n type AssertCurrentChainErrorType,\n type AssertCurrentChainParameters,\n assertCurrentChain,\n} from './utils/chain/assertCurrentChain.js'\nexport { defineChain } from './utils/chain/defineChain.js'\nexport {\n type ExtractChainErrorType,\n type ExtractChainParameters,\n type ExtractChainReturnType,\n extractChain,\n} from './utils/chain/extractChain.js'\nexport {\n type GetChainContractAddressErrorType,\n getChainContractAddress,\n} from './utils/chain/getChainContractAddress.js'\nexport {\n type ConcatBytesErrorType,\n type ConcatErrorType,\n type ConcatHexErrorType,\n type ConcatReturnType,\n concat,\n concatBytes,\n concatHex,\n} from './utils/data/concat.js'\nexport { type IsBytesErrorType, isBytes } from './utils/data/isBytes.js'\nexport { type IsHexErrorType, isHex } from './utils/data/isHex.js'\nexport {\n type PadBytesErrorType,\n type PadErrorType,\n type PadHexErrorType,\n type PadReturnType,\n pad,\n padBytes,\n padHex,\n} from './utils/data/pad.js'\nexport { type SizeErrorType, size } from './utils/data/size.js'\nexport {\n type SliceBytesErrorType,\n type SliceErrorType,\n type SliceHexErrorType,\n slice,\n sliceBytes,\n sliceHex,\n} from './utils/data/slice.js'\nexport {\n type TrimErrorType,\n type TrimReturnType,\n trim,\n} from './utils/data/trim.js'\nexport {\n type BytesToBigIntErrorType,\n type BytesToBigIntOpts,\n type BytesToBoolErrorType,\n type BytesToBoolOpts,\n type BytesToNumberErrorType,\n type BytesToNumberOpts,\n type BytesToStringErrorType,\n type BytesToStringOpts,\n bytesToBigInt,\n bytesToBool,\n bytesToNumber,\n bytesToString,\n type FromBytesErrorType,\n type FromBytesParameters,\n fromBytes,\n} from './utils/encoding/fromBytes.js'\nexport {\n type FromHexErrorType,\n fromHex,\n type HexToBigIntErrorType,\n type HexToBoolErrorType,\n type HexToNumberErrorType,\n type HexToStringErrorType,\n hexToBigInt,\n hexToBool,\n hexToNumber,\n hexToString,\n} from './utils/encoding/fromHex.js'\nexport {\n type FromRlpErrorType,\n type FromRlpReturnType,\n fromRlp,\n} from './utils/encoding/fromRlp.js'\nexport {\n type BoolToBytesErrorType,\n type BoolToBytesOpts,\n boolToBytes,\n type HexToBytesErrorType,\n type HexToBytesOpts,\n hexToBytes,\n type NumberToBytesErrorType,\n numberToBytes,\n type StringToBytesErrorType,\n type StringToBytesOpts,\n stringToBytes,\n type ToBytesErrorType,\n type ToBytesParameters,\n toBytes,\n} from './utils/encoding/toBytes.js'\nexport {\n type BoolToHexErrorType,\n type BoolToHexOpts,\n type BytesToHexErrorType,\n type BytesToHexOpts,\n boolToHex,\n bytesToHex,\n type NumberToHexErrorType,\n type NumberToHexOpts,\n numberToHex,\n type StringToHexErrorType,\n type StringToHexOpts,\n stringToHex,\n type ToHexErrorType,\n type ToHexParameters,\n toHex,\n} from './utils/encoding/toHex.js'\nexport {\n type BytesToRlpErrorType,\n bytesToRlp,\n type HexToRlpErrorType,\n hexToRlp,\n type ToRlpErrorType,\n type ToRlpReturnType,\n toRlp,\n} from './utils/encoding/toRlp.js'\nexport { type LabelhashErrorType, labelhash } from './utils/ens/labelhash.js'\nexport { type NamehashErrorType, namehash } from './utils/ens/namehash.js'\nexport {\n type ToCoinTypeError,\n toCoinType,\n} from './utils/ens/toCoinType.js'\nexport {\n type GetContractErrorReturnType,\n getContractError,\n} from './utils/errors/getContractError.js'\nexport {\n type DefineBlockErrorType,\n defineBlock,\n type FormatBlockErrorType,\n type FormattedBlock,\n formatBlock,\n} from './utils/formatters/block.js'\nexport { type FormatLogErrorType, formatLog } from './utils/formatters/log.js'\nexport {\n type DefineTransactionErrorType,\n defineTransaction,\n type FormatTransactionErrorType,\n type FormattedTransaction,\n formatTransaction,\n transactionType,\n} from './utils/formatters/transaction.js'\nexport {\n type DefineTransactionReceiptErrorType,\n defineTransactionReceipt,\n type FormatTransactionReceiptErrorType,\n type FormattedTransactionReceipt,\n formatTransactionReceipt,\n} from './utils/formatters/transactionReceipt.js'\nexport {\n type DefineTransactionRequestErrorType,\n defineTransactionRequest,\n type FormatTransactionRequestErrorType,\n type FormattedTransactionRequest,\n formatTransactionRequest,\n rpcTransactionType,\n} from './utils/formatters/transactionRequest.js'\nexport { type IsHashErrorType, isHash } from './utils/hash/isHash.js'\nexport {\n type Keccak256ErrorType,\n type Keccak256Hash,\n keccak256,\n} from './utils/hash/keccak256.js'\nexport {\n type Ripemd160ErrorType,\n type Ripemd160Hash,\n ripemd160,\n} from './utils/hash/ripemd160.js'\nexport {\n type Sha256ErrorType,\n type Sha256Hash,\n sha256,\n} from './utils/hash/sha256.js'\nexport {\n type ToEventHashErrorType,\n toEventHash,\n} from './utils/hash/toEventHash.js'\nexport {\n type ToEventSelectorErrorType,\n /** @deprecated use `ToEventSelectorErrorType`. */\n type ToEventSelectorErrorType as GetEventSelectorErrorType,\n toEventSelector,\n /** @deprecated use `toEventSelector`. */\n toEventSelector as getEventSelector,\n} from './utils/hash/toEventSelector.js'\nexport {\n type ToEventSignatureErrorType,\n /** @deprecated use `ToEventSignatureErrorType`. */\n type ToEventSignatureErrorType as GetEventSignatureErrorType,\n toEventSignature,\n /** @deprecated use `toEventSignature`. */\n toEventSignature as getEventSignature,\n} from './utils/hash/toEventSignature.js'\nexport {\n type ToFunctionHashErrorType,\n toFunctionHash,\n} from './utils/hash/toFunctionHash.js'\nexport {\n type ToFunctionSelectorErrorType,\n /** @deprecated use `ToFunctionSelectorErrorType`. */\n type ToFunctionSelectorErrorType as GetFunctionSelectorErrorType,\n toFunctionSelector,\n /** @deprecated use `toFunctionSelector`. */\n toFunctionSelector as getFunctionSelector,\n} from './utils/hash/toFunctionSelector.js'\nexport {\n type ToFunctionSignatureErrorType,\n /** @deprecated use `ToFunctionSignatureErrorType`. */\n type ToFunctionSignatureErrorType as GetFunctionSignatureErrorType,\n toFunctionSignature,\n /** @deprecated use `toFunctionSignature`. */\n toFunctionSignature as getFunctionSignature,\n} from './utils/hash/toFunctionSignature.js'\nexport {\n type DefineKzgErrorType,\n type DefineKzgParameters,\n type DefineKzgReturnType,\n defineKzg,\n} from './utils/kzg/defineKzg.js'\nexport {\n type SetupKzgErrorType,\n type SetupKzgParameters,\n type SetupKzgReturnType,\n setupKzg,\n} from './utils/kzg/setupKzg.js'\nexport {\n type CreateNonceManagerParameters,\n createNonceManager,\n type NonceManager,\n type NonceManagerSource,\n nonceManager,\n} from './utils/nonceManager.js'\nexport { withCache } from './utils/promise/withCache.js'\nexport {\n type WithRetryErrorType,\n withRetry,\n} from './utils/promise/withRetry.js'\nexport {\n type WithTimeoutErrorType,\n withTimeout,\n} from './utils/promise/withTimeout.js'\nexport {\n type CompactSignatureToSignatureErrorType,\n compactSignatureToSignature,\n} from './utils/signature/compactSignatureToSignature.js'\nexport {\n type HashMessageErrorType,\n hashMessage,\n} from './utils/signature/hashMessage.js'\nexport {\n type HashDomainErrorType,\n type HashStructErrorType,\n type HashTypedDataErrorType,\n type HashTypedDataParameters,\n type HashTypedDataReturnType,\n hashDomain,\n hashStruct,\n hashTypedData,\n} from './utils/signature/hashTypedData.js'\nexport {\n type IsErc6492SignatureErrorType,\n type IsErc6492SignatureParameters,\n type IsErc6492SignatureReturnType,\n isErc6492Signature,\n} from './utils/signature/isErc6492Signature.js'\nexport {\n type IsErc8010SignatureErrorType,\n type IsErc8010SignatureParameters,\n type IsErc8010SignatureReturnType,\n isErc8010Signature,\n} from './utils/signature/isErc8010Signature.js'\nexport {\n /** @deprecated Use `ParseCompactSignatureErrorType`. */\n type ParseCompactSignatureErrorType as HexToCompactSignatureErrorType,\n type ParseCompactSignatureErrorType,\n /** @deprecated Use `parseCompactSignature`. */\n parseCompactSignature as hexToCompactSignature,\n parseCompactSignature,\n} from './utils/signature/parseCompactSignature.js'\nexport {\n type ParseErc6492SignatureErrorType,\n type ParseErc6492SignatureParameters,\n type ParseErc6492SignatureReturnType,\n parseErc6492Signature,\n} from './utils/signature/parseErc6492Signature.js'\nexport {\n type ParseErc8010SignatureErrorType,\n type ParseErc8010SignatureParameters,\n type ParseErc8010SignatureReturnType,\n parseErc8010Signature,\n} from './utils/signature/parseErc8010Signature.js'\nexport {\n /** @deprecated Use `ParseSignatureErrorType`. */\n type ParseSignatureErrorType as HexToSignatureErrorType,\n type ParseSignatureErrorType,\n /** @deprecated Use `parseSignature`. */\n parseSignature as hexToSignature,\n parseSignature,\n} from './utils/signature/parseSignature.js'\nexport {\n type RecoverAddressErrorType,\n type RecoverAddressParameters,\n type RecoverAddressReturnType,\n recoverAddress,\n} from './utils/signature/recoverAddress.js'\nexport {\n type RecoverMessageAddressErrorType,\n type RecoverMessageAddressParameters,\n type RecoverMessageAddressReturnType,\n recoverMessageAddress,\n} from './utils/signature/recoverMessageAddress.js'\nexport {\n type RecoverPublicKeyErrorType,\n type RecoverPublicKeyParameters,\n type RecoverPublicKeyReturnType,\n recoverPublicKey,\n} from './utils/signature/recoverPublicKey.js'\nexport {\n type RecoverTransactionAddressErrorType,\n type RecoverTransactionAddressParameters,\n type RecoverTransactionAddressReturnType,\n recoverTransactionAddress,\n} from './utils/signature/recoverTransactionAddress.js'\nexport {\n type RecoverTypedDataAddressErrorType,\n type RecoverTypedDataAddressParameters,\n type RecoverTypedDataAddressReturnType,\n recoverTypedDataAddress,\n} from './utils/signature/recoverTypedDataAddress.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeCompactSignatureErrorType as CompactSignatureToHexErrorType,\n type SerializeCompactSignatureErrorType,\n /** @deprecated Use `serializeCompactSignature` instead. */\n serializeCompactSignature as compactSignatureToHex,\n serializeCompactSignature,\n} from './utils/signature/serializeCompactSignature.js'\nexport {\n type SerializeErc6492SignatureErrorType,\n type SerializeErc6492SignatureParameters,\n type SerializeErc6492SignatureReturnType,\n serializeErc6492Signature,\n} from './utils/signature/serializeErc6492Signature.js'\nexport {\n type SerializeErc8010SignatureErrorType,\n type SerializeErc8010SignatureParameters,\n type SerializeErc8010SignatureReturnType,\n serializeErc8010Signature,\n} from './utils/signature/serializeErc8010Signature.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeSignatureErrorType as SignatureToHexErrorType,\n type SerializeSignatureErrorType,\n type SerializeSignatureParameters,\n type SerializeSignatureReturnType,\n /** @deprecated Use `serializeSignature` instead. */\n serializeSignature as signatureToHex,\n serializeSignature,\n} from './utils/signature/serializeSignature.js'\nexport {\n type SignatureToCompactSignatureErrorType,\n signatureToCompactSignature,\n} from './utils/signature/signatureToCompactSignature.js'\nexport {\n type ToPrefixedMessageErrorType,\n toPrefixedMessage,\n} from './utils/signature/toPrefixedMessage.js'\nexport {\n type VerifyHashErrorType,\n type VerifyHashParameters,\n type VerifyHashReturnType,\n verifyHash,\n} from './utils/signature/verifyHash.js'\nexport {\n type VerifyMessageErrorType,\n type VerifyMessageParameters,\n type VerifyMessageReturnType,\n verifyMessage,\n} from './utils/signature/verifyMessage.js'\nexport {\n type VerifyTypedDataErrorType,\n type VerifyTypedDataParameters,\n type VerifyTypedDataReturnType,\n verifyTypedData,\n} from './utils/signature/verifyTypedData.js'\nexport { type StringifyErrorType, stringify } from './utils/stringify.js'\nexport {\n type AssertRequestErrorType,\n assertRequest,\n} from './utils/transaction/assertRequest.js'\nexport {\n type AssertTransactionEIP1559ErrorType,\n type AssertTransactionEIP2930ErrorType,\n type AssertTransactionLegacyErrorType,\n assertTransactionEIP1559,\n assertTransactionEIP2930,\n assertTransactionLegacy,\n} from './utils/transaction/assertTransaction.js'\nexport {\n type GetSerializedTransactionType,\n type GetSerializedTransactionTypeErrorType,\n getSerializedTransactionType,\n} from './utils/transaction/getSerializedTransactionType.js'\nexport {\n type GetTransactionType,\n type GetTransactionTypeErrorType,\n getTransactionType,\n} from './utils/transaction/getTransactionType.js'\nexport {\n type ParseTransactionErrorType,\n type ParseTransactionReturnType,\n parseTransaction,\n} from './utils/transaction/parseTransaction.js'\nexport {\n type SerializeAccessListErrorType,\n serializeAccessList,\n} from './utils/transaction/serializeAccessList.js'\nexport {\n type SerializedTransactionReturnType,\n type SerializeTransactionErrorType,\n type SerializeTransactionFn,\n serializeTransaction,\n} from './utils/transaction/serializeTransaction.js'\nexport {\n type DomainSeparatorErrorType,\n domainSeparator,\n type GetTypesForEIP712DomainErrorType,\n getTypesForEIP712Domain,\n type SerializeTypedDataErrorType,\n serializeTypedData,\n type ValidateTypedDataErrorType,\n validateTypedData,\n} from './utils/typedData.js'\nexport {\n type FormatEtherErrorType,\n formatEther,\n} from './utils/unit/formatEther.js'\nexport {\n type FormatGweiErrorType,\n formatGwei,\n} from './utils/unit/formatGwei.js'\nexport {\n type FormatUnitsErrorType,\n formatUnits,\n} from './utils/unit/formatUnits.js'\nexport {\n type ParseEtherErrorType,\n parseEther,\n} from './utils/unit/parseEther.js'\nexport { type ParseGweiErrorType, parseGwei } from './utils/unit/parseGwei.js'\nexport {\n type ParseUnitsErrorType,\n parseUnits,\n} from './utils/unit/parseUnits.js'\n","import type { Address } from \"viem\";\nimport { getAddress } from \"viem\";\n\ninterface AddressDisplayProps {\n address: Address;\n className?: string;\n}\n\n/**\n * Displays a truncated checksummed address without any navigation.\n * Pure display component for showing addresses.\n */\nexport function AddressDisplay({ address, className }: AddressDisplayProps) {\n const checksummedAddress = getAddress(address);\n const truncatedAddress = `${checksummedAddress.slice(0, 6)}...${checksummedAddress.slice(-4)}`;\n return <span className={className}>{truncatedAddress}</span>;\n}\n","import BoringAvatar from \"boring-avatars\";\nimport * as React from \"react\";\n\nimport type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport type { Name } from \"@ensnode/ensnode-sdk\";\n\nimport { cn } from \"../../utils/cn\";\nimport { getEnsMetadataServiceAvatarUrl } from \"../../utils/ensMetadata\";\nimport { Avatar, AvatarImage } from \"../ui/avatar\";\n\ninterface EnsAvatarProps {\n name: Name;\n namespaceId: ENSNamespaceId;\n className?: string;\n isSquare?: boolean;\n}\n\ntype ImageLoadingStatus = Parameters<\n NonNullable<React.ComponentProps<typeof AvatarImage>[\"onLoadingStatusChange\"]>\n>[0];\n\nexport const EnsAvatar = ({ name, namespaceId, className, isSquare = false }: EnsAvatarProps) => {\n const [loadingStatus, setLoadingStatus] = React.useState<ImageLoadingStatus>(\"idle\");\n const avatarUrl = getEnsMetadataServiceAvatarUrl(name, namespaceId);\n\n if (avatarUrl === null) {\n return (\n <Avatar className={className}>\n <EnsAvatarFallback name={name} isSquare={isSquare} />\n </Avatar>\n );\n }\n\n return (\n <Avatar className={className}>\n <AvatarImage\n src={avatarUrl.href}\n alt={name}\n onLoadingStatusChange={(status: ImageLoadingStatus) => {\n setLoadingStatus(status);\n }}\n />\n {loadingStatus === \"error\" && <EnsAvatarFallback name={name} isSquare={isSquare} />}\n {(loadingStatus === \"idle\" || loadingStatus === \"loading\") && (\n <AvatarLoading isSquare={isSquare} />\n )}\n </Avatar>\n );\n};\n\ninterface EnsAvatarFallbackProps {\n name: Name;\n isSquare: boolean;\n}\n\nconst avatarFallbackColors = [\"#000000\", \"#bedbff\", \"#5191c1\", \"#1e6495\", \"#0a4b75\"];\n\nconst EnsAvatarFallback = ({ name, isSquare }: EnsAvatarFallbackProps) => (\n <BoringAvatar\n name={name}\n colors={avatarFallbackColors}\n variant=\"beam\"\n className=\"nhui:w-full nhui:h-full\"\n square={isSquare}\n />\n);\n\ntype EnsAvatarLoadingProps = Omit<EnsAvatarProps, \"name\" | \"namespaceId\" | \"className\">;\nconst AvatarLoading = ({ isSquare }: EnsAvatarLoadingProps) => (\n <div\n className={cn(\n \"nhui:h-full nhui:w-full nhui:animate-pulse nhui:bg-gray-200\",\n !isSquare && \"nhui:rounded-full\",\n )}\n />\n);\n\n// TODO: Copied from ENSAwards (as a newer version) - further alignment might be needed\n","import type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport { ENSNamespaceIds, type Name } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Build the avatar image URL for a name on the given ENS Namespace that (once fetched) would\n * load the avatar image for the given name from the ENS Metadata Service\n * (https://metadata.ens.domains/docs).\n *\n * The returned URL is dynamically built based on the provided ENS namespace. Not all ENS\n * namespaces are supported by the ENS Metadata Service. Therefore, the returned URL may\n * be null.\n *\n * @param {Name} name - ENS name to build the avatar image URL for\n * @param {ENSNamespaceId} namespaceId - ENS Namespace identifier\n * @returns avatar image URL for the name on the given ENS Namespace, or null if the given\n * ENS namespace is not supported by the ENS Metadata Service\n */\nexport function getEnsMetadataServiceAvatarUrl(\n name: Name,\n namespaceId: ENSNamespaceId,\n): URL | null {\n switch (namespaceId) {\n case ENSNamespaceIds.Mainnet:\n return new URL(name, `https://metadata.ens.domains/mainnet/avatar/`);\n case ENSNamespaceIds.Sepolia:\n return new URL(name, `https://metadata.ens.domains/sepolia/avatar/`);\n case ENSNamespaceIds.EnsTestEnv:\n // ens-test-env runs on a local chain and is not supported by metadata.ens.domains\n // TODO: Above comment is not true. Details at https://github.com/namehash/ensnode/issues/1078\n return null;\n }\n}\n","import * as AvatarPrimitive from \"@radix-ui/react-avatar\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"nhui:relative nhui:flex nhui:size-8 nhui:shrink-0 nhui:overflow-hidden nhui:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"nhui:aspect-square nhui:size-full\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"nhui:bg-muted nhui:flex nhui:size-full nhui:items-center nhui:justify-center nhui:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport type { PropsWithChildren } from \"react\";\n\nimport type { ENSNamespaceId, Identity } from \"@ensnode/ensnode-sdk\";\nimport {\n DEFAULT_EVM_CHAIN_ID,\n isResolvedIdentity,\n ResolutionStatusIds,\n translateDefaultableChainIdToChainId,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { getBlockExplorerAddressDetailsUrl } from \"../../utils/blockExplorers\";\nimport { getChainName } from \"../../utils/chains\";\nimport { cn } from \"../../utils/cn\";\nimport { getEnsManagerAddressDetailsUrl } from \"../../utils/ensManager\";\nimport { ChainIcon } from \"../chains/ChainIcon\";\nimport { ChainExplorerIcon } from \"../icons/ChainExplorerIcon\";\nimport { EnsIcon } from \"../icons/ens/EnsIcon\";\nimport { CopyButton } from \"../special-buttons/CopyButton\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\nimport { AddressDisplay } from \"./Address\";\n\nexport interface IdentityLinkDetails {\n isExternal: boolean;\n link: URL | null;\n}\ninterface IdentityLinkProps {\n linkDetails: IdentityLinkDetails;\n className?: string;\n}\n\n/**\n * Displays an identifier (address or name) with a link to the identity details URL.\n * If the ENS namespace has a known ENS Manager App,\n * includes a link to the view details of the address within that ENS namespace.\n *\n * Can take other components (ex.ChainIcon) as children\n * and display them alongside the link as one common interaction area.\n */\nexport function IdentityLink({\n linkDetails,\n className,\n children,\n}: PropsWithChildren<IdentityLinkProps>) {\n if (linkDetails.link === null) {\n return <>{children}</>;\n }\n\n return (\n <a\n href={linkDetails.link.href}\n target={linkDetails.isExternal ? \"_blank\" : \"_self\"}\n className={cn(\n \"nhui:text-sm nhui:leading-normal nhui:font-medium nhui:text-blue-600\",\n className,\n )}\n >\n {children}\n </a>\n );\n}\n\nexport interface IdentityTooltipProps {\n identity: Identity;\n namespaceId: ENSNamespaceId;\n}\n\n/**\n * On hover displays details on how the primary name for\n * the address of the identity was resolved.\n */\nexport const IdentityTooltip = ({\n identity,\n namespaceId,\n children,\n}: PropsWithChildren<IdentityTooltipProps>) => {\n if (!isResolvedIdentity(identity)) {\n // identity is still loading, don't build any tooltip components yet.\n return children;\n }\n\n const chainDescription =\n identity.chainId === DEFAULT_EVM_CHAIN_ID\n ? 'the \"default\" EVM Chain'\n : getChainName(identity.chainId);\n\n let header: string;\n\n switch (identity.resolutionStatus) {\n case ResolutionStatusIds.Named:\n header = `Primary name on ${chainDescription} for address:`;\n break;\n case ResolutionStatusIds.Unnamed:\n header = `Unnamed address on ${chainDescription}:`;\n break;\n case ResolutionStatusIds.Unknown:\n header = `Error resolving address on ${chainDescription}:`;\n break;\n }\n\n const ensAppAddressDetailsUrl = getEnsManagerAddressDetailsUrl(identity.address, namespaceId);\n\n const body = (\n <span>\n <AddressDisplay address={identity.address} />\n </span>\n );\n\n const effectiveChainId = translateDefaultableChainIdToChainId(identity.chainId, namespaceId);\n const chainExplorerUrl = getBlockExplorerAddressDetailsUrl(effectiveChainId, identity.address);\n\n return (\n <Tooltip delayDuration={250}>\n <TooltipTrigger asChild>{children}</TooltipTrigger>\n <TooltipContent\n side=\"top\"\n className=\"nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit [&_svg]:fill-gray-50 [&_svg]:bg-gray-50\"\n >\n {/*TODO: The styling of all tooltips should either be unified across all our apps or made customizable. */}\n {/*Currently aligned to fit ensadmin, cause it's only used there*/}\n <div className=\"nhui:flex nhui:gap-4\">\n <div className=\"nhui:flex nhui:items-center\">\n <ChainIcon\n chainId={translateDefaultableChainIdToChainId(identity.chainId, namespaceId)}\n height={24}\n width={24}\n />\n </div>\n <div>\n {header}\n <br />\n {body}\n </div>\n <div className=\"nhui:flex nhui:items-center nhui:gap-2\">\n <CopyButton\n value={identity.address}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n successIcon={<CheckIcon className=\"nhui:h-4 nhui:w-4\" style={{ fill: \"none\" }} />}\n icon={<CopyIcon className=\"nhui:h-4 nhui:w-4\" style={{ fill: \"none\" }} />}\n showToast={true}\n />\n {chainExplorerUrl && (\n <a target=\"_blank\" href={chainExplorerUrl.toString()}>\n <ChainExplorerIcon\n height={24}\n width={24}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n />\n </a>\n )}\n {ensAppAddressDetailsUrl && (\n <a target=\"_blank\" href={ensAppAddressDetailsUrl.toString()}>\n <EnsIcon\n height={24}\n width={24}\n className=\"nhui:text-gray-500 nhui:hover:text-gray-700 nhui:transition-colors\"\n />\n </a>\n )}\n </div>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import type { Address, Hash } from \"viem\";\n\nimport type { ChainId } from \"@ensnode/ensnode-sdk\";\n\nimport { SUPPORTED_CHAINS } from \"./chains\";\n\n/**\n * Gets the \"base\" block explorer URL for a given {@link ChainId}\n *\n * @returns default block explorer URL for the chain with the provided id,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerUrl = (chainId: ChainId): URL | null => {\n const chain = SUPPORTED_CHAINS.find((chain) => chain.id === chainId);\n if (!chain) return null;\n\n // NOTE: anvil/ens-test-env chain does not have a blockExplorer\n if (!chain.blockExplorers) return null;\n\n return new URL(chain.blockExplorers.default.url);\n};\n\n/**\n * Gets the block explorer URL for a specific address on a specific chainId\n *\n * @returns complete block explorer URL for a specific address on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerAddressDetailsUrl = (\n chainId: ChainId,\n address: Address,\n): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`address/${address}`, chainBlockExplorer.toString());\n};\n\n/**\n * Gets the block explorer URL for a specific transaction hash on a specific chainId\n *\n * @returns complete block explorer URL for a specific transaction hash on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerTransactionDetailsUrl = (\n chainId: ChainId,\n transactionHash: Hash,\n): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`tx/${transactionHash}`, chainBlockExplorer.toString());\n};\n\n/**\n * Gets the block explorer URL for a specific block on a specific chainId\n *\n * @returns complete block explorer URL for a specific block on a specific chainId,\n * or null if the referenced chain doesn't have a known block explorer\n */\nexport const getBlockExplorerBlockUrl = (chainId: ChainId, blockNumber: number): URL | null => {\n const chainBlockExplorer = getBlockExplorerUrl(chainId);\n if (!chainBlockExplorer) return null;\n\n return new URL(`block/${blockNumber}`, chainBlockExplorer.toString());\n};\n","import type { Address } from \"viem\";\n\nimport type { ENSNamespaceId } from \"@ensnode/datasources\";\nimport { ENSNamespaceIds, type Name } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Get the ENS Manager App URL for the provided namespace.\n *\n * @param {ENSNamespaceId} namespaceId - ENS Namespace identifier\n * @returns ENS Manager App URL for the provided namespace, or null if the provided namespace\n * doesn't have a known ENS Manager App\n */\nexport function getEnsManagerUrl(namespaceId: ENSNamespaceId): URL | null {\n switch (namespaceId) {\n case ENSNamespaceIds.Mainnet:\n return new URL(`https://app.ens.domains/`);\n case ENSNamespaceIds.Sepolia:\n return new URL(`https://sepolia.app.ens.domains/`);\n case ENSNamespaceIds.EnsTestEnv:\n // ens-test-env runs on a local chain and is not supported by app.ens.domains\n return null;\n }\n}\n\n/**\n * Builds the URL of the external ENS Manager App Profile page for a given name and ENS Namespace.\n *\n * @returns URL to the Profile page in the external ENS Manager App for a given name and ENS Namespace,\n * or null if this URL is not known\n */\nexport function getEnsManagerNameDetailsUrl(name: Name, namespaceId: ENSNamespaceId): URL | null {\n const baseUrl = getEnsManagerUrl(namespaceId);\n if (!baseUrl) return null;\n\n return new URL(name, baseUrl);\n}\n\n/**\n * Get the URL of the address details page in ENS Manager App for a given address and ENS Namespace.\n *\n * @returns URL to the address details page in the ENS Manager App for a given address and ENS\n * Namespace, or null if this URL is not known\n */\nexport function getEnsManagerAddressDetailsUrl(\n address: Address,\n namespaceId: ENSNamespaceId,\n): URL | null {\n const baseUrl = getEnsManagerUrl(namespaceId);\n if (!baseUrl) return null;\n\n return new URL(address, baseUrl);\n}\n","import * as React from \"react\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../../utils/cn\";\nimport { Button, type ButtonProps } from \"../ui/button\";\n\nexport interface CopyButtonProps extends Omit<ButtonProps, \"onClick\"> {\n value: string;\n message?: string;\n showToast?: boolean;\n icon?: React.ReactNode;\n successIcon?: React.ReactNode;\n}\n\nexport function CopyButton({\n value,\n message = \"Copied to clipboard\",\n variant = \"ghost\",\n size = \"icon\",\n showToast = false,\n icon,\n successIcon,\n className,\n children,\n ...props\n}: CopyButtonProps) {\n const [hasCopied, setHasCopied] = React.useState(false);\n const [isCopying, setIsCopying] = React.useState(false);\n\n React.useEffect(() => {\n if (hasCopied) {\n const timeout = setTimeout(() => setHasCopied(false), 2000);\n return () => clearTimeout(timeout);\n }\n }, [hasCopied]);\n\n async function copyToClipboard() {\n if (isCopying) return;\n\n try {\n setIsCopying(true);\n await navigator.clipboard.writeText(value);\n setHasCopied(true);\n\n if (showToast) {\n toast.success(message);\n }\n } catch (error) {\n console.error(\"Failed to copy text:\", error);\n\n if (showToast) {\n toast.error(\"Failed to copy text to clipboard\");\n }\n } finally {\n setIsCopying(false);\n }\n }\n\n return (\n <Button\n variant={variant}\n size={size}\n type=\"button\"\n onClick={copyToClipboard}\n disabled={isCopying}\n className={cn(\"nhui:cursor-pointer\", className)}\n {...props}\n >\n {hasCopied ? (successIcon ? successIcon : \"Copied\") : icon ? icon : \"Copy\"}\n <span className=\"sr-only\">Copy to clipboard</span>\n </Button>\n );\n}\n","import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils/cn\";\n\nconst buttonVariants = cva(\n \"nhui:inline-flex nhui:items-center nhui:justify-center nhui:gap-2 nhui:whitespace-nowrap nhui:rounded-md nhui:text-sm nhui:font-medium nhui:transition-all nhui:disabled:pointer-events-none nhui:disabled:opacity-50 nhui:[&_svg]:pointer-events-none nhui:[&_svg:not([class*=size-])]:size-4 nhui:shrink-0 nhui:[&_svg]:shrink-0 nhui:outline-none nhui:focus-visible:border-ring nhui:focus-visible:ring-ring/50 nhui:focus-visible:ring-[3px] nhui:aria-invalid:ring-destructive/20 nhui:dark:aria-invalid:ring-destructive/40 nhui:aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"nhui:bg-primary nhui:text-primary-foreground nhui:hover:bg-primary/90\",\n destructive:\n \"nhui:bg-destructive nhui:text-white nhui:hover:bg-destructive/90 nhui:focus-visible:ring-destructive/20 nhui:dark:focus-visible:ring-destructive/40 nhui:dark:bg-destructive/60\",\n outline:\n \"nhui:border nhui:bg-background nhui:shadow-xs nhui:hover:bg-accent nhui:hover:text-accent-foreground nhui:dark:bg-input/30 nhui:dark:border-input nhui:dark:hover:bg-input/50\",\n secondary: \"nhui:bg-secondary nhui:text-secondary-foreground nhui:hover:bg-secondary/80\",\n ghost:\n \"nhui:hover:bg-accent nhui:hover:text-accent-foreground nhui:dark:hover:bg-accent/50\",\n link: \"nhui:text-primary nhui:underline-offset-4 nhui:hover:underline\",\n },\n size: {\n default: \"nhui:h-9 nhui:px-4 nhui:py-2 nhui:has-[>svg]:px-3\",\n sm: \"nhui:h-8 nhui:rounded-md nhui:gap-1.5 nhui:px-3 nhui:has-[>svg]:px-2.5\",\n lg: \"nhui:h-10 nhui:rounded-md nhui:px-6 nhui:has-[>svg]:px-4\",\n icon: \"nhui:size-9\",\n \"icon-sm\": \"nhui:size-8\",\n \"icon-lg\": \"nhui:size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ComponentProps<\"button\">,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","import type { Name } from \"@ensnode/ensnode-sdk\";\nimport { beautifyName } from \"@ensnode/ensnode-sdk\";\n\ninterface NameDisplayProps {\n name: Name;\n className?: string;\n}\n\n/**\n * Displays an ENS name in beautified form.\n *\n * @param name - The name to display in beautified form.\n *\n */\nexport function NameDisplay({ name, className = \"nhui:font-medium\" }: NameDisplayProps) {\n const beautifiedName = beautifyName(name);\n return <span className={className}>{beautifiedName}</span>;\n}\n","import type * as React from \"react\";\n\nimport { useResolvedIdentity } from \"@ensnode/ensnode-react\";\nimport {\n type ENSNamespaceId,\n type Identity,\n isResolvedIdentity,\n ResolutionStatusIds,\n translateDefaultableChainIdToChainId,\n type UnresolvedIdentity,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { useIsMobile } from \"../../hooks/useIsMobile\";\nimport { cn } from \"../../utils/cn\";\nimport { ChainIcon } from \"../chains/ChainIcon\";\nimport { Skeleton } from \"../ui/skeleton\";\nimport { AddressDisplay } from \"./Address\";\nimport { EnsAvatar } from \"./EnsAvatar\";\nimport { IdentityLink, type IdentityLinkDetails, IdentityTooltip } from \"./Identity\";\nimport { NameDisplay } from \"./Name\";\n\nexport interface ResolveAndDisplayIdentityProps {\n identity: UnresolvedIdentity;\n namespaceId: ENSNamespaceId;\n accelerate?: boolean;\n withLink?: boolean;\n identityLinkDetails?: IdentityLinkDetails;\n withTooltip?: boolean;\n withAvatar?: boolean;\n withIdentifier?: boolean;\n className?: string;\n}\n\n/**\n * Resolves the provided `UnresolvedIdentity` through ENSNode and displays the result.\n *\n * @param identity - The `UnresolvedIdentity` to resolve and display.\n * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'ens-test-env')\n * @param accelerate - Whether to attempt Protocol Acceleration (default: false)\n * when resolving the primary name.\n * @param withLink - Whether to wrap the displayed identity in an `IdentityLink` component.\n * @param identityLinkDetails - If the `withLink` is true, provides info on where should it lead and should it be an external link.\n * @param withTooltip - Whether to wrap the displayed identity in an `IdentityInfoTooltip` component.\n * @param withAvatar - Whether to display an avatar image.\n * @param withIdentifier - Whether to display identity's textual identifier (address or name).\n * @param className - The class name to apply to the displayed identity.\n */\nexport function ResolveAndDisplayIdentity({\n identity,\n namespaceId,\n accelerate = true,\n withLink = true,\n identityLinkDetails,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: ResolveAndDisplayIdentityProps) {\n // resolve the primary name for `identity` using ENSNode\n // TODO: extract out the concept of resolving an `Identity` into a provider that child\n // components can then hook into.\n const { identity: identityResult } = useResolvedIdentity({\n identity,\n accelerate,\n });\n\n return (\n <DisplayIdentity\n identity={identityResult}\n namespaceId={namespaceId}\n withLink={withLink}\n identityLinkDetails={identityLinkDetails}\n withTooltip={withTooltip}\n withAvatar={withAvatar}\n withIdentifier={withIdentifier}\n className={className}\n />\n );\n}\n\ninterface DisplayIdentityProps {\n identity: Identity;\n namespaceId: ENSNamespaceId;\n withLink?: boolean;\n identityLinkDetails?: IdentityLinkDetails;\n withTooltip?: boolean;\n withAvatar?: boolean;\n withIdentifier?: boolean;\n className?: string;\n}\n\n/**\n * Displays the provided `Identity`.\n *\n * Performs _NO_ resolution if the provided `identity` is not already a `ResolvedIdentity`.\n *\n * @param identity - The identity to display. May be a `ResolvedIdentity` or an `UnresolvedIdentity`.\n * If not a `ResolvedIdentity` (and therefore just an `UnresolvedIdentity`) then displays a loading state.\n * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'ens-test-env')\n * @param withLink - Whether to wrap the displayed identity in an `IdentityLink` component.\n * @param identityLinkDetails - If the `withLink` is true, provides info on where should it lead and should it be an external link.\n * @param withTooltip - Whether to wrap the displayed identity in an `IdentityInfoTooltip` component.\n * @param withAvatar - Whether to display an avatar image.\n * @param withIdentifier - Whether to display identity's textual identifier (address or name).\n * @param className - The class name to apply to the displayed identity.\n *\n * @throws Error - if `withLink` is true, but no `identityLinkDetails` are provided.\n */\nexport function DisplayIdentity({\n identity,\n namespaceId,\n withLink = true,\n identityLinkDetails,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: DisplayIdentityProps) {\n let avatar: React.ReactElement;\n let identifier: React.ReactElement;\n\n const isMobile = useIsMobile();\n\n if (!isResolvedIdentity(identity)) {\n // identity is an `UnresolvedIdentity` which represents that it hasn't been resolved yet\n // display loading state\n avatar = (\n <Skeleton\n className={cn(\n \"nhui:h-10 nhui:w-10 nhui:rounded-full nhui:bg-gray-200\",\n isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\",\n )}\n />\n );\n identifier = (\n <Skeleton\n className={cn(\n \"nhui:w-[100px] nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200\",\n className,\n )}\n />\n );\n } else if (\n identity.resolutionStatus === ResolutionStatusIds.Unnamed ||\n identity.resolutionStatus === ResolutionStatusIds.Unknown\n ) {\n avatar = (\n <div\n className={cn(\n \"nhui:w-10 nhui:h-10 nhui:flex nhui:justify-center nhui:items-center\",\n isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\",\n )}\n >\n <ChainIcon\n chainId={translateDefaultableChainIdToChainId(identity.chainId, namespaceId)}\n height={isMobile && withIdentifier ? 16 : 24}\n width={isMobile && withIdentifier ? 16 : 24}\n />\n </div>\n );\n identifier = (\n <AddressDisplay\n address={identity.address}\n className={cn(\n \"nhui:whitespace-nowrap nhui:hover:underline nhui:hover:underline-offset-[25%]\",\n className,\n )}\n />\n );\n } else {\n avatar = (\n <EnsAvatar\n name={identity.name}\n namespaceId={namespaceId}\n className={cn(\"nhui:h-10 nhui:w-10\", isMobile && withIdentifier && \"nhui:w-5 nhui:h-5\")}\n />\n );\n identifier = (\n <NameDisplay\n name={identity.name}\n className={cn(\n \"nhui:w-fit nhui:sm:w-full nhui:whitespace-nowrap nhui:hover:underline nhui:hover:underline-offset-[25%] nhui:overflow-x-auto\",\n className,\n )}\n />\n );\n }\n\n let result = (\n <div className=\"nhui:inline-flex nhui:items-center nhui:gap-2\">\n {/* TODO: extract the `EnsAvatar` / `ChainIcon` out of this component and remove the\n `withAvatar` prop. */}\n {withAvatar && avatar}\n {withIdentifier && identifier}\n </div>\n );\n\n // TODO: extract the `IdentityInfoTooltip` out of this component and remove the `withTooltip` prop.\n if (withTooltip) {\n result = (\n <IdentityTooltip identity={identity} namespaceId={namespaceId}>\n {result}\n </IdentityTooltip>\n );\n }\n\n // TODO: extract the `IdentityLink` out of this component and remove the `withLink` prop.\n if (withLink) {\n if (identityLinkDetails === undefined) {\n throw new Error(\"Invariant(ResolveAndDisplayIdentity): Expected identity link details\");\n }\n result = (\n <IdentityLink\n linkDetails={identityLinkDetails}\n className={cn(\"nhui:inline-flex nhui:w-fit nhui:h-fit\")}\n >\n {result}\n </IdentityLink>\n );\n }\n\n return result;\n}\n\n// TODO: Copied from ENSAwards (as a newer version) - performed some refactor actions\n// to make the component usable across all our apps, but further alignment might be needed\n","import * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 640;\n\nexport function useIsMobile(breakpoint: number = MOBILE_BREAKPOINT) {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < breakpoint);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < breakpoint);\n return () => mql.removeEventListener(\"change\", onChange);\n }, [breakpoint]);\n\n return !!isMobile;\n}\n","import { cn } from \"../../utils/cn\";\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"nhui:bg-accent nhui:animate-pulse nhui:rounded-md\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import { Info as InfoIcon, CircleQuestionMark as QuestionmarkIcon } from \"lucide-react\";\nimport { memo, type PropsWithChildren, type ReactNode } from \"react\";\nimport { type Address, zeroAddress } from \"viem\";\n\nimport type {\n DefaultableChainId,\n ENSNamespaceId,\n NamedRegistrarAction,\n RegistrarActionReferral,\n UnixTimestamp,\n} from \"@ensnode/ensnode-sdk\";\nimport {\n buildUnresolvedIdentity,\n isRegistrarActionReferralAvailable,\n RegistrarActionTypes,\n ZERO_ENCODED_REFERRER,\n} from \"@ensnode/ensnode-sdk\";\n\nimport { useIsMobile } from \"../../hooks/useIsMobile\";\nimport { getBlockExplorerTransactionDetailsUrl } from \"../../utils/blockExplorers\";\nimport { cn } from \"../../utils/cn\";\nimport { DisplayDuration } from \"../datetime/DisplayDuration\";\nimport { RelativeTime } from \"../datetime/RelativeTime\";\nimport type { IdentityLinkDetails } from \"../identity/Identity\";\nimport { NameDisplay } from \"../identity/Name\";\nimport {\n ResolveAndDisplayIdentity,\n type ResolveAndDisplayIdentityProps,\n} from \"../identity/ResolveAndDisplayIdentity\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\n\ninterface LabeledFieldProps {\n fieldLabel: string;\n className?: string;\n}\n\n/**\n * Display a labeled field.\n */\nexport function LabeledField({\n fieldLabel,\n className,\n children,\n}: PropsWithChildren<LabeledFieldProps>) {\n return (\n <div\n className={cn(\n \"nhui:max-sm:w-full nhui:flex nhui:flex-row nhui:sm:flex-col nhui:flex-nowrap nhui:justify-between nhui:sm:justify-center nhui:items-start nhui:gap-0 nhui:max-sm:self-stretch\",\n className,\n )}\n >\n <p className=\"nhui:text-muted-foreground nhui:text-sm nhui:leading-normal nhui:font-normal\">\n {fieldLabel}\n </p>\n {children}\n </div>\n );\n}\n\nexport interface ReferrerLinkData {\n isExternal: boolean;\n getLink: (address: Address, namespaceId: ENSNamespaceId) => URL | null;\n}\n\ninterface ResolveAndDisplayReferrerIdentityProps\n extends Omit<ResolveAndDisplayIdentityProps, \"identity\" | \"identityLinkDetails\"> {\n chainId: DefaultableChainId;\n referral: RegistrarActionReferral;\n referrerLinkData: ReferrerLinkData;\n}\n\n/**\n * Resolve and Display Referrer Identity\n *\n * Resolves and displays the identity of the decoded referrer, or a fallback UI.\n */\nfunction ResolveAndDisplayReferrerIdentity({\n namespaceId,\n chainId,\n referral,\n accelerate = true,\n withLink = true,\n referrerLinkData,\n withTooltip = true,\n withAvatar = false,\n withIdentifier = true,\n className,\n}: ResolveAndDisplayReferrerIdentityProps) {\n // if encoded referrer is not available or is the zero encoded referrer then\n if (\n !isRegistrarActionReferralAvailable(referral) ||\n referral.encodedReferrer === ZERO_ENCODED_REFERRER\n ) {\n // when we only want to display avatar (without textual identifier) don't display anything (return an empty placeholder).\n // Otherwise, display a hyphen with no avatar\n return withAvatar && !withIdentifier ? (\n <div className=\"nhui:w-10 nhui:h-10\" />\n ) : (\n <p className=\"nhui:h-[21px]\">-</p>\n );\n }\n\n // if the encoded referrer was not the zeroEncodedReferrer but couldn't be\n // decoded according to the subjective interpretation rules of\n // the current ENS Referral Awards program then display a tooltip with details\n if (referral.decodedReferrer === zeroAddress) {\n // when we only want to display avatar (without textual identifier) use a dedicated placeholder.\n // Otherwise, display \"unknown\" plus the placeholder.\n const unknownAvatarPlaceholder = (className?: string, iconSize = 24) => (\n <div\n className={cn(\n \"nhui:flex nhui:justify-center nhui:items-center nhui:rounded-full nhui:bg-gray-200\",\n className,\n !withAvatar && \"nhui:hidden\",\n )}\n >\n <QuestionmarkIcon size={iconSize} className=\"nhui:text-gray-400\" />\n </div>\n );\n\n return withAvatar && !withIdentifier ? (\n unknownAvatarPlaceholder(\"nhui:w-10 nhui:h-10\", 24)\n ) : (\n <span className=\"nhui:h-[21px] nhui:inline-flex nhui:items-center nhui:gap-2 nhui:font-medium\">\n {unknownAvatarPlaceholder(\"nhui:w-5 nhui:h-5\", 16)}\n Unknown\n <Tooltip delayDuration={250}>\n <TooltipTrigger>\n <InfoIcon size={16} className=\"nhui:shrink-0 nhui:fill-neutral-300 nhui:text-white\" />\n </TooltipTrigger>\n <TooltipContent\n side=\"top\"\n className=\"nhui:bg-gray-50 nhui:text-sm nhui:text-black nhui:text-left nhui:shadow-md nhui:outline-hidden nhui:w-fit [&_svg]:fill-gray-50 [&_svg]:bg-gray-50\"\n >\n Encoded referrer\n <code className=\"nhui:block\">{referral.encodedReferrer}</code> does not follow the\n formatting requirements of incentive programs.\n </TooltipContent>\n </Tooltip>\n </span>\n );\n }\n\n // resolve and display identity for the decodedReferrer address\n const referrerIdentity = buildUnresolvedIdentity(referral.decodedReferrer, namespaceId, chainId);\n\n return (\n <ResolveAndDisplayIdentity\n identity={referrerIdentity}\n namespaceId={namespaceId}\n accelerate={accelerate}\n withAvatar={withAvatar}\n withTooltip={withTooltip}\n withIdentifier={withIdentifier}\n className={className}\n withLink={withLink}\n identityLinkDetails={{\n isExternal: referrerLinkData.isExternal,\n link: referrerLinkData.getLink(referrerIdentity.address, namespaceId),\n }}\n />\n );\n}\n\nexport interface RegistrarActionCardLoadingProps {\n showReferrer?: boolean;\n showReferralProgramField?: boolean;\n}\n\n/**\n * Display Registrar Action Card loading state\n */\nexport function RegistrarActionCardLoading({\n showReferrer = true,\n showReferralProgramField = true,\n}: RegistrarActionCardLoadingProps) {\n const isMobile = useIsMobile();\n\n return (\n <div\n className=\"nhui:w-full nhui:min-h-[80px] nhui:box-border nhui:flex nhui:flex-col nhui:sm:flex-row nhui:flex-wrap nhui:justify-start nhui:sm:justify-between nhui:items-start\n nhui:sm:items-center nhui:gap-2 nhui:p-4 nhui:sm:p-6 nhui:sm:gap-y-5 nhui:rounded-2xl nhui:border nhui:border-gray-200 nhui:text-sm nhui:bg-white\"\n >\n <LabeledField fieldLabel=\"Name\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </LabeledField>\n\n <LabeledField fieldLabel=\"Registrar action\" className=\"nhui:w-[15%] nhui:min-w-[110px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/5 nhui:sm:w-3/4\" />\n </LabeledField>\n\n <LabeledField fieldLabel=\"Duration\" className=\"nhui:w-[10%] nhui:min-w-[110px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-2/3\" />\n </LabeledField>\n\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-10 nhui:h-10 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <LabeledField fieldLabel=\"Registrant\" className=\"nhui:sm:min-w-[110px]\">\n <div className=\"nhui:w-full nhui:flex nhui:flex-row nhui:flex-nowrap nhui:max-sm:justify-end nhui:justify-start nhui:items-center nhui:gap-2\">\n {isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-5 nhui:h-5 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </div>\n </LabeledField>\n </div>\n\n {showReferrer && (\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-10 nhui:h-10 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <LabeledField fieldLabel=\"Referrer\" className=\"nhui:sm:min-w-[110px]\">\n <div className=\"nhui:w-full nhui:flex nhui:flex-row nhui:flex-nowrap nhui:max-sm:justify-end nhui:justify-start nhui:items-center nhui:gap-2\">\n {isMobile && (\n <div className=\"nhui:animate-pulse nhui:w-5 nhui:h-5 nhui:bg-gray-200 nhui:rounded-full\" />\n )}\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-3/5\" />\n </div>\n </LabeledField>\n </div>\n )}\n\n {showReferralProgramField && (\n <LabeledField fieldLabel=\"Incentive program\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n <div className=\"nhui:animate-pulse nhui:h-[14px] nhui:mt-[4px] nhui:mb-[3px] nhui:bg-gray-200 nhui:rounded-sm nhui:w-1/4 nhui:sm:w-4/5\" />\n </LabeledField>\n )}\n </div>\n );\n}\n\nexport interface RegistrarActionCardProps {\n namespaceId: ENSNamespaceId;\n namedRegistrarAction: NamedRegistrarAction;\n now: UnixTimestamp;\n links: {\n name: IdentityLinkDetails;\n registrant: IdentityLinkDetails;\n referrer: ReferrerLinkData;\n };\n showIdentityTooltips?: {\n registrant: boolean;\n referrer: boolean;\n };\n showReferrer?: boolean;\n referralProgramField?: ReactNode;\n}\n\n/**\n * Display a single Registrar Action\n */\nexport function RegistrarActionCard({\n namespaceId,\n namedRegistrarAction,\n now,\n links,\n showIdentityTooltips = {\n registrant: false,\n referrer: false,\n },\n showReferrer = true,\n referralProgramField,\n}: RegistrarActionCardProps) {\n const isMobile = useIsMobile();\n const { registrant, registrationLifecycle, type, referral, transactionHash } =\n namedRegistrarAction.action;\n const { chainId } = registrationLifecycle.subregistry.subregistryId;\n\n const transactionDetailUrl = getBlockExplorerTransactionDetailsUrl(chainId, transactionHash);\n const withTransactionLink = ({ children }: PropsWithChildren) =>\n // wrap `children` content with a transaction link only if the URL is defined\n transactionDetailUrl ? (\n <a\n target=\"_blank\"\n className=\"nhui:w-fit nhui:text-blue-600 nhui:font-medium nhui:hover:underline nhui:hover:underline-offset-[25%]\"\n href={transactionDetailUrl.toString()}\n >\n {children}\n </a>\n ) : (\n children\n );\n\n const registrantIdentity = buildUnresolvedIdentity(registrant, namespaceId, chainId);\n\n return (\n <div\n className=\"nhui:w-full nhui:min-h-[80px] nhui:box-border nhui:flex nhui:flex-col nhui:sm:flex-row nhui:flex-wrap nhui:justify-start nhui:sm:justify-between\n nhui:items-start nhui:gap-2 nhui:p-4 nhui:sm:p-6 nhui:sm:gap-y-5 nhui:rounded-2xl nhui:border nhui:border-gray-200 nhui:text-sm nhui:bg-white\"\n >\n <LabeledField fieldLabel=\"Name\" className=\"nhui:w-[15%] nhui:min-w-[162px]\">\n {links.name.link !== null ? (\n <a\n target={links.name.isExternal ? \"_blank\" : \"_self\"}\n href={links.name.link.href}\n className=\"nhui:max-sm:max-w-3/4 nhui:sm:w-full nhui:box-border nhui:overflow-x-auto nhui:text-blue-600 nhui:font-medium nhui:hover:underline nhui:hover:underline-offset-[25%] nhui:whitespace-nowrap\"\n >\n <NameDisplay name={namedRegistrarAction.name} className=\"nhui:h-[21px]\" />\n </a>\n ) : (\n <p className=\"nhui:max-sm:max-w-3/4 nhui:sm:w-full nhui:box-border nhui:overflow-x-auto nhui:font-medium nhui:whitespace-nowrap\">\n <NameDisplay name={namedRegistrarAction.name} className=\"nhui:h-[21px]\" />\n </p>\n )}\n </LabeledField>\n\n <LabeledField\n fieldLabel={type === RegistrarActionTypes.Registration ? \"Registered\" : \"Renewed\"}\n className=\"nhui:w-[15%] nhui:min-w-[110px]\"\n >\n <p className=\"nhui:h-[21px] nhui:font-medium\">\n <RelativeTime\n timestamp={namedRegistrarAction.action.block.timestamp}\n tooltipPosition=\"top\"\n conciseFormatting={true}\n contentWrapper={withTransactionLink}\n relativeTo={now}\n />\n </p>\n </LabeledField>\n\n <LabeledField fieldLabel=\"Duration\" className=\"nhui:w-[10%] nhui:min-w-[110px]\">\n <p className=\"nhui:h-[21px] nhui:font-medium\">\n <DisplayDuration duration={namedRegistrarAction.action.incrementalDuration} />\n </p>\n </LabeledField>\n\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <ResolveAndDisplayIdentity\n identity={registrantIdentity}\n namespaceId={namespaceId}\n withAvatar={true}\n withTooltip={showIdentityTooltips.registrant}\n withIdentifier={false}\n identityLinkDetails={links.registrant}\n />\n )}\n <LabeledField fieldLabel=\"Registrant\" className=\"nhui:sm:min-w-[110px]\">\n <ResolveAndDisplayIdentity\n identity={registrantIdentity}\n namespaceId={namespaceId}\n withAvatar={isMobile}\n withTooltip={showIdentityTooltips.registrant}\n className=\"nhui:font-medium nhui:sm:max-[1220px]:max-w-[110px] nhui:min-[1220px]:max-w-[140px]\"\n identityLinkDetails={links.registrant}\n />\n </LabeledField>\n </div>\n\n {showReferrer && (\n <div className=\"nhui:flex nhui:flex-row nhui:flex-nowrap nhui:justify-start nhui:items-center nhui:gap-3 nhui:max-sm:w-full nhui:w-[15%] nhui:min-w-[162px]\">\n {!isMobile && (\n <ResolveAndDisplayReferrerIdentity\n chainId={chainId}\n namespaceId={namespaceId}\n referral={referral}\n withAvatar={true}\n withIdentifier={false}\n withTooltip={showIdentityTooltips.referrer}\n referrerLinkData={links.referrer}\n />\n )}\n <LabeledField fieldLabel=\"Referrer\" className=\"nhui:w-[15%] nhui:min-w-[110px]\">\n <ResolveAndDisplayReferrerIdentity\n chainId={chainId}\n namespaceId={namespaceId}\n referral={referral}\n withAvatar={isMobile}\n withIdentifier={true}\n withTooltip={showIdentityTooltips.referrer}\n referrerLinkData={links.referrer}\n />\n </LabeledField>\n </div>\n )}\n\n {referralProgramField !== undefined && referralProgramField}\n </div>\n );\n}\n\nexport const RegistrarActionCardMemo = memo(RegistrarActionCard);\n","import { useEffect, useState } from \"react\";\n\nimport type { Duration, UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { useSystemClock } from \"./useSystemClock\";\n\n/** Default time to refresh: `1` second. */\nexport const DEFAULT_TIME_TO_REFRESH: Duration = 1;\n\nexport interface UseNowProps {\n /**\n * Duration after which time value will be refreshed.\n *\n * Defaults to {@link DEFAULT_TIME_TO_REFRESH}.\n */\n timeToRefresh?: Duration;\n}\n\n/**\n * Use now\n *\n * This hook returns the current system time while following `timeToRefresh` param.\n *\n * @param timeToRefresh Duration after which time value will be refreshed.\n *\n * @example\n * ```ts\n * // `now` will be updated each second (by default)\n * const now = useNow();\n * ```\n * @example\n * ```ts\n * // `now` will be updated each 5 seconds\n * const now = useNow({ timeToRefresh: 5 });\n * ```\n */\nexport function useNow(props?: UseNowProps): UnixTimestamp {\n const clock = useSystemClock();\n const [throttledClock, setThrottledClock] = useState(clock);\n const { timeToRefresh = DEFAULT_TIME_TO_REFRESH } = props || {};\n\n useEffect(() => {\n if (clock - throttledClock >= timeToRefresh) {\n setThrottledClock(clock);\n }\n }, [timeToRefresh, clock, throttledClock]);\n\n return throttledClock;\n}\n","import { getUnixTime } from \"date-fns\";\nimport { useSyncExternalStore } from \"react\";\n\nimport type { UnixTimestamp } from \"@ensnode/ensnode-sdk\";\n\nimport { systemClock } from \"../utils/systemClock\";\n\n/**\n * Use System Clock\n *\n * Allows reading the current system time {@link UnixTimestamp} which stays\n * exactly the same across all callers of this hook.\n *\n * @see https://react.dev/reference/react/useSyncExternalStore\n */\nexport function useSystemClock(): UnixTimestamp {\n const subscribe = (callback: () => void) => {\n systemClock.addListener(callback);\n\n return () => {\n systemClock.removeListener(callback);\n };\n };\n const getSnapshot = () => getUnixTime(new Date(systemClock.currentTime));\n const getServerSnapshot = () => getUnixTime(new Date());\n\n const syncedSystemClock = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n\n // syncedSystemClock will be undefined on the initial render,\n // so we return the snapshot result to ensure there's always\n // some UnixTime value returned.\n return syncedSystemClock ?? getSnapshot();\n}\n","type SyncedClockListener = () => void;\n\n/**\n * Create Now\n *\n * Helper type defining a factory function for unix timestamp values in milliseconds.\n * An example factory is `Date.now`.\n */\ntype CreateNow = () => number;\n\nexport interface SyncedClock {\n /**\n * Current time of the synced clock as a unix timestamp value in milliseconds.\n */\n currentTime: ReturnType<CreateNow>;\n\n /**\n * Adds a new listener to all listeners tracking the synced clock.\n * @param callback to notify the listener about clock updates.\n */\n addListener(callback: SyncedClockListener): void;\n\n /**\n * Removes a listener from all listeners tracking the synced clock.\n * @param callback to notify the listener about clock updates.\n */\n removeListener(callback: SyncedClockListener): void;\n}\n\n/**\n * Default tick rate frequency in milliseconds.\n */\nexport const DEFAULT_TICK_RATE = 16;\n\n/**\n * High-resolution clock that updates with `tickRate` frequency.\n */\nexport class HighResolutionSyncedClock implements SyncedClock {\n #listeners = new Set<SyncedClockListener>();\n\n #currentTime = Date.now();\n\n #timerId: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Tick rate frequency in milliseconds.\n */\n #tickRate: number;\n\n /**\n * Clock's tick handler.\n *\n * Runs at `tickRate` frequency, and notifies all listeners about\n * the current time updates.\n */\n #tick = () => {\n this.#currentTime = Date.now();\n\n this.#listeners.forEach((listener) => listener());\n\n this.#timerId = setTimeout(this.#tick, this.#tickRate);\n };\n\n /**\n * Starts the clock.\n */\n private start = () => {\n if (this.#timerId === null) {\n this.#currentTime = Date.now();\n this.#timerId = setTimeout(this.#tick, this.#tickRate);\n }\n };\n\n /**\n * Stops the clock.\n */\n private stop = () => {\n if (this.#timerId !== null) {\n clearTimeout(this.#timerId);\n this.#timerId = null;\n }\n };\n\n public constructor(tickRate = DEFAULT_TICK_RATE) {\n this.#tickRate = tickRate;\n }\n\n /**\n * Adds a new listener to all listeners tracking the synced clock.\n *\n * Starts the clock (or restarts it, which is a noop) if there's at\n * least one listener.\n *\n * @param callback to notify the listener about clock updates.\n */\n public addListener(callback: SyncedClockListener) {\n this.#listeners.add(callback);\n\n // start (or restart, which is a noop) when anyone is listening\n if (this.#listeners.size > 0) {\n this.start();\n }\n }\n\n /**\n * Removes a listener from all listeners tracking the synced clock.\n *\n * Stops the clock if there's no listener.\n *\n * @param callback to notify the listener about clock updates.\n */\n public removeListener(callback: SyncedClockListener) {\n this.#listeners.delete(callback);\n\n // stop when no one is listening anymore\n if (this.#listeners.size === 0) {\n this.stop();\n }\n }\n\n get currentTime() {\n return this.#currentTime;\n }\n}\n","import { HighResolutionSyncedClock, type SyncedClock } from \"./syncedClock\";\n\n/**\n * Synced System Clock\n *\n * There is just one instance of it in ENSAdmin.\n */\nexport const systemClock: SyncedClock = new HighResolutionSyncedClock();\n"],"mappings":";;;;;;AAAA,IAAa;AAAb;;;AAAO,IAAM,UAAU;;;;;ACoFvB,SAAS,KACP,KACA,IAA4C;AAE5C,MAAI,KAAK,GAAG;AAAG,WAAO;AACtB,MACE,OACA,OAAO,QAAQ,YACf,WAAW,OACX,IAAI,UAAU;AAEd,WAAO,KAAK,IAAI,OAAO,EAAE;AAC3B,SAAO,KAAK,OAAO;AACrB;AAjGA,IAOI,aA6BS;AApCb;;;;AAOA,IAAI,cAA2B;MAC7B,YAAY,CAAC,EACX,aACA,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G,YAAY,cAAc,CAAC,EAAC,IACjC,CAAA;IACG;AAEf;AArGA,IAWa;AAXb;;;;AAWO,IAAM,qBAAqB;MAChC,QAAQ;MACR,SAAS;MACT,SAAS;MACT,SAAS;MACT,SAAS;;;;;;AC9BX,IAAa,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WAEA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WAEA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA;AAjGb;;;AAAO,IAAM,UAAU,OAAO,KAAK,MAAM;AAClC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,WAAW,OAAO,MAAM,MAAM;AACpC,IAAM,YAAY,OAAO,OAAO,MAAM;AACtC,IAAM,YAAY,OAAO,OAAO,MAAM;AACtC,IAAM,YAAY,OAAO,OAAO,MAAM;AACtC,IAAM,YAAY,OAAO,OAAO,MAAM;AACtC,IAAM,YAAY,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AI,KAAK,YAAY,WAAW,CAAC;AACvE,QAAM,oBAAoB,MAAM,YAAY,oBAAI,KAAK,CAAC;AAEtD,QAAM,oBAAoB,qBAAqB,WAAW,aAAa,iBAAiB;AAKxF,SAAO,qBAAqB,YAAY;AAC1C;;;ADzBO,IAAM,0BAAoC;AA6B1C,SAAS,OAAO,OAAoC;AACzD,QAAM,QAAQ,eAAe;AAC7B,QAAM,CAAC,gBAAgB,iBAAiB,IAAIC,UAAS,KAAK;AAC1D,QAAM,EAAE,gBAAgB,wBAAwB,IAAI,SAAS,CAAC;AAE9D,EAAAC,WAAU,MAAM;AACd,QAAI,QAAQ,kBAAkB,eAAe;AAC3C,wBAAkB,KAAK;AAAA,IACzB;AAAA,EACF,GAAG,CAAC,eAAe,OAAO,cAAc,CAAC;AAEzC,SAAO;AACT;","names":["size","size","size","size","encoder","size","formatAuthorizationList","init_cursor","size","toBytes","isLE","_32n","toBytes","size","toBytes","cause","formatted","init_cursor","sha256","sha256","version","sha256","version","size","version","init_cursor","size","version","blobs","commitments","proofs","v","serializeTransaction","sourceId","chainConfig","chainConfig","chainConfig","sourceId","sourceId","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","ensTestEnvL1Chain","jsx","jsx","fromUnixTime","useEffect","useState","formatDistanceStrict","fromUnixTime","useEffect","useState","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","fromUnixTime","formatDistanceStrict","useState","useEffect","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","React","jsx","jsxs","jsx","jsxs","jsx","React","jsx","jsx","jsxs","chain","ENSNamespaceIds","React","jsx","size","jsx","jsxs","size","Fragment","jsx","jsxs","jsx","isResolvedIdentity","ResolutionStatusIds","translateDefaultableChainIdToChainId","React","jsx","jsx","jsxs","isResolvedIdentity","ResolutionStatusIds","translateDefaultableChainIdToChainId","InfoIcon","jsx","jsxs","className","InfoIcon","useEffect","useState","useState","useEffect"]}