{"version":3,"file":"serializeSignature-CZEInS9b.mjs","names":[],"sources":["../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/authorization/hashAuthorization.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/constants/strings.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/signature/hashMessage.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/errors/typedData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/typedData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/signature/hashTypedData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/signature/serializeSignature.js"],"sourcesContent":["import { checksumAddress, } from '../../utils/address/getAddress.js';\nimport { keccak256, } from '../../utils/hash/keccak256.js';\n/**\n * @description Converts an ECDSA public key to an address.\n *\n * @param publicKey The public key to convert.\n *\n * @returns The address.\n */\nexport function publicKeyToAddress(publicKey) {\n    const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n    return checksumAddress(`0x${address}`);\n}\n//# sourceMappingURL=publicKeyToAddress.js.map","import { concatHex } from '../data/concat.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { numberToHex } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { keccak256 } from '../hash/keccak256.js';\n/**\n * Computes an Authorization hash in [EIP-7702 format](https://eips.ethereum.org/EIPS/eip-7702): `keccak256('0x05' || rlp([chain_id, address, nonce]))`.\n */\nexport function hashAuthorization(parameters) {\n    const { chainId, nonce, to } = parameters;\n    const address = parameters.contractAddress ?? parameters.address;\n    const hash = keccak256(concatHex([\n        '0x05',\n        toRlp([\n            chainId ? numberToHex(chainId) : '0x',\n            address,\n            nonce ? numberToHex(nonce) : '0x',\n        ]),\n    ]));\n    if (to === 'bytes')\n        return hexToBytes(hash);\n    return hash;\n}\n//# sourceMappingURL=hashAuthorization.js.map","export const presignMessagePrefix = '\\x19Ethereum Signed Message:\\n';\n//# sourceMappingURL=strings.js.map","import { presignMessagePrefix } from '../../constants/strings.js';\nimport { concat } from '../data/concat.js';\nimport { size } from '../data/size.js';\nimport { bytesToHex, stringToHex, } from '../encoding/toHex.js';\nexport function toPrefixedMessage(message_) {\n    const message = (() => {\n        if (typeof message_ === 'string')\n            return stringToHex(message_);\n        if (typeof message_.raw === 'string')\n            return message_.raw;\n        return bytesToHex(message_.raw);\n    })();\n    const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);\n    return concat([prefix, message]);\n}\n//# sourceMappingURL=toPrefixedMessage.js.map","import { keccak256 } from '../hash/keccak256.js';\nimport { toPrefixedMessage } from './toPrefixedMessage.js';\nexport function hashMessage(message, to_) {\n    return keccak256(toPrefixedMessage(message), to_);\n}\n//# sourceMappingURL=hashMessage.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nexport class InvalidDomainError extends BaseError {\n    constructor({ domain }) {\n        super(`Invalid domain \"${stringify(domain)}\".`, {\n            metaMessages: ['Must be a valid EIP-712 domain.'],\n        });\n    }\n}\nexport class InvalidPrimaryTypeError extends BaseError {\n    constructor({ primaryType, types, }) {\n        super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types))}\\`.`, {\n            docsPath: '/api/glossary/Errors#typeddatainvalidprimarytypeerror',\n            metaMessages: ['Check that the primary type is a key in `types`.'],\n        });\n    }\n}\nexport class InvalidStructTypeError extends BaseError {\n    constructor({ type }) {\n        super(`Struct type \"${type}\" is invalid.`, {\n            metaMessages: ['Struct type must not be a Solidity type.'],\n            name: 'InvalidStructTypeError',\n        });\n    }\n}\n//# sourceMappingURL=typedData.js.map","import { BytesSizeMismatchError } from '../errors/abi.js';\nimport { InvalidAddressError } from '../errors/address.js';\nimport { InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError, } from '../errors/typedData.js';\nimport { isAddress } from './address/isAddress.js';\nimport { size } from './data/size.js';\nimport { numberToHex } from './encoding/toHex.js';\nimport { bytesRegex, integerRegex } from './regex.js';\nimport { hashDomain, } from './signature/hashTypedData.js';\nimport { stringify } from './stringify.js';\nexport function serializeTypedData(parameters) {\n    const { domain: domain_, message: message_, primaryType, types, } = parameters;\n    const normalizeData = (struct, data_) => {\n        const data = { ...data_ };\n        for (const param of struct) {\n            const { name, type } = param;\n            if (type === 'address')\n                data[name] = data[name].toLowerCase();\n        }\n        return data;\n    };\n    const domain = (() => {\n        if (!types.EIP712Domain)\n            return {};\n        if (!domain_)\n            return {};\n        return normalizeData(types.EIP712Domain, domain_);\n    })();\n    const message = (() => {\n        if (primaryType === 'EIP712Domain')\n            return undefined;\n        return normalizeData(types[primaryType], message_);\n    })();\n    return stringify({ domain, message, primaryType, types });\n}\nexport function validateTypedData(parameters) {\n    const { domain, message, primaryType, types } = parameters;\n    const validateData = (struct, data) => {\n        for (const param of struct) {\n            const { name, type } = param;\n            const value = data[name];\n            const integerMatch = type.match(integerRegex);\n            if (integerMatch &&\n                (typeof value === 'number' || typeof value === 'bigint')) {\n                const [_type, base, size_] = integerMatch;\n                // If number cannot be cast to a sized hex value, it is out of range\n                // and will throw.\n                numberToHex(value, {\n                    signed: base === 'int',\n                    size: Number.parseInt(size_, 10) / 8,\n                });\n            }\n            if (type === 'address' && typeof value === 'string' && !isAddress(value))\n                throw new InvalidAddressError({ address: value });\n            const bytesMatch = type.match(bytesRegex);\n            if (bytesMatch) {\n                const [_type, size_] = bytesMatch;\n                if (size_ && size(value) !== Number.parseInt(size_, 10))\n                    throw new BytesSizeMismatchError({\n                        expectedSize: Number.parseInt(size_, 10),\n                        givenSize: size(value),\n                    });\n            }\n            const struct = types[type];\n            if (struct) {\n                validateReference(type);\n                validateData(struct, value);\n            }\n        }\n    };\n    // Validate domain types.\n    if (types.EIP712Domain && domain) {\n        if (typeof domain !== 'object')\n            throw new InvalidDomainError({ domain });\n        validateData(types.EIP712Domain, domain);\n    }\n    // Validate message types.\n    if (primaryType !== 'EIP712Domain') {\n        if (types[primaryType])\n            validateData(types[primaryType], message);\n        else\n            throw new InvalidPrimaryTypeError({ primaryType, types });\n    }\n}\nexport function getTypesForEIP712Domain({ domain, }) {\n    return [\n        typeof domain?.name === 'string' && { name: 'name', type: 'string' },\n        domain?.version && { name: 'version', type: 'string' },\n        (typeof domain?.chainId === 'number' ||\n            typeof domain?.chainId === 'bigint') && {\n            name: 'chainId',\n            type: 'uint256',\n        },\n        domain?.verifyingContract && {\n            name: 'verifyingContract',\n            type: 'address',\n        },\n        domain?.salt && { name: 'salt', type: 'bytes32' },\n    ].filter(Boolean);\n}\nexport function domainSeparator({ domain }) {\n    return hashDomain({\n        domain: domain,\n        types: {\n            EIP712Domain: getTypesForEIP712Domain({ domain }),\n        },\n    });\n}\n/** @internal */\nfunction validateReference(type) {\n    // Struct type must not be a Solidity type.\n    if (type === 'address' ||\n        type === 'bool' ||\n        type === 'string' ||\n        type.startsWith('bytes') ||\n        type.startsWith('uint') ||\n        type.startsWith('int'))\n        throw new InvalidStructTypeError({ type });\n}\n//# sourceMappingURL=typedData.js.map","// Implementation forked and adapted from https://github.com/MetaMask/eth-sig-util/blob/main/src/sign-typed-data.ts\nimport { encodeAbiParameters, } from '../abi/encodeAbiParameters.js';\nimport { concat } from '../data/concat.js';\nimport { toHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { getTypesForEIP712Domain, validateTypedData, } from '../typedData.js';\nexport function hashTypedData(parameters) {\n    const { domain = {}, message, primaryType, } = parameters;\n    const types = {\n        EIP712Domain: getTypesForEIP712Domain({ domain }),\n        ...parameters.types,\n    };\n    // Need to do a runtime validation check on addresses, byte ranges, integer ranges, etc\n    // as we can't statically check this with TypeScript.\n    validateTypedData({\n        domain,\n        message,\n        primaryType,\n        types,\n    });\n    const parts = ['0x1901'];\n    if (domain)\n        parts.push(hashDomain({\n            domain,\n            types: types,\n        }));\n    if (primaryType !== 'EIP712Domain')\n        parts.push(hashStruct({\n            data: message,\n            primaryType,\n            types: types,\n        }));\n    return keccak256(concat(parts));\n}\nexport function hashDomain({ domain, types, }) {\n    return hashStruct({\n        data: domain,\n        primaryType: 'EIP712Domain',\n        types: types,\n    });\n}\nexport function hashStruct({ data, primaryType, types, }) {\n    const encoded = encodeData({\n        data: data,\n        primaryType,\n        types: types,\n    });\n    return keccak256(encoded);\n}\nfunction encodeData({ data, primaryType, types, }) {\n    const encodedTypes = [{ type: 'bytes32' }];\n    const encodedValues = [hashType({ primaryType, types })];\n    for (const field of types[primaryType]) {\n        const [type, value] = encodeField({\n            types,\n            name: field.name,\n            type: field.type,\n            value: data[field.name],\n        });\n        encodedTypes.push(type);\n        encodedValues.push(value);\n    }\n    return encodeAbiParameters(encodedTypes, encodedValues);\n}\nfunction hashType({ primaryType, types, }) {\n    const encodedHashType = toHex(encodeType({ primaryType, types }));\n    return keccak256(encodedHashType);\n}\nexport function encodeType({ primaryType, types, }) {\n    let result = '';\n    const unsortedDeps = findTypeDependencies({ primaryType, types });\n    unsortedDeps.delete(primaryType);\n    const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n    for (const type of deps) {\n        result += `${type}(${types[type]\n            .map(({ name, type: t }) => `${t} ${name}`)\n            .join(',')})`;\n    }\n    return result;\n}\nfunction findTypeDependencies({ primaryType: primaryType_, types, }, results = new Set()) {\n    const match = primaryType_.match(/^\\w*/u);\n    const primaryType = match?.[0];\n    if (results.has(primaryType) || types[primaryType] === undefined) {\n        return results;\n    }\n    results.add(primaryType);\n    for (const field of types[primaryType]) {\n        findTypeDependencies({ primaryType: field.type, types }, results);\n    }\n    return results;\n}\nfunction encodeField({ types, name, type, value, }) {\n    if (types[type] !== undefined) {\n        return [\n            { type: 'bytes32' },\n            keccak256(encodeData({ data: value, primaryType: type, types })),\n        ];\n    }\n    if (type === 'bytes')\n        return [{ type: 'bytes32' }, keccak256(value)];\n    if (type === 'string')\n        return [{ type: 'bytes32' }, keccak256(toHex(value))];\n    if (type.lastIndexOf(']') === type.length - 1) {\n        const parsedType = type.slice(0, type.lastIndexOf('['));\n        const typeValuePairs = value.map((item) => encodeField({\n            name,\n            type: parsedType,\n            types,\n            value: item,\n        }));\n        return [\n            { type: 'bytes32' },\n            keccak256(encodeAbiParameters(typeValuePairs.map(([t]) => t), typeValuePairs.map(([, v]) => v))),\n        ];\n    }\n    return [{ type }, value];\n}\n//# sourceMappingURL=hashTypedData.js.map","import { secp256k1 } from '@noble/curves/secp256k1';\nimport { hexToBigInt } from '../encoding/fromHex.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\n/**\n * @description Converts a signature into hex format.\n *\n * @param signature The signature to convert.\n * @returns The signature in hex format.\n *\n * @example\n * serializeSignature({\n *   r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',\n *   s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',\n *   yParity: 1\n * })\n * // \"0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c\"\n */\nexport function serializeSignature({ r, s, to = 'hex', v, yParity, }) {\n    const yParity_ = (() => {\n        if (yParity === 0 || yParity === 1)\n            return yParity;\n        if (v && (v === 27n || v === 28n || v >= 35n))\n            return v % 2n === 0n ? 1 : 0;\n        throw new Error('Invalid `v` or `yParity` value');\n    })();\n    const signature = `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${yParity_ === 0 ? '1b' : '1c'}`;\n    if (to === 'hex')\n        return signature;\n    return hexToBytes(signature);\n}\n//# sourceMappingURL=serializeSignature.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;;;;;;;;;AASA,SAAgB,mBAAmB,WAAW;AAE1C,QAAO,gBAAgB,KADP,UAAU,KAAK,UAAU,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,GAChC;;;;;;;ACH1C,SAAgB,kBAAkB,YAAY;CAC1C,MAAM,EAAE,SAAS,OAAO,OAAO;CAC/B,MAAM,UAAU,WAAW,mBAAmB,WAAW;CACzD,MAAM,OAAO,UAAU,UAAU,CAC7B,QACA,MAAM;EACF,UAAU,YAAY,QAAQ,GAAG;EACjC;EACA,QAAQ,YAAY,MAAM,GAAG;EAChC,CAAC,CACL,CAAC,CAAC;AACH,KAAI,OAAO,QACP,QAAO,WAAW,KAAK;AAC3B,QAAO;;;;ACrBX,MAAa,uBAAuB;;;ACIpC,SAAgB,kBAAkB,UAAU;CACxC,MAAM,iBAAiB;AACnB,MAAI,OAAO,aAAa,SACpB,QAAO,YAAY,SAAS;AAChC,MAAI,OAAO,SAAS,QAAQ,SACxB,QAAO,SAAS;AACpB,SAAO,WAAW,SAAS,IAAI;KAC/B;AAEJ,QAAO,OAAO,CADC,YAAY,GAAG,uBAAuB,KAAK,QAAQ,GAAG,EAC9C,QAAQ,CAAC;;;;ACXpC,SAAgB,YAAY,SAAS,KAAK;AACtC,QAAO,UAAU,kBAAkB,QAAQ,EAAE,IAAI;;;;ACDrD,IAAa,qBAAb,cAAwC,UAAU;CAC9C,YAAY,EAAE,UAAU;AACpB,QAAM,mBAAmB,UAAU,OAAO,CAAC,KAAK,EAC5C,cAAc,CAAC,kCAAkC,EACpD,CAAC;;;AAGV,IAAa,0BAAb,cAA6C,UAAU;CACnD,YAAY,EAAE,aAAa,SAAU;AACjC,QAAM,0BAA0B,YAAY,sBAAsB,KA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