@aa-sdk/core 4.18.0-alpha.3 → 4.18.0

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.
@@ -29,7 +29,7 @@ export async function _initUserOperation(client, args) {
29
29
  ? uo
30
30
  : account.encodeExecute(uo);
31
31
  const signature = account.getDummySignature();
32
- const nonce = account.getAccountNonce(overrides?.nonceKey);
32
+ const nonce = overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);
33
33
  const struct = entryPoint.version === "0.6.0"
34
34
  ? {
35
35
  initCode: account.getInitCode(),
@@ -1 +1 @@
1
- {"version":3,"file":"initUserOperation.js","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/initUserOperation.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAmB,MAAM,yBAAyB,CAAC;AAO7E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAWtC,MAA4D,EAC5D,IAEwE;IAExE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACzD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAE3C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAChC,CAAC,CAAC,OAAO,EAAE,KAAK,QAAQ;YACxB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAE9C,MAAM,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE3D,MAAM,MAAM,GACV,UAAU,CAAC,OAAO,KAAK,OAAO;QAC5B,CAAC,CAAE;YACC,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAE;YAC/B,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,KAAK;YACL,QAAQ;YACR,SAAS;SAC8C;QAC3D,CAAC,CAAE;YACC,OAAO,EAAE,iBAAiB,CACxB,OAAO,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EACzD,OAAO,CAAC,iBAAiB,CAC1B;YACD,WAAW,EAAE,iBAAiB,CAC5B,OAAO,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EACzD,OAAO,CAAC,cAAc,CACvB;YACD,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,KAAK;YACL,QAAQ;YACR,SAAS;SAC8C,CAAC;IAEhE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { Chain, Transport } from \"viem\";\nimport type {\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../../account/smartContractAccount.js\";\nimport type { BaseSmartAccountClient } from \"../../../client/smartAccountClient.js\";\nimport { AccountNotFoundError } from \"../../../errors/account.js\";\nimport { ChainNotFoundError } from \"../../../errors/client.js\";\nimport type { UserOperationStruct } from \"../../../types.js\";\nimport { conditionalReturn, type Deferrable } from \"../../../utils/index.js\";\nimport type {\n BuildUserOperationParameters,\n SendUserOperationParameters,\n UserOperationContext,\n} from \"../types.js\";\n\n/**\n * Description internal action function of SmartAccountClient for initializing\n * a user operation for the sender account\n *\n * @template {Transport} TTransport\n * @template {Chain | undefined} TChain\n * @template {SmartContractAccount | undefined} TAccount\n * @template {UserOperationContext | undefined} TContext\n * @template {GetEntryPointFromAccount} TEntryPointVersion\n * @param {BaseSmartAccountClient<TTransport, TChain, TAccount>} client smart account client\n * @param {SendUserOperationParameters<TAccount, TContext, TEntryPointVersion> | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>} args send user operation parameters\n * @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} initialized user operation struct\n */\nexport async function _initUserOperation<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n>(\n client: BaseSmartAccountClient<TTransport, TChain, TAccount>,\n args:\n | SendUserOperationParameters<TAccount, TContext, TEntryPointVersion>\n | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>\n): Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>> {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!client.chain) {\n throw new ChainNotFoundError();\n }\n\n const entryPoint = account.getEntryPoint();\n\n const callData = Array.isArray(uo)\n ? account.encodeBatchExecute(uo)\n : typeof uo === \"string\"\n ? uo\n : account.encodeExecute(uo);\n\n const signature = account.getDummySignature();\n\n const nonce = account.getAccountNonce(overrides?.nonceKey);\n\n const struct =\n entryPoint.version === \"0.6.0\"\n ? ({\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature,\n } as Deferrable<UserOperationStruct<TEntryPointVersion>>)\n : ({\n factory: conditionalReturn(\n account.isAccountDeployed().then((deployed) => !deployed),\n account.getFactoryAddress\n ),\n factoryData: conditionalReturn(\n account.isAccountDeployed().then((deployed) => !deployed),\n account.getFactoryData\n ),\n sender: account.address,\n nonce,\n callData,\n signature,\n } as Deferrable<UserOperationStruct<TEntryPointVersion>>);\n\n return struct;\n}\n"]}
1
+ {"version":3,"file":"initUserOperation.js","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/initUserOperation.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAmB,MAAM,yBAAyB,CAAC;AAO7E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAWtC,MAA4D,EAC5D,IAEwE;IAExE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACzD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAE3C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAChC,CAAC,CAAC,OAAO,EAAE,KAAK,QAAQ;YACxB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAE9C,MAAM,KAAK,GACT,SAAS,EAAE,KAAK,IAAI,OAAO,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEnE,MAAM,MAAM,GACV,UAAU,CAAC,OAAO,KAAK,OAAO;QAC5B,CAAC,CAAE;YACC,QAAQ,EAAE,OAAO,CAAC,WAAW,EAAE;YAC/B,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,KAAK;YACL,QAAQ;YACR,SAAS;SAC8C;QAC3D,CAAC,CAAE;YACC,OAAO,EAAE,iBAAiB,CACxB,OAAO,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EACzD,OAAO,CAAC,iBAAiB,CAC1B;YACD,WAAW,EAAE,iBAAiB,CAC5B,OAAO,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EACzD,OAAO,CAAC,cAAc,CACvB;YACD,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,KAAK;YACL,QAAQ;YACR,SAAS;SAC8C,CAAC;IAEhE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { Chain, Transport } from \"viem\";\nimport type {\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../../account/smartContractAccount.js\";\nimport type { BaseSmartAccountClient } from \"../../../client/smartAccountClient.js\";\nimport { AccountNotFoundError } from \"../../../errors/account.js\";\nimport { ChainNotFoundError } from \"../../../errors/client.js\";\nimport type { UserOperationStruct } from \"../../../types.js\";\nimport { conditionalReturn, type Deferrable } from \"../../../utils/index.js\";\nimport type {\n BuildUserOperationParameters,\n SendUserOperationParameters,\n UserOperationContext,\n} from \"../types.js\";\n\n/**\n * Description internal action function of SmartAccountClient for initializing\n * a user operation for the sender account\n *\n * @template {Transport} TTransport\n * @template {Chain | undefined} TChain\n * @template {SmartContractAccount | undefined} TAccount\n * @template {UserOperationContext | undefined} TContext\n * @template {GetEntryPointFromAccount} TEntryPointVersion\n * @param {BaseSmartAccountClient<TTransport, TChain, TAccount>} client smart account client\n * @param {SendUserOperationParameters<TAccount, TContext, TEntryPointVersion> | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>} args send user operation parameters\n * @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} initialized user operation struct\n */\nexport async function _initUserOperation<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n>(\n client: BaseSmartAccountClient<TTransport, TChain, TAccount>,\n args:\n | SendUserOperationParameters<TAccount, TContext, TEntryPointVersion>\n | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>\n): Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>> {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!client.chain) {\n throw new ChainNotFoundError();\n }\n\n const entryPoint = account.getEntryPoint();\n\n const callData = Array.isArray(uo)\n ? account.encodeBatchExecute(uo)\n : typeof uo === \"string\"\n ? uo\n : account.encodeExecute(uo);\n\n const signature = account.getDummySignature();\n\n const nonce =\n overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);\n\n const struct =\n entryPoint.version === \"0.6.0\"\n ? ({\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature,\n } as Deferrable<UserOperationStruct<TEntryPointVersion>>)\n : ({\n factory: conditionalReturn(\n account.isAccountDeployed().then((deployed) => !deployed),\n account.getFactoryAddress\n ),\n factoryData: conditionalReturn(\n account.isAccountDeployed().then((deployed) => !deployed),\n account.getFactoryData\n ),\n sender: account.address,\n nonce,\n callData,\n signature,\n } as Deferrable<UserOperationStruct<TEntryPointVersion>>);\n\n return struct;\n}\n"]}
@@ -37,14 +37,6 @@ export type UserOperationOverrides<TEntryPointVersion extends EntryPointVersion
37
37
  maxPriorityFeePerGas: UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"] | Multiplier;
38
38
  preVerificationGas: UserOperationStruct<TEntryPointVersion>["preVerificationGas"] | Multiplier;
39
39
  verificationGasLimit: UserOperationStruct<TEntryPointVersion>["verificationGasLimit"] | Multiplier;
40
- /**
41
- * This can be used to override the key used when calling `entryPoint.getNonce`
42
- * It is useful when you want to use parallel nonces for user operations
43
- *
44
- * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
45
- * one user operation for your account in a bundle
46
- */
47
- nonceKey: bigint;
48
40
  /**
49
41
  * The same state overrides for
50
42
  * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.
@@ -54,7 +46,21 @@ export type UserOperationOverrides<TEntryPointVersion extends EntryPointVersion
54
46
  * for user operation scenarios under conditions that aren’t currently present on the live network.
55
47
  */
56
48
  stateOverride: StateOverride;
57
- } & UserOperationPaymasterOverrides<TEntryPointVersion>>;
49
+ } & UserOperationPaymasterOverrides<TEntryPointVersion>> &
50
+ /**
51
+ * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`
52
+ * It is useful when you want to use parallel nonces for user operations
53
+ *
54
+ * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
55
+ * one user operation for your account in a bundle
56
+ */
57
+ Partial<{
58
+ nonceKey: bigint;
59
+ nonce: never;
60
+ } | {
61
+ nonceKey: never;
62
+ nonce: bigint;
63
+ }>;
58
64
  export interface UserOperationRequest_v6 {
59
65
  sender: Address;
60
66
  nonce: Hex;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AAyWd,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 * This can be used to override the 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 nonceKey: bigint;\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// [!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"]}
@@ -60,25 +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 keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
64
- callGasLimit: {
65
- multiplier: number;
66
- } | UserOperationStruct<TEntryPointVersion>["callGasLimit"];
67
- maxFeePerGas: {
68
- multiplier: number;
69
- } | UserOperationStruct<TEntryPointVersion>["maxFeePerGas"];
70
- maxPriorityFeePerGas: {
71
- multiplier: number;
72
- } | UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"];
73
- preVerificationGas: {
74
- multiplier: number;
75
- } | UserOperationStruct<TEntryPointVersion>["preVerificationGas"];
76
- verificationGasLimit: {
77
- multiplier: number;
78
- } | UserOperationStruct<TEntryPointVersion>["verificationGasLimit"];
79
- nonceKey: bigint;
80
- stateOverride: import("viem").StateOverride;
81
- } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
63
+ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
82
64
  /**
83
65
  * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter
84
66
  * is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will
@@ -88,25 +70,7 @@ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof i
88
70
  * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
89
71
  * @returns {boolean} whether the paymaster middleware should be bypassed
90
72
  */
91
- export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
92
- callGasLimit: {
93
- multiplier: number;
94
- } | UserOperationStruct<TEntryPointVersion>["callGasLimit"];
95
- maxFeePerGas: {
96
- multiplier: number;
97
- } | UserOperationStruct<TEntryPointVersion>["maxFeePerGas"];
98
- maxPriorityFeePerGas: {
99
- multiplier: number;
100
- } | UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"];
101
- preVerificationGas: {
102
- multiplier: number;
103
- } | UserOperationStruct<TEntryPointVersion>["preVerificationGas"];
104
- verificationGasLimit: {
105
- multiplier: number;
106
- } | UserOperationStruct<TEntryPointVersion>["verificationGasLimit"];
107
- nonceKey: bigint;
108
- stateOverride: import("viem").StateOverride;
109
- } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
73
+ export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
110
74
  /**
111
75
  * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
112
76
  *
@@ -1 +1 @@
1
- export declare const VERSION = "4.18.0-alpha.3";
1
+ export declare const VERSION = "4.18.0";
@@ -1,4 +1,4 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.18.0-alpha.3";
3
+ export const VERSION = "4.18.0";
4
4
  //# sourceMappingURL=version.js.map
@@ -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,gBAAgB,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.18.0-alpha.3\";\n"]}
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.18.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"initUserOperation.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/initUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GA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B,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5D,IAAI,EACA,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACnE,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACvE,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAgD9D"}
@@ -37,14 +37,6 @@ export type UserOperationOverrides<TEntryPointVersion extends EntryPointVersion
37
37
  maxPriorityFeePerGas: UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"] | Multiplier;
38
38
  preVerificationGas: UserOperationStruct<TEntryPointVersion>["preVerificationGas"] | Multiplier;
39
39
  verificationGasLimit: UserOperationStruct<TEntryPointVersion>["verificationGasLimit"] | Multiplier;
40
- /**
41
- * This can be used to override the key used when calling `entryPoint.getNonce`
42
- * It is useful when you want to use parallel nonces for user operations
43
- *
44
- * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
45
- * one user operation for your account in a bundle
46
- */
47
- nonceKey: bigint;
48
40
  /**
49
41
  * The same state overrides for
50
42
  * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.
@@ -54,7 +46,21 @@ export type UserOperationOverrides<TEntryPointVersion extends EntryPointVersion
54
46
  * for user operation scenarios under conditions that aren’t currently present on the live network.
55
47
  */
56
48
  stateOverride: StateOverride;
57
- } & UserOperationPaymasterOverrides<TEntryPointVersion>>;
49
+ } & UserOperationPaymasterOverrides<TEntryPointVersion>> &
50
+ /**
51
+ * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`
52
+ * It is useful when you want to use parallel nonces for user operations
53
+ *
54
+ * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
55
+ * one user operation for your account in a bundle
56
+ */
57
+ Partial<{
58
+ nonceKey: bigint;
59
+ nonce: never;
60
+ } | {
61
+ nonceKey: never;
62
+ nonce: bigint;
63
+ }>;
58
64
  export interface UserOperationRequest_v6 {
59
65
  sender: Address;
60
66
  nonce: Hex;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC7B,gCAAgC,EAChC,gCAAgC,EACjC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC;AAC5B,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC;AAGhC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,GAAG,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,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AAC;IAE3B,QAAQ,EAAE,SAAS,CAAC;IAEpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IAEpC,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAElC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IAEpC,gBAAgB,EAAE,SAAS,GAAG,IAAI,CAAC;IAEnC,SAAS,EAAE,SAAS,CAAC;CACtB;AAMD,MAAM,WAAW,sBAAsB;IAErC,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,EAAE,YAAY,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,QAAQ,EAAE,SAAS,CAAC;IAEpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IAEpC,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAElC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IAEpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,6BAA6B,CAAC,EAAE,YAAY,CAAC;IAE7C,uBAAuB,CAAC,EAAE,YAAY,CAAC;IAEvC,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,SAAS,EAAE,SAAS,CAAC;CACtB;AAID,MAAM,MAAM,mBAAmB,CAC7B,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D,CAAC,kBAAkB,SAAS,OAAO,GACnC,sBAAsB,GACtB,kBAAkB,SAAS,OAAO,GAClC,sBAAsB,GACtB,KAAK,CAAC,GACR,qBAAqB,CAAC"}
@@ -60,25 +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 keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
64
- callGasLimit: {
65
- multiplier: number;
66
- } | UserOperationStruct<TEntryPointVersion>["callGasLimit"];
67
- maxFeePerGas: {
68
- multiplier: number;
69
- } | UserOperationStruct<TEntryPointVersion>["maxFeePerGas"];
70
- maxPriorityFeePerGas: {
71
- multiplier: number;
72
- } | UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"];
73
- preVerificationGas: {
74
- multiplier: number;
75
- } | UserOperationStruct<TEntryPointVersion>["preVerificationGas"];
76
- verificationGasLimit: {
77
- multiplier: number;
78
- } | UserOperationStruct<TEntryPointVersion>["verificationGasLimit"];
79
- nonceKey: bigint;
80
- stateOverride: import("viem").StateOverride;
81
- } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
63
+ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
82
64
  /**
83
65
  * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter
84
66
  * is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will
@@ -88,25 +70,7 @@ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof i
88
70
  * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
89
71
  * @returns {boolean} whether the paymaster middleware should be bypassed
90
72
  */
91
- export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
92
- callGasLimit: {
93
- multiplier: number;
94
- } | UserOperationStruct<TEntryPointVersion>["callGasLimit"];
95
- maxFeePerGas: {
96
- multiplier: number;
97
- } | UserOperationStruct<TEntryPointVersion>["maxFeePerGas"];
98
- maxPriorityFeePerGas: {
99
- multiplier: number;
100
- } | UserOperationStruct<TEntryPointVersion>["maxPriorityFeePerGas"];
101
- preVerificationGas: {
102
- multiplier: number;
103
- } | UserOperationStruct<TEntryPointVersion>["preVerificationGas"];
104
- verificationGasLimit: {
105
- multiplier: number;
106
- } | UserOperationStruct<TEntryPointVersion>["verificationGasLimit"];
107
- nonceKey: bigint;
108
- stateOverride: import("viem").StateOverride;
109
- } & import("../types").UserOperationPaymasterOverrides<TEntryPointVersion>> | undefined) => boolean;
73
+ export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: UserOperationOverrides<TEntryPointVersion> | undefined) => boolean;
110
74
  /**
111
75
  * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
112
76
  *
@@ -1 +1 @@
1
- {"version":3,"file":"userop.d.ts","sourceRoot":"","sources":["../../../src/utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAIlB;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAEhE,OAAO,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAC/C,OAAO,IAAI,oBAAoB,CAAC,kBAAkB,CAAC,CAWrD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,EAChE,OAA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,CAAC,EAAE,4BAA4B,GACvC,MAAM,GAAG,YAAY,CAIvB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,+OAIhC,OAEgE,CAAC;AAEpE;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,+OAIxC,OAGoE,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,qBACd,GAAG,KACpB,KAAK,qBAAqB,OAAO,CAAC,EAAE,WAAW,GAAG,eAAe,CAGlE,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,kCAGhC,KAAK,qBAAqB,OAAO,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC,KAAG,GACpC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.18.0-alpha.3";
1
+ export declare const VERSION = "4.18.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aa-sdk/core",
3
3
  "license": "MIT",
4
- "version": "4.18.0-alpha.3",
4
+ "version": "4.18.0",
5
5
  "description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
6
6
  "author": "Alchemy",
7
7
  "type": "module",
@@ -65,5 +65,5 @@
65
65
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
66
66
  },
67
67
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
68
- "gitHead": "3ab0862d913254d5f4208981cbcc5e3ed8d6708f"
68
+ "gitHead": "d69993e1d23ad074ad924e067db24d71c899a227"
69
69
  }
@@ -62,7 +62,8 @@ export async function _initUserOperation<
62
62
 
63
63
  const signature = account.getDummySignature();
64
64
 
65
- const nonce = account.getAccountNonce(overrides?.nonceKey);
65
+ const nonce =
66
+ overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);
66
67
 
67
68
  const struct =
68
69
  entryPoint.version === "0.6.0"
package/src/types.ts CHANGED
@@ -113,14 +113,6 @@ export type UserOperationOverrides<
113
113
  verificationGasLimit:
114
114
  | UserOperationStruct<TEntryPointVersion>["verificationGasLimit"]
115
115
  | Multiplier;
116
- /**
117
- * This can be used to override the key used when calling `entryPoint.getNonce`
118
- * It is useful when you want to use parallel nonces for user operations
119
- *
120
- * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
121
- * one user operation for your account in a bundle
122
- */
123
- nonceKey: bigint;
124
116
 
125
117
  /**
126
118
  * The same state overrides for
@@ -132,7 +124,21 @@ export type UserOperationOverrides<
132
124
  */
133
125
  stateOverride: StateOverride;
134
126
  } & UserOperationPaymasterOverrides<TEntryPointVersion>
135
- >;
127
+ > &
128
+ /**
129
+ * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`
130
+ * It is useful when you want to use parallel nonces for user operations
131
+ *
132
+ * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include
133
+ * one user operation for your account in a bundle
134
+ */
135
+ Partial<
136
+ | {
137
+ nonceKey: bigint;
138
+ nonce: never;
139
+ }
140
+ | { nonceKey: never; nonce: bigint }
141
+ >;
136
142
  // [!endregion UserOperationOverrides]
137
143
 
138
144
  // [!region UserOperationRequest_v6]
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.18.0-alpha.3";
3
+ export const VERSION = "4.18.0";