@aa-sdk/core 4.0.0-alpha.1 → 4.0.0-alpha.2

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 (60) hide show
  1. package/dist/cjs/ens/utils.d.ts +1 -1
  2. package/dist/cjs/ens/utils.js +3 -3
  3. package/dist/cjs/ens/utils.js.map +1 -1
  4. package/dist/cjs/index.d.ts +1 -2
  5. package/dist/cjs/index.js +35 -58
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/signer/local-account.d.ts +2 -2
  8. package/dist/cjs/signer/wallet-client.d.ts +2 -2
  9. package/dist/cjs/utils/defaults.d.ts +1 -1
  10. package/dist/cjs/utils/defaults.js +25 -25
  11. package/dist/cjs/utils/defaults.js.map +1 -1
  12. package/dist/cjs/utils/index.d.ts +0 -3
  13. package/dist/cjs/utils/index.js +1 -25
  14. package/dist/cjs/utils/index.js.map +1 -1
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/cjs/version.js.map +1 -1
  18. package/dist/esm/ens/utils.d.ts +1 -1
  19. package/dist/esm/ens/utils.js +1 -1
  20. package/dist/esm/ens/utils.js.map +1 -1
  21. package/dist/esm/index.d.ts +1 -2
  22. package/dist/esm/index.js +1 -2
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/signer/local-account.d.ts +2 -2
  25. package/dist/esm/signer/wallet-client.d.ts +2 -2
  26. package/dist/esm/utils/defaults.d.ts +1 -1
  27. package/dist/esm/utils/defaults.js +2 -2
  28. package/dist/esm/utils/defaults.js.map +1 -1
  29. package/dist/esm/utils/index.d.ts +0 -3
  30. package/dist/esm/utils/index.js +0 -11
  31. package/dist/esm/utils/index.js.map +1 -1
  32. package/dist/esm/version.d.ts +1 -1
  33. package/dist/esm/version.js +1 -1
  34. package/dist/esm/version.js.map +1 -1
  35. package/dist/types/ens/utils.d.ts +1 -1
  36. package/dist/types/ens/utils.d.ts.map +1 -1
  37. package/dist/types/index.d.ts +1 -2
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/signer/local-account.d.ts +2 -2
  40. package/dist/types/signer/wallet-client.d.ts +2 -2
  41. package/dist/types/utils/defaults.d.ts +1 -1
  42. package/dist/types/utils/defaults.d.ts.map +1 -1
  43. package/dist/types/utils/index.d.ts +0 -10
  44. package/dist/types/utils/index.d.ts.map +1 -1
  45. package/dist/types/version.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/src/ens/utils.ts +1 -2
  48. package/src/index.ts +0 -23
  49. package/src/utils/defaults.ts +3 -4
  50. package/src/utils/index.ts +0 -23
  51. package/src/version.ts +1 -1
  52. package/dist/cjs/chains/index.d.ts +0 -20
  53. package/dist/cjs/chains/index.js +0 -169
  54. package/dist/cjs/chains/index.js.map +0 -1
  55. package/dist/esm/chains/index.d.ts +0 -20
  56. package/dist/esm/chains/index.js +0 -166
  57. package/dist/esm/chains/index.js.map +0 -1
  58. package/dist/types/chains/index.d.ts +0 -21
  59. package/dist/types/chains/index.d.ts.map +0 -1
  60. package/src/chains/index.ts +0 -194
@@ -22,7 +22,6 @@ export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
22
22
  export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
23
23
  export type * from "./actions/smartAccount/types.js";
24
24
  export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
25
- export { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "./chains/index.js";
26
25
  export type * from "./client/bundlerClient.js";
27
26
  export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
28
27
  export type * from "./client/decorators/bundlerClient.js";
@@ -60,4 +59,4 @@ export { WalletClientSigner } from "./signer/wallet-client.js";
60
59
  export { split, type SplitTransportParams } from "./transport/split.js";
61
60
  export type * from "./types.js";
62
61
  export type * from "./utils/index.js";
63
- export { AlchemyChainMap, BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getChain, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
62
+ export { BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
package/dist/esm/index.js CHANGED
@@ -16,7 +16,6 @@ export { sendTransaction } from "./actions/smartAccount/sendTransaction.js";
16
16
  export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
17
17
  export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
18
18
  export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
19
- export { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "./chains/index.js";
20
19
  export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
21
20
  export { bundlerActions } from "./client/decorators/bundlerClient.js";
22
21
  export { smartAccountClientActions } from "./client/decorators/smartAccountClient.js";
@@ -44,5 +43,5 @@ export { SignerSchema, isSigner } from "./signer/schema.js";
44
43
  export { wrapSignatureWith6492 } from "./signer/utils.js";
45
44
  export { WalletClientSigner } from "./signer/wallet-client.js";
46
45
  export { split } from "./transport/split.js";
47
- export { AlchemyChainMap, BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getChain, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
46
+ export { BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
48
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE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Ac,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAK5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAA6B,MAAM,sBAAsB,CAAC;AAGxE,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,SAAS,EACT,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,QAAQ,EACR,qCAAqC,EACrC,iCAAiC,EACjC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,kBAAkB,CAAC","sourcesContent":["export type { Abi } from \"abitype\";\nexport type { Address, HttpTransport } from \"viem\";\nexport * as chains from \"viem/chains\";\n\nexport { EntryPointAbi_v6 } from \"./abis/EntryPointAbi_v6.js\";\nexport { EntryPointAbi_v7 } from \"./abis/EntryPointAbi_v7.js\";\nexport { SimpleAccountAbi_v6 } from \"./abis/SimpleAccountAbi_v6.js\";\nexport { SimpleAccountAbi_v7 } from \"./abis/SimpleAccountAbi_v7.js\";\nexport { SimpleAccountFactoryAbi } from \"./abis/SimpleAccountFactoryAbi.js\";\nexport { BaseSmartContractAccount } from \"./account/base.js\";\nexport { createSimpleSmartAccount } from \"./account/simple.js\";\nexport type { SimpleSmartAccount } from \"./account/simple.js\";\nexport type * from \"./account/smartContractAccount.js\";\nexport {\n getAccountAddress,\n isSmartAccountWithSigner,\n parseFactoryAddressFromAccountInitCode,\n toSmartContractAccount,\n} from \"./account/smartContractAccount.js\";\nexport type {\n BaseSmartAccountParams,\n SignTypedDataParams,\n} from \"./account/types.js\";\nexport { buildUserOperation } from \"./actions/smartAccount/buildUserOperation.js\";\nexport { buildUserOperationFromTx } from \"./actions/smartAccount/buildUserOperationFromTx.js\";\nexport { buildUserOperationFromTxs } from \"./actions/smartAccount/buildUserOperationFromTxs.js\";\nexport { checkGasSponsorshipEligibility } from \"./actions/smartAccount/checkGasSponsorshipEligibility.js\";\nexport { dropAndReplaceUserOperation } from \"./actions/smartAccount/dropAndReplaceUserOperation.js\";\nexport { sendTransaction } from \"./actions/smartAccount/sendTransaction.js\";\nexport { sendTransactions } from \"./actions/smartAccount/sendTransactions.js\";\nexport { sendUserOperation } from \"./actions/smartAccount/sendUserOperation.js\";\nexport type * from \"./actions/smartAccount/types.js\";\nexport { waitForUserOperationTransaction } from \"./actions/smartAccount/waitForUserOperationTransacation.js\";\nexport {\n arbitrum,\n arbitrumGoerli,\n arbitrumSepolia,\n base,\n baseGoerli,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n goerli,\n mainnet,\n optimism,\n optimismGoerli,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"./chains/index.js\";\nexport type * from \"./client/bundlerClient.js\";\nexport {\n createBundlerClient,\n createBundlerClientFromExisting,\n} from \"./client/bundlerClient.js\";\nexport type * from \"./client/decorators/bundlerClient.js\";\nexport { bundlerActions } from \"./client/decorators/bundlerClient.js\";\nexport type * from \"./client/decorators/smartAccountClient.js\";\nexport { smartAccountClientActions } from \"./client/decorators/smartAccountClient.js\";\nexport { isSmartAccountClient } from \"./client/isSmartAccountClient.js\";\nexport {\n ConnectionConfigSchema,\n SmartAccountClientOptsSchema,\n} from \"./client/schema.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport {\n createSmartAccountClient,\n createSmartAccountClientFromExisting,\n} from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport {\n convertChainIdToCoinType,\n convertCoinTypeToChain,\n convertCoinTypeToChainId,\n} from \"./ens/utils.js\";\nexport {\n defaultEntryPointVersion,\n entryPointRegistry,\n getEntryPoint,\n isEntryPointVersion,\n} from \"./entrypoint/index.js\";\nexport type * from \"./entrypoint/types.js\";\nexport {\n AccountNotFoundError,\n AccountRequiresOwnerError,\n BatchExecutionNotSupportedError,\n DefaultFactoryNotDefinedError,\n FailedToGetStorageSlotError,\n GetCounterFactualAddressError,\n IncorrectAccountType,\n SignTransactionNotSupportedError,\n SmartAccountWithSignerRequiredError,\n UpgradeToAndCallNotSupportedError,\n UpgradesNotSupportedError,\n} from \"./errors/account.js\";\nexport { BaseError } from \"./errors/base.js\";\nexport {\n ChainNotFoundError,\n IncompatibleClientError,\n InvalidRpcUrlError,\n} from \"./errors/client.js\";\nexport {\n EntryPointNotFoundError,\n InvalidEntryPointError,\n} from \"./errors/entrypoint.js\";\nexport { InvalidSignerTypeError } from \"./errors/signer.js\";\nexport {\n FailedToFindTransactionError,\n TransactionMissingToParamError,\n} from \"./errors/transaction.js\";\nexport {\n InvalidUserOperationError,\n WaitForUserOperationError,\n} from \"./errors/useroperation.js\";\nexport { LogLevel, Logger } from \"./logger.js\";\nexport { middlewareActions } from \"./middleware/actions.js\";\nexport { defaultFeeEstimator } from \"./middleware/defaults/feeEstimator.js\";\nexport { defaultGasEstimator } from \"./middleware/defaults/gasEstimator.js\";\nexport { defaultPaymasterAndData } from \"./middleware/defaults/paymasterAndData.js\";\nexport { defaultUserOpSigner } from \"./middleware/defaults/userOpSigner.js\";\nexport { noopMiddleware } from \"./middleware/noopMiddleware.js\";\nexport type * from \"./middleware/types.js\";\nexport { LocalAccountSigner } from \"./signer/local-account.js\";\nexport { SignerSchema, isSigner } from \"./signer/schema.js\";\nexport type {\n SmartAccountAuthenticator,\n SmartAccountSigner,\n} from \"./signer/types.js\";\nexport { wrapSignatureWith6492 } from \"./signer/utils.js\";\nexport { WalletClientSigner } from \"./signer/wallet-client.js\";\nexport { split, type SplitTransportParams } from \"./transport/split.js\";\nexport type * from \"./types.js\";\nexport type * from \"./utils/index.js\";\nexport {\n AlchemyChainMap,\n BigNumberishRangeSchema,\n BigNumberishSchema,\n ChainSchema,\n HexSchema,\n MultiplierSchema,\n allEqual,\n applyUserOpFeeOption,\n applyUserOpOverride,\n applyUserOpOverrideOrFeeOption,\n asyncPipe,\n bigIntMax,\n bigIntMultiply,\n bypassPaymasterAndData,\n bypassPaymasterAndDataEmptyHex,\n concatPaymasterAndData,\n deepHexlify,\n filterUndefined,\n getChain,\n getDefaultSimpleAccountFactoryAddress,\n getDefaultUserOperationFeeOptions,\n isBigNumberish,\n isMultiplier,\n isValidRequest,\n parsePaymasterAndData,\n pick,\n resolveProperties,\n takeBytes,\n toRecord,\n} from \"./utils/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sCAAsC,EACtC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;A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qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,kBAAkB,CAAC","sourcesContent":["export type { Abi } from \"abitype\";\nexport type { Address, HttpTransport } from \"viem\";\nexport * as chains from \"viem/chains\";\n\nexport { EntryPointAbi_v6 } from \"./abis/EntryPointAbi_v6.js\";\nexport { EntryPointAbi_v7 } from \"./abis/EntryPointAbi_v7.js\";\nexport { SimpleAccountAbi_v6 } from \"./abis/SimpleAccountAbi_v6.js\";\nexport { SimpleAccountAbi_v7 } from \"./abis/SimpleAccountAbi_v7.js\";\nexport { SimpleAccountFactoryAbi } from \"./abis/SimpleAccountFactoryAbi.js\";\nexport { BaseSmartContractAccount } from \"./account/base.js\";\nexport { createSimpleSmartAccount } from \"./account/simple.js\";\nexport type { SimpleSmartAccount } from \"./account/simple.js\";\nexport type * from \"./account/smartContractAccount.js\";\nexport {\n getAccountAddress,\n isSmartAccountWithSigner,\n parseFactoryAddressFromAccountInitCode,\n toSmartContractAccount,\n} from \"./account/smartContractAccount.js\";\nexport type {\n BaseSmartAccountParams,\n SignTypedDataParams,\n} from \"./account/types.js\";\nexport { buildUserOperation } from \"./actions/smartAccount/buildUserOperation.js\";\nexport { buildUserOperationFromTx } from \"./actions/smartAccount/buildUserOperationFromTx.js\";\nexport { buildUserOperationFromTxs } from \"./actions/smartAccount/buildUserOperationFromTxs.js\";\nexport { checkGasSponsorshipEligibility } from \"./actions/smartAccount/checkGasSponsorshipEligibility.js\";\nexport { dropAndReplaceUserOperation } from \"./actions/smartAccount/dropAndReplaceUserOperation.js\";\nexport { sendTransaction } from \"./actions/smartAccount/sendTransaction.js\";\nexport { sendTransactions } from \"./actions/smartAccount/sendTransactions.js\";\nexport { sendUserOperation } from \"./actions/smartAccount/sendUserOperation.js\";\nexport type * from \"./actions/smartAccount/types.js\";\nexport { waitForUserOperationTransaction } from \"./actions/smartAccount/waitForUserOperationTransacation.js\";\nexport type * from \"./client/bundlerClient.js\";\nexport {\n createBundlerClient,\n createBundlerClientFromExisting,\n} from \"./client/bundlerClient.js\";\nexport type * from \"./client/decorators/bundlerClient.js\";\nexport { bundlerActions } from \"./client/decorators/bundlerClient.js\";\nexport type * from \"./client/decorators/smartAccountClient.js\";\nexport { smartAccountClientActions } from \"./client/decorators/smartAccountClient.js\";\nexport { isSmartAccountClient } from \"./client/isSmartAccountClient.js\";\nexport {\n ConnectionConfigSchema,\n SmartAccountClientOptsSchema,\n} from \"./client/schema.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport {\n createSmartAccountClient,\n createSmartAccountClientFromExisting,\n} from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport {\n convertChainIdToCoinType,\n convertCoinTypeToChain,\n convertCoinTypeToChainId,\n} from \"./ens/utils.js\";\nexport {\n defaultEntryPointVersion,\n entryPointRegistry,\n getEntryPoint,\n isEntryPointVersion,\n} from \"./entrypoint/index.js\";\nexport type * from \"./entrypoint/types.js\";\nexport {\n AccountNotFoundError,\n AccountRequiresOwnerError,\n BatchExecutionNotSupportedError,\n DefaultFactoryNotDefinedError,\n FailedToGetStorageSlotError,\n GetCounterFactualAddressError,\n IncorrectAccountType,\n SignTransactionNotSupportedError,\n SmartAccountWithSignerRequiredError,\n UpgradeToAndCallNotSupportedError,\n UpgradesNotSupportedError,\n} from \"./errors/account.js\";\nexport { BaseError } from \"./errors/base.js\";\nexport {\n ChainNotFoundError,\n IncompatibleClientError,\n InvalidRpcUrlError,\n} from \"./errors/client.js\";\nexport {\n EntryPointNotFoundError,\n InvalidEntryPointError,\n} from \"./errors/entrypoint.js\";\nexport { InvalidSignerTypeError } from \"./errors/signer.js\";\nexport {\n FailedToFindTransactionError,\n TransactionMissingToParamError,\n} from \"./errors/transaction.js\";\nexport {\n InvalidUserOperationError,\n WaitForUserOperationError,\n} from \"./errors/useroperation.js\";\nexport { LogLevel, Logger } from \"./logger.js\";\nexport { middlewareActions } from \"./middleware/actions.js\";\nexport { defaultFeeEstimator } from \"./middleware/defaults/feeEstimator.js\";\nexport { defaultGasEstimator } from \"./middleware/defaults/gasEstimator.js\";\nexport { defaultPaymasterAndData } from \"./middleware/defaults/paymasterAndData.js\";\nexport { defaultUserOpSigner } from \"./middleware/defaults/userOpSigner.js\";\nexport { noopMiddleware } from \"./middleware/noopMiddleware.js\";\nexport type * from \"./middleware/types.js\";\nexport { LocalAccountSigner } from \"./signer/local-account.js\";\nexport { SignerSchema, isSigner } from \"./signer/schema.js\";\nexport type {\n SmartAccountAuthenticator,\n SmartAccountSigner,\n} from \"./signer/types.js\";\nexport { wrapSignatureWith6492 } from \"./signer/utils.js\";\nexport { WalletClientSigner } from \"./signer/wallet-client.js\";\nexport { split, type SplitTransportParams } from \"./transport/split.js\";\nexport type * from \"./types.js\";\nexport type * from \"./utils/index.js\";\nexport {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n ChainSchema,\n HexSchema,\n MultiplierSchema,\n allEqual,\n applyUserOpFeeOption,\n applyUserOpOverride,\n applyUserOpOverrideOrFeeOption,\n asyncPipe,\n bigIntMax,\n bigIntMultiply,\n bypassPaymasterAndData,\n bypassPaymasterAndDataEmptyHex,\n concatPaymasterAndData,\n deepHexlify,\n filterUndefined,\n getDefaultSimpleAccountFactoryAddress,\n getDefaultUserOperationFeeOptions,\n isBigNumberish,\n isMultiplier,\n isValidRequest,\n parsePaymasterAndData,\n pick,\n resolveProperties,\n takeBytes,\n toRecord,\n} from \"./utils/index.js\";\n"]}
@@ -32,13 +32,13 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
32
32
  [x: `bytes9[${string}]`]: undefined;
33
33
  [x: `bytes10[${string}]`]: undefined;
34
34
  [x: `bytes25[${string}]`]: undefined;
35
- [x: `bytes18[${string}]`]: undefined;
36
35
  [x: `bytes12[${string}]`]: undefined;
37
36
  [x: `bytes13[${string}]`]: undefined;
38
37
  [x: `bytes14[${string}]`]: undefined;
39
38
  [x: `bytes15[${string}]`]: undefined;
40
39
  [x: `bytes16[${string}]`]: undefined;
41
40
  [x: `bytes17[${string}]`]: undefined;
41
+ [x: `bytes18[${string}]`]: undefined;
42
42
  [x: `bytes19[${string}]`]: undefined;
43
43
  [x: `bytes20[${string}]`]: undefined;
44
44
  [x: `bytes21[${string}]`]: undefined;
@@ -134,13 +134,13 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
134
134
  bytes9?: undefined;
135
135
  bytes10?: undefined;
136
136
  bytes25?: undefined;
137
- bytes18?: undefined;
138
137
  bytes12?: undefined;
139
138
  bytes13?: undefined;
140
139
  bytes14?: undefined;
141
140
  bytes15?: undefined;
142
141
  bytes16?: undefined;
143
142
  bytes17?: undefined;
143
+ bytes18?: undefined;
144
144
  bytes19?: undefined;
145
145
  bytes20?: undefined;
146
146
  bytes21?: undefined;
@@ -33,13 +33,13 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
33
33
  [x: `bytes9[${string}]`]: undefined;
34
34
  [x: `bytes10[${string}]`]: undefined;
35
35
  [x: `bytes25[${string}]`]: undefined;
36
- [x: `bytes18[${string}]`]: undefined;
37
36
  [x: `bytes12[${string}]`]: undefined;
38
37
  [x: `bytes13[${string}]`]: undefined;
39
38
  [x: `bytes14[${string}]`]: undefined;
40
39
  [x: `bytes15[${string}]`]: undefined;
41
40
  [x: `bytes16[${string}]`]: undefined;
42
41
  [x: `bytes17[${string}]`]: undefined;
42
+ [x: `bytes18[${string}]`]: undefined;
43
43
  [x: `bytes19[${string}]`]: undefined;
44
44
  [x: `bytes20[${string}]`]: undefined;
45
45
  [x: `bytes21[${string}]`]: undefined;
@@ -135,13 +135,13 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
135
135
  bytes9?: undefined;
136
136
  bytes10?: undefined;
137
137
  bytes25?: undefined;
138
- bytes18?: undefined;
139
138
  bytes12?: undefined;
140
139
  bytes13?: undefined;
141
140
  bytes14?: undefined;
142
141
  bytes15?: undefined;
143
142
  bytes16?: undefined;
144
143
  bytes17?: undefined;
144
+ bytes18?: undefined;
145
145
  bytes19?: undefined;
146
146
  bytes20?: undefined;
147
147
  bytes21?: undefined;
@@ -1,6 +1,6 @@
1
1
  import { type Address, type Chain } from "viem";
2
2
  import type { EntryPointVersion } from "../entrypoint/types.js";
3
- import type { UserOperationFeeOptions } from "../types";
3
+ import type { UserOperationFeeOptions } from "../types.js";
4
4
  export declare const getDefaultSimpleAccountFactoryAddress: (chain: Chain, version?: EntryPointVersion) => Address;
5
5
  export declare const minPriorityFeePerBidDefaults: Map<number, bigint>;
6
6
  export declare const getDefaultUserOperationFeeOptions: (chain: Chain) => UserOperationFeeOptions;
@@ -1,5 +1,5 @@
1
1
  import {} from "viem";
2
- import { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "../chains/index.js";
2
+ import { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "viem/chains";
3
3
  import { defaultEntryPointVersion } from "../entrypoint/index.js";
4
4
  import { DefaultFactoryNotDefinedError } from "../errors/account.js";
5
5
  export const getDefaultSimpleAccountFactoryAddress = (chain, version = defaultEntryPointVersion) => {
@@ -17,7 +17,7 @@ export const getDefaultSimpleAccountFactoryAddress = (chain, version = defaultEn
17
17
  case baseGoerli.id:
18
18
  case baseSepolia.id:
19
19
  case fraxtal.id:
20
- case fraxtalSepolia.id:
20
+ case 2523:
21
21
  case zora.id:
22
22
  case zoraSepolia.id:
23
23
  return "0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232";
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,MAAM,CAA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B,KAAK,cAAc,CAAC,EAAE;oBACpB,OAAO,4CAA4C,CAAC;gBACtD;oBACE,MAAM;YACV,CAAC;YACD,MAAM;QACR,KAAK,OAAO;YACV,QAAQ,KAAK,CAAC,EAAE,EAAE,CAAC;gBACjB;oBACE,OAAO,4CAA4C,CAAC;YACxD,CAAC;IACL,CAAC;IAED,MAAM,IAAI,6BAA6B,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAiB;IAClE,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAW,CAAC;IAC1B,CAAC,cAAc,CAAC,EAAE,EAAE,SAAW,CAAC;IAChC,CAAC,eAAe,CAAC,EAAE,EAAE,SAAW,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,KAAY,EACa,EAAE;IAC3B,OAAO;QACL,oBAAoB,EAAE;YACpB,GAAG,EAAE,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,UAAY;YAC/D,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { type Address, type Chain } from \"viem\";\nimport {\n arbitrum,\n arbitrumGoerli,\n arbitrumSepolia,\n base,\n baseGoerli,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n goerli,\n mainnet,\n optimism,\n optimismGoerli,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"../chains/index.js\";\nimport { defaultEntryPointVersion } from \"../entrypoint/index.js\";\nimport type { EntryPointVersion } from \"../entrypoint/types.js\";\nimport { DefaultFactoryNotDefinedError } from \"../errors/account.js\";\nimport type { UserOperationFeeOptions } from \"../types\";\n\n/**\n * Utility method returning the default simple account factory address given a {@link Chain} object\n *\n * @param chain - a {@link Chain} object\n * @param version - {@link EntryPointVersion} value that defaults to `defaultEntryPointVersion`\n * @returns a {@link abi.Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultSimpleAccountFactoryAddress = (\n chain: Chain,\n version: EntryPointVersion = defaultEntryPointVersion\n): Address => {\n switch (version) {\n case \"0.6.0\":\n switch (chain.id) {\n case mainnet.id:\n case polygon.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n case baseGoerli.id:\n case baseSepolia.id:\n case fraxtal.id:\n case fraxtalSepolia.id:\n case zora.id:\n case zoraSepolia.id:\n return \"0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232\";\n case sepolia.id:\n case goerli.id:\n case polygonMumbai.id:\n case optimismGoerli.id:\n case arbitrumGoerli.id:\n return \"0x9406Cc6185a346906296840746125a0E44976454\";\n default:\n break;\n }\n break;\n case \"0.7.0\":\n switch (chain.id) {\n default:\n return \"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985\";\n }\n }\n\n throw new DefaultFactoryNotDefinedError(\"SimpleAccount\", chain, version);\n};\n\nexport const minPriorityFeePerBidDefaults = new Map<number, bigint>([\n [arbitrum.id, 10_000_000n],\n [arbitrumGoerli.id, 10_000_000n],\n [arbitrumSepolia.id, 10_000_000n],\n]);\n\nexport const getDefaultUserOperationFeeOptions = (\n chain: Chain\n): UserOperationFeeOptions => {\n return {\n maxPriorityFeePerGas: {\n min: minPriorityFeePerBidDefaults.get(chain.id) ?? 100_000_000n,\n multiplier: 1.33,\n },\n };\n};\n"]}
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,MAAM,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,IAAI,EACJ,UAAU,EACV,WAAW,EACX,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd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AAO,4CAA4C,CAAC;YACxD,CAAC;IACL,CAAC;IAED,MAAM,IAAI,6BAA6B,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAiB;IAClE,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAW,CAAC;IAC1B,CAAC,cAAc,CAAC,EAAE,EAAE,SAAW,CAAC;IAChC,CAAC,eAAe,CAAC,EAAE,EAAE,SAAW,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,KAAY,EACa,EAAE;IAC3B,OAAO;QACL,oBAAoB,EAAE;YACpB,GAAG,EAAE,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,UAAY;YAC/D,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { type Address, type Chain } from \"viem\";\nimport {\n arbitrum,\n arbitrumGoerli,\n arbitrumSepolia,\n base,\n baseGoerli,\n baseSepolia,\n fraxtal,\n goerli,\n mainnet,\n optimism,\n optimismGoerli,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"viem/chains\";\nimport { defaultEntryPointVersion } from \"../entrypoint/index.js\";\nimport type { EntryPointVersion } from \"../entrypoint/types.js\";\nimport { DefaultFactoryNotDefinedError } from \"../errors/account.js\";\nimport type { UserOperationFeeOptions } from \"../types.js\";\n\n/**\n * Utility method returning the default simple account factory address given a {@link Chain} object\n *\n * @param chain - a {@link Chain} object\n * @param version - {@link EntryPointVersion} value that defaults to `defaultEntryPointVersion`\n * @returns a {@link abi.Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultSimpleAccountFactoryAddress = (\n chain: Chain,\n version: EntryPointVersion = defaultEntryPointVersion\n): Address => {\n switch (version) {\n case \"0.6.0\":\n switch (chain.id) {\n case mainnet.id:\n case polygon.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n case baseGoerli.id:\n case baseSepolia.id:\n case fraxtal.id:\n case 2523:\n case zora.id:\n case zoraSepolia.id:\n return \"0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232\";\n case sepolia.id:\n case goerli.id:\n case polygonMumbai.id:\n case optimismGoerli.id:\n case arbitrumGoerli.id:\n return \"0x9406Cc6185a346906296840746125a0E44976454\";\n default:\n break;\n }\n break;\n case \"0.7.0\":\n switch (chain.id) {\n default:\n return \"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985\";\n }\n }\n\n throw new DefaultFactoryNotDefinedError(\"SimpleAccount\", chain, version);\n};\n\nexport const minPriorityFeePerBidDefaults = new Map<number, bigint>([\n [arbitrum.id, 10_000_000n],\n [arbitrumGoerli.id, 10_000_000n],\n [arbitrumSepolia.id, 10_000_000n],\n]);\n\nexport const getDefaultUserOperationFeeOptions = (\n chain: Chain\n): UserOperationFeeOptions => {\n return {\n maxPriorityFeePerGas: {\n min: minPriorityFeePerBidDefaults.get(chain.id) ?? 100_000_000n,\n multiplier: 1.33,\n },\n };\n};\n"]}
@@ -1,8 +1,5 @@
1
- import type { Chain } from "viem";
2
1
  import type { PromiseOrValue } from "../types.js";
3
2
  import type { RecordableKeys } from "./types.js";
4
- export declare const AlchemyChainMap: Map<number, Chain>;
5
- export declare const getChain: (chainId: number) => Chain;
6
3
  export declare const asyncPipe: <S, O, F>(...fns: ((s: S, o?: O | undefined, f?: F | undefined) => Promise<S>)[]) => (s: S, o?: O | undefined, f?: F | undefined) => Promise<S>;
7
4
  export type Deferrable<T> = {
8
5
  [K in keyof T]: PromiseOrValue<T[K]>;
@@ -1,15 +1,4 @@
1
1
  import { toHex } from "viem";
2
- import * as chains from "viem/chains";
3
- import * as alchemyChains from "../chains/index.js";
4
- export const AlchemyChainMap = new Map(Object.values(alchemyChains).map((c) => [c.id, c]));
5
- export const getChain = (chainId) => {
6
- for (const chain of Object.values(chains)) {
7
- if (chain.id === chainId) {
8
- return AlchemyChainMap.get(chain.id) ?? chain;
9
- }
10
- }
11
- throw new Error("could not find chain");
12
- };
13
2
  export const asyncPipe = (...fns) => async (s, o, f) => {
14
3
  let result = s;
15
4
  for (const fn of fns) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AAIpD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CACpC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CACnD,CAAC;AASF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAS,EAAE;IACjD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1C,IAAI,KAAK,CAAC,EAAE,KAAK,OAAO,EAAE,CAAC;YACzB,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC;QAChD,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,SAAS,GACpB,CAAU,GAAG,GAA2C,EAAE,EAAE,CAC5D,KAAK,EAAE,CAAI,EAAE,CAAK,EAAE,CAAK,EAAE,EAAE;IAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;Q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MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAa,EAAW,EAAE;IACpD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AASF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,SAA2B,EAC3B,KAAuB,EACC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAsB9E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAKtB,KAAU,EACV,QAAW,EACX,EAAkB,EACD,EAAE,CACnB,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACzB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC","sourcesContent":["import type { Chain } from \"viem\";\nimport { toHex } from \"viem\";\nimport * as chains from \"viem/chains\";\nimport * as alchemyChains from \"../chains/index.js\";\nimport type { PromiseOrValue } from \"../types.js\";\nimport type { RecordableKeys } from \"./types.js\";\n\nexport const AlchemyChainMap = new Map<number, Chain>(\n Object.values(alchemyChains).map((c) => [c.id, c])\n);\n\n/**\n * Utility method for converting a chainId to a {@link Chain} object\n *\n * @param chainId - the chainId to convert\n * @returns a {@link Chain} object for the given chainId\n * @throws if the chainId is not found\n */\nexport const getChain = (chainId: number): Chain => {\n for (const chain of Object.values(chains)) {\n if (chain.id === chainId) {\n return AlchemyChainMap.get(chain.id) ?? chain;\n }\n }\n throw new Error(\"could not find chain\");\n};\n\n/**\n * Utility function that allows for piping a series of async functions together\n *\n * @param fns - functions to pipe\n * @returns result of the pipe\n */\nexport const asyncPipe =\n <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>\n async (s: S, o?: O, f?: F) => {\n let result = s;\n for (const fn of fns) {\n result = await fn(result, o, f);\n }\n return result;\n };\n\n// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers\nexport type Deferrable<T> = {\n [K in keyof T]: PromiseOrValue<T[K]>;\n};\n\n/**\n * Await all of the properties of a {@link Deferrable} object\n *\n * @param object - a {@link Deferrable} object\n * @returns the object with its properties resolved\n */\nexport async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {\n const promises = Object.keys(object).map((key) => {\n const value = object[key as keyof Deferrable<T>];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return filterUndefined<T>(\n results.reduce((accum, curr) => {\n accum[curr.key as keyof T] = curr.value;\n return accum;\n }, {} as T)\n );\n}\n\n/**\n * Recursively converts all values in an object to hex strings\n *\n * @param obj - obj to deep hexlify\n * @returns object with all of its values hexlified\n */\nexport function deepHexlify(obj: any): any {\n if (typeof obj === \"function\") {\n return undefined;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce(\n (set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key]),\n }),\n {}\n );\n}\n\n/**\n * Filters out properties with undefined or null values from the provided object.\n *\n * @example\n * ```ts\n * import { filterUndefined } from \"@aa-sdk/core\";\n *\n * const result = filterUndefined({\n * foo: undefined,\n * bar: null,\n * baz: \"baz\",\n * }); // { baz: \"baz\" }\n * ```\n *\n * @param {T} obj the object from which to remove properties with undefined or null values\n * @returns {T} the object with undefined or null properties removed\n */\nexport function filterUndefined<T>(obj: T): T {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj as T;\n}\n\n/**\n * Picks the specified keys from an object and returns a new object containing only those key-value pairs.\n *\n * @example\n * ```ts\n * import { pick } from \"@aa-sdk/core\";\n *\n * const picked = pick({\n * foo: \"foo\",\n * bar: \"bar\",\n * }, [\"foo\"]); // { foo: \"foo\" }\n * ```\n *\n * @param {Record<string, unknown>} obj The object from which to pick keys\n * @param {string|string[]} keys A single key or an array of keys to pick from the object\n * @returns {Record<string, unknown>} A new object containing only the picked key-value pairs\n */\nexport function pick(obj: Record<string, unknown>, keys: string | string[]) {\n return Object.keys(obj)\n .filter((k) => keys.includes(k))\n .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {});\n}\n\n/**\n * Utility method for checking if the passed in values are all equal (strictly)\n *\n * @param params - values to check\n * @returns a boolean indicating if all values are the same\n * @throws if no values are passed in\n */\nexport const allEqual = (...params: any[]): boolean => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v) => v === params[0]);\n};\n\n/**\n * Utility method for checking the condition and return the value if condition holds true, undefined if not.\n *\n * @param condition - condition to check\n * @param value - value to return when condition holds true\n * @returns the value if condition holds true, undefined if not\n */\nexport const conditionalReturn = <T>(\n condition: Promise<boolean>,\n value: () => Promise<T>\n): Promise<T | undefined> => condition.then((t) => (t ? value() : undefined));\n\n/**\n * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function.\n *\n * @example\n * ```ts\n * import { toRecord } from \"@aa-sdk/core\";\n * import { sepolia, mainnet } from \"viem/chains\";\n *\n * const addressesByChain = toRecord(\n * [sepolia, mainnet],\n * \"id\",\n * () => \"0x...\"\n * ); // { [sepolia.id]: \"0x...\", [mainnet.id]: \"0x...\" }\n * ```\n *\n * @param {T[]} array The array of objects to convert to a record\n * @param {K} selector The key used to select the property that will become the record's key\n * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value\n * @returns {Record<T[K], V>} The resulting record object\n */\nexport const toRecord = <\n T extends { [K in RecordableKeys<T>]: string | number | symbol },\n K extends RecordableKeys<T>,\n V\n>(\n array: T[],\n selector: K,\n fn: (item: T) => V\n): Record<T[K], V> =>\n array.reduce((acc, item) => {\n acc[item[selector]] = fn(item);\n return acc;\n }, {} as Record<T[K], V>);\n\nexport * from \"./bigint.js\";\nexport * from \"./bytes.js\";\nexport * from \"./defaults.js\";\nexport * from \"./schema.js\";\nexport type * from \"./types.js\";\nexport * from \"./userop.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAU7B,MAAM,CAAC,MAAM,SAAS,GACpB,CAAU,GAAG,GAA2C,EAAE,EAAE,CAC5D,KAAK,EAAE,CAAI,EAAE,CAAK,EAAE,CAAK,EAAE,EAAE;IAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAaJ,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,MAAqB;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,GAA0B,CAAC,CAAC;QACjD,OAAO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SAA2B,EAC3B,KAAuB,EACC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAsB9E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAKtB,KAAU,EACV,QAAW,EACX,EAAkB,EACD,EAAE,CACnB,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACzB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC","sourcesContent":["import { toHex } from \"viem\";\nimport type { PromiseOrValue } from \"../types.js\";\nimport type { RecordableKeys } from \"./types.js\";\n\n/**\n * Utility function that allows for piping a series of async functions together\n *\n * @param fns - functions to pipe\n * @returns result of the pipe\n */\nexport const asyncPipe =\n <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>\n async (s: S, o?: O, f?: F) => {\n let result = s;\n for (const fn of fns) {\n result = await fn(result, o, f);\n }\n return result;\n };\n\n// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers\nexport type Deferrable<T> = {\n [K in keyof T]: PromiseOrValue<T[K]>;\n};\n\n/**\n * Await all of the properties of a {@link Deferrable} object\n *\n * @param object - a {@link Deferrable} object\n * @returns the object with its properties resolved\n */\nexport async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {\n const promises = Object.keys(object).map((key) => {\n const value = object[key as keyof Deferrable<T>];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n\n const results = await Promise.all(promises);\n\n return filterUndefined<T>(\n results.reduce((accum, curr) => {\n accum[curr.key as keyof T] = curr.value;\n return accum;\n }, {} as T)\n );\n}\n\n/**\n * Recursively converts all values in an object to hex strings\n *\n * @param obj - obj to deep hexlify\n * @returns object with all of its values hexlified\n */\nexport function deepHexlify(obj: any): any {\n if (typeof obj === \"function\") {\n return undefined;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce(\n (set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key]),\n }),\n {}\n );\n}\n\n/**\n * Filters out properties with undefined or null values from the provided object.\n *\n * @example\n * ```ts\n * import { filterUndefined } from \"@aa-sdk/core\";\n *\n * const result = filterUndefined({\n * foo: undefined,\n * bar: null,\n * baz: \"baz\",\n * }); // { baz: \"baz\" }\n * ```\n *\n * @param {T} obj the object from which to remove properties with undefined or null values\n * @returns {T} the object with undefined or null properties removed\n */\nexport function filterUndefined<T>(obj: T): T {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj as T;\n}\n\n/**\n * Picks the specified keys from an object and returns a new object containing only those key-value pairs.\n *\n * @example\n * ```ts\n * import { pick } from \"@aa-sdk/core\";\n *\n * const picked = pick({\n * foo: \"foo\",\n * bar: \"bar\",\n * }, [\"foo\"]); // { foo: \"foo\" }\n * ```\n *\n * @param {Record<string, unknown>} obj The object from which to pick keys\n * @param {string|string[]} keys A single key or an array of keys to pick from the object\n * @returns {Record<string, unknown>} A new object containing only the picked key-value pairs\n */\nexport function pick(obj: Record<string, unknown>, keys: string | string[]) {\n return Object.keys(obj)\n .filter((k) => keys.includes(k))\n .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {});\n}\n\n/**\n * Utility method for checking if the passed in values are all equal (strictly)\n *\n * @param params - values to check\n * @returns a boolean indicating if all values are the same\n * @throws if no values are passed in\n */\nexport const allEqual = (...params: any[]): boolean => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v) => v === params[0]);\n};\n\n/**\n * Utility method for checking the condition and return the value if condition holds true, undefined if not.\n *\n * @param condition - condition to check\n * @param value - value to return when condition holds true\n * @returns the value if condition holds true, undefined if not\n */\nexport const conditionalReturn = <T>(\n condition: Promise<boolean>,\n value: () => Promise<T>\n): Promise<T | undefined> => condition.then((t) => (t ? value() : undefined));\n\n/**\n * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function.\n *\n * @example\n * ```ts\n * import { toRecord } from \"@aa-sdk/core\";\n * import { sepolia, mainnet } from \"viem/chains\";\n *\n * const addressesByChain = toRecord(\n * [sepolia, mainnet],\n * \"id\",\n * () => \"0x...\"\n * ); // { [sepolia.id]: \"0x...\", [mainnet.id]: \"0x...\" }\n * ```\n *\n * @param {T[]} array The array of objects to convert to a record\n * @param {K} selector The key used to select the property that will become the record's key\n * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value\n * @returns {Record<T[K], V>} The resulting record object\n */\nexport const toRecord = <\n T extends { [K in RecordableKeys<T>]: string | number | symbol },\n K extends RecordableKeys<T>,\n V\n>(\n array: T[],\n selector: K,\n fn: (item: T) => V\n): Record<T[K], V> =>\n array.reduce((acc, item) => {\n acc[item[selector]] = fn(item);\n return acc;\n }, {} as Record<T[K], V>);\n\nexport * from \"./bigint.js\";\nexport * from \"./bytes.js\";\nexport * from \"./defaults.js\";\nexport * from \"./schema.js\";\nexport type * from \"./types.js\";\nexport * from \"./userop.js\";\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.0-alpha.1";
1
+ export declare const VERSION = "4.0.0-alpha.2";
@@ -1,2 +1,2 @@
1
- export const VERSION = "4.0.0-alpha.1";
1
+ export const VERSION = "4.0.0-alpha.2";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,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-alpha.1\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,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-alpha.2\";\n"]}
@@ -1,5 +1,5 @@
1
- import type { Chain } from "viem/chains";
2
1
  import * as chains from "viem/chains";
2
+ import { type Chain } from "viem/chains";
3
3
  export declare const ChainsById: Map<number, chains.Chain>;
4
4
  /**
5
5
  * Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAGtC,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAEhD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,MAQ1D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,KAAG,MAQ3D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,KAQzD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAEhD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,MAQ1D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,KAAG,MAQ3D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,KAQzD,CAAC"}
@@ -22,7 +22,6 @@ export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
22
22
  export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
23
23
  export type * from "./actions/smartAccount/types.js";
24
24
  export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
25
- export { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "./chains/index.js";
26
25
  export type * from "./client/bundlerClient.js";
27
26
  export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
28
27
  export type * from "./client/decorators/bundlerClient.js";
@@ -60,5 +59,5 @@ export { WalletClientSigner } from "./signer/wallet-client.js";
60
59
  export { split, type SplitTransportParams } from "./transport/split.js";
61
60
  export type * from "./types.js";
62
61
  export type * from "./utils/index.js";
63
- export { AlchemyChainMap, BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getChain, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
62
+ export { BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
64
63
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,mBAAmB,mCAAmC,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sCAA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ytes10[${string}]`]: undefined;
37
37
  [x: `bytes25[${string}]`]: undefined;
38
- [x: `bytes18[${string}]`]: undefined;
39
38
  [x: `bytes12[${string}]`]: undefined;
40
39
  [x: `bytes13[${string}]`]: undefined;
41
40
  [x: `bytes14[${string}]`]: undefined;
42
41
  [x: `bytes15[${string}]`]: undefined;
43
42
  [x: `bytes16[${string}]`]: undefined;
44
43
  [x: `bytes17[${string}]`]: undefined;
44
+ [x: `bytes18[${string}]`]: undefined;
45
45
  [x: `bytes19[${string}]`]: undefined;
46
46
  [x: `bytes20[${string}]`]: undefined;
47
47
  [x: `bytes21[${string}]`]: undefined;
@@ -137,13 +137,13 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
137
137
  bytes9?: undefined;
138
138
  bytes10?: undefined;
139
139
  bytes25?: undefined;
140
- bytes18?: undefined;
141
140
  bytes12?: undefined;
142
141
  bytes13?: undefined;
143
142
  bytes14?: undefined;
144
143
  bytes15?: undefined;
145
144
  bytes16?: undefined;
146
145
  bytes17?: undefined;
146
+ bytes18?: undefined;
147
147
  bytes19?: undefined;
148
148
  bytes20?: undefined;
149
149
  bytes21?: undefined;
@@ -36,13 +36,13 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
36
36
  [x: `bytes9[${string}]`]: undefined;
37
37
  [x: `bytes10[${string}]`]: undefined;
38
38
  [x: `bytes25[${string}]`]: undefined;
39
- [x: `bytes18[${string}]`]: undefined;
40
39
  [x: `bytes12[${string}]`]: undefined;
41
40
  [x: `bytes13[${string}]`]: undefined;
42
41
  [x: `bytes14[${string}]`]: undefined;
43
42
  [x: `bytes15[${string}]`]: undefined;
44
43
  [x: `bytes16[${string}]`]: undefined;
45
44
  [x: `bytes17[${string}]`]: undefined;
45
+ [x: `bytes18[${string}]`]: undefined;
46
46
  [x: `bytes19[${string}]`]: undefined;
47
47
  [x: `bytes20[${string}]`]: undefined;
48
48
  [x: `bytes21[${string}]`]: undefined;
@@ -138,13 +138,13 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
138
138
  bytes9?: undefined;
139
139
  bytes10?: undefined;
140
140
  bytes25?: undefined;
141
- bytes18?: undefined;
142
141
  bytes12?: undefined;
143
142
  bytes13?: undefined;
144
143
  bytes14?: undefined;
145
144
  bytes15?: undefined;
146
145
  bytes16?: undefined;
147
146
  bytes17?: undefined;
147
+ bytes18?: undefined;
148
148
  bytes19?: undefined;
149
149
  bytes20?: undefined;
150
150
  bytes21?: undefined;
@@ -1,6 +1,6 @@
1
1
  import { type Address, type Chain } from "viem";
2
2
  import type { EntryPointVersion } from "../entrypoint/types.js";
3
- import type { UserOperationFeeOptions } from "../types";
3
+ import type { UserOperationFeeOptions } from "../types.js";
4
4
  /**
5
5
  * Utility method returning the default simple account factory address given a {@link Chain} object
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAuBhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,UACzC,KAAK,YACH,iBAAiB,KACzB,OAqCF,CAAC;AAEF,eAAO,MAAM,4BAA4B,qBAIvC,CAAC;AAEH,eAAO,MAAM,iCAAiC,UACrC,KAAK,KACX,uBAOF,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAsBhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,UACzC,KAAK,YACH,iBAAiB,KACzB,OAqCF,CAAC;AAEF,eAAO,MAAM,4BAA4B,qBAIvC,CAAC;AAEH,eAAO,MAAM,iCAAiC,UACrC,KAAK,KACX,uBAOF,CAAC"}
@@ -1,15 +1,5 @@
1
- import type { Chain } from "viem";
2
1
  import type { PromiseOrValue } from "../types.js";
3
2
  import type { RecordableKeys } from "./types.js";
4
- export declare const AlchemyChainMap: Map<number, Chain>;
5
- /**
6
- * Utility method for converting a chainId to a {@link Chain} object
7
- *
8
- * @param chainId - the chainId to convert
9
- * @returns a {@link Chain} object for the given chainId
10
- * @throws if the chainId is not found
11
- */
12
- export declare const getChain: (chainId: number) => Chain;
13
3
  /**
14
4
  * Utility function that allows for piping a series of async functions together
15
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAIlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,eAAe,oBAE3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,YAAa,MAAM,KAAG,KAO1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,iJAQnB,CAAC;AAGJ,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAc5E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CA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G,EAAE,GAAG,GAAG,GAAG,CAqBzC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAO5C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAIzE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,cAAe,GAAG,EAAE,KAAG,OAK3C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,iBACjB,QAAQ,OAAO,CAAC,oDAEgD,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,2KAYM,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,mBAAmB,YAAY,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.0.0-alpha.1";
1
+ export declare const VERSION = "4.0.0-alpha.2";
2
2
  //# sourceMappingURL=version.d.ts.map
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-alpha.1",
4
+ "version": "4.0.0-alpha.2",
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",
@@ -66,5 +66,5 @@
66
66
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
67
67
  },
68
68
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
69
- "gitHead": "cb4bf5f8a9aa8fdff1610130821b69ff806e79e6"
69
+ "gitHead": "af70c1ea67be7f49339a1267ccadd8dc10aabde1"
70
70
  }
package/src/ens/utils.ts CHANGED
@@ -1,6 +1,5 @@
1
- import type { Chain } from "viem/chains";
2
1
  import * as chains from "viem/chains";
3
- import { mainnet } from "../chains/index.js";
2
+ import { mainnet, type Chain } from "viem/chains";
4
3
 
5
4
  export const ChainsById: Map<number, chains.Chain> = new Map(
6
5
  Object.values(chains).map((x) => [x.id, x])
package/src/index.ts CHANGED
@@ -31,27 +31,6 @@ export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
31
31
  export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
32
32
  export type * from "./actions/smartAccount/types.js";
33
33
  export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
34
- export {
35
- arbitrum,
36
- arbitrumGoerli,
37
- arbitrumSepolia,
38
- base,
39
- baseGoerli,
40
- baseSepolia,
41
- fraxtal,
42
- fraxtalSepolia,
43
- goerli,
44
- mainnet,
45
- optimism,
46
- optimismGoerli,
47
- optimismSepolia,
48
- polygon,
49
- polygonAmoy,
50
- polygonMumbai,
51
- sepolia,
52
- zora,
53
- zoraSepolia,
54
- } from "./chains/index.js";
55
34
  export type * from "./client/bundlerClient.js";
56
35
  export {
57
36
  createBundlerClient,
@@ -136,7 +115,6 @@ export { split, type SplitTransportParams } from "./transport/split.js";
136
115
  export type * from "./types.js";
137
116
  export type * from "./utils/index.js";
138
117
  export {
139
- AlchemyChainMap,
140
118
  BigNumberishRangeSchema,
141
119
  BigNumberishSchema,
142
120
  ChainSchema,
@@ -154,7 +132,6 @@ export {
154
132
  concatPaymasterAndData,
155
133
  deepHexlify,
156
134
  filterUndefined,
157
- getChain,
158
135
  getDefaultSimpleAccountFactoryAddress,
159
136
  getDefaultUserOperationFeeOptions,
160
137
  isBigNumberish,
@@ -7,7 +7,6 @@ import {
7
7
  baseGoerli,
8
8
  baseSepolia,
9
9
  fraxtal,
10
- fraxtalSepolia,
11
10
  goerli,
12
11
  mainnet,
13
12
  optimism,
@@ -19,11 +18,11 @@ import {
19
18
  sepolia,
20
19
  zora,
21
20
  zoraSepolia,
22
- } from "../chains/index.js";
21
+ } from "viem/chains";
23
22
  import { defaultEntryPointVersion } from "../entrypoint/index.js";
24
23
  import type { EntryPointVersion } from "../entrypoint/types.js";
25
24
  import { DefaultFactoryNotDefinedError } from "../errors/account.js";
26
- import type { UserOperationFeeOptions } from "../types";
25
+ import type { UserOperationFeeOptions } from "../types.js";
27
26
 
28
27
  /**
29
28
  * Utility method returning the default simple account factory address given a {@link Chain} object
@@ -51,7 +50,7 @@ export const getDefaultSimpleAccountFactoryAddress = (
51
50
  case baseGoerli.id:
52
51
  case baseSepolia.id:
53
52
  case fraxtal.id:
54
- case fraxtalSepolia.id:
53
+ case 2523:
55
54
  case zora.id:
56
55
  case zoraSepolia.id:
57
56
  return "0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232";
@@ -1,30 +1,7 @@
1
- import type { Chain } from "viem";
2
1
  import { toHex } from "viem";
3
- import * as chains from "viem/chains";
4
- import * as alchemyChains from "../chains/index.js";
5
2
  import type { PromiseOrValue } from "../types.js";
6
3
  import type { RecordableKeys } from "./types.js";
7
4
 
8
- export const AlchemyChainMap = new Map<number, Chain>(
9
- Object.values(alchemyChains).map((c) => [c.id, c])
10
- );
11
-
12
- /**
13
- * Utility method for converting a chainId to a {@link Chain} object
14
- *
15
- * @param chainId - the chainId to convert
16
- * @returns a {@link Chain} object for the given chainId
17
- * @throws if the chainId is not found
18
- */
19
- export const getChain = (chainId: number): Chain => {
20
- for (const chain of Object.values(chains)) {
21
- if (chain.id === chainId) {
22
- return AlchemyChainMap.get(chain.id) ?? chain;
23
- }
24
- }
25
- throw new Error("could not find chain");
26
- };
27
-
28
5
  /**
29
6
  * Utility function that allows for piping a series of async functions together
30
7
  *
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.0.0-alpha.1";
3
+ export const VERSION = "4.0.0-alpha.2";
@@ -1,20 +0,0 @@
1
- import { type Chain } from "viem";
2
- export declare const arbitrum: Chain;
3
- export declare const arbitrumGoerli: Chain;
4
- export declare const arbitrumSepolia: Chain;
5
- export declare const goerli: Chain;
6
- export declare const mainnet: Chain;
7
- export declare const optimism: Chain;
8
- export declare const optimismGoerli: Chain;
9
- export declare const optimismSepolia: Chain;
10
- export declare const sepolia: Chain;
11
- export declare const base: Chain;
12
- export declare const baseGoerli: Chain;
13
- export declare const baseSepolia: Chain;
14
- export declare const polygonMumbai: Chain;
15
- export declare const polygonAmoy: Chain;
16
- export declare const polygon: Chain;
17
- export declare const fraxtal: Chain;
18
- export declare const fraxtalSepolia: Chain;
19
- export declare const zora: Chain;
20
- export declare const zoraSepolia: Chain;