@aa-sdk/core 4.35.0 → 4.35.1
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/README.md +1 -1
- package/dist/esm/account/smartContractAccount.d.ts +1 -1
- package/dist/esm/account/smartContractAccount.js.map +1 -1
- package/dist/esm/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/bundler/getSupportedEntryPoints.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/smartAccount/getAddress.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/signMessage.js.map +1 -1
- package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -1
- package/dist/esm/actions/smartAccount/signUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/types.js.map +1 -1
- package/dist/esm/actions/smartAccount/upgradeAccount.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/addBreadcrumb.js.map +1 -1
- package/dist/esm/client/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/esm/client/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/schema.d.ts +25 -25
- package/dist/esm/client/schema.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/ens/utils.js.map +1 -1
- package/dist/esm/entrypoint/0.6.d.ts +2 -2
- package/dist/esm/entrypoint/0.6.js.map +1 -1
- package/dist/esm/entrypoint/0.7.d.ts +1 -1
- package/dist/esm/entrypoint/0.7.js.map +1 -1
- package/dist/esm/entrypoint/index.d.ts +1 -1
- package/dist/esm/entrypoint/index.js.map +1 -1
- package/dist/esm/entrypoint/types.js.map +1 -1
- package/dist/esm/errors/account.js.map +1 -1
- package/dist/esm/errors/client.js.map +1 -1
- package/dist/esm/errors/entrypoint.js.map +1 -1
- package/dist/esm/errors/signer.js.map +1 -1
- package/dist/esm/errors/useroperation.js.map +1 -1
- package/dist/esm/middleware/actions.js.map +1 -1
- package/dist/esm/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/esm/middleware/defaults/7702signer.js +1 -1
- package/dist/esm/middleware/defaults/7702signer.js.map +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/esm/middleware/erc7677middleware.js.map +1 -1
- package/dist/esm/middleware/types.js.map +1 -1
- package/dist/esm/signer/local-account.d.ts +2 -207
- package/dist/esm/signer/local-account.js.map +1 -1
- package/dist/esm/signer/schema.d.ts +1 -1
- package/dist/esm/signer/types.js.map +1 -1
- package/dist/esm/signer/wallet-client.d.ts +2 -207
- package/dist/esm/signer/wallet-client.js.map +1 -1
- package/dist/esm/transport/split.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/defaults.js.map +1 -1
- package/dist/esm/utils/index.d.ts +2 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/stateOverride.js.map +1 -1
- package/dist/esm/utils/testUtils.js.map +1 -1
- package/dist/esm/utils/traceHeader.js.map +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/userop.d.ts +2 -2
- package/dist/esm/utils/userop.js +1 -1
- package/dist/esm/utils/userop.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/account/smartContractAccount.d.ts +1 -1
- package/dist/types/account/smartContractAccount.d.ts.map +1 -1
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/signUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/types.d.ts.map +1 -1
- package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/schema.d.ts +25 -25
- package/dist/types/client/schema.d.ts.map +1 -1
- package/dist/types/ens/utils.d.ts.map +1 -1
- package/dist/types/entrypoint/0.6.d.ts +2 -2
- package/dist/types/entrypoint/0.6.d.ts.map +1 -1
- package/dist/types/entrypoint/0.7.d.ts +1 -1
- package/dist/types/entrypoint/0.7.d.ts.map +1 -1
- package/dist/types/entrypoint/index.d.ts +1 -1
- package/dist/types/entrypoint/index.d.ts.map +1 -1
- package/dist/types/entrypoint/types.d.ts.map +1 -1
- package/dist/types/errors/useroperation.d.ts.map +1 -1
- package/dist/types/middleware/actions.d.ts.map +1 -1
- package/dist/types/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/types/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/types/middleware/types.d.ts.map +1 -1
- package/dist/types/signer/local-account.d.ts +2 -207
- package/dist/types/signer/local-account.d.ts.map +1 -1
- package/dist/types/signer/schema.d.ts +1 -1
- package/dist/types/signer/schema.d.ts.map +1 -1
- package/dist/types/signer/utils.d.ts.map +1 -1
- package/dist/types/signer/wallet-client.d.ts +2 -207
- package/dist/types/signer/wallet-client.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts.map +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/bytes.d.ts.map +1 -1
- package/dist/types/utils/defaults.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/testUtils.d.ts.map +1 -1
- package/dist/types/utils/traceHeader.d.ts.map +1 -1
- package/dist/types/utils/userop.d.ts +2 -2
- package/dist/types/utils/userop.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -6
- package/src/account/smartContractAccount.ts +27 -25
- package/src/actions/bundler/estimateUserOperationGas.ts +2 -2
- package/src/actions/bundler/getSupportedEntryPoints.ts +2 -2
- package/src/actions/bundler/getUserOperationByHash.ts +2 -2
- package/src/actions/bundler/getUserOperationReceipt.ts +2 -2
- package/src/actions/bundler/sendRawUserOperation.ts +2 -2
- package/src/actions/smartAccount/buildUserOperation.ts +5 -4
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +4 -3
- package/src/actions/smartAccount/buildUserOperationFromTxs.ts +9 -8
- package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +5 -4
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +7 -6
- package/src/actions/smartAccount/estimateUserOperationGas.ts +5 -4
- package/src/actions/smartAccount/getAddress.ts +2 -2
- package/src/actions/smartAccount/internal/initUserOperation.ts +7 -6
- package/src/actions/smartAccount/internal/runMiddlewareStack.ts +13 -12
- package/src/actions/smartAccount/internal/sendUserOperation.ts +3 -2
- package/src/actions/smartAccount/sendTransaction.ts +5 -4
- package/src/actions/smartAccount/sendTransactions.ts +3 -3
- package/src/actions/smartAccount/sendUserOperation.ts +4 -3
- package/src/actions/smartAccount/signMessage.ts +3 -3
- package/src/actions/smartAccount/signTypedData.ts +3 -3
- package/src/actions/smartAccount/signUserOperation.ts +4 -3
- package/src/actions/smartAccount/types.ts +23 -15
- package/src/actions/smartAccount/upgradeAccount.ts +3 -3
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +5 -5
- package/src/client/addBreadcrumb.ts +1 -1
- package/src/client/bundlerClient.ts +5 -5
- package/src/client/decorators/bundlerClient.ts +7 -7
- package/src/client/decorators/smartAccountClient.ts +20 -18
- package/src/client/isSmartAccountClient.ts +4 -4
- package/src/client/schema.ts +2 -2
- package/src/client/smartAccountClient.ts +14 -14
- package/src/client/types.ts +2 -2
- package/src/ens/utils.ts +1 -1
- package/src/entrypoint/0.6.ts +3 -3
- package/src/entrypoint/0.7.ts +4 -4
- package/src/entrypoint/index.ts +10 -9
- package/src/entrypoint/types.ts +30 -28
- package/src/errors/account.ts +1 -1
- package/src/errors/client.ts +3 -3
- package/src/errors/entrypoint.ts +2 -2
- package/src/errors/signer.ts +1 -1
- package/src/errors/useroperation.ts +6 -3
- package/src/middleware/actions.ts +3 -3
- package/src/middleware/defaults/7702gasEstimator.ts +4 -4
- package/src/middleware/defaults/7702signer.ts +3 -3
- package/src/middleware/defaults/feeEstimator.ts +4 -4
- package/src/middleware/defaults/gasEstimator.ts +6 -6
- package/src/middleware/defaults/paymasterAndData.ts +1 -1
- package/src/middleware/defaults/userOpSigner.ts +2 -2
- package/src/middleware/erc7677middleware.ts +9 -9
- package/src/middleware/types.ts +7 -5
- package/src/signer/local-account.ts +7 -7
- package/src/signer/types.ts +3 -3
- package/src/signer/wallet-client.ts +2 -2
- package/src/transport/split.ts +1 -1
- package/src/types.ts +29 -29
- package/src/utils/bigint.ts +4 -4
- package/src/utils/defaults.ts +1 -1
- package/src/utils/index.ts +12 -9
- package/src/utils/schema.ts +2 -2
- package/src/utils/stateOverride.ts +4 -4
- package/src/utils/testUtils.ts +2 -2
- package/src/utils/traceHeader.ts +14 -11
- package/src/utils/types.ts +1 -1
- package/src/utils/userop.ts +17 -17
- package/src/version.ts +1 -1
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AA+Wd,mCAAmC","sourcesContent":["import {\n type Address,\n type Hash,\n type Hex,\n type StateOverride,\n type TransactionReceipt,\n} from \"viem\";\nimport type { z } from \"zod\";\nimport type {\n UserOperationFeeOptionsFieldSchema,\n UserOperationFeeOptionsSchema,\n UserOperationFeeOptionsSchema_v6,\n UserOperationFeeOptionsSchema_v7,\n} from \"./client/schema\";\nimport type { EntryPointVersion } from \"./entrypoint/types\";\nimport type {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n MultiplierSchema,\n NoUndefined,\n} from \"./utils\";\n\nexport type EmptyHex = `0x`;\nexport type NullAddress = `0x0`;\n\n// based on @account-abstraction/common\nexport type PromiseOrValue<T> = T | Promise<T>;\nexport type BytesLike = Uint8Array | Hex;\nexport type Multiplier = z.input<typeof MultiplierSchema>;\n\nexport type BigNumberish = z.input<typeof BigNumberishSchema>;\nexport type BigNumberishRange = z.input<typeof BigNumberishRangeSchema>;\n\n// [!region UserOperationCallData]\nexport type UserOperationCallData =\n | {\n /* the target of the call */\n target: Address;\n /* the data passed to the target */\n data: Hex;\n /* the amount of native token to send to the target (default: 0) */\n value?: bigint;\n }\n | Hex;\n// [!endregion UserOperationCallData]\n\n// [!region BatchUserOperationCallData]\nexport type BatchUserOperationCallData = Exclude<UserOperationCallData, Hex>[];\n// [!endregion BatchUserOperationCallData]\n\nexport type UserOperationFeeOptionsField = z.input<\n typeof UserOperationFeeOptionsFieldSchema\n>;\n\nexport type UserOperationFeeOptions<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = TEntryPointVersion extends \"0.6.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v6>\n : TEntryPointVersion extends \"0.7.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v7>\n : z.input<typeof UserOperationFeeOptionsSchema>;\n\nexport type UserOperationOverridesParameter<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n Required extends boolean = false\n> = Required extends true\n ? { overrides: UserOperationOverrides<TEntryPointVersion> }\n : { overrides?: UserOperationOverrides<TEntryPointVersion> };\n\n// [!region UserOperationPaymasterOverrides]\nexport type UserOperationPaymasterOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = TEntryPointVersion extends \"0.6.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n paymasterAndData: Hex;\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n // if set to '0x', all paymaster related fields are omitted from the user op request\n paymasterData: Hex;\n paymaster: Address;\n paymasterVerificationGasLimit:\n | NoUndefined<\n UserOperationStruct<\"0.7.0\">[\"paymasterVerificationGasLimit\"]\n >\n | Multiplier;\n paymasterPostOpGasLimit:\n | NoUndefined<UserOperationStruct<\"0.7.0\">[\"paymasterPostOpGasLimit\"]>\n | Multiplier;\n }\n : {};\n// [!endregion UserOperationOverridesParameter]\n\n// [!region UserOperationOverrides]\nexport type UserOperationOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = Partial<\n {\n callGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"callGasLimit\"]\n | Multiplier;\n maxFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxFeePerGas\"]\n | Multiplier;\n maxPriorityFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxPriorityFeePerGas\"]\n | Multiplier;\n preVerificationGas:\n | UserOperationStruct<TEntryPointVersion>[\"preVerificationGas\"]\n | Multiplier;\n verificationGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"verificationGasLimit\"]\n | Multiplier;\n\n /**\n * The same state overrides for\n * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.\n * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden\n * prior to executing the call. State overrides allow you to customize the network state for\n * the purpose of the simulation, so this feature is useful when you need to estimate gas\n * for user operation scenarios under conditions that aren’t currently present on the live network.\n */\n stateOverride: StateOverride;\n } & UserOperationPaymasterOverrides<TEntryPointVersion>\n> &\n /**\n * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`\n * It is useful when you want to use parallel nonces for user operations\n *\n * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include\n * one user operation for your account in a bundle\n */\n Partial<\n | {\n nonceKey: bigint;\n nonce: never;\n }\n | { nonceKey: never; nonce: bigint }\n >;\n// [!endregion UserOperationOverrides]\n\n// [!region UserOperationRequest_v6]\n// represents the request as it needs to be formatted for v0.6 RPC requests\n// Reference: https://github.com/ethereum/ERCs/blob/8dd085d159cb123f545c272c0d871a5339550e79/ERCS/erc-4337.md#definitions\nexport interface UserOperationRequest_v6 {\n /* the origin of the request */\n sender: Address;\n /* nonce (as hex) of the transaction, returned from the entry point for this Address */\n nonce: Hex;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: Hex | EmptyHex;\n /* the callData passed to the target */\n callData: Hex;\n /* Gas value (as hex) used by inner account execution */\n callGasLimit: Hex;\n /* Actual gas (as hex) used by the validation of this UserOperation */\n verificationGasLimit: Hex;\n /* Gas overhead (as hex) of this UserOperation */\n preVerificationGas: Hex;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) (as hex)*/\n maxFeePerGas: Hex;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) (as hex)*/\n maxPriorityFeePerGas: Hex;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: Hex | EmptyHex;\n /* Data passed into the account along with the nonce during the verification step */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v6]\n\n// [!region UserOperationRequest_v7]\n// represents the request as it needs to be formatted for v0.7 RPC requests\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport interface UserOperationRequest_v7 {\n /* the account making the operation */\n sender: Address;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: Hex;\n /* account factory, only for new accounts */\n factory?: Address;\n /* data for account factory (only if account factory exists) */\n factoryData?: Hex;\n /* the data to pass to the sender during the main execution call */\n callData: Hex;\n /* the amount of gas to allocate the main execution call */\n callGasLimit: Hex;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit: Hex;\n /* extra gas to pay the bunder */\n preVerificationGas: Hex;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas: Hex;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas: Hex;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: Address;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: Hex;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: Hex;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: Hex;\n /* data passed into the account to verify authorization */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v7]\n\nexport type Eip7702ExtendedFields = {\n eip7702Auth?: {\n chainId: Hex;\n nonce: Hex;\n address: Address;\n r: Hex;\n s: Hex;\n yParity: Hex;\n };\n};\n\n// [!region UserOperationRequest]\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport type UserOperationRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationRequest_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationRequest_v7\n : never) &\n Eip7702ExtendedFields;\n\n// [!endregion UserOperationRequest]\n\n// [!region UserOperationEstimateGasResponse]\nexport interface UserOperationEstimateGasResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> {\n /* Gas overhead of this UserOperation */\n preVerificationGas: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit: BigNumberish;\n /* Value used by inner account execution */\n callGasLimit: BigNumberish;\n /*\n * EntryPoint v0.7.0 operations only.\n * The amount of gas to allocate for the paymaster validation code.\n * Note: `eth_estimateUserOperationGas` does not return paymasterPostOpGasLimit.\n */\n paymasterVerificationGasLimit: TEntryPointVersion extends \"0.7.0\"\n ? BigNumberish | undefined\n : never;\n}\n// [!endregion UserOperationEstimateGasResponse]\n\n// [!region UserOperationResponse]\nexport interface UserOperationResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> {\n /* the User Operation */\n userOperation: UserOperationRequest<TEntryPointVersion>;\n /* the address of the entry point contract that executed the user operation */\n entryPoint: Address;\n /* the block number the user operation was included in */\n blockNumber: BigNumberish;\n /* the hash of the block the user operation was included in */\n blockHash: Hash;\n /* the hash of the transaction that included the user operation */\n transactionHash: Hash;\n}\n// [!endregion UserOperationResponse]\n\n// [!region UserOperationReceipt]\nexport interface UserOperationReceipt {\n /* The request hash of the UserOperation. */\n userOpHash: Hash;\n /* The entry point address used for the UserOperation. */\n entryPoint: Address;\n /* The account initiating the UserOperation. */\n sender: Address;\n /* The nonce used in the UserOperation. */\n nonce: BigNumberish;\n /* The paymaster used for this UserOperation (or empty). */\n paymaster?: Address;\n /* The actual amount paid (by account or paymaster) for this UserOperation. */\n actualGasCost: BigNumberish;\n /* The total gas used by this UserOperation (including preVerification, creation, validation, and execution). */\n actualGasUsed: BigNumberish;\n /* Indicates whether the execution completed without reverting. */\n success: boolean;\n /* In case of revert, this is the revert reason. */\n reason?: string;\n /* The logs generated by this UserOperation (not including logs of other UserOperations in the same bundle). */\n logs: string[];\n /* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */\n receipt: TransactionReceipt;\n}\n// [!endregion UserOperationReceipt]\n\n// [!region UserOperationStruct_v6]\n// https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOperation.ts\n// this is used for building requests for v0.6 entry point contract\nexport interface UserOperationStruct_v6 {\n /* the origin of the request */\n sender: string;\n /* nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: BytesLike | \"0x\";\n /* the callData passed to the target */\n callData: BytesLike;\n /* Value used by inner account execution */\n callGasLimit?: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit?: BigNumberish;\n /* Gas overhead of this UserOperation */\n preVerificationGas?: BigNumberish;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: BytesLike | \"0x\";\n /* Data passed into the account along with the nonce during the verification step */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v6]\n\n// [!region UserOperationStruct_v7]\n// based on https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOperation.ts\n// this is used for building requests for v0.7 entry point contract\nexport interface UserOperationStruct_v7 {\n /* the account making the operation */\n sender: string;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* account factory, only for new accounts */\n factory?: string;\n /* data for account factory (only if account factory exists) */\n factoryData?: BytesLike;\n /* the data to pass to the sender during the main execution call */\n callData: BytesLike;\n /* the amount of gas to allocate the main execution call */\n callGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit?: BigNumberish;\n /* extra gas to pay the bunder */\n preVerificationGas?: BigNumberish;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: string;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: BigNumberish;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: BytesLike;\n /* data passed into the account to verify authorization */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v7]\n\n// [!region UserOperationStruct]\nexport type UserOperationStruct<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationStruct_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationStruct_v7\n : never) &\n Eip7702ExtendedFields;\n// [!endregion UserOperationStruct]\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AA+Wd,mCAAmC","sourcesContent":["import {\n type Address,\n type Hash,\n type Hex,\n type StateOverride,\n type TransactionReceipt,\n} from \"viem\";\nimport type { z } from \"zod\";\nimport type {\n UserOperationFeeOptionsFieldSchema,\n UserOperationFeeOptionsSchema,\n UserOperationFeeOptionsSchema_v6,\n UserOperationFeeOptionsSchema_v7,\n} from \"./client/schema\";\nimport type { EntryPointVersion } from \"./entrypoint/types\";\nimport type {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n MultiplierSchema,\n NoUndefined,\n} from \"./utils\";\n\nexport type EmptyHex = `0x`;\nexport type NullAddress = `0x0`;\n\n// based on @account-abstraction/common\nexport type PromiseOrValue<T> = T | Promise<T>;\nexport type BytesLike = Uint8Array | Hex;\nexport type Multiplier = z.input<typeof MultiplierSchema>;\n\nexport type BigNumberish = z.input<typeof BigNumberishSchema>;\nexport type BigNumberishRange = z.input<typeof BigNumberishRangeSchema>;\n\n// [!region UserOperationCallData]\nexport type UserOperationCallData =\n | {\n /* the target of the call */\n target: Address;\n /* the data passed to the target */\n data: Hex;\n /* the amount of native token to send to the target (default: 0) */\n value?: bigint;\n }\n | Hex;\n// [!endregion UserOperationCallData]\n\n// [!region BatchUserOperationCallData]\nexport type BatchUserOperationCallData = Exclude<UserOperationCallData, Hex>[];\n// [!endregion BatchUserOperationCallData]\n\nexport type UserOperationFeeOptionsField = z.input<\n typeof UserOperationFeeOptionsFieldSchema\n>;\n\nexport type UserOperationFeeOptions<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v6>\n : TEntryPointVersion extends \"0.7.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v7>\n : z.input<typeof UserOperationFeeOptionsSchema>;\n\nexport type UserOperationOverridesParameter<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n Required extends boolean = false,\n> = Required extends true\n ? { overrides: UserOperationOverrides<TEntryPointVersion> }\n : { overrides?: UserOperationOverrides<TEntryPointVersion> };\n\n// [!region UserOperationPaymasterOverrides]\nexport type UserOperationPaymasterOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n paymasterAndData: Hex;\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n // if set to '0x', all paymaster related fields are omitted from the user op request\n paymasterData: Hex;\n paymaster: Address;\n paymasterVerificationGasLimit:\n | NoUndefined<\n UserOperationStruct<\"0.7.0\">[\"paymasterVerificationGasLimit\"]\n >\n | Multiplier;\n paymasterPostOpGasLimit:\n | NoUndefined<UserOperationStruct<\"0.7.0\">[\"paymasterPostOpGasLimit\"]>\n | Multiplier;\n }\n : {};\n// [!endregion UserOperationOverridesParameter]\n\n// [!region UserOperationOverrides]\nexport type UserOperationOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = Partial<\n {\n callGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"callGasLimit\"]\n | Multiplier;\n maxFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxFeePerGas\"]\n | Multiplier;\n maxPriorityFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxPriorityFeePerGas\"]\n | Multiplier;\n preVerificationGas:\n | UserOperationStruct<TEntryPointVersion>[\"preVerificationGas\"]\n | Multiplier;\n verificationGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"verificationGasLimit\"]\n | Multiplier;\n\n /**\n * The same state overrides for\n * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.\n * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden\n * prior to executing the call. State overrides allow you to customize the network state for\n * the purpose of the simulation, so this feature is useful when you need to estimate gas\n * for user operation scenarios under conditions that aren’t currently present on the live network.\n */\n stateOverride: StateOverride;\n } & UserOperationPaymasterOverrides<TEntryPointVersion>\n> &\n /**\n * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`\n * It is useful when you want to use parallel nonces for user operations\n *\n * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include\n * one user operation for your account in a bundle\n */\n Partial<\n | {\n nonceKey: bigint;\n nonce: never;\n }\n | { nonceKey: never; nonce: bigint }\n >;\n// [!endregion UserOperationOverrides]\n\n// [!region UserOperationRequest_v6]\n// represents the request as it needs to be formatted for v0.6 RPC requests\n// Reference: https://github.com/ethereum/ERCs/blob/8dd085d159cb123f545c272c0d871a5339550e79/ERCS/erc-4337.md#definitions\nexport interface UserOperationRequest_v6 {\n /* the origin of the request */\n sender: Address;\n /* nonce (as hex) of the transaction, returned from the entry point for this Address */\n nonce: Hex;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: Hex | EmptyHex;\n /* the callData passed to the target */\n callData: Hex;\n /* Gas value (as hex) used by inner account execution */\n callGasLimit: Hex;\n /* Actual gas (as hex) used by the validation of this UserOperation */\n verificationGasLimit: Hex;\n /* Gas overhead (as hex) of this UserOperation */\n preVerificationGas: Hex;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) (as hex)*/\n maxFeePerGas: Hex;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) (as hex)*/\n maxPriorityFeePerGas: Hex;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: Hex | EmptyHex;\n /* Data passed into the account along with the nonce during the verification step */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v6]\n\n// [!region UserOperationRequest_v7]\n// represents the request as it needs to be formatted for v0.7 RPC requests\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport interface UserOperationRequest_v7 {\n /* the account making the operation */\n sender: Address;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: Hex;\n /* account factory, only for new accounts */\n factory?: Address;\n /* data for account factory (only if account factory exists) */\n factoryData?: Hex;\n /* the data to pass to the sender during the main execution call */\n callData: Hex;\n /* the amount of gas to allocate the main execution call */\n callGasLimit: Hex;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit: Hex;\n /* extra gas to pay the bunder */\n preVerificationGas: Hex;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas: Hex;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas: Hex;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: Address;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: Hex;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: Hex;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: Hex;\n /* data passed into the account to verify authorization */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v7]\n\nexport type Eip7702ExtendedFields = {\n eip7702Auth?: {\n chainId: Hex;\n nonce: Hex;\n address: Address;\n r: Hex;\n s: Hex;\n yParity: Hex;\n };\n};\n\n// [!region UserOperationRequest]\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport type UserOperationRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationRequest_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationRequest_v7\n : never) &\n Eip7702ExtendedFields;\n\n// [!endregion UserOperationRequest]\n\n// [!region UserOperationEstimateGasResponse]\nexport interface UserOperationEstimateGasResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* Gas overhead of this UserOperation */\n preVerificationGas: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit: BigNumberish;\n /* Value used by inner account execution */\n callGasLimit: BigNumberish;\n /*\n * EntryPoint v0.7.0 operations only.\n * The amount of gas to allocate for the paymaster validation code.\n * Note: `eth_estimateUserOperationGas` does not return paymasterPostOpGasLimit.\n */\n paymasterVerificationGasLimit: TEntryPointVersion extends \"0.7.0\"\n ? BigNumberish | undefined\n : never;\n}\n// [!endregion UserOperationEstimateGasResponse]\n\n// [!region UserOperationResponse]\nexport interface UserOperationResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* the User Operation */\n userOperation: UserOperationRequest<TEntryPointVersion>;\n /* the address of the entry point contract that executed the user operation */\n entryPoint: Address;\n /* the block number the user operation was included in */\n blockNumber: BigNumberish;\n /* the hash of the block the user operation was included in */\n blockHash: Hash;\n /* the hash of the transaction that included the user operation */\n transactionHash: Hash;\n}\n// [!endregion UserOperationResponse]\n\n// [!region UserOperationReceipt]\nexport interface UserOperationReceipt {\n /* The request hash of the UserOperation. */\n userOpHash: Hash;\n /* The entry point address used for the UserOperation. */\n entryPoint: Address;\n /* The account initiating the UserOperation. */\n sender: Address;\n /* The nonce used in the UserOperation. */\n nonce: BigNumberish;\n /* The paymaster used for this UserOperation (or empty). */\n paymaster?: Address;\n /* The actual amount paid (by account or paymaster) for this UserOperation. */\n actualGasCost: BigNumberish;\n /* The total gas used by this UserOperation (including preVerification, creation, validation, and execution). */\n actualGasUsed: BigNumberish;\n /* Indicates whether the execution completed without reverting. */\n success: boolean;\n /* In case of revert, this is the revert reason. */\n reason?: string;\n /* The logs generated by this UserOperation (not including logs of other UserOperations in the same bundle). */\n logs: string[];\n /* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */\n receipt: TransactionReceipt;\n}\n// [!endregion UserOperationReceipt]\n\n// [!region UserOperationStruct_v6]\n// https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOperation.ts\n// this is used for building requests for v0.6 entry point contract\nexport interface UserOperationStruct_v6 {\n /* the origin of the request */\n sender: string;\n /* nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: BytesLike | \"0x\";\n /* the callData passed to the target */\n callData: BytesLike;\n /* Value used by inner account execution */\n callGasLimit?: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit?: BigNumberish;\n /* Gas overhead of this UserOperation */\n preVerificationGas?: BigNumberish;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: BytesLike | \"0x\";\n /* Data passed into the account along with the nonce during the verification step */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v6]\n\n// [!region UserOperationStruct_v7]\n// based on https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOperation.ts\n// this is used for building requests for v0.7 entry point contract\nexport interface UserOperationStruct_v7 {\n /* the account making the operation */\n sender: string;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* account factory, only for new accounts */\n factory?: string;\n /* data for account factory (only if account factory exists) */\n factoryData?: BytesLike;\n /* the data to pass to the sender during the main execution call */\n callData: BytesLike;\n /* the amount of gas to allocate the main execution call */\n callGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit?: BigNumberish;\n /* extra gas to pay the bunder */\n preVerificationGas?: BigNumberish;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: string;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: BigNumberish;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: BytesLike;\n /* data passed into the account to verify authorization */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v7]\n\n// [!region UserOperationStruct]\nexport type UserOperationStruct<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationStruct_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationStruct_v7\n : never) &\n Eip7702ExtendedFields;\n// [!endregion UserOperationStruct]\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../../src/utils/bigint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,IAAc,EAAU,EAAE;IACrD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAA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\";\nimport type { BigNumberish, Multiplier } from \"../types\";\nimport { isMultiplier } from \"./schema.js\";\n\n/**\n * Returns the max bigint in a list of bigints\n *\n * @param {bigint[]} args a list of bigints to get the max of\n * @returns {bigint} the max bigint in the list\n */\nexport const bigIntMax = (...args: bigint[]): bigint => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n\n return args.reduce((m, c) => (m > c ? m : c));\n};\n\n/**\n * Returns the min bigint in a list of bigints\n *\n * @param {bigint[]} args a list of bigints to get the max of\n * @returns {bigint} the min bigint in the list\n */\nexport const bigIntMin = (...args: bigint[]): bigint => {\n if (!args.length) {\n throw new Error(\"bigIntMin requires at least one argument\");\n }\n\n return args.reduce((m, c) => (m < c ? m : c));\n};\n\n/**\n * Given a bigint and a min-max range, returns the min-max clamped bigint value\n *\n * @param {BigNumberish} value a bigint value to clamp\n * @param {BigNumberish | undefined} lower lower bound min max tuple value\n * @param {BigNumberish | undefined} upper upper bound min max tuple value\n * @returns {bigint} the clamped bigint value per given range\n */\nexport const bigIntClamp = (\n value: BigNumberish,\n lower: BigNumberish | null | undefined,\n upper: BigNumberish | null | undefined
|
|
1
|
+
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../../src/utils/bigint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,IAAc,EAAU,EAAE;IACrD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAA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AAEF,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,2DAAc,CAAA;IACd,uDAAY,CAAA;AACd,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAkB,EAClB,UAAoC,EACpC,eAA6B,YAAY,CAAC,QAAQ,EAClD,EAAE;IACF,IAAI,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;IACJ,CAAC;IAED,iFAAiF;IACjF,MAAM,aAAa,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;IACvE,MAAM,GAAG,GACP,YAAY,KAAK,YAAY,CAAC,QAAQ;QACpC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,IAAI,aAAa,CAAC,CAAC;YACnE,MAAM,CAAC,EAAE,IAAI,aAAa,GAAG,CAAC,CAAC;QACjC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,IAAI,aAAa,CAAC,CAAC,CAAC;IAE1E,OAAO,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,aAAa,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAc,EAAU,EAAE,CACtD,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { keccak256, toHex } from \"viem\";\nimport type { BigNumberish, Multiplier } from \"../types\";\nimport { isMultiplier } from \"./schema.js\";\n\n/**\n * Returns the max bigint in a list of bigints\n *\n * @param {bigint[]} args a list of bigints to get the max of\n * @returns {bigint} the max bigint in the list\n */\nexport const bigIntMax = (...args: bigint[]): bigint => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n\n return args.reduce((m, c) => (m > c ? m : c));\n};\n\n/**\n * Returns the min bigint in a list of bigints\n *\n * @param {bigint[]} args a list of bigints to get the max of\n * @returns {bigint} the min bigint in the list\n */\nexport const bigIntMin = (...args: bigint[]): bigint => {\n if (!args.length) {\n throw new Error(\"bigIntMin requires at least one argument\");\n }\n\n return args.reduce((m, c) => (m < c ? m : c));\n};\n\n/**\n * Given a bigint and a min-max range, returns the min-max clamped bigint value\n *\n * @param {BigNumberish} value a bigint value to clamp\n * @param {BigNumberish | undefined} lower lower bound min max tuple value\n * @param {BigNumberish | undefined} upper upper bound min max tuple value\n * @returns {bigint} the clamped bigint value per given range\n */\nexport const bigIntClamp = (\n value: BigNumberish,\n lower: BigNumberish | null | undefined,\n upper: BigNumberish | null | undefined,\n): bigint => {\n lower = lower != null ? BigInt(lower) : null;\n upper = upper != null ? BigInt(upper) : null;\n\n if (upper != null && lower != null && upper < lower) {\n throw new Error(\n `invalid range: upper bound ${upper} is less than lower bound ${lower}`,\n );\n }\n\n let ret = BigInt(value);\n if (lower != null && lower > ret) {\n ret = lower;\n }\n if (upper != null && upper < ret) {\n ret = upper;\n }\n return ret;\n};\n\nexport enum RoundingMode {\n ROUND_DOWN = 0,\n ROUND_UP = 1,\n}\n\n/**\n * Given a bigint and a number (which can be a float), returns the bigint value.\n * Note: this function has loss and will round down to the nearest integer.\n *\n * @param {BigNumberish} base - the number to be multiplied\n * @param {number} multiplier - the amount to multiply by\n * @param {RoundingMode} roundingMode - the rounding mode to use when calculating the percent. defaults to ROUND_UP\n * @returns {bigint} the bigint value of the multiplication with the number rounded by the rounding mode\n */\nexport const bigIntMultiply = (\n base: BigNumberish,\n multiplier: Multiplier[\"multiplier\"],\n roundingMode: RoundingMode = RoundingMode.ROUND_UP,\n) => {\n if (!isMultiplier({ multiplier })) {\n throw new Error(\n \"bigIntMultiply requires a multiplier validated number as the second argument\",\n );\n }\n\n // Get decimal places of b. Max decimal places is defined by the MultiplerSchema.\n const decimalPlaces = multiplier.toString().split(\".\")[1]?.length ?? 0;\n const val =\n roundingMode === RoundingMode.ROUND_UP\n ? BigInt(base) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) +\n BigInt(10 ** decimalPlaces - 1)\n : BigInt(base) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n\n return val / BigInt(10 ** decimalPlaces);\n};\n\n/**\n * Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user.\n *\n * example:\n * ```\n * const salt = stringToIndex(\"alice@example.com\");\n *\n * export const account = new SimpleSmartContractAccount({\n * index: salt,\n * // other args omitted...\n * });\n * ```\n *\n * @param {string} phrase -- any string value.\n * @returns {bigint} the bigint value of the hashed string\n */\nexport const stringToIndex = (phrase: string): bigint =>\n BigInt(keccak256(toHex(phrase)));\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAiB;IAClE,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAW,CAAC;IAC1B,CAAC,cAAc,CAAC,EAAE,EAAE,SAAW,CAAC;IAChC,CAAC,eAAe,CAAC,EAAE,EAAE,SAAW,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,KAAY,EACa,EAAE;IAC3B,OAAO;QACL,oBAAoB,EAAE;YACpB,GAAG,EAAE,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,UAAY;YAC/D,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { type Chain } from \"viem\";\nimport { arbitrum, arbitrumGoerli, arbitrumSepolia } from \"viem/chains\";\nimport type { UserOperationFeeOptions } from \"../types.js\";\n\nexport const minPriorityFeePerBidDefaults = new Map<number, bigint>([\n [arbitrum.id, 10_000_000n],\n [arbitrumGoerli.id, 10_000_000n],\n [arbitrumSepolia.id, 10_000_000n],\n]);\n\nexport const getDefaultUserOperationFeeOptions = (\n chain: Chain
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAiB;IAClE,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAW,CAAC;IAC1B,CAAC,cAAc,CAAC,EAAE,EAAE,SAAW,CAAC;IAChC,CAAC,eAAe,CAAC,EAAE,EAAE,SAAW,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,KAAY,EACa,EAAE;IAC3B,OAAO;QACL,oBAAoB,EAAE;YACpB,GAAG,EAAE,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,UAAY;YAC/D,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { type Chain } from \"viem\";\nimport { arbitrum, arbitrumGoerli, arbitrumSepolia } from \"viem/chains\";\nimport type { UserOperationFeeOptions } from \"../types.js\";\n\nexport const minPriorityFeePerBidDefaults = new Map<number, bigint>([\n [arbitrum.id, 10_000_000n],\n [arbitrumGoerli.id, 10_000_000n],\n [arbitrumSepolia.id, 10_000_000n],\n]);\n\nexport const getDefaultUserOperationFeeOptions = (\n chain: Chain,\n): UserOperationFeeOptions => {\n return {\n maxPriorityFeePerGas: {\n min: minPriorityFeePerBidDefaults.get(chain.id) ?? 100_000_000n,\n multiplier: 1.33,\n },\n };\n};\n"]}
|
|
@@ -6,7 +6,7 @@ import type { RecordableKeys } from "./types.js";
|
|
|
6
6
|
* @param {((s: S, o?: O, f?: F) => Promise<S>)[]} fns - functions to pipe
|
|
7
7
|
* @returns {S} result of the pipe
|
|
8
8
|
*/
|
|
9
|
-
export declare const asyncPipe: <S, O, F>(...fns: ((s: S, o?: O
|
|
9
|
+
export declare const asyncPipe: <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) => (s: S, o?: O, f?: F) => Promise<S>;
|
|
10
10
|
export type Deferrable<T> = {
|
|
11
11
|
[K in keyof T]: PromiseOrValue<T[K]>;
|
|
12
12
|
};
|
|
@@ -100,7 +100,7 @@ export declare const conditionalReturn: <T>(condition: Promise<boolean>, value:
|
|
|
100
100
|
* @param {(item: T) => V} fn The function that transforms each item in the array into the record's value
|
|
101
101
|
* @returns {Record<T[K], V>} The resulting record object
|
|
102
102
|
*/
|
|
103
|
-
export declare const toRecord: <T extends { [
|
|
103
|
+
export declare const toRecord: <T extends { [K_1 in RecordableKeys<T>]: string | number | symbol; }, K extends RecordableKeys<T>, V>(array: T[], selector: K, fn: (item: T) => V) => Record<T[K], V>;
|
|
104
104
|
export * from "./bigint.js";
|
|
105
105
|
export * from "./bytes.js";
|
|
106
106
|
export * from "./defaults.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAI7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GACpB,CAAU,GAAG,GAA2C,EAAE,EAAE,CAC5D,KAAK,EAAE,CAAI,EAAE,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GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAa,EAAW,EAAE;IACpD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,SAA2B,EAC3B,KAAuB,EACC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAKtB,KAAU,EACV,QAAW,EACX,EAAkB,EACD,EAAE,CACnB,KAAK,CAAC,MAAM,CACV,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACZ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,EACD,EAAqB,CACtB,CAAC;AAEJ,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC","sourcesContent":["import { toHex } from \"viem\";\nimport type { PromiseOrValue } from \"../types.js\";\nimport type { RecordableKeys } from \"./types.js\";\n\n/**\n * Utility function that allows for piping a series of async functions together\n *\n * @param {((s: S, o?: O, f?: F) => Promise<S>)[]} fns - functions to pipe\n * @returns {S} result of the pipe\n */\nexport const asyncPipe =\n <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>\n async (s: S, o?: O, f?: F) => {\n let result = s;\n for (const fn of fns) {\n result = await fn(result, o, f);\n }\n return result;\n };\n\n// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers\nexport type Deferrable<T> = {\n [K in keyof T]: PromiseOrValue<T[K]>;\n};\n\n/**\n * Used to ensure type doesn't extend another, for use in & chaining of properties\n */\nexport type NotType<A, B> = A extends B ? never : unknown;\n\n/**\n * Await all of the properties of a Deferrable object\n *\n * @param {Deferrable<T>} object - a Deferrable object\n * @returns {Promise<T>} the object with its properties resolved\n */\nexport async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {\n const promises = Object.keys(object).map((key) => {\n const value = object[key as keyof Deferrable<T>];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return filterUndefined<T>(\n results.reduce((accum, curr) => {\n accum[curr.key as keyof T] = curr.value;\n return accum;\n }, {} as T),\n );\n}\n\n/**\n * Recursively converts all values in an object to hex strings\n *\n * @param {any} obj - obj to deep hexlify\n * @returns {any} object with all of its values hexlified\n */\nexport function deepHexlify(obj: any): any {\n if (typeof obj === \"function\") {\n return undefined;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce(\n (set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key]),\n }),\n {},\n );\n}\n\n/**\n * Filters out properties with undefined or null values from the provided object.\n *\n * @example\n * ```ts\n * import { filterUndefined } from \"@aa-sdk/core\";\n *\n * const result = filterUndefined({\n * foo: undefined,\n * bar: null,\n * baz: \"baz\",\n * }); // { baz: \"baz\" }\n * ```\n *\n * @param {T} obj the object from which to remove properties with undefined or null values\n * @returns {T} the object with undefined or null properties removed\n */\nexport function filterUndefined<T>(obj: T): T {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj as T;\n}\n\n/**\n * Picks the specified keys from an object and returns a new object containing only those key-value pairs.\n *\n * @example\n * ```ts\n * import { pick } from \"@aa-sdk/core\";\n *\n * const picked = pick({\n * foo: \"foo\",\n * bar: \"bar\",\n * }, [\"foo\"]); // { foo: \"foo\" }\n * ```\n *\n * @param {Record<string, unknown>} obj The object from which to pick keys\n * @param {string|string[]} keys A single key or an array of keys to pick from the object\n * @returns {Record<string, unknown>} A new object containing only the picked key-value pairs\n */\nexport function pick(obj: Record<string, unknown>, keys: string | string[]) {\n return Object.keys(obj)\n .filter((k) => keys.includes(k))\n .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {});\n}\n\n/**\n * Utility method for checking if the passed in values are all equal (strictly)\n *\n * @param {...any[]} params - values to check\n * @returns {boolean} a boolean indicating if all values are the same\n * @throws if no values are passed in\n */\nexport const allEqual = (...params: any[]): boolean => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v) => v === params[0]);\n};\n\n/**\n * Utility method for checking the condition and return the value if condition holds true, undefined if not.\n *\n * @param {Promise<boolean>} condition - condition to check\n * @param {() => Promise<T>} value - value to return when condition holds true\n * @returns {Promise<T | undefined>} the value if condition holds true, undefined if not\n */\nexport const conditionalReturn = <T>(\n condition: Promise<boolean>,\n value: () => Promise<T>,\n): Promise<T | undefined> => condition.then((t) => (t ? value() : undefined));\n\n/**\n * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function.\n *\n * @example\n * ```ts\n * import { toRecord } from \"@aa-sdk/core\";\n * import { sepolia, mainnet } from \"viem/chains\";\n *\n * const addressesByChain = toRecord(\n * [sepolia, mainnet],\n * \"id\",\n * () => \"0x...\"\n * ); // { [sepolia.id]: \"0x...\", [mainnet.id]: \"0x...\" }\n * ```\n *\n * @param {T[]} array The array of objects to convert to a record\n * @param {K} selector The key used to select the property that will become the record's key\n * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value\n * @returns {Record<T[K], V>} The resulting record object\n */\nexport const toRecord = <\n T extends { [K in RecordableKeys<T>]: string | number | symbol },\n K extends RecordableKeys<T>,\n V,\n>(\n array: T[],\n selector: K,\n fn: (item: T) => V,\n): Record<T[K], V> =>\n array.reduce(\n (acc, item) => {\n acc[item[selector]] = fn(item);\n return acc;\n },\n {} as Record<T[K], V>,\n );\n\nexport * from \"./bigint.js\";\nexport * from \"./bytes.js\";\nexport * from \"./defaults.js\";\nexport * from \"./schema.js\";\nexport type * from \"./types.js\";\nexport * from \"./userop.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CACjC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,IAAI,IAAI,KAAK;IACb,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAuB,CAAC,GAAG,EAAE,EAAE;IAC9D,OAAO,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH,yBAAyB;AACzB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,4BAA4B;AAE5B,8BAA8B;AAC9B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,GAAG,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IAClC,GAAG,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACnC,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,iCAAiC;AAEjC,uBAAuB;AACvB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN;;OAEG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAC3B,CAAC,CAAC,EAAE,EAAE;QACJ,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC,EACD,EAAE,OAAO,EAAE,mCAAmC,EAAE,CACjD;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,0BAA0B;AAE1B,MAAM,UAAU,cAAc,CAAC,CAAM;IACnC,OAAO,CAAC,IAAI,IAAI,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAM;IACjC,OAAO,CAAC,IAAI,IAAI,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC5D,CAAC","sourcesContent":["import { isHex, type Chain } from \"viem\";\nimport { z } from \"zod\";\nimport type { BigNumberish, Multiplier } from \"../types\";\n\nexport const ChainSchema = z.custom<Chain>(\n (chain) =>\n chain != null &&\n typeof chain === \"object\" &&\n \"id\" in chain &&\n typeof chain.id === \"number\"
|
|
1
|
+
{"version":3,"file":"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AAM,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC,EACD,EAAE,OAAO,EAAE,mCAAmC,EAAE,CACjD;CACF,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,0BAA0B;AAE1B,MAAM,UAAU,cAAc,CAAC,CAAM;IACnC,OAAO,CAAC,IAAI,IAAI,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAM;IACjC,OAAO,CAAC,IAAI,IAAI,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC5D,CAAC","sourcesContent":["import { isHex, type Chain } from \"viem\";\nimport { z } from \"zod\";\nimport type { BigNumberish, Multiplier } from \"../types\";\n\nexport const ChainSchema = z.custom<Chain>(\n (chain) =>\n chain != null &&\n typeof chain === \"object\" &&\n \"id\" in chain &&\n typeof chain.id === \"number\",\n);\n\nexport const HexSchema = z.custom<`0x${string}` | \"0x\">((val) => {\n return isHex(val, { strict: true });\n});\n\n// [!region BigNumberish]\nexport const BigNumberishSchema = z.union([HexSchema, z.number(), z.bigint()]);\n// [!endregion BigNumberish]\n\n// [!region BigNumberishRange]\nexport const BigNumberishRangeSchema = z\n .object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional(),\n })\n .strict();\n// [!endregion BigNumberishRange]\n\n// [!region Multiplier]\nexport const MultiplierSchema = z\n .object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: z.number().refine(\n (n) => {\n return (n.toString().split(\".\")[1]?.length ?? 0) <= 4;\n },\n { message: \"Max precision is 4 decimal places\" },\n ),\n })\n .strict();\n// [!endregion Multiplier]\n\nexport function isBigNumberish(x: any): x is BigNumberish {\n return x != null && BigNumberishSchema.safeParse(x).success;\n}\n\nexport function isMultiplier(x: any): x is Multiplier {\n return x != null && MultiplierSchema.safeParse(x).success;\n}\n"]}
|
|
@@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AAK,CAAC,CAAC;IAC5E,IAAI,KAAK,KAAK,SAAS;QACrB,uBAAuB,CAAC,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC/D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,IAAI,uBAAuB,CAAC,KAAK;YAAE,MAAM,IAAI,4BAA4B,EAAE,CAAC;QAC5E,uBAAuB,CAAC,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAID,+CAA+C;AAC/C,MAAM,UAAU,sBAAsB,CACpC,UAA6C;IAE7C,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,gBAAgB,GAAqB,EAAE,CAAC;IAC9C,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,IAAI,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC;YAC3B,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5D,gBAAgB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import type { Address } from \"abitype\";\nimport {\n AccountStateConflictError,\n InvalidAddressError,\n StateAssignmentConflictError,\n isAddress,\n numberToHex,\n type RpcAccountStateOverride,\n type RpcStateMapping,\n type RpcStateOverride,\n type StateMapping,\n type StateOverride,\n} from \"viem\";\n\n// Copied from Viem's utils/stateOverride.ts, which does not expose these\n// functions.\n\ntype SerializeStateMappingParameters = StateMapping | undefined;\n\nfunction serializeStateMapping(\n stateMapping: SerializeStateMappingParameters
|
|
1
|
+
{"version":3,"file":"stateOverride.js","sourceRoot":"","sources":["../../../src/utils/stateOverride.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,SAAS,EACT,WAAW,GAMZ,MAAM,MAAM,CAAC;AAOd,SAAS,qBAAqB,CAC5B,YAA6C;IAE7C,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACjE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAClD,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC/B,wBAAwB,CAAC,KAAK,CAAC,CAAC;QAChC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAClB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QACxB,8EAA8E;QAC9E,MAAM,IAAI,KAAK,CACb,6CAA6C,KAAK,CAAC,MAAM,YAAY,CACtE,CAAC;IACJ,CAAC;AACH,CAAC;AAOD,SAAS,6BAA6B,CACpC,UAAmD;IAEnD,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IAC9D,MAAM,uBAAuB,GAA4B,EAAE,CAAC;IAC5D,IAAI,IAAI,KAAK,SAAS;QAAE,uBAAuB,CAAC,IAAI,GAAG,IAAI,CAAC;IAC5D,IAAI,OAAO,KAAK,SAAS;QACvB,uBAAuB,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACzD,IAAI,KAAK,KAAK,SAAS;QAAE,uBAAuB,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5E,IAAI,KAAK,KAAK,SAAS;QACrB,uBAAuB,CAAC,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC/D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,IAAI,uBAAuB,CAAC,KAAK;YAAE,MAAM,IAAI,4BAA4B,EAAE,CAAC;QAC5E,uBAAuB,CAAC,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAID,+CAA+C;AAC/C,MAAM,UAAU,sBAAsB,CACpC,UAA6C;IAE7C,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,gBAAgB,GAAqB,EAAE,CAAC;IAC9C,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,IAAI,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YACxC,MAAM,IAAI,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC;YAC3B,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5D,gBAAgB,CAAC,OAAO,CAAC,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import type { Address } from \"abitype\";\nimport {\n AccountStateConflictError,\n InvalidAddressError,\n StateAssignmentConflictError,\n isAddress,\n numberToHex,\n type RpcAccountStateOverride,\n type RpcStateMapping,\n type RpcStateOverride,\n type StateMapping,\n type StateOverride,\n} from \"viem\";\n\n// Copied from Viem's utils/stateOverride.ts, which does not expose these\n// functions.\n\ntype SerializeStateMappingParameters = StateMapping | undefined;\n\nfunction serializeStateMapping(\n stateMapping: SerializeStateMappingParameters,\n): RpcStateMapping | undefined {\n if (!stateMapping || stateMapping.length === 0) return undefined;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {} as RpcStateMapping);\n}\n\nfunction validateBytes32HexLength(value: Address): void {\n if (value.length !== 66) {\n // This is the error message from Viem's non-exported InvalidBytesLengthError.\n throw new Error(\n `Hex is expected to be 66 hex long, but is ${value.length} hex long.`,\n );\n }\n}\n\ntype SerializeAccountStateOverrideParameters = Omit<\n StateOverride[number],\n \"address\"\n>;\n\nfunction serializeAccountStateOverride(\n parameters: SerializeAccountStateOverrideParameters,\n): RpcAccountStateOverride {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride: RpcAccountStateOverride = {};\n if (code !== undefined) rpcAccountStateOverride.code = code;\n if (balance !== undefined)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== undefined) rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== undefined)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== undefined) {\n if (rpcAccountStateOverride.state) throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n}\n\ntype SerializeStateOverrideParameters = StateOverride | undefined;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function serializeStateOverride(\n parameters?: SerializeStateOverrideParameters,\n): RpcStateOverride | undefined {\n if (!parameters) return undefined;\n const rpcStateOverride: RpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address: address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../../src/utils/testUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAwB,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,+BAA+B,GAEhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,EAClD,MAAS,EACyD,EAAE;IACpE,OAAO,sBAAsB,CAAC;QAC5B,MAAM,EAAE,OAAO;QACf,cAAc,EAAE,4CAA4C;QAC5D,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QACvC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY;QACrC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY;QACvC,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAC7B,oDAAoD;QACtD,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;QACpC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;QAC/B,iBAAiB,EAAE,GAAQ,EAAE,CAC3B,sIAAsI;KACzI,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC/C,OAAO,+BAA+B,CACpC,kBAAkB,CAAC;QACjB,KAAK;QACL,SAAS,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;SACxB,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { createPublicClient, custom, type Chain, type Hex } from \"viem\";\nimport {\n toSmartContractAccount,\n type SmartContractAccount,\n} from \"../account/smartContractAccount.js\";\nimport {\n createBundlerClientFromExisting,\n type BundlerClient,\n} from \"../client/bundlerClient.js\";\nimport { getEntryPoint } from \"../entrypoint/index.js\";\nimport type { DefaultEntryPointVersion } from \"../entrypoint/types.js\";\n\nexport const createDummySmartContractAccount = async <C extends BundlerClient>(\n client: C
|
|
1
|
+
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../../src/utils/testUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAwB,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,+BAA+B,GAEhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,EAClD,MAAS,EACyD,EAAE;IACpE,OAAO,sBAAsB,CAAC;QAC5B,MAAM,EAAE,OAAO;QACf,cAAc,EAAE,4CAA4C;QAC5D,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QACvC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY;QACrC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY;QACvC,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAC7B,oDAAoD;QACtD,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;QACpC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;QAC/B,iBAAiB,EAAE,GAAQ,EAAE,CAC3B,sIAAsI;KACzI,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC/C,OAAO,+BAA+B,CACpC,kBAAkB,CAAC;QACjB,KAAK;QACL,SAAS,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;SACxB,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { createPublicClient, custom, type Chain, type Hex } from \"viem\";\nimport {\n toSmartContractAccount,\n type SmartContractAccount,\n} from \"../account/smartContractAccount.js\";\nimport {\n createBundlerClientFromExisting,\n type BundlerClient,\n} from \"../client/bundlerClient.js\";\nimport { getEntryPoint } from \"../entrypoint/index.js\";\nimport type { DefaultEntryPointVersion } from \"../entrypoint/types.js\";\n\nexport const createDummySmartContractAccount = async <C extends BundlerClient>(\n client: C,\n): Promise<SmartContractAccount<\"dummy\", DefaultEntryPointVersion>> => {\n return toSmartContractAccount({\n source: \"dummy\",\n accountAddress: \"0x1234567890123456789012345678901234567890\",\n entryPoint: getEntryPoint(client.chain),\n chain: client.chain,\n transport: custom(client),\n signMessage: async () => \"0xdeadbeef\",\n signTypedData: async () => \"0xdeadbeef\",\n getAccountInitCode: async () =>\n \"0x1234567890123456789012345678901234567890deadbeef\",\n encodeBatchExecute: async () => \"0x\",\n encodeExecute: async () => \"0x\",\n getDummySignature: (): Hex =>\n \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\",\n });\n};\n\nexport const createTestClient = (chain: Chain) => {\n return createBundlerClientFromExisting(\n createPublicClient({\n chain,\n transport: custom({\n request: async () => {},\n }),\n }),\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceHeader.js","sourceRoot":"","sources":["../../../src/utils/traceHeader.ts"],"names":[],"mappings":"AAAA,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CACpD,IAAI,CAAC,KAAK,CAAC,IA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E,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;iBACxC,IAAI,CAAC,GAAG,CAAC;SACJ,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,SAAiB;QACzB,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW;YAC7C,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,IAAI,SAAS,EAAE;YAC/C,CAAC,CAAC,SAAS,CAAC;QACd,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;YACnE,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["function generateRandomHexString(numBytes: number) {\n const hexPairs = new Array(numBytes).fill(0).map(() =>\n Math.floor(Math.random() * 16)\n .toString(16)\n .padStart(2, \"0\"),\n );\n return hexPairs.join(\"\");\n}\n\n/**\n * These are the headers that are used in the trace headers, could be found in the spec\n *\n * @see https://www.w3.org/TR/trace-context/#design-overview\n */\n\nexport const TRACE_HEADER_NAME = \"traceparent\";\n/**\n * These are the headers that are used in the trace headers, could be found in the spec\n *\n * @see https://www.w3.org/TR/trace-context/#design-overview\n */\nexport const TRACE_HEADER_STATE = \"tracestate\";\n\nconst clientTraceId = generateRandomHexString(16);\n/**\n * Some tools that are useful when dealing with the values\n * of the trace header. Follows the W3C trace context standard.\n *\n * @see https://www.w3.org/TR/trace-context/\n */\nexport class TraceHeader {\n readonly traceId: string;\n readonly parentId: string;\n readonly traceFlags: string;\n readonly traceState: Record<string, string>;\n\n /**\n * Initializes a new instance with the provided trace identifiers and state information.\n *\n * @param {string} traceId The unique identifier for the trace\n * @param {string} parentId The identifier of the parent trace\n * @param {string} traceFlags Flags containing trace-related options\n * @param {TraceHeader[\"traceState\"]} traceState The trace state information for additional trace context\n */\n constructor(\n traceId: string,\n parentId: string,\n traceFlags: string,\n traceState: TraceHeader[\"traceState\"],\n ) {\n this.traceId = traceId;\n this.parentId = parentId;\n this.traceFlags = traceFlags;\n this.traceState = traceState;\n }\n\n /**\n * Creating a default trace id that is a random setup for both trace id and parent id\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * ```\n *\n * @returns {TraceHeader} A default trace header\n */\n static default() {\n return new TraceHeader(\n clientTraceId,\n generateRandomHexString(8),\n \"00\", //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags\n {},\n );\n }\n /**\n * Should be able to consume a trace header from the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers);\n * ```\n *\n * @param {Record<string,string>} headers The headers from the http request\n * @returns {TraceHeader | undefined} The trace header object, or nothing if not found\n */\n static fromTraceHeader(\n headers: Record<string, string>,\n ): TraceHeader | undefined {\n if (!headers[TRACE_HEADER_NAME]) {\n return undefined;\n }\n const [version, traceId, parentId, traceFlags] =\n headers[TRACE_HEADER_NAME]?.split(\"-\");\n\n const traceState =\n headers[TRACE_HEADER_STATE]?.split(\",\").reduce(\n (acc, curr) => {\n const [key, value] = curr.split(\"=\");\n acc[key] = value;\n return acc;\n },\n {} as Record<string, string>,\n ) || {};\n if (version !== \"00\") {\n console.debug(\n new Error(\n `Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`,\n ),\n );\n return undefined;\n }\n return new TraceHeader(traceId, parentId, traceFlags, traceState);\n }\n\n /**\n * Should be able to convert the trace header to the format that is used in the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const headers = traceHeader.toTraceHeader();\n * ```\n *\n * @returns {{traceparent: string, tracestate: string}} The trace header in the format of a record, used in our http client\n */\n toTraceHeader() {\n return {\n [TRACE_HEADER_NAME]: `00-${this.traceId}-${this.parentId}-${this.traceFlags}`,\n [TRACE_HEADER_STATE]: Object.entries(this.traceState)\n .map(([key, value]) => `${key}=${value}`)\n .join(\",\"),\n } as const;\n }\n\n /**\n * Should be able to create a new trace header with a new event in the trace state,\n * as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the\n * trace parent gets updated as according to the docs\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const newTraceHeader = traceHeader.withEvent(\"newEvent\");\n * ```\n *\n * @param {string} eventName The key of the new event\n * @returns {TraceHeader} The new trace header\n */\n withEvent(eventName: string): TraceHeader {\n const breadcrumbs = this.traceState.breadcrumbs\n ? `${this.traceState.breadcrumbs}-${eventName}`\n : eventName;\n return new TraceHeader(this.traceId, this.parentId, this.traceFlags, {\n ...this.traceState,\n breadcrumbs,\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,qBAAqB","sourcesContent":["// borrowed from viem\n\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n// borrowed from viem\n/**\n * @description Checks if T is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\n\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\n\nexport type RequiredBy<TType, TKeys extends keyof TType> = Required<\n Pick<TType, TKeys>\n> &\n Omit<TType, TKeys>;\n\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport type WithRequired<T, K extends keyof T> = Required<Pick<T, K>>;\nexport type WithOptional<T, K extends keyof T> = Pick<Partial<T>, K>;\n\n// Checks for type equivalence, evaluates always to either `true` or `false`.\n// Semantics: (EQ<A, B> = true) <==> (A <==> B)\nexport type EQ<A, B> = [A] extends [B]\n ? [B] extends [A]\n ? true\n : false\n : false;\n\n// Auxiliary type for `IsMemberOrSubtypeOfAComponent`\n// Evaluates to `true` or `boolean` if one of the explicit components (according to the TypeScript distribution\n// mechanism for union types) of the union type equals the other given type.\n// Examples:\n// EqualsOneOfTheComponents<string, string | boolean> ⟶ boolean\n// EqualsOneOfTheComponents<string, string> ⟶ true\n// EqualsOneOfTheComponents<number, string | boolean> ⟶ false\nexport type EqualsOneOfTheComponents<T, Union> = Union extends infer Component // enforce distribution\n ? EQ<T, Component>\n : never;\n\n// Auxiliary type for `IsOneOf`\nexport type IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n ConjunctionOfExplicitComponentChecks extends boolean
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,qBAAqB","sourcesContent":["// borrowed from viem\n\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n// borrowed from viem\n/**\n * @description Checks if T is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\n\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\n\nexport type RequiredBy<TType, TKeys extends keyof TType> = Required<\n Pick<TType, TKeys>\n> &\n Omit<TType, TKeys>;\n\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport type WithRequired<T, K extends keyof T> = Required<Pick<T, K>>;\nexport type WithOptional<T, K extends keyof T> = Pick<Partial<T>, K>;\n\n// Checks for type equivalence, evaluates always to either `true` or `false`.\n// Semantics: (EQ<A, B> = true) <==> (A <==> B)\nexport type EQ<A, B> = [A] extends [B]\n ? [B] extends [A]\n ? true\n : false\n : false;\n\n// Auxiliary type for `IsMemberOrSubtypeOfAComponent`\n// Evaluates to `true` or `boolean` if one of the explicit components (according to the TypeScript distribution\n// mechanism for union types) of the union type equals the other given type.\n// Examples:\n// EqualsOneOfTheComponents<string, string | boolean> ⟶ boolean\n// EqualsOneOfTheComponents<string, string> ⟶ true\n// EqualsOneOfTheComponents<number, string | boolean> ⟶ false\nexport type EqualsOneOfTheComponents<T, Union> = Union extends infer Component // enforce distribution\n ? EQ<T, Component>\n : never;\n\n// Auxiliary type for `IsOneOf`\nexport type IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n ConjunctionOfExplicitComponentChecks extends boolean,\n> = [T] extends [Union]\n ? true extends ConjunctionOfExplicitComponentChecks\n ? true\n : false\n : false;\n\n// Checks whether the given type equals one of the explicit components of the union type. Note that in this respect we\n// consider the members of the infinite types number and string as implicit since the inbuilt distribution mechanism of\n// TypeScript does not (cannot) distribute over the infinite number of strings or numbers. However, `boolean` is treated\n// by TypeScript (and accordingly here) as the explicit union `true | false`.\n//\n// In particular, the evaluation result is `false` if the type is a proper union of components of the union type. It also\n// evaluates to false if the given type is a proper subtype of one of its explicit components.\n// It always evaluates to either `true` or `false`.\n// Examples:\n// IsOneOf<number, string | number | boolean> ⟶ true\n// IsOneOf<2 | 4, 0 | 1 | 2 | 3 | 4 | 5 | 6> ⟶ false\n// IsOneOf<'text', string> ⟶ false // only implicit but not explicit component\nexport type IsOneOf<T, Union> = IsMemberOrSubtypeOfAComponent<\n T,\n Union,\n EqualsOneOfTheComponents<T, Union>\n>;\n\nexport type OneOf<T1, T2> = IsOneOf<T1, T2> extends true ? T1 : never;\n\nexport type RecordableKeys<T> = {\n [K in keyof T]: T[K] extends string | number | symbol ? K : never;\n}[keyof T];\n\n// Marks a subset of the fields of T as optional.\nexport type OptionalFields<T, K extends keyof T> = Pick<Partial<T>, K> &\n Omit<T, K>;\n"]}
|
|
@@ -60,7 +60,7 @@ export declare function applyUserOpOverrideOrFeeOption<TValue extends BigNumberi
|
|
|
60
60
|
* @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
|
|
61
61
|
* @returns {boolean} whether the paymaster middleware should be bypassed
|
|
62
62
|
*/
|
|
63
|
-
export declare const bypassPaymasterAndData: <TEntryPointVersion extends
|
|
63
|
+
export declare const bypassPaymasterAndData: <TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
|
|
64
64
|
/**
|
|
65
65
|
* An alternative to `bypassPaymasterAndData` which only returns true if the data parameter
|
|
66
66
|
* is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will
|
|
@@ -70,7 +70,7 @@ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof i
|
|
|
70
70
|
* @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
|
|
71
71
|
* @returns {boolean} whether the paymaster middleware should be bypassed
|
|
72
72
|
*/
|
|
73
|
-
export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends
|
|
73
|
+
export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
|
|
74
74
|
/**
|
|
75
75
|
* Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
|
|
76
76
|
*
|
package/dist/esm/utils/userop.js
CHANGED
|
@@ -80,7 +80,7 @@ export function applyUserOpFeeOption(value, feeOption) {
|
|
|
80
80
|
? bigIntClamp(feeOption.multiplier
|
|
81
81
|
? bigIntMultiply(value, feeOption.multiplier)
|
|
82
82
|
: value, feeOption.min, feeOption.max)
|
|
83
|
-
: feeOption.min ?? 0n;
|
|
83
|
+
: (feeOption.min ?? 0n);
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* Utility method for applying a UserOperationOverrides field value and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userop.js","sourceRoot":"","sources":["../../../src/utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,MAAM,CAAC;AAYtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAG5B,OAAgD;IAEhD,oEAAoE;IACpE,OAAO,CACL,OAAO,CAAC,YAAY,IAAI,IAAI;QAC5B,OAAO,CAAC,kBAAkB,IAAI,IAAI;QAClC,OAAO,CAAC,oBAAoB,IAAI,IAAI;QACpC,OAAO,CAAC,YAAY,IAAI,IAAI;QAC5B,OAAO,CAAC,oBAAoB,IAAI,IAAI;QACpC,uBAAuB,CAAC,OAAO,CAAC;QAChC,qBAAqB,CAAC,OAAO,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAErC,OAAgD;IAChD,IAAI,kBAAkB,IAAI,OAAO,EAAE,CAAC;QAClC,OAAQ,OAAkC,CAAC,gBAAgB,IAAI,IAAI,CAAC;IACtE,CAAC;IAED,6BAA6B;IAC7B,OAAO,QAAQ,CACZ,OAAkC,CAAC,SAAS,IAAI,IAAI,EACpD,OAAkC,CAAC,aAAa,IAAI,IAAI,EACxD,OAAkC,CAAC,uBAAuB,IAAI,IAAI,EAClE,OAAkC,CAAC,6BAA6B,IAAI,IAAI,CAC1E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAEnC,OAAgD;IAChD,IAAI,UAAU,IAAI,OAAO,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AC,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAE;QACvC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAGpC,SAAiE,EACxD,EAAE,CACX,CAAC,CAAC,SAAS;IACX,CAAC,kBAAkB,IAAI,SAAS,IAAI,eAAe,IAAI,SAAS,CAAC,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAG5C,SAAiE,EACxD,EAAE,CACX,SAAS,KAAK,SAAS;IACvB,CAAC,CAAC,kBAAkB,IAAI,SAAS,IAAI,SAAS,CAAC,gBAAgB,KAAK,IAAI,CAAC;QACvE,CAAC,eAAe,IAAI,SAAS,IAAI,SAAS,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,gBAAqB,EAC+C,EAAE,CAAC,CAAC;IACxE,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAY;IACvD,aAAa,EAAE,KAAK,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,EAAS;CAC5D,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,SAAS,GAAG,IAAI,EAChB,aAAa,GAAG,IAAI,GAC+C,EAAO,EAAE,CAC5E,MAAM,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC","sourcesContent":["import { concat, type Address, type Hex } from \"viem\";\nimport type { EntryPointVersion } from \"../entrypoint/types\";\nimport type {\n BigNumberish,\n Multiplier,\n UserOperationFeeOptionsField,\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n UserOperationStruct_v6,\n UserOperationStruct_v7,\n} from \"../types\";\nimport { bigIntClamp, bigIntMultiply } from \"./bigint.js\";\nimport { allEqual, isBigNumberish } from \"./index.js\";\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version\n *\n * @param {UserOperationStruct} request a UserOperationStruct to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is valid\n */\nexport function isValidRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n request: UserOperationStruct<TEntryPointVersion>\n): request is UserOperationRequest<TEntryPointVersion> {\n // These are the only ones marked as optional in the interface above\n return (\n request.callGasLimit != null &&\n request.preVerificationGas != null &&\n request.verificationGasLimit != null &&\n request.maxFeePerGas != null &&\n request.maxPriorityFeePerGas != null &&\n isValidPaymasterAndData(request) &&\n isValidFactoryAndData(request)\n );\n}\n\n/**\n * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest\n */\nexport function isValidPaymasterAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"paymasterAndData\" in request) {\n return (request as UserOperationStruct_v6).paymasterAndData != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).paymaster == null,\n (request as UserOperationStruct_v7).paymasterData == null,\n (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null,\n (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null\n );\n}\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest\n */\nexport function isValidFactoryAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"initCode\" in request) {\n const { initCode } = request as UserOperationStruct_v6;\n return initCode != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).factory == null,\n (request as UserOperationStruct_v7).factoryData == null\n );\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} override the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpOverride<TValue extends BigNumberish | undefined>(\n value: TValue,\n override?: BigNumberish | Multiplier\n): TValue | BigNumberish {\n if (override == null) {\n return value;\n }\n\n if (isBigNumberish(override)) {\n return override;\n }\n\n // multiplier override\n else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n}\n\n/**\n * Utility method for applying a UserOperationFeeOptionsField value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {UserOperationFeeOptionsField} feeOption the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(\n value: TValue,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n if (feeOption == null) {\n return value;\n }\n\n return value != null\n ? bigIntClamp(\n feeOption.multiplier\n ? bigIntMultiply(value, feeOption.multiplier)\n : value,\n feeOption.min,\n feeOption.max\n )\n : feeOption.min ?? 0n;\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value and\n * a UserOperationFeeOptionsField value over the current value set for the field,\n * with the override taking precedence over the fee option\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} [override] the override value to apply\n * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply\n * @returns {BigNumberish} the new value of the field after applying the override or fee option\n */\nexport function applyUserOpOverrideOrFeeOption<\n TValue extends BigNumberish | undefined\n>(\n value: TValue,\n override?: BigNumberish | Multiplier,\n feeOption?: UserOperationFeeOptionsField\n): TValue | BigNumberish {\n return value != null && override != null\n ? applyUserOpOverride(value, override)!\n : applyUserOpFeeOption(value, feeOption);\n}\n\n/**\n * Utility method for checking whether the middleware pipeline should\n * bypass the paymaster middleware for the user operation with the given overrides,\n * either because the UserOp is paying for its own gas, or passing a specific paymaster\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndData = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n !!overrides &&\n (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n\n/**\n * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter\n * is \"0x,\" this is useful for cases when middleware should be bypassed ONLY IF the UserOp will\n * pay for its own gas\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndDataEmptyHex = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined\n): boolean =>\n overrides !== undefined &&\n ((\"paymasterAndData\" in overrides && overrides.paymasterAndData === \"0x\") ||\n (\"paymasterData\" in overrides && overrides.paymasterData === \"0x\"));\n\n/**\n * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string\n *\n * @param {Hex} paymasterAndData the paymaster and data hex string to parse.\n * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request\n * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field\n */\nexport const parsePaymasterAndData = (\n paymasterAndData: Hex\n): Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\"> => ({\n paymaster: paymasterAndData.substring(0, 42) as Address,\n paymasterData: `0x${paymasterAndData.substring(42)}` as Hex,\n});\n\n/**\n * Utility method for converting the object containing the paymaster address and paymaster data\n * to the paymaster and data concatenated hex string\n *\n * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of\n * entrypoint v0.7 user operation request\n * @param {Hex} paymasterAndData.paymaster the paymaster address\n * @param {Hex} paymasterAndData.paymasterData the paymaster data\n * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field\n */\nexport const concatPaymasterAndData = ({\n paymaster = \"0x\",\n paymasterData = \"0x\",\n}: Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\">): Hex =>\n concat([paymaster, paymasterData]);\n"]}
|
|
1
|
+
{"version":3,"file":"userop.js","sourceRoot":"","sources":["../../../src/utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,MAAM,CAAC;AAYtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAG5B,OAAgD;IAEhD,oEAAoE;IACpE,OAAO,CACL,OAAO,CAAC,YAAY,IAAI,IAAI;QAC5B,OAAO,CAAC,kBAAkB,IAAI,IAAI;QAClC,OAAO,CAAC,oBAAoB,IAAI,IAAI;QACpC,OAAO,CAAC,YAAY,IAAI,IAAI;QAC5B,OAAO,CAAC,oBAAoB,IAAI,IAAI;QACpC,uBAAuB,CAAC,OAAO,CAAC;QAChC,qBAAqB,CAAC,OAAO,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAErC,OAAgD;IAChD,IAAI,kBAAkB,IAAI,OAAO,EAAE,CAAC;QAClC,OAAQ,OAAkC,CAAC,gBAAgB,IAAI,IAAI,CAAC;IACtE,CAAC;IAED,6BAA6B;IAC7B,OAAO,QAAQ,CACZ,OAAkC,CAAC,SAAS,IAAI,IAAI,EACpD,OAAkC,CAAC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,CAAC","sourcesContent":["import { concat, type Address, type Hex } from \"viem\";\nimport type { EntryPointVersion } from \"../entrypoint/types\";\nimport type {\n BigNumberish,\n Multiplier,\n UserOperationFeeOptionsField,\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n UserOperationStruct_v6,\n UserOperationStruct_v7,\n} from \"../types\";\nimport { bigIntClamp, bigIntMultiply } from \"./bigint.js\";\nimport { allEqual, isBigNumberish } from \"./index.js\";\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version\n *\n * @param {UserOperationStruct} request a UserOperationStruct to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is valid\n */\nexport function isValidRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n>(\n request: UserOperationStruct<TEntryPointVersion>,\n): request is UserOperationRequest<TEntryPointVersion> {\n // These are the only ones marked as optional in the interface above\n return (\n request.callGasLimit != null &&\n request.preVerificationGas != null &&\n request.verificationGasLimit != null &&\n request.maxFeePerGas != null &&\n request.maxPriorityFeePerGas != null &&\n isValidPaymasterAndData(request) &&\n isValidFactoryAndData(request)\n );\n}\n\n/**\n * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest\n */\nexport function isValidPaymasterAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"paymasterAndData\" in request) {\n return (request as UserOperationStruct_v6).paymasterAndData != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).paymaster == null,\n (request as UserOperationStruct_v7).paymasterData == null,\n (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null,\n (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null,\n );\n}\n\n/**\n * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data\n *\n * @param {UserOperationRequest} request a UserOperationRequest to validate\n * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest\n */\nexport function isValidFactoryAndData<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n>(request: UserOperationStruct<TEntryPointVersion>): boolean {\n if (\"initCode\" in request) {\n const { initCode } = request as UserOperationStruct_v6;\n return initCode != null;\n }\n\n // either all exist, or none.\n return allEqual(\n (request as UserOperationStruct_v7).factory == null,\n (request as UserOperationStruct_v7).factoryData == null,\n );\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} override the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpOverride<TValue extends BigNumberish | undefined>(\n value: TValue,\n override?: BigNumberish | Multiplier,\n): TValue | BigNumberish {\n if (override == null) {\n return value;\n }\n\n if (isBigNumberish(override)) {\n return override;\n }\n\n // multiplier override\n else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n}\n\n/**\n * Utility method for applying a UserOperationFeeOptionsField value\n * over the current value set for the field\n *\n * @param {BigNumberish} value the current value of the field\n * @param {UserOperationFeeOptionsField} feeOption the override value to apply\n * @returns {BigNumberish} the new value of the field after applying the override\n */\nexport function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(\n value: TValue,\n feeOption?: UserOperationFeeOptionsField,\n): TValue | BigNumberish {\n if (feeOption == null) {\n return value;\n }\n\n return value != null\n ? bigIntClamp(\n feeOption.multiplier\n ? bigIntMultiply(value, feeOption.multiplier)\n : value,\n feeOption.min,\n feeOption.max,\n )\n : (feeOption.min ?? 0n);\n}\n\n/**\n * Utility method for applying a UserOperationOverrides field value and\n * a UserOperationFeeOptionsField value over the current value set for the field,\n * with the override taking precedence over the fee option\n *\n * @param {BigNumberish} value the current value of the field\n * @param {BigNumberish | Multiplier} [override] the override value to apply\n * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply\n * @returns {BigNumberish} the new value of the field after applying the override or fee option\n */\nexport function applyUserOpOverrideOrFeeOption<\n TValue extends BigNumberish | undefined,\n>(\n value: TValue,\n override?: BigNumberish | Multiplier,\n feeOption?: UserOperationFeeOptionsField,\n): TValue | BigNumberish {\n return value != null && override != null\n ? applyUserOpOverride(value, override)!\n : applyUserOpFeeOption(value, feeOption);\n}\n\n/**\n * Utility method for checking whether the middleware pipeline should\n * bypass the paymaster middleware for the user operation with the given overrides,\n * either because the UserOp is paying for its own gas, or passing a specific paymaster\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndData = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined,\n): boolean =>\n !!overrides &&\n (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n\n/**\n * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter\n * is \"0x,\" this is useful for cases when middleware should be bypassed ONLY IF the UserOp will\n * pay for its own gas\n *\n * @template EntryPointVersion TEntryPointVersion\n * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check\n * @returns {boolean} whether the paymaster middleware should be bypassed\n */\nexport const bypassPaymasterAndDataEmptyHex = <\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n>(\n overrides: UserOperationOverrides<TEntryPointVersion> | undefined,\n): boolean =>\n overrides !== undefined &&\n ((\"paymasterAndData\" in overrides && overrides.paymasterAndData === \"0x\") ||\n (\"paymasterData\" in overrides && overrides.paymasterData === \"0x\"));\n\n/**\n * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string\n *\n * @param {Hex} paymasterAndData the paymaster and data hex string to parse.\n * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request\n * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field\n */\nexport const parsePaymasterAndData = (\n paymasterAndData: Hex,\n): Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\"> => ({\n paymaster: paymasterAndData.substring(0, 42) as Address,\n paymasterData: `0x${paymasterAndData.substring(42)}` as Hex,\n});\n\n/**\n * Utility method for converting the object containing the paymaster address and paymaster data\n * to the paymaster and data concatenated hex string\n *\n * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of\n * entrypoint v0.7 user operation request\n * @param {Hex} paymasterAndData.paymaster the paymaster address\n * @param {Hex} paymasterAndData.paymasterData the paymaster data\n * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field\n */\nexport const concatPaymasterAndData = ({\n paymaster = \"0x\",\n paymasterData = \"0x\",\n}: Pick<UserOperationRequest<\"0.7.0\">, \"paymaster\" | \"paymasterData\">): Hex =>\n concat([paymaster, paymasterData]);\n"]}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.35.
|
|
1
|
+
export declare const VERSION = "4.35.1";
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.35.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.35.1\";\n"]}
|
|
@@ -41,7 +41,7 @@ export type SmartContractAccountWithSigner<Name extends string = string, TSigner
|
|
|
41
41
|
* @param {SmartContractAccount} account The account to check.
|
|
42
42
|
* @returns {boolean} true if the account has a signer, otherwise false.
|
|
43
43
|
*/
|
|
44
|
-
export declare const isSmartAccountWithSigner: (account: SmartContractAccount) => account is SmartContractAccountWithSigner
|
|
44
|
+
export declare const isSmartAccountWithSigner: (account: SmartContractAccount) => account is SmartContractAccountWithSigner;
|
|
45
45
|
export type SmartContractAccount<Name extends string = string, TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = LocalAccount<Name> & {
|
|
46
46
|
source: Name;
|
|
47
47
|
getDummySignature: () => Hex | Promise<Hex>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartContractAccount.d.ts","sourceRoot":"","sources":["../../../src/account/smartContractAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAWhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CAClB,CAAC;AAEF,oBAAY,eAAe;IACzB,SAAS,QAAQ;IACjB,YAAY,QAAQ;IACpB,QAAQ,QAAQ;CACjB;AAED,MAAM,MAAM,wBAAwB,CAClC,QAAQ,SAAS,oBAAoB,GAAG,SAAS,EACjD,gBAAgB,SAAS,oBAAoB,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"smartContractAccount.d.ts","sourceRoot":"","sources":["../../../src/account/smartContractAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAWhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CAClB,CAAC;AAEF,oBAAY,eAAe;IACzB,SAAS,QAAQ;IACjB,YAAY,QAAQ;IACpB,QAAQ,QAAQ;CACjB;AAED,MAAM,MAAM,wBAAwB,CAClC,QAAQ,SAAS,oBAAoB,GAAG,SAAS,EACjD,gBAAgB,SAAS,oBAAoB,GAAG,oBAAoB,IAEpE,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,SAAS,oBAAoB,CAC1E,MAAM,EACN,MAAM,kBAAkB,CACzB,GACG,kBAAkB,GAClB,iBAAiB,CAAC;AAExB,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,oBAAoB,GA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,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iBAAiB,GAAU,6DAKrC,uBAAuB,2BAkCzB,CAAC;AAGF,wBAAsB,sBAAsB,CAC1C,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAChE,EACA,SAAS,EACT,KAAK,EACL,UAAU,EACV,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,GACvB,EAAE,4BAA4B,CAC7B,IAAI,EACJ,UAAU,EACV,MAAM,EACN,kBAAkB,CACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Address, Chain, Client, StateOverride, Transport } from "viem";
|
|
2
2
|
import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
3
|
+
import type { EntryPointVersion } from "../../entrypoint/types";
|
|
3
4
|
import type { UserOperationEstimateGasResponse, UserOperationRequest } from "../../types";
|
|
4
|
-
export declare const estimateUserOperationGas: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>, TEntryPointVersion extends
|
|
5
|
+
export declare const estimateUserOperationGas: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>, TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(client: TClient, args: {
|
|
5
6
|
request: UserOperationRequest<TEntryPointVersion>;
|
|
6
7
|
entryPoint: Address;
|
|
7
|
-
stateOverride?: StateOverride
|
|
8
|
+
stateOverride?: StateOverride;
|
|
8
9
|
}) => Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>;
|
|
9
10
|
//# sourceMappingURL=estimateUserOperationGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACV,gCAAgC,EAChC,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,wBAAwB,GACnC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAC3E,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAEhE,QAAQ,OAAO,EACf,MAAM;IACJ,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,KACA,OAAO,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,CAY9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSupportedEntryPoints.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getSupportedEntryPoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"getSupportedEntryPoints.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getSupportedEntryPoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAE3E,QAAQ,OAAO,KACd,OAAO,CAAC,OAAO,EAAE,CAKnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationByHash.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"getUserOperationByHash.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,sBAAsB,GACjC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAE3E,QAAQ,OAAO,EACf,MAAM;IACJ,IAAI,EAAE,GAAG,CAAC;CACX,KACA,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAKtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAE3E,QAAQ,OAAO,EACf,MAAM;IACJ,IAAI,EAAE,GAAG,CAAC;CACX,KACA,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAKrC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Address, Chain, Client, Hex, Transport } from "viem";
|
|
2
2
|
import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
3
|
+
import type { EntryPointVersion } from "../../entrypoint/types";
|
|
3
4
|
import type { UserOperationRequest } from "../../types";
|
|
4
|
-
export declare const sendRawUserOperation: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>, TEntryPointVersion extends
|
|
5
|
+
export declare const sendRawUserOperation: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>, TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(client: TClient, args: {
|
|
5
6
|
request: UserOperationRequest<TEntryPointVersion>;
|
|
6
7
|
entryPoint: Address;
|
|
7
8
|
}) => Promise<Hex>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendRawUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/sendRawUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"sendRawUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/sendRawUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,oBAAoB,GAC/B,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAC3E,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAEhE,QAAQ,OAAO,EACf,MAAM;IACJ,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAClD,UAAU,EAAE,OAAO,CAAC;CACrB,KACA,OAAO,CAAC,GAAG,CAKb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAC/D,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAI/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EACV,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"buildUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAC/D,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAI/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EACV,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAEzE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC7C,IAAI,EAAE,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACzE,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAuBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUserOperationFromTx.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAC5D,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"buildUserOperationFromTx.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAC5D,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAEzE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,yBAAyB,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,EACjE,SAAS,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,EACtD,OAAO,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAqClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUserOperationFromTxs.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTxs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAQ5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wCAAwC,EACxC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"buildUserOperationFromTxs.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTxs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAQ5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wCAAwC,EACxC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EACzE,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EAEb,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC7C,IAAI,EAAE,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACvE,OAAO,CAAC,wCAAwC,CAAC,kBAAkB,CAAC,CAAC,CAmEvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkGasSponsorshipEligibility.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/checkGasSponsorshipEligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,oCAAoC,CAC9C,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"checkGasSponsorshipEligibility.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/checkGasSponsorshipEligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,oCAAoC,CAC9C,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,IACvE;IACF,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EAEb,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC7C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,oCAAoC,CAAC,QAAQ,CAAC,CAAC,CAsCzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAelE,OAAO,KAAK,EACV,qCAAqC,EACrC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAelE,OAAO,KAAK,EACV,qCAAqC,EACrC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAEzE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC7C,IAAI,EAAE,qCAAqC,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC9D,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAwEtD"}
|