@aa-sdk/core 4.0.0-beta.0 → 4.0.0-beta.10

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.
Files changed (64) hide show
  1. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +9 -4
  2. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js +17 -12
  3. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  4. package/dist/esm/actions/smartAccount/signMessage.js +1 -1
  5. package/dist/esm/actions/smartAccount/signMessage.js.map +1 -1
  6. package/dist/esm/actions/smartAccount/signTypedData.js +1 -1
  7. package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -1
  8. package/dist/esm/client/decorators/smartAccountClient.d.ts +2 -5
  9. package/dist/esm/client/decorators/smartAccountClient.js +1 -5
  10. package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
  11. package/dist/esm/middleware/erc7677middleware.d.ts +4 -4
  12. package/dist/esm/middleware/erc7677middleware.js.map +1 -1
  13. package/dist/esm/signer/local-account.d.ts +17 -5
  14. package/dist/esm/signer/local-account.js +19 -2
  15. package/dist/esm/signer/local-account.js.map +1 -1
  16. package/dist/esm/signer/types.d.ts +1 -3
  17. package/dist/esm/signer/types.js.map +1 -1
  18. package/dist/esm/signer/wallet-client.d.ts +2 -4
  19. package/dist/esm/signer/wallet-client.js +3 -2
  20. package/dist/esm/signer/wallet-client.js.map +1 -1
  21. package/dist/esm/types.d.ts +0 -30
  22. package/dist/esm/types.js.map +1 -1
  23. package/dist/esm/version.d.ts +1 -1
  24. package/dist/esm/version.js +1 -1
  25. package/dist/esm/version.js.map +1 -1
  26. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +9 -4
  27. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -1
  28. package/dist/types/client/decorators/smartAccountClient.d.ts +2 -5
  29. package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
  30. package/dist/types/middleware/erc7677middleware.d.ts +4 -4
  31. package/dist/types/middleware/erc7677middleware.d.ts.map +1 -1
  32. package/dist/types/signer/local-account.d.ts +17 -5
  33. package/dist/types/signer/local-account.d.ts.map +1 -1
  34. package/dist/types/signer/types.d.ts +1 -3
  35. package/dist/types/signer/types.d.ts.map +1 -1
  36. package/dist/types/signer/wallet-client.d.ts +2 -4
  37. package/dist/types/signer/wallet-client.d.ts.map +1 -1
  38. package/dist/types/types.d.ts +0 -30
  39. package/dist/types/types.d.ts.map +1 -1
  40. package/dist/types/version.d.ts +1 -1
  41. package/dist/types/version.d.ts.map +1 -1
  42. package/package.json +4 -6
  43. package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +33 -16
  44. package/src/actions/smartAccount/signMessage.ts +1 -1
  45. package/src/actions/smartAccount/signTypedData.ts +1 -1
  46. package/src/client/decorators/smartAccountClient.ts +9 -14
  47. package/src/middleware/erc7677middleware.ts +9 -9
  48. package/src/signer/local-account.ts +26 -4
  49. package/src/signer/types.ts +2 -2
  50. package/src/signer/wallet-client.ts +8 -4
  51. package/src/types.ts +0 -56
  52. package/src/version.ts +1 -1
  53. package/dist/esm/actions/smartAccount/signMessageWith6492.d.ts +0 -4
  54. package/dist/esm/actions/smartAccount/signMessageWith6492.js +0 -8
  55. package/dist/esm/actions/smartAccount/signMessageWith6492.js.map +0 -1
  56. package/dist/esm/actions/smartAccount/signTypedDataWith6492.d.ts +0 -6
  57. package/dist/esm/actions/smartAccount/signTypedDataWith6492.js +0 -8
  58. package/dist/esm/actions/smartAccount/signTypedDataWith6492.js.map +0 -1
  59. package/dist/types/actions/smartAccount/signMessageWith6492.d.ts +0 -5
  60. package/dist/types/actions/smartAccount/signMessageWith6492.d.ts.map +0 -1
  61. package/dist/types/actions/smartAccount/signTypedDataWith6492.d.ts +0 -7
  62. package/dist/types/actions/smartAccount/signTypedDataWith6492.d.ts.map +0 -1
  63. package/src/actions/smartAccount/signMessageWith6492.ts +0 -21
  64. package/src/actions/smartAccount/signTypedDataWith6492.ts +0 -23
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AAoZd,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\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\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/** @deprecated use viem type TransactionReceipt instead */\nexport interface UserOperationReceiptObject {\n /* 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log */\n blockHash: Hash;\n /* The block number where this log was in. null when its pending. null when its pending log. */\n blockNumber: BigNumberish;\n /* The index of the transaction within the block. */\n transactionIndex: BigNumberish;\n /* 32 Bytes - hash of the transaction. null when its pending. */\n transactionHash: Hash;\n /* 20 Bytes - address of the sender */\n from: Address;\n /* 20 Bytes - address of the receiver. null when its a contract creation transaction */\n to: Address;\n /* The total amount of gas used when this transaction was executed in the block. */\n cumulativeGasUsed: BigNumberish;\n /* The amount of gas used by this specific transaction alone */\n gasUsed: BigNumberish;\n /* 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null */\n contractAddress: Address;\n logs: UserOperationReceiptLog[];\n /* 256 Bytes - Bloom filter for light clients to quickly retrieve related logs */\n logsBloom: Hex;\n /* 32 bytes of post-transaction stateroot. (pre Byzantium hard fork at block 4,370,000) */\n root: Hex;\n /* Either 1 (success) or 0 (failure). (post Byzantium hard fork at block 4,370,000) */\n status: number;\n /* The cumulative gas used in the block containing this UserOperation. */\n effectiveGasPrice: BigNumberish;\n /* The type of the recipt object */\n type: string;\n}\n\n/** @deprecated use viem type Log instead */\n/* https://github.com/wevm/viem/blob/6ef4ac131a878bf1dc4b335f5dc127e62618dda0/src/types/log.ts#L15 */\nexport interface UserOperationReceiptLog {\n /* The hash of the block where the given transaction was included. */\n blockHash: Hash;\n /* The number of the block where the given transaction was included. */\n blockNumber: BigNumberish;\n /* The index of the transaction within the block. */\n transactionIndex: BigNumberish;\n /* 20 Bytes - address from which this log originated. */\n address: Address;\n /* Integer of the log index position in the block. null when its pending log. */\n logIndex: BigNumberish;\n /* Contains one or more 32 Bytes non-indexed arguments of the log. */\n data: Hex;\n /* true when the log was removed, due to a chain reorganization. false if its a valid log. */\n removed: boolean;\n /* Array of zero to four 32 Bytes DATA of indexed log arguments. */\n topics: string[];\n /* hash of the transaction */\n transactionHash: Hash;\n}\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// [!endregion UserOperationStruct]\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AA4Vd,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\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\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// [!endregion UserOperationStruct]\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.0-beta.0";
1
+ export declare const VERSION = "4.0.0-beta.10";
@@ -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.0.0-beta.0";
3
+ export const VERSION = "4.0.0-beta.10";
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,cAAc,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.0.0-beta.0\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.0.0-beta.10\";\n"]}
@@ -1,6 +1,11 @@
1
1
  import type { Chain, Client, Transport } from "viem";
2
- import type { SmartContractAccount } from "../../account/smartContractAccount.js";
2
+ import type { GetEntryPointFromAccount, SmartContractAccount } from "../../account/smartContractAccount.js";
3
+ import type { UserOperationStruct } from "../../types.js";
3
4
  import type { SendUserOperationParameters, UserOperationContext } from "./types";
5
+ export type CheckGasSponsorshipEligibilityResult<TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>> = {
6
+ eligible: boolean;
7
+ request?: UserOperationStruct<TEntryPointVersion>;
8
+ };
4
9
  /**
5
10
  * This function verifies the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent.
6
11
  * Internally, this method invokes `buildUserOperation`, which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field.
@@ -10,7 +15,7 @@ import type { SendUserOperationParameters, UserOperationContext } from "./types"
10
15
  * ```ts
11
16
  * import { smartAccountClient } from "./smartAccountClient";
12
17
  * // [!code focus:99]
13
- * const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
18
+ * const { eligible } = await smartAccountClient.checkGasSponsorshipEligibility({
14
19
  * uo: {
15
20
  * data: "0xCalldata",
16
21
  * target: "0xTarget",
@@ -27,7 +32,7 @@ import type { SendUserOperationParameters, UserOperationContext } from "./types"
27
32
  *
28
33
  * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for making RPC calls
29
34
  * @param {SendUserOperationParameters} args containing the user operation, account, context, and overrides
30
- * @returns {Promise<boolean>} a Promise containing a boolean indicating if the account is elgibile for sponsorship
35
+ * @returns {Promise<CheckGasSponsorshipEligibilityResult<TAccount>>} a Promise containing a boolean indicating if the account is elgibile for sponsorship and the sponsored UO
31
36
  */
32
- export declare function checkGasSponsorshipEligibility<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<boolean>;
37
+ export declare function checkGasSponsorshipEligibility<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<CheckGasSponsorshipEligibilityResult<TAccount>>;
33
38
  //# sourceMappingURL=checkGasSponsorshipEligibility.d.ts.map
@@ -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,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAMlF,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,OAAO,CAAC,CAiClB"}
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;AAEjB,MAAM,MAAM,oCAAoC,CAC9C,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,IAChG;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,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,oCAAoC,CAAC,QAAQ,CAAC,CAAC,CAqCzD"}
@@ -1,5 +1,6 @@
1
1
  import { type Address, type Chain, type Client, type Hex, type SendTransactionParameters, type Transport, type TypedData } from "viem";
2
2
  import type { GetAccountParameter, GetEntryPointFromAccount, SmartContractAccount } from "../../account/smartContractAccount";
3
+ import { type CheckGasSponsorshipEligibilityResult } from "../../actions/smartAccount/checkGasSponsorshipEligibility.js";
3
4
  import { type SignMessageParameters } from "../../actions/smartAccount/signMessage.js";
4
5
  import { type SignTypedDataParameters } from "../../actions/smartAccount/signTypedData.js";
5
6
  import type { BuildTransactionParameters, BuildUserOperationFromTransactionsResult, BuildUserOperationParameters, DropAndReplaceUserOperationParameters, SendTransactionsParameters, SendUserOperationParameters, SignUserOperationParameters, UpgradeAccountParams, UserOperationContext, WaitForUserOperationTxParameters } from "../../actions/smartAccount/types";
@@ -10,7 +11,7 @@ export type BaseSmartAccountClientActions<TChain extends Chain | undefined = Cha
10
11
  buildUserOperation: (args: BuildUserOperationParameters<TAccount, TContext>) => Promise<UserOperationStruct<TEntryPointVersion>>;
11
12
  buildUserOperationFromTx: (args: SendTransactionParameters<TChain, TAccount>, overrides?: UserOperationOverrides<TEntryPointVersion>, context?: TContext) => Promise<UserOperationStruct<TEntryPointVersion>>;
12
13
  buildUserOperationFromTxs: (args: BuildTransactionParameters<TAccount, TContext>) => Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>;
13
- checkGasSponsorshipEligibility: <TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(args: SendUserOperationParameters<TAccount, TContext>) => Promise<boolean>;
14
+ checkGasSponsorshipEligibility: <TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(args: SendUserOperationParameters<TAccount, TContext>) => Promise<CheckGasSponsorshipEligibilityResult<TAccount, TEntryPointVersion>>;
14
15
  signUserOperation: (args: SignUserOperationParameters<TAccount, TEntryPointVersion, TContext>) => Promise<UserOperationRequest<TEntryPointVersion>>;
15
16
  dropAndReplaceUserOperation: (args: DropAndReplaceUserOperationParameters<TAccount, TContext>) => Promise<SendUserOperationResult<TEntryPointVersion>>;
16
17
  sendTransaction: <TChainOverride extends Chain | undefined = undefined>(args: SendTransactionParameters<TChain, TAccount, TChainOverride>, overrides?: UserOperationOverrides<TEntryPointVersion>, context?: TContext) => Promise<Hex>;
@@ -22,10 +23,6 @@ export type BaseSmartAccountClientActions<TChain extends Chain | undefined = Cha
22
23
  signTypedData: <const TTypedData extends TypedData | {
23
24
  [key: string]: unknown;
24
25
  }, TPrimaryType extends string = string>(args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>) => Promise<Hex>;
25
- signMessageWith6492: (args: SignMessageParameters<TAccount>) => Promise<Hex>;
26
- signTypedDataWith6492: <const TTypedData extends TypedData | {
27
- [key: string]: unknown;
28
- }, TPrimaryType extends string = string>(args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>) => Promise<Hex>;
29
26
  } & (IsUndefined<TAccount> extends false ? {
30
27
  getAddress: () => Address;
31
28
  } : {
@@ -1 +1 @@
1
- {"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../../src/client/decorators/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAU5C,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,6CAA6C,CAAC;AAGrD,OAAO,KAAK,EACV,0BAA0B,EAC1B,wCAAwC,EACxC,4BAA4B,EAC5B,qCAAqC,EACrC,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,gCAAgC,EACjC,MAAM,kCAAkC,CAAC;AAG1C,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aA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E,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,KACzC,6BAA6B,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAoB3D,CAAC;AAEH,eAAO,MAAM,4BAA4B,aAMpB,CAAC"}
@@ -3,10 +3,10 @@ import type { ClientMiddlewareConfig } from "../client/types";
3
3
  import type { EntryPointVersion } from "../entrypoint/types";
4
4
  import type { UserOperationFeeOptions, UserOperationOverrides, UserOperationRequest, UserOperationStruct } from "../types";
5
5
  import { type Deferrable } from "../utils/index.js";
6
- export type Erc7677RpcSchema = [
6
+ export type Erc7677RpcSchema<TContext extends Record<string, any> = Record<string, any>> = [
7
7
  {
8
8
  Method: "pm_getPaymasterStubData";
9
- Parameters: [UserOperationRequest, Address, Hex, Record<string, any>];
9
+ Parameters: [UserOperationRequest, Address, Hex, TContext];
10
10
  ReturnType: {
11
11
  sponsor?: {
12
12
  name: string;
@@ -22,7 +22,7 @@ export type Erc7677RpcSchema = [
22
22
  },
23
23
  {
24
24
  Method: "pm_getPaymasterData";
25
- Parameters: [UserOperationRequest, Address, Hex, Record<string, any>];
25
+ Parameters: [UserOperationRequest, Address, Hex, TContext];
26
26
  ReturnType: {
27
27
  paymaster?: Address;
28
28
  paymasterData?: Hex;
@@ -30,7 +30,7 @@ export type Erc7677RpcSchema = [
30
30
  };
31
31
  }
32
32
  ];
33
- export type Erc7677Client<T extends Transport = Transport> = Client<T, Chain, undefined, Erc7677RpcSchema>;
33
+ export type Erc7677Client<T extends Transport = Transport, TContext extends Record<string, any> = Record<string, any>> = Client<T, Chain, undefined, Erc7677RpcSchema<TContext>>;
34
34
  export type Erc7677MiddlewareParams<TContext extends Record<string, any> | undefined = Record<string, any> | undefined, TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = {
35
35
  context?: ((struct: Deferrable<UserOperationStruct<TEntryPointVersion>>, args: {
36
36
  overrides?: UserOperationOverrides<TEntryPointVersion>;
@@ -1 +1 @@
1
- {"version":3,"file":"erc7677midd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AM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACxD,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE5D,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,SAAS,EACb,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D;IACF,OAAO,CAAC,EACJ,CAAC,CACC,MAAM,EAAE,UAAU,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,EAC3D,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QACvD,UAAU,CAAC,EAAE,uBAAuB,CAAC;KACtC,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC,GACvB,QAAQ,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC5C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,SAAS,EAEb,MAAM,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACzC,IAAI,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,kBAAkB,CAAC,CAoG5E"}
@@ -58,7 +58,7 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
58
58
  * @param {TypedDataDefinition<TTypedData, TPrimaryType>} params The parameters defining the typed data and primary type
59
59
  * @returns {Promise<Hex>} A promise that resolves to the signed data in hexadecimal format
60
60
  */
61
- readonly signTypedData: <const TTypedData extends {
61
+ readonly signTypedData: <const TTypedData extends Record<string, unknown> | {
62
62
  [x: string]: readonly import("viem").TypedDataParameter[];
63
63
  [x: `string[${string}]`]: undefined;
64
64
  [x: `function[${string}]`]: undefined;
@@ -263,9 +263,7 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
263
263
  uint232?: undefined;
264
264
  uint240?: undefined;
265
265
  uint248?: undefined;
266
- } | {
267
- [key: string]: unknown;
268
- }, TPrimaryType extends string = string>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
266
+ }, TPrimaryType extends "EIP712Domain" | keyof TTypedData = keyof TTypedData>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
269
267
  /**
270
268
  * Returns the address of the inner object in a specific hexadecimal format.
271
269
  *
@@ -310,6 +308,20 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
310
308
  *
311
309
  * @param {Hex} key The private key in hexadecimal format
312
310
  * @returns {LocalAccountSigner<PrivateKeyAccount>} An instance of `LocalAccountSigner` initialized with the provided private key
313
- */ static privateKeyToAccountSigner(key: Hex): LocalAccountSigner<PrivateKeyAccount>;
311
+ */
312
+ static privateKeyToAccountSigner(key: Hex): LocalAccountSigner<PrivateKeyAccount>;
313
+ /**
314
+ * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.
315
+ *
316
+ * @example
317
+ * ```ts
318
+ * import { LocalAccountSigner } from "@aa-sdk/core";
319
+ *
320
+ * const signer = LocalAccountSigner.generatePrivateKeySigner();
321
+ * ```
322
+ *
323
+ * @returns {LocalAccountSigner<PrivateKeyAccount>} A `LocalAccountSigner` instance initialized with the generated private key account
324
+ */
325
+ static generatePrivateKeySigner(): LocalAccountSigner<PrivateKeyAccount>;
314
326
  }
315
327
  //# sourceMappingURL=local-account.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-account.d.ts","sourceRoot":"","sources":["../../../src/signer/local-account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,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AAM,CAAC,yBAAyB,CAC9B,GAAG,EAAE,GAAG,GACP,kBAAkB,CAAC,iBAAiB,CAAC;IAKxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,wBAAwB,IAAI,kBAAkB,CAAC,iBAAiB,CAAC;CAIzE"}
@@ -21,8 +21,6 @@ export interface SmartAccountSigner<Inner = any> {
21
21
  inner: Inner;
22
22
  getAddress: () => Promise<Address>;
23
23
  signMessage: (message: SignableMessage) => Promise<Hex>;
24
- signTypedData: <const TTypedData extends TypedData | {
25
- [key: string]: unknown;
26
- }, TPrimaryType extends string = string>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
24
+ signTypedData: <const TTypedData extends TypedData | Record<string, unknown>, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
27
25
  }
28
26
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EACV,GAAG,EACH,eAAe,EACf,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAC;AAGd;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,GAAG,GAAG,CAC7E,SAAQ,kBAAkB,CAAC,KAAK,CAAC;IACjC,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3D,cAAc,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;CAC5C;AAID;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IAEb,UAAU,EAAE,MAAM,O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GAAG,cAAc,GAAG,MAAM,UAAU,EAEzE,MAAM,EAAE,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,KAClD,OAAO,CAAC,GAAG,CAAC,CAAC;CACnB"}
@@ -98,7 +98,7 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
98
98
  * @param {TypedDataDefinition<TTypedData, TPrimaryType>} typedData The typed data to be signed
99
99
  * @returns {Promise<Hex>} A promise that resolves to a hex string representing the signed data
100
100
  */
101
- signTypedData: <const TTypedData extends {
101
+ signTypedData: <const TTypedData extends Record<string, unknown> | {
102
102
  [x: string]: readonly import("viem").TypedDataParameter[];
103
103
  [x: `string[${string}]`]: undefined;
104
104
  [x: `function[${string}]`]: undefined;
@@ -303,8 +303,6 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
303
303
  uint232?: undefined;
304
304
  uint240?: undefined;
305
305
  uint248?: undefined;
306
- } | {
307
- [key: string]: unknown;
308
- }, TPrimaryType extends string = string>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
306
+ }, TPrimaryType extends string | keyof TTypedData = string>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
309
307
  }
310
308
  //# sourceMappingURL=wallet-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallet-client.d.ts","sourceRoot":"","sources":["../../../src/signer/wallet-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;GAEG;AACH,qBAAa,kBAAmB,YAAW,kBAAkB,CAAC,YAAY,CAAC;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,MAAM,EAAE,YAAY,E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E,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC,CAKtE;IAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6HAKV,QAAQ,GAAG,CAAC,CASb;CACH"}
@@ -112,36 +112,6 @@ export interface UserOperationReceipt {
112
112
  logs: string[];
113
113
  receipt: TransactionReceipt;
114
114
  }
115
- /** @deprecated use viem type TransactionReceipt instead */
116
- export interface UserOperationReceiptObject {
117
- blockHash: Hash;
118
- blockNumber: BigNumberish;
119
- transactionIndex: BigNumberish;
120
- transactionHash: Hash;
121
- from: Address;
122
- to: Address;
123
- cumulativeGasUsed: BigNumberish;
124
- gasUsed: BigNumberish;
125
- contractAddress: Address;
126
- logs: UserOperationReceiptLog[];
127
- logsBloom: Hex;
128
- root: Hex;
129
- status: number;
130
- effectiveGasPrice: BigNumberish;
131
- type: string;
132
- }
133
- /** @deprecated use viem type Log instead */
134
- export interface UserOperationReceiptLog {
135
- blockHash: Hash;
136
- blockNumber: BigNumberish;
137
- transactionIndex: BigNumberish;
138
- address: Address;
139
- logIndex: BigNumberish;
140
- data: Hex;
141
- removed: boolean;
142
- topics: string[];
143
- transactionHash: Hash;
144
- }
145
115
  export interface UserOperationStruct_v6 {
146
116
  sender: string;
147
117
  nonce: BigNumberish;
@@ -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,EACl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G,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,kBAAkB,SAAS,OAAO,GAClC,sBAAsB,GACtB,kBAAkB,SAAS,OAAO,GAClC,sBAAsB,GACtB,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.0.0-beta.0";
1
+ export declare const VERSION = "4.0.0-beta.10";
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,iBAAiB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aa-sdk/core",
3
3
  "license": "MIT",
4
- "version": "4.0.0-beta.0",
4
+ "version": "4.0.0-beta.10",
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",
@@ -39,8 +39,7 @@
39
39
  "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/core",
40
40
  "clean": "rm -rf ./dist",
41
41
  "test": "vitest",
42
- "test:run": "vitest run",
43
- "test:run-e2e": "vitest run --config vitest.config.e2e.ts"
42
+ "test:run": "vitest run"
44
43
  },
45
44
  "devDependencies": {
46
45
  "dotenv": "^16.0.3",
@@ -52,11 +51,10 @@
52
51
  "dependencies": {
53
52
  "abitype": "^0.8.3",
54
53
  "eventemitter3": "^5.0.1",
55
- "viem": "2.20.0",
56
54
  "zod": "^3.22.4"
57
55
  },
58
56
  "peerDependencies": {
59
- "viem": "2.20.0"
57
+ "viem": "^2.20.0"
60
58
  },
61
59
  "repository": {
62
60
  "type": "git",
@@ -66,5 +64,5 @@
66
64
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
67
65
  },
68
66
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
69
- "gitHead": "5da6d98a0d16878652dd5bccdb1d3cebc6d86752"
67
+ "gitHead": "3429eb6a07e6a929a1c2069839a525135d081d3e"
70
68
  }
@@ -1,5 +1,8 @@
1
1
  import type { Chain, Client, Transport } from "viem";
2
- import type { SmartContractAccount } from "../../account/smartContractAccount.js";
2
+ import type {
3
+ GetEntryPointFromAccount,
4
+ SmartContractAccount,
5
+ } from "../../account/smartContractAccount.js";
3
6
  import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js";
4
7
  import { AccountNotFoundError } from "../../errors/account.js";
5
8
  import { IncompatibleClientError } from "../../errors/client.js";
@@ -10,6 +13,16 @@ import type {
10
13
  UserOperationContext,
11
14
  } from "./types";
12
15
 
16
+ export type CheckGasSponsorshipEligibilityResult<
17
+ TAccount extends SmartContractAccount | undefined =
18
+ | SmartContractAccount
19
+ | undefined,
20
+ TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
21
+ > = {
22
+ eligible: boolean;
23
+ request?: UserOperationStruct<TEntryPointVersion>;
24
+ };
25
+
13
26
  /**
14
27
  * This function verifies the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent.
15
28
  * Internally, this method invokes `buildUserOperation`, which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field.
@@ -19,7 +32,7 @@ import type {
19
32
  * ```ts
20
33
  * import { smartAccountClient } from "./smartAccountClient";
21
34
  * // [!code focus:99]
22
- * const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
35
+ * const { eligible } = await smartAccountClient.checkGasSponsorshipEligibility({
23
36
  * uo: {
24
37
  * data: "0xCalldata",
25
38
  * target: "0xTarget",
@@ -36,7 +49,7 @@ import type {
36
49
  *
37
50
  * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for making RPC calls
38
51
  * @param {SendUserOperationParameters} args containing the user operation, account, context, and overrides
39
- * @returns {Promise<boolean>} a Promise containing a boolean indicating if the account is elgibile for sponsorship
52
+ * @returns {Promise<CheckGasSponsorshipEligibilityResult<TAccount>>} a Promise containing a boolean indicating if the account is elgibile for sponsorship and the sponsored UO
40
53
  */
41
54
  export function checkGasSponsorshipEligibility<
42
55
  TTransport extends Transport = Transport,
@@ -50,7 +63,7 @@ export function checkGasSponsorshipEligibility<
50
63
  >(
51
64
  client: Client<TTransport, TChain, TAccount>,
52
65
  args: SendUserOperationParameters<TAccount, TContext>
53
- ): Promise<boolean> {
66
+ ): Promise<CheckGasSponsorshipEligibilityResult<TAccount>> {
54
67
  const { account = client.account, overrides, context } = args;
55
68
 
56
69
  if (!account) {
@@ -71,16 +84,20 @@ export function checkGasSponsorshipEligibility<
71
84
  overrides,
72
85
  context,
73
86
  })
74
- .then((userOperationStruct) =>
75
- account.getEntryPoint().version === "0.6.0"
76
- ? (userOperationStruct as UserOperationStruct<"0.6.0">)
77
- .paymasterAndData !== "0x" &&
78
- (userOperationStruct as UserOperationStruct<"0.6.0">)
79
- .paymasterAndData !== null
80
- : (userOperationStruct as UserOperationStruct<"0.7.0">)
81
- .paymasterData !== "0x" &&
82
- (userOperationStruct as UserOperationStruct<"0.7.0">)
83
- .paymasterData !== null
84
- )
85
- .catch(() => false);
87
+ .then((userOperationStruct) => ({
88
+ eligible:
89
+ account.getEntryPoint().version === "0.6.0"
90
+ ? (userOperationStruct as UserOperationStruct<"0.6.0">)
91
+ .paymasterAndData !== "0x" &&
92
+ (userOperationStruct as UserOperationStruct<"0.6.0">)
93
+ .paymasterAndData !== null
94
+ : (userOperationStruct as UserOperationStruct<"0.7.0">)
95
+ .paymasterData !== "0x" &&
96
+ (userOperationStruct as UserOperationStruct<"0.7.0">)
97
+ .paymasterData !== null,
98
+ request: userOperationStruct,
99
+ }))
100
+ .catch(() => ({
101
+ eligible: false,
102
+ }));
86
103
  }
@@ -24,5 +24,5 @@ export const signMessage: <
24
24
  if (!account) {
25
25
  throw new AccountNotFoundError();
26
26
  }
27
- return account.signMessage({ message });
27
+ return account.signMessageWith6492({ message });
28
28
  };
@@ -38,5 +38,5 @@ export const signTypedData: <
38
38
  throw new AccountNotFoundError();
39
39
  }
40
40
 
41
- return account.signTypedData(typedData);
41
+ return account.signTypedDataWith6492(typedData);
42
42
  };