@aa-sdk/core 4.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/cjs/abis/EntryPointAbi_v6.d.ts +1018 -0
- package/dist/cjs/abis/EntryPointAbi_v6.js +1313 -0
- package/dist/cjs/abis/EntryPointAbi_v6.js.map +1 -0
- package/dist/cjs/abis/EntryPointAbi_v7.d.ts +775 -0
- package/dist/cjs/abis/EntryPointAbi_v7.js +661 -0
- package/dist/cjs/abis/EntryPointAbi_v7.js.map +1 -0
- package/dist/cjs/abis/SimpleAccountAbi_v6.d.ts +405 -0
- package/dist/cjs/abis/SimpleAccountAbi_v6.js +528 -0
- package/dist/cjs/abis/SimpleAccountAbi_v6.js.map +1 -0
- package/dist/cjs/abis/SimpleAccountAbi_v7.d.ts +410 -0
- package/dist/cjs/abis/SimpleAccountAbi_v7.js +538 -0
- package/dist/cjs/abis/SimpleAccountAbi_v7.js.map +1 -0
- package/dist/cjs/abis/SimpleAccountFactoryAbi.d.ts +55 -0
- package/dist/cjs/abis/SimpleAccountFactoryAbi.js +78 -0
- package/dist/cjs/abis/SimpleAccountFactoryAbi.js.map +1 -0
- package/dist/cjs/account/base.d.ts +49 -0
- package/dist/cjs/account/base.js +257 -0
- package/dist/cjs/account/base.js.map +1 -0
- package/dist/cjs/account/schema.d.ts +100 -0
- package/dist/cjs/account/schema.js +43 -0
- package/dist/cjs/account/schema.js.map +1 -0
- package/dist/cjs/account/simple.d.ts +14 -0
- package/dist/cjs/account/simple.js +119 -0
- package/dist/cjs/account/simple.js.map +1 -0
- package/dist/cjs/account/smartContractAccount.d.ts +68 -0
- package/dist/cjs/account/smartContractAccount.js +174 -0
- package/dist/cjs/account/smartContractAccount.js.map +1 -0
- package/dist/cjs/account/types.d.ts +30 -0
- package/dist/cjs/account/types.js +3 -0
- package/dist/cjs/account/types.js.map +1 -0
- package/dist/cjs/actions/bundler/estimateUserOperationGas.d.ts +8 -0
- package/dist/cjs/actions/bundler/estimateUserOperationGas.js +18 -0
- package/dist/cjs/actions/bundler/estimateUserOperationGas.js.map +1 -0
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.d.ts +3 -0
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.js +11 -0
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.js.map +1 -0
- package/dist/cjs/actions/bundler/getUserOperationByHash.d.ts +6 -0
- package/dist/cjs/actions/bundler/getUserOperationByHash.js +11 -0
- package/dist/cjs/actions/bundler/getUserOperationByHash.js.map +1 -0
- package/dist/cjs/actions/bundler/getUserOperationReceipt.d.ts +6 -0
- package/dist/cjs/actions/bundler/getUserOperationReceipt.js +11 -0
- package/dist/cjs/actions/bundler/getUserOperationReceipt.js.map +1 -0
- package/dist/cjs/actions/bundler/sendRawUserOperation.d.ts +7 -0
- package/dist/cjs/actions/bundler/sendRawUserOperation.js +11 -0
- package/dist/cjs/actions/bundler/sendRawUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/buildUserOperation.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/buildUserOperation.js +25 -0
- package/dist/cjs/actions/smartAccount/buildUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js +39 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js.map +1 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js +62 -0
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -0
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js +34 -0
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -0
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js +64 -0
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js +23 -0
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js.map +1 -0
- package/dist/cjs/actions/smartAccount/getAddress.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/getAddress.js +13 -0
- package/dist/cjs/actions/smartAccount/getAddress.js.map +1 -0
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.d.ts +7 -0
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.js +42 -0
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.d.ts +10 -0
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js +47 -0
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -0
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.d.ts +10 -0
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js +28 -0
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/sendTransaction.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/sendTransaction.js +35 -0
- package/dist/cjs/actions/smartAccount/sendTransaction.js.map +1 -0
- package/dist/cjs/actions/smartAccount/sendTransactions.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/sendTransactions.js +36 -0
- package/dist/cjs/actions/smartAccount/sendTransactions.js.map +1 -0
- package/dist/cjs/actions/smartAccount/sendUserOperation.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/sendUserOperation.js +31 -0
- package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/signMessage.d.ts +6 -0
- package/dist/cjs/actions/smartAccount/signMessage.js +12 -0
- package/dist/cjs/actions/smartAccount/signMessage.js.map +1 -0
- package/dist/cjs/actions/smartAccount/signMessageWith6492.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/signMessageWith6492.js +12 -0
- package/dist/cjs/actions/smartAccount/signMessageWith6492.js.map +1 -0
- package/dist/cjs/actions/smartAccount/signTypedData.d.ts +10 -0
- package/dist/cjs/actions/smartAccount/signTypedData.js +12 -0
- package/dist/cjs/actions/smartAccount/signTypedData.js.map +1 -0
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.d.ts +6 -0
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js +12 -0
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js.map +1 -0
- package/dist/cjs/actions/smartAccount/signUserOperation.d.ts +5 -0
- package/dist/cjs/actions/smartAccount/signUserOperation.js +30 -0
- package/dist/cjs/actions/smartAccount/signUserOperation.js.map +1 -0
- package/dist/cjs/actions/smartAccount/types.d.ts +42 -0
- package/dist/cjs/actions/smartAccount/types.js +3 -0
- package/dist/cjs/actions/smartAccount/types.js.map +1 -0
- package/dist/cjs/actions/smartAccount/upgradeAccount.d.ts +4 -0
- package/dist/cjs/actions/smartAccount/upgradeAccount.js +38 -0
- package/dist/cjs/actions/smartAccount/upgradeAccount.js.map +1 -0
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.d.ts +3 -0
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js +36 -0
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -0
- package/dist/cjs/chains/index.d.ts +20 -0
- package/dist/cjs/chains/index.js +169 -0
- package/dist/cjs/chains/index.js.map +1 -0
- package/dist/cjs/client/bundlerClient.d.ts +10 -0
- package/dist/cjs/client/bundlerClient.js +51 -0
- package/dist/cjs/client/bundlerClient.js.map +1 -0
- package/dist/cjs/client/decorators/bundlerClient.d.ts +41 -0
- package/dist/cjs/client/decorators/bundlerClient.js +17 -0
- package/dist/cjs/client/decorators/bundlerClient.js.map +1 -0
- package/dist/cjs/client/decorators/smartAccountClient.d.ts +35 -0
- package/dist/cjs/client/decorators/smartAccountClient.js +43 -0
- package/dist/cjs/client/decorators/smartAccountClient.js.map +1 -0
- package/dist/cjs/client/isSmartAccountClient.d.ts +5 -0
- package/dist/cjs/client/isSmartAccountClient.js +18 -0
- package/dist/cjs/client/isSmartAccountClient.js.map +1 -0
- package/dist/cjs/client/schema.d.ts +767 -0
- package/dist/cjs/client/schema.js +63 -0
- package/dist/cjs/client/schema.js.map +1 -0
- package/dist/cjs/client/smartAccountClient.d.ts +33 -0
- package/dist/cjs/client/smartAccountClient.js +93 -0
- package/dist/cjs/client/smartAccountClient.js.map +1 -0
- package/dist/cjs/client/types.d.ts +26 -0
- package/dist/cjs/client/types.js +3 -0
- package/dist/cjs/client/types.js.map +1 -0
- package/dist/cjs/ens/utils.d.ts +6 -0
- package/dist/cjs/ens/utils.js +53 -0
- package/dist/cjs/ens/utils.js.map +1 -0
- package/dist/cjs/entrypoint/0.6.d.ts +1029 -0
- package/dist/cjs/entrypoint/0.6.js +49 -0
- package/dist/cjs/entrypoint/0.6.js.map +1 -0
- package/dist/cjs/entrypoint/0.7.d.ts +792 -0
- package/dist/cjs/entrypoint/0.7.js +88 -0
- package/dist/cjs/entrypoint/0.7.js.map +1 -0
- package/dist/cjs/entrypoint/index.d.ts +8 -0
- package/dist/cjs/entrypoint/index.js +53 -0
- package/dist/cjs/entrypoint/index.js.map +1 -0
- package/dist/cjs/entrypoint/types.d.ts +46 -0
- package/dist/cjs/entrypoint/types.js +3 -0
- package/dist/cjs/entrypoint/types.js.map +1 -0
- package/dist/cjs/errors/account.d.ts +47 -0
- package/dist/cjs/errors/account.js +140 -0
- package/dist/cjs/errors/account.js.map +1 -0
- package/dist/cjs/errors/base.d.ts +18 -0
- package/dist/cjs/errors/base.js +39 -0
- package/dist/cjs/errors/base.js.map +1 -0
- package/dist/cjs/errors/client.d.ts +14 -0
- package/dist/cjs/errors/client.js +44 -0
- package/dist/cjs/errors/client.js.map +1 -0
- package/dist/cjs/errors/entrypoint.d.ts +10 -0
- package/dist/cjs/errors/entrypoint.js +32 -0
- package/dist/cjs/errors/entrypoint.js.map +1 -0
- package/dist/cjs/errors/signer.d.ts +5 -0
- package/dist/cjs/errors/signer.js +20 -0
- package/dist/cjs/errors/signer.js.map +1 -0
- package/dist/cjs/errors/transaction.d.ts +10 -0
- package/dist/cjs/errors/transaction.js +29 -0
- package/dist/cjs/errors/transaction.js.map +1 -0
- package/dist/cjs/errors/useroperation.d.ts +10 -0
- package/dist/cjs/errors/useroperation.js +34 -0
- package/dist/cjs/errors/useroperation.js.map +1 -0
- package/dist/cjs/index.d.ts +63 -0
- package/dist/cjs/index.js +198 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/logger.d.ts +20 -0
- package/dist/cjs/logger.js +60 -0
- package/dist/cjs/logger.js.map +1 -0
- package/dist/cjs/middleware/actions.d.ts +12 -0
- package/dist/cjs/middleware/actions.js +37 -0
- package/dist/cjs/middleware/actions.js.map +1 -0
- package/dist/cjs/middleware/defaults/feeEstimator.d.ts +3 -0
- package/dist/cjs/middleware/defaults/feeEstimator.js +21 -0
- package/dist/cjs/middleware/defaults/feeEstimator.js.map +1 -0
- package/dist/cjs/middleware/defaults/gasEstimator.d.ts +3 -0
- package/dist/cjs/middleware/defaults/gasEstimator.js +26 -0
- package/dist/cjs/middleware/defaults/gasEstimator.js.map +1 -0
- package/dist/cjs/middleware/defaults/paymasterAndData.d.ts +2 -0
- package/dist/cjs/middleware/defaults/paymasterAndData.js +12 -0
- package/dist/cjs/middleware/defaults/paymasterAndData.js.map +1 -0
- package/dist/cjs/middleware/defaults/userOpSigner.d.ts +2 -0
- package/dist/cjs/middleware/defaults/userOpSigner.js +26 -0
- package/dist/cjs/middleware/defaults/userOpSigner.js.map +1 -0
- package/dist/cjs/middleware/noopMiddleware.d.ts +2 -0
- package/dist/cjs/middleware/noopMiddleware.js +8 -0
- package/dist/cjs/middleware/noopMiddleware.js.map +1 -0
- package/dist/cjs/middleware/types.d.ts +21 -0
- package/dist/cjs/middleware/types.js +3 -0
- package/dist/cjs/middleware/types.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/signer/local-account.d.ts +219 -0
- package/dist/cjs/signer/local-account.js +56 -0
- package/dist/cjs/signer/local-account.js.map +1 -0
- package/dist/cjs/signer/schema.d.ts +4 -0
- package/dist/cjs/signer/schema.js +16 -0
- package/dist/cjs/signer/schema.js.map +1 -0
- package/dist/cjs/signer/types.d.ts +15 -0
- package/dist/cjs/signer/types.js +3 -0
- package/dist/cjs/signer/types.js.map +1 -0
- package/dist/cjs/signer/utils.d.ts +15 -0
- package/dist/cjs/signer/utils.js +31 -0
- package/dist/cjs/signer/utils.js.map +1 -0
- package/dist/cjs/signer/wallet-client.d.ts +217 -0
- package/dist/cjs/signer/wallet-client.js +58 -0
- package/dist/cjs/signer/wallet-client.js.map +1 -0
- package/dist/cjs/transport/split.d.ts +9 -0
- package/dist/cjs/transport/split.js +26 -0
- package/dist/cjs/transport/split.js.map +1 -0
- package/dist/cjs/types.d.ts +158 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils/bigint.d.ts +10 -0
- package/dist/cjs/utils/bigint.js +55 -0
- package/dist/cjs/utils/bigint.js.map +1 -0
- package/dist/cjs/utils/bytes.d.ts +7 -0
- package/dist/cjs/utils/bytes.js +11 -0
- package/dist/cjs/utils/bytes.js.map +1 -0
- package/dist/cjs/utils/defaults.d.ts +6 -0
- package/dist/cjs/utils/defaults.js +59 -0
- package/dist/cjs/utils/defaults.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +23 -0
- package/dist/cjs/utils/index.js +127 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/schema.d.ts +25 -0
- package/dist/cjs/utils/schema.js +35 -0
- package/dist/cjs/utils/schema.js.map +1 -0
- package/dist/cjs/utils/stateOverride.d.ts +4 -0
- package/dist/cjs/utils/stateOverride.js +52 -0
- package/dist/cjs/utils/stateOverride.js.map +1 -0
- package/dist/cjs/utils/testUtils.d.ts +6 -0
- package/dist/cjs/utils/testUtils.js +33 -0
- package/dist/cjs/utils/testUtils.js.map +1 -0
- package/dist/cjs/utils/types.d.ts +16 -0
- package/dist/cjs/utils/types.js +3 -0
- package/dist/cjs/utils/types.js.map +1 -0
- package/dist/cjs/utils/userop.d.ts +49 -0
- package/dist/cjs/utils/userop.js +75 -0
- package/dist/cjs/utils/userop.js.map +1 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/version.js.map +1 -0
- package/dist/esm/abis/EntryPointAbi_v6.d.ts +1018 -0
- package/dist/esm/abis/EntryPointAbi_v6.js +1310 -0
- package/dist/esm/abis/EntryPointAbi_v6.js.map +1 -0
- package/dist/esm/abis/EntryPointAbi_v7.d.ts +775 -0
- package/dist/esm/abis/EntryPointAbi_v7.js +658 -0
- package/dist/esm/abis/EntryPointAbi_v7.js.map +1 -0
- package/dist/esm/abis/SimpleAccountAbi_v6.d.ts +405 -0
- package/dist/esm/abis/SimpleAccountAbi_v6.js +525 -0
- package/dist/esm/abis/SimpleAccountAbi_v6.js.map +1 -0
- package/dist/esm/abis/SimpleAccountAbi_v7.d.ts +410 -0
- package/dist/esm/abis/SimpleAccountAbi_v7.js +535 -0
- package/dist/esm/abis/SimpleAccountAbi_v7.js.map +1 -0
- package/dist/esm/abis/SimpleAccountFactoryAbi.d.ts +55 -0
- package/dist/esm/abis/SimpleAccountFactoryAbi.js +75 -0
- package/dist/esm/abis/SimpleAccountFactoryAbi.js.map +1 -0
- package/dist/esm/account/base.d.ts +49 -0
- package/dist/esm/account/base.js +253 -0
- package/dist/esm/account/base.js.map +1 -0
- package/dist/esm/account/schema.d.ts +100 -0
- package/dist/esm/account/schema.js +35 -0
- package/dist/esm/account/schema.js.map +1 -0
- package/dist/esm/account/simple.d.ts +14 -0
- package/dist/esm/account/simple.js +115 -0
- package/dist/esm/account/simple.js.map +1 -0
- package/dist/esm/account/smartContractAccount.d.ts +68 -0
- package/dist/esm/account/smartContractAccount.js +167 -0
- package/dist/esm/account/smartContractAccount.js.map +1 -0
- package/dist/esm/account/types.d.ts +30 -0
- package/dist/esm/account/types.js +2 -0
- package/dist/esm/account/types.js.map +1 -0
- package/dist/esm/actions/bundler/estimateUserOperationGas.d.ts +8 -0
- package/dist/esm/actions/bundler/estimateUserOperationGas.js +14 -0
- package/dist/esm/actions/bundler/estimateUserOperationGas.js.map +1 -0
- package/dist/esm/actions/bundler/getSupportedEntryPoints.d.ts +3 -0
- package/dist/esm/actions/bundler/getSupportedEntryPoints.js +7 -0
- package/dist/esm/actions/bundler/getSupportedEntryPoints.js.map +1 -0
- package/dist/esm/actions/bundler/getUserOperationByHash.d.ts +6 -0
- package/dist/esm/actions/bundler/getUserOperationByHash.js +7 -0
- package/dist/esm/actions/bundler/getUserOperationByHash.js.map +1 -0
- package/dist/esm/actions/bundler/getUserOperationReceipt.d.ts +6 -0
- package/dist/esm/actions/bundler/getUserOperationReceipt.js +7 -0
- package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -0
- package/dist/esm/actions/bundler/sendRawUserOperation.d.ts +7 -0
- package/dist/esm/actions/bundler/sendRawUserOperation.js +7 -0
- package/dist/esm/actions/bundler/sendRawUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/buildUserOperation.d.ts +5 -0
- package/dist/esm/actions/smartAccount/buildUserOperation.js +22 -0
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.d.ts +5 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js +36 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.d.ts +4 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js +58 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -0
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +4 -0
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js +30 -0
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -0
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.d.ts +5 -0
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js +60 -0
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.d.ts +5 -0
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js +20 -0
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -0
- package/dist/esm/actions/smartAccount/getAddress.d.ts +4 -0
- package/dist/esm/actions/smartAccount/getAddress.js +9 -0
- package/dist/esm/actions/smartAccount/getAddress.js.map +1 -0
- package/dist/esm/actions/smartAccount/internal/initUserOperation.d.ts +7 -0
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js +38 -0
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.d.ts +10 -0
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js +43 -0
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -0
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.d.ts +10 -0
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js +24 -0
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/sendTransaction.d.ts +5 -0
- package/dist/esm/actions/smartAccount/sendTransaction.js +31 -0
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -0
- package/dist/esm/actions/smartAccount/sendTransactions.d.ts +4 -0
- package/dist/esm/actions/smartAccount/sendTransactions.js +32 -0
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -0
- package/dist/esm/actions/smartAccount/sendUserOperation.d.ts +5 -0
- package/dist/esm/actions/smartAccount/sendUserOperation.js +27 -0
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/signMessage.d.ts +6 -0
- package/dist/esm/actions/smartAccount/signMessage.js +8 -0
- package/dist/esm/actions/smartAccount/signMessage.js.map +1 -0
- package/dist/esm/actions/smartAccount/signMessageWith6492.d.ts +4 -0
- package/dist/esm/actions/smartAccount/signMessageWith6492.js +8 -0
- package/dist/esm/actions/smartAccount/signMessageWith6492.js.map +1 -0
- package/dist/esm/actions/smartAccount/signTypedData.d.ts +10 -0
- package/dist/esm/actions/smartAccount/signTypedData.js +8 -0
- package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -0
- package/dist/esm/actions/smartAccount/signTypedDataWith6492.d.ts +6 -0
- package/dist/esm/actions/smartAccount/signTypedDataWith6492.js +8 -0
- package/dist/esm/actions/smartAccount/signTypedDataWith6492.js.map +1 -0
- package/dist/esm/actions/smartAccount/signUserOperation.d.ts +5 -0
- package/dist/esm/actions/smartAccount/signUserOperation.js +26 -0
- package/dist/esm/actions/smartAccount/signUserOperation.js.map +1 -0
- package/dist/esm/actions/smartAccount/types.d.ts +42 -0
- package/dist/esm/actions/smartAccount/types.js +2 -0
- package/dist/esm/actions/smartAccount/types.js.map +1 -0
- package/dist/esm/actions/smartAccount/upgradeAccount.d.ts +4 -0
- package/dist/esm/actions/smartAccount/upgradeAccount.js +34 -0
- package/dist/esm/actions/smartAccount/upgradeAccount.js.map +1 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.d.ts +3 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js +32 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -0
- package/dist/esm/chains/index.d.ts +20 -0
- package/dist/esm/chains/index.js +166 -0
- package/dist/esm/chains/index.js.map +1 -0
- package/dist/esm/client/bundlerClient.d.ts +10 -0
- package/dist/esm/client/bundlerClient.js +46 -0
- package/dist/esm/client/bundlerClient.js.map +1 -0
- package/dist/esm/client/decorators/bundlerClient.d.ts +41 -0
- package/dist/esm/client/decorators/bundlerClient.js +13 -0
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -0
- package/dist/esm/client/decorators/smartAccountClient.d.ts +35 -0
- package/dist/esm/client/decorators/smartAccountClient.js +40 -0
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -0
- package/dist/esm/client/isSmartAccountClient.d.ts +5 -0
- package/dist/esm/client/isSmartAccountClient.js +13 -0
- package/dist/esm/client/isSmartAccountClient.js.map +1 -0
- package/dist/esm/client/schema.d.ts +767 -0
- package/dist/esm/client/schema.js +59 -0
- package/dist/esm/client/schema.js.map +1 -0
- package/dist/esm/client/smartAccountClient.d.ts +33 -0
- package/dist/esm/client/smartAccountClient.js +90 -0
- package/dist/esm/client/smartAccountClient.js.map +1 -0
- package/dist/esm/client/types.d.ts +26 -0
- package/dist/esm/client/types.js +2 -0
- package/dist/esm/client/types.js.map +1 -0
- package/dist/esm/ens/utils.d.ts +6 -0
- package/dist/esm/ens/utils.js +24 -0
- package/dist/esm/ens/utils.js.map +1 -0
- package/dist/esm/entrypoint/0.6.d.ts +1029 -0
- package/dist/esm/entrypoint/0.6.js +47 -0
- package/dist/esm/entrypoint/0.6.js.map +1 -0
- package/dist/esm/entrypoint/0.7.d.ts +792 -0
- package/dist/esm/entrypoint/0.7.js +82 -0
- package/dist/esm/entrypoint/0.7.js.map +1 -0
- package/dist/esm/entrypoint/index.d.ts +8 -0
- package/dist/esm/entrypoint/index.js +46 -0
- package/dist/esm/entrypoint/index.js.map +1 -0
- package/dist/esm/entrypoint/types.d.ts +46 -0
- package/dist/esm/entrypoint/types.js +2 -0
- package/dist/esm/entrypoint/types.js.map +1 -0
- package/dist/esm/errors/account.d.ts +47 -0
- package/dist/esm/errors/account.js +126 -0
- package/dist/esm/errors/account.js.map +1 -0
- package/dist/esm/errors/base.d.ts +18 -0
- package/dist/esm/errors/base.js +35 -0
- package/dist/esm/errors/base.js.map +1 -0
- package/dist/esm/errors/client.d.ts +14 -0
- package/dist/esm/errors/client.js +38 -0
- package/dist/esm/errors/client.js.map +1 -0
- package/dist/esm/errors/entrypoint.d.ts +10 -0
- package/dist/esm/errors/entrypoint.js +27 -0
- package/dist/esm/errors/entrypoint.js.map +1 -0
- package/dist/esm/errors/signer.d.ts +5 -0
- package/dist/esm/errors/signer.js +16 -0
- package/dist/esm/errors/signer.js.map +1 -0
- package/dist/esm/errors/transaction.d.ts +10 -0
- package/dist/esm/errors/transaction.js +24 -0
- package/dist/esm/errors/transaction.js.map +1 -0
- package/dist/esm/errors/useroperation.d.ts +10 -0
- package/dist/esm/errors/useroperation.js +29 -0
- package/dist/esm/errors/useroperation.js.map +1 -0
- package/dist/esm/index.d.ts +63 -0
- package/dist/esm/index.js +48 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +20 -0
- package/dist/esm/logger.js +56 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/middleware/actions.d.ts +12 -0
- package/dist/esm/middleware/actions.js +33 -0
- package/dist/esm/middleware/actions.js.map +1 -0
- package/dist/esm/middleware/defaults/feeEstimator.d.ts +3 -0
- package/dist/esm/middleware/defaults/feeEstimator.js +17 -0
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -0
- package/dist/esm/middleware/defaults/gasEstimator.d.ts +3 -0
- package/dist/esm/middleware/defaults/gasEstimator.js +22 -0
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -0
- package/dist/esm/middleware/defaults/paymasterAndData.d.ts +2 -0
- package/dist/esm/middleware/defaults/paymasterAndData.js +8 -0
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -0
- package/dist/esm/middleware/defaults/userOpSigner.d.ts +2 -0
- package/dist/esm/middleware/defaults/userOpSigner.js +22 -0
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -0
- package/dist/esm/middleware/noopMiddleware.d.ts +2 -0
- package/dist/esm/middleware/noopMiddleware.js +4 -0
- package/dist/esm/middleware/noopMiddleware.js.map +1 -0
- package/dist/esm/middleware/types.d.ts +21 -0
- package/dist/esm/middleware/types.js +2 -0
- package/dist/esm/middleware/types.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/signer/local-account.d.ts +219 -0
- package/dist/esm/signer/local-account.js +53 -0
- package/dist/esm/signer/local-account.js.map +1 -0
- package/dist/esm/signer/schema.d.ts +4 -0
- package/dist/esm/signer/schema.js +12 -0
- package/dist/esm/signer/schema.js.map +1 -0
- package/dist/esm/signer/types.d.ts +15 -0
- package/dist/esm/signer/types.js +2 -0
- package/dist/esm/signer/types.js.map +1 -0
- package/dist/esm/signer/utils.d.ts +15 -0
- package/dist/esm/signer/utils.js +26 -0
- package/dist/esm/signer/utils.js.map +1 -0
- package/dist/esm/signer/wallet-client.d.ts +217 -0
- package/dist/esm/signer/wallet-client.js +54 -0
- package/dist/esm/signer/wallet-client.js.map +1 -0
- package/dist/esm/transport/split.d.ts +9 -0
- package/dist/esm/transport/split.js +22 -0
- package/dist/esm/transport/split.js.map +1 -0
- package/dist/esm/types.d.ts +158 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils/bigint.d.ts +10 -0
- package/dist/esm/utils/bigint.js +47 -0
- package/dist/esm/utils/bigint.js.map +1 -0
- package/dist/esm/utils/bytes.d.ts +7 -0
- package/dist/esm/utils/bytes.js +7 -0
- package/dist/esm/utils/bytes.js.map +1 -0
- package/dist/esm/utils/defaults.d.ts +6 -0
- package/dist/esm/utils/defaults.js +55 -0
- package/dist/esm/utils/defaults.js.map +1 -0
- package/dist/esm/utils/index.d.ts +23 -0
- package/dist/esm/utils/index.js +88 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/schema.d.ts +25 -0
- package/dist/esm/utils/schema.js +30 -0
- package/dist/esm/utils/schema.js.map +1 -0
- package/dist/esm/utils/stateOverride.d.ts +4 -0
- package/dist/esm/utils/stateOverride.js +48 -0
- package/dist/esm/utils/stateOverride.js.map +1 -0
- package/dist/esm/utils/testUtils.d.ts +6 -0
- package/dist/esm/utils/testUtils.js +28 -0
- package/dist/esm/utils/testUtils.js.map +1 -0
- package/dist/esm/utils/types.d.ts +16 -0
- package/dist/esm/utils/types.js +2 -0
- package/dist/esm/utils/types.js.map +1 -0
- package/dist/esm/utils/userop.d.ts +49 -0
- package/dist/esm/utils/userop.js +62 -0
- package/dist/esm/utils/userop.js.map +1 -0
- package/dist/esm/version.d.ts +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/types/abis/EntryPointAbi_v6.d.ts +1019 -0
- package/dist/types/abis/EntryPointAbi_v6.d.ts.map +1 -0
- package/dist/types/abis/EntryPointAbi_v7.d.ts +776 -0
- package/dist/types/abis/EntryPointAbi_v7.d.ts.map +1 -0
- package/dist/types/abis/SimpleAccountAbi_v6.d.ts +406 -0
- package/dist/types/abis/SimpleAccountAbi_v6.d.ts.map +1 -0
- package/dist/types/abis/SimpleAccountAbi_v7.d.ts +411 -0
- package/dist/types/abis/SimpleAccountAbi_v7.d.ts.map +1 -0
- package/dist/types/abis/SimpleAccountFactoryAbi.d.ts +56 -0
- package/dist/types/abis/SimpleAccountFactoryAbi.d.ts.map +1 -0
- package/dist/types/account/base.d.ts +128 -0
- package/dist/types/account/base.d.ts.map +1 -0
- package/dist/types/account/schema.d.ts +101 -0
- package/dist/types/account/schema.d.ts.map +1 -0
- package/dist/types/account/simple.d.ts +15 -0
- package/dist/types/account/simple.d.ts.map +1 -0
- package/dist/types/account/smartContractAccount.d.ts +69 -0
- package/dist/types/account/smartContractAccount.d.ts.map +1 -0
- package/dist/types/account/types.d.ts +144 -0
- package/dist/types/account/types.d.ts.map +1 -0
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts +9 -0
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -0
- package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts +4 -0
- package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts.map +1 -0
- package/dist/types/actions/bundler/getUserOperationByHash.d.ts +7 -0
- package/dist/types/actions/bundler/getUserOperationByHash.d.ts.map +1 -0
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts +7 -0
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -0
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts +8 -0
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts +6 -0
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +45 -0
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts +75 -0
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +33 -0
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts +6 -0
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts +19 -0
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/getAddress.d.ts +5 -0
- package/dist/types/actions/smartAccount/getAddress.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts +22 -0
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts +25 -0
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts +18 -0
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/sendTransaction.d.ts +6 -0
- package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/sendTransactions.d.ts +5 -0
- package/dist/types/actions/smartAccount/sendTransactions.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts +13 -0
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/signMessage.d.ts +7 -0
- package/dist/types/actions/smartAccount/signMessage.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/signMessageWith6492.d.ts +5 -0
- package/dist/types/actions/smartAccount/signMessageWith6492.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/signTypedData.d.ts +11 -0
- package/dist/types/actions/smartAccount/signTypedData.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/signTypedDataWith6492.d.ts +7 -0
- package/dist/types/actions/smartAccount/signTypedDataWith6492.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/signUserOperation.d.ts +6 -0
- package/dist/types/actions/smartAccount/signUserOperation.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/types.d.ts +57 -0
- package/dist/types/actions/smartAccount/types.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/upgradeAccount.d.ts +5 -0
- package/dist/types/actions/smartAccount/upgradeAccount.d.ts.map +1 -0
- package/dist/types/actions/smartAccount/waitForUserOperationTransacation.d.ts +4 -0
- package/dist/types/actions/smartAccount/waitForUserOperationTransacation.d.ts.map +1 -0
- package/dist/types/chains/index.d.ts +21 -0
- package/dist/types/chains/index.d.ts.map +1 -0
- package/dist/types/client/bundlerClient.d.ts +17 -0
- package/dist/types/client/bundlerClient.d.ts.map +1 -0
- package/dist/types/client/decorators/bundlerClient.d.ts +74 -0
- package/dist/types/client/decorators/bundlerClient.d.ts.map +1 -0
- package/dist/types/client/decorators/smartAccountClient.d.ts +36 -0
- package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -0
- package/dist/types/client/isSmartAccountClient.d.ts +22 -0
- package/dist/types/client/isSmartAccountClient.d.ts.map +1 -0
- package/dist/types/client/schema.d.ts +780 -0
- package/dist/types/client/schema.d.ts.map +1 -0
- package/dist/types/client/smartAccountClient.d.ts +34 -0
- package/dist/types/client/smartAccountClient.d.ts.map +1 -0
- package/dist/types/client/types.d.ts +27 -0
- package/dist/types/client/types.d.ts.map +1 -0
- package/dist/types/ens/utils.d.ts +7 -0
- package/dist/types/ens/utils.d.ts.map +1 -0
- package/dist/types/entrypoint/0.6.d.ts +1030 -0
- package/dist/types/entrypoint/0.6.d.ts.map +1 -0
- package/dist/types/entrypoint/0.7.d.ts +793 -0
- package/dist/types/entrypoint/0.7.d.ts.map +1 -0
- package/dist/types/entrypoint/index.d.ts +9 -0
- package/dist/types/entrypoint/index.d.ts.map +1 -0
- package/dist/types/entrypoint/types.d.ts +64 -0
- package/dist/types/entrypoint/types.d.ts.map +1 -0
- package/dist/types/errors/account.d.ts +48 -0
- package/dist/types/errors/account.d.ts.map +1 -0
- package/dist/types/errors/base.d.ts +19 -0
- package/dist/types/errors/base.d.ts.map +1 -0
- package/dist/types/errors/client.d.ts +15 -0
- package/dist/types/errors/client.d.ts.map +1 -0
- package/dist/types/errors/entrypoint.d.ts +11 -0
- package/dist/types/errors/entrypoint.d.ts.map +1 -0
- package/dist/types/errors/signer.d.ts +6 -0
- package/dist/types/errors/signer.d.ts.map +1 -0
- package/dist/types/errors/transaction.d.ts +11 -0
- package/dist/types/errors/transaction.d.ts.map +1 -0
- package/dist/types/errors/useroperation.d.ts +36 -0
- package/dist/types/errors/useroperation.d.ts.map +1 -0
- package/dist/types/index.d.ts +64 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/logger.d.ts +21 -0
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/middleware/actions.d.ts +27 -0
- package/dist/types/middleware/actions.d.ts.map +1 -0
- package/dist/types/middleware/defaults/feeEstimator.d.ts +4 -0
- package/dist/types/middleware/defaults/feeEstimator.d.ts.map +1 -0
- package/dist/types/middleware/defaults/gasEstimator.d.ts +12 -0
- package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -0
- package/dist/types/middleware/defaults/paymasterAndData.d.ts +3 -0
- package/dist/types/middleware/defaults/paymasterAndData.d.ts.map +1 -0
- package/dist/types/middleware/defaults/userOpSigner.d.ts +3 -0
- package/dist/types/middleware/defaults/userOpSigner.d.ts.map +1 -0
- package/dist/types/middleware/noopMiddleware.d.ts +10 -0
- package/dist/types/middleware/noopMiddleware.d.ts.map +1 -0
- package/dist/types/middleware/types.d.ts +22 -0
- package/dist/types/middleware/types.d.ts.map +1 -0
- package/dist/types/signer/local-account.d.ts +220 -0
- package/dist/types/signer/local-account.d.ts.map +1 -0
- package/dist/types/signer/schema.d.ts +5 -0
- package/dist/types/signer/schema.d.ts.map +1 -0
- package/dist/types/signer/types.d.ts +28 -0
- package/dist/types/signer/types.d.ts.map +1 -0
- package/dist/types/signer/utils.d.ts +16 -0
- package/dist/types/signer/utils.d.ts.map +1 -0
- package/dist/types/signer/wallet-client.d.ts +218 -0
- package/dist/types/signer/wallet-client.d.ts.map +1 -0
- package/dist/types/transport/split.d.ts +42 -0
- package/dist/types/transport/split.d.ts.map +1 -0
- package/dist/types/types.d.ts +176 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/bigint.d.ts +56 -0
- package/dist/types/utils/bigint.d.ts.map +1 -0
- package/dist/types/utils/bytes.d.ts +17 -0
- package/dist/types/utils/bytes.d.ts.map +1 -0
- package/dist/types/utils/defaults.d.ts +15 -0
- package/dist/types/utils/defaults.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +63 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/schema.d.ts +29 -0
- package/dist/types/utils/schema.d.ts.map +1 -0
- package/dist/types/utils/stateOverride.d.ts +5 -0
- package/dist/types/utils/stateOverride.d.ts.map +1 -0
- package/dist/types/utils/testUtils.d.ts +7 -0
- package/dist/types/utils/testUtils.d.ts.map +1 -0
- package/dist/types/utils/types.d.ts +39 -0
- package/dist/types/utils/types.d.ts.map +1 -0
- package/dist/types/utils/userop.d.ts +129 -0
- package/dist/types/utils/userop.d.ts.map +1 -0
- package/dist/types/version.d.ts +2 -0
- package/dist/types/version.d.ts.map +1 -0
- package/package.json +70 -0
- package/src/abis/EntryPointAbi_v6.ts +1309 -0
- package/src/abis/EntryPointAbi_v7.ts +658 -0
- package/src/abis/SimpleAccountAbi_v6.ts +524 -0
- package/src/abis/SimpleAccountAbi_v7.ts +534 -0
- package/src/abis/SimpleAccountFactoryAbi.ts +74 -0
- package/src/account/base.ts +415 -0
- package/src/account/schema.ts +51 -0
- package/src/account/simple.ts +215 -0
- package/src/account/smartContractAccount.ts +406 -0
- package/src/account/types.ts +184 -0
- package/src/actions/bundler/estimateUserOperationGas.ts +32 -0
- package/src/actions/bundler/getSupportedEntryPoints.ts +13 -0
- package/src/actions/bundler/getUserOperationByHash.ts +17 -0
- package/src/actions/bundler/getUserOperationReceipt.ts +17 -0
- package/src/actions/bundler/sendRawUserOperation.ts +20 -0
- package/src/actions/smartAccount/buildUserOperation.ts +52 -0
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +112 -0
- package/src/actions/smartAccount/buildUserOperationFromTxs.ts +168 -0
- package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +86 -0
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +111 -0
- package/src/actions/smartAccount/estimateUserOperationGas.ts +65 -0
- package/src/actions/smartAccount/getAddress.ts +25 -0
- package/src/actions/smartAccount/internal/initUserOperation.ts +93 -0
- package/src/actions/smartAccount/internal/runMiddlewareStack.ts +121 -0
- package/src/actions/smartAccount/internal/sendUserOperation.ts +64 -0
- package/src/actions/smartAccount/sendTransaction.ts +73 -0
- package/src/actions/smartAccount/sendTransactions.ts +53 -0
- package/src/actions/smartAccount/sendUserOperation.ts +65 -0
- package/src/actions/smartAccount/signMessage.ts +28 -0
- package/src/actions/smartAccount/signMessageWith6492.ts +21 -0
- package/src/actions/smartAccount/signTypedData.ts +42 -0
- package/src/actions/smartAccount/signTypedDataWith6492.ts +23 -0
- package/src/actions/smartAccount/signUserOperation.ts +54 -0
- package/src/actions/smartAccount/types.ts +158 -0
- package/src/actions/smartAccount/upgradeAccount.ts +66 -0
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +58 -0
- package/src/chains/index.ts +194 -0
- package/src/client/bundlerClient.ts +107 -0
- package/src/client/decorators/bundlerClient.ts +129 -0
- package/src/client/decorators/smartAccountClient.ts +177 -0
- package/src/client/isSmartAccountClient.ts +53 -0
- package/src/client/schema.ts +92 -0
- package/src/client/smartAccountClient.ts +276 -0
- package/src/client/types.ts +51 -0
- package/src/ens/utils.ts +37 -0
- package/src/entrypoint/0.6.ts +74 -0
- package/src/entrypoint/0.7.ts +153 -0
- package/src/entrypoint/index.ts +152 -0
- package/src/entrypoint/types.ts +120 -0
- package/src/errors/account.ts +87 -0
- package/src/errors/base.ts +48 -0
- package/src/errors/client.ts +28 -0
- package/src/errors/entrypoint.ts +25 -0
- package/src/errors/signer.ts +13 -0
- package/src/errors/transaction.ts +16 -0
- package/src/errors/useroperation.ts +54 -0
- package/src/index.ts +172 -0
- package/src/logger.ts +58 -0
- package/src/middleware/actions.ts +92 -0
- package/src/middleware/defaults/feeEstimator.ts +50 -0
- package/src/middleware/defaults/gasEstimator.ts +66 -0
- package/src/middleware/defaults/paymasterAndData.ts +13 -0
- package/src/middleware/defaults/userOpSigner.ts +35 -0
- package/src/middleware/noopMiddleware.ts +12 -0
- package/src/middleware/types.ts +49 -0
- package/src/signer/local-account.ts +59 -0
- package/src/signer/schema.ts +16 -0
- package/src/signer/types.ts +46 -0
- package/src/signer/utils.ts +68 -0
- package/src/signer/wallet-client.ts +49 -0
- package/src/transport/split.ts +69 -0
- package/src/types.ts +411 -0
- package/src/utils/bigint.ts +118 -0
- package/src/utils/bytes.ts +23 -0
- package/src/utils/defaults.ts +93 -0
- package/src/utils/index.ts +173 -0
- package/src/utils/schema.ts +52 -0
- package/src/utils/stateOverride.ts +80 -0
- package/src/utils/testUtils.ts +42 -0
- package/src/utils/types.ts +94 -0
- package/src/utils/userop.ts +220 -0
- package/src/version.ts +3 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidSignerTypeError = void 0;
|
|
4
|
+
const base_js_1 = require("./base.js");
|
|
5
|
+
class InvalidSignerTypeError extends base_js_1.BaseError {
|
|
6
|
+
constructor(signerType) {
|
|
7
|
+
super([
|
|
8
|
+
"Invalid signer type parameter passed to SmartAccountSigner.",
|
|
9
|
+
signerType ?? "A signerType must be provided.",
|
|
10
|
+
].join("\n"));
|
|
11
|
+
Object.defineProperty(this, "name", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: "InvalidSignerTypeError"
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.InvalidSignerTypeError = InvalidSignerTypeError;
|
|
20
|
+
//# sourceMappingURL=signer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAEtC,MAAa,sBAAuB,SAAQ,mBAAS;IAEnD,YAAY,UAAmB;QAC7B,KAAK,CACH;YACE,6DAA6D;YAC7D,UAAU,IAAI,gCAAgC;SAC/C,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QAPK;;;;mBAAO,wBAAwB;WAAC;IAQzC,CAAC;CACF;AAVD,wDAUC","sourcesContent":["import { BaseError } from \"./base.js\";\n\nexport class InvalidSignerTypeError extends BaseError {\n override name = \"InvalidSignerTypeError\";\n constructor(signerType?: string) {\n super(\n [\n \"Invalid signer type parameter passed to SmartAccountSigner.\",\n signerType ?? \"A signerType must be provided.\",\n ].join(\"\\n\")\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
export declare class TransactionMissingToParamError extends BaseError {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class FailedToFindTransactionError extends BaseError {
|
|
8
|
+
name: string;
|
|
9
|
+
constructor(hash: Hex);
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FailedToFindTransactionError = exports.TransactionMissingToParamError = void 0;
|
|
4
|
+
const base_js_1 = require("./base.js");
|
|
5
|
+
class TransactionMissingToParamError extends base_js_1.BaseError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Transaction is missing `to` address set on request");
|
|
8
|
+
Object.defineProperty(this, "name", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true,
|
|
12
|
+
value: "TransactionMissingToParamError"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.TransactionMissingToParamError = TransactionMissingToParamError;
|
|
17
|
+
class FailedToFindTransactionError extends base_js_1.BaseError {
|
|
18
|
+
constructor(hash) {
|
|
19
|
+
super(`Failed to find transaction for user operation ${hash}`);
|
|
20
|
+
Object.defineProperty(this, "name", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: "FailedToFindTransactionError"
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.FailedToFindTransactionError = FailedToFindTransactionError;
|
|
29
|
+
//# sourceMappingURL=transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/errors/transaction.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAEtC,MAAa,8BAA+B,SAAQ,mBAAS;IAE3D;QACE,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAFrD;;;;mBAAO,gCAAgC;WAAC;IAGjD,CAAC;CACF;AALD,wEAKC;AAED,MAAa,4BAA6B,SAAQ,mBAAS;IAEzD,YAAY,IAAS;QACnB,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;QAFxD;;;;mBAAO,8BAA8B;WAAC;IAG/C,CAAC;CACF;AALD,oEAKC","sourcesContent":["import type { Hex } from \"viem\";\nimport { BaseError } from \"./base.js\";\n\nexport class TransactionMissingToParamError extends BaseError {\n override name = \"TransactionMissingToParamError\";\n constructor() {\n super(\"Transaction is missing `to` address set on request\");\n }\n}\n\nexport class FailedToFindTransactionError extends BaseError {\n override name = \"FailedToFindTransactionError\";\n constructor(hash: Hex) {\n super(`Failed to find transaction for user operation ${hash}`);\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UserOperationRequest, UserOperationStruct } from "../types.js";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
export declare class InvalidUserOperationError extends BaseError {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor(uo: UserOperationStruct);
|
|
6
|
+
}
|
|
7
|
+
export declare class WaitForUserOperationError extends BaseError {
|
|
8
|
+
request: UserOperationRequest;
|
|
9
|
+
constructor(request: UserOperationRequest, error: Error);
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WaitForUserOperationError = exports.InvalidUserOperationError = void 0;
|
|
4
|
+
const base_js_1 = require("./base.js");
|
|
5
|
+
class InvalidUserOperationError extends base_js_1.BaseError {
|
|
6
|
+
constructor(uo) {
|
|
7
|
+
super(`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(uo, (_key, value) => typeof value === "bigint"
|
|
8
|
+
? {
|
|
9
|
+
type: "bigint",
|
|
10
|
+
value: value.toString(),
|
|
11
|
+
}
|
|
12
|
+
: value, 2)}`);
|
|
13
|
+
Object.defineProperty(this, "name", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: "InvalidUserOperationError"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.InvalidUserOperationError = InvalidUserOperationError;
|
|
22
|
+
class WaitForUserOperationError extends base_js_1.BaseError {
|
|
23
|
+
constructor(request, error) {
|
|
24
|
+
super(`Failed to find User Operation: ${error.message}`);
|
|
25
|
+
Object.defineProperty(this, "request", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: request
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.WaitForUserOperationError = WaitForUserOperationError;
|
|
34
|
+
//# sourceMappingURL=useroperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useroperation.js","sourceRoot":"","sources":["../../../src/errors/useroperation.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAStC,MAAa,yBAA0B,SAAQ,mBAAS;IAYtD,YAAY,EAAuB;QACjC,KAAK,CACH,yFAAyF,IAAI,CAAC,SAAS,CACrG,EAAE,EACF,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACd,OAAO,KAAK,KAAK,QAAQ;YACvB,CAAC,CAAC;gBACE,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;aACxB;YACH,CAAC,CAAC,KAAK,EACX,CAAC,CACF,EAAE,CACJ,CAAC;QArBK;;;;mBAAO,2BAA2B;WAAC;IAsB5C,CAAC;CACF;AA3BD,8DA2BC;AAQD,MAAa,yBAA0B,SAAQ,mBAAS;IAKtD,YAAmB,OAA6B,EAAE,KAAY;QAC5D,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAD/C;;;;mBAAO,OAAO;WAAsB;IAEhD,CAAC;CACF;AARD,8DAQC","sourcesContent":["import type { UserOperationRequest, UserOperationStruct } from \"../types.js\";\nimport { BaseError } from \"./base.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { dropAndReplaceUserOperation } from \"../actions/smartAccount/dropAndReplaceUserOperation.js\";\n\n/**\n * Thrown when a {@link UserOperationStruct} is not a valid request\n *\n * extends viem BaseError\n */\nexport class InvalidUserOperationError extends BaseError {\n /**\n * @inheritdoc\n */\n override name = \"InvalidUserOperationError\";\n /**\n * Creates an instance of InvalidUserOperationError.\n *\n * InvalidUserOperationError constructor\n *\n * @param uo the invalid user operation struct\n */\n constructor(uo: UserOperationStruct) {\n super(\n `Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(\n uo,\n (_key, value) =>\n typeof value === \"bigint\"\n ? {\n type: \"bigint\",\n value: value.toString(),\n }\n : value,\n 2\n )}`\n );\n }\n}\n\n/**\n * Error thrown when waiting for user operation request to be mined.\n *\n * Includes the internal error as well as the request that failed. This request\n * can then be used with {@link dropAndReplaceUserOperation} to retry the operation.\n */\nexport class WaitForUserOperationError extends BaseError {\n /**\n * @param request the user operation request that failed\n * @param error the underlying error that caused the failure\n */\n constructor(public request: UserOperationRequest, error: Error) {\n super(`Failed to find User Operation: ${error.message}`);\n }\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type { Abi } from "abitype";
|
|
2
|
+
export type { Address, HttpTransport } from "viem";
|
|
3
|
+
export * as chains from "viem/chains";
|
|
4
|
+
export { EntryPointAbi_v6 } from "./abis/EntryPointAbi_v6.js";
|
|
5
|
+
export { EntryPointAbi_v7 } from "./abis/EntryPointAbi_v7.js";
|
|
6
|
+
export { SimpleAccountAbi_v6 } from "./abis/SimpleAccountAbi_v6.js";
|
|
7
|
+
export { SimpleAccountAbi_v7 } from "./abis/SimpleAccountAbi_v7.js";
|
|
8
|
+
export { SimpleAccountFactoryAbi } from "./abis/SimpleAccountFactoryAbi.js";
|
|
9
|
+
export { BaseSmartContractAccount } from "./account/base.js";
|
|
10
|
+
export { createSimpleSmartAccount } from "./account/simple.js";
|
|
11
|
+
export type { SimpleSmartAccount } from "./account/simple.js";
|
|
12
|
+
export type * from "./account/smartContractAccount.js";
|
|
13
|
+
export { getAccountAddress, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, toSmartContractAccount, } from "./account/smartContractAccount.js";
|
|
14
|
+
export type { BaseSmartAccountParams, SignTypedDataParams, } from "./account/types.js";
|
|
15
|
+
export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js";
|
|
16
|
+
export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js";
|
|
17
|
+
export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js";
|
|
18
|
+
export { checkGasSponsorshipEligibility } from "./actions/smartAccount/checkGasSponsorshipEligibility.js";
|
|
19
|
+
export { dropAndReplaceUserOperation } from "./actions/smartAccount/dropAndReplaceUserOperation.js";
|
|
20
|
+
export { sendTransaction } from "./actions/smartAccount/sendTransaction.js";
|
|
21
|
+
export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
|
|
22
|
+
export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
|
|
23
|
+
export type * from "./actions/smartAccount/types.js";
|
|
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
|
+
export type * from "./client/bundlerClient.js";
|
|
27
|
+
export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
|
|
28
|
+
export type * from "./client/decorators/bundlerClient.js";
|
|
29
|
+
export { bundlerActions } from "./client/decorators/bundlerClient.js";
|
|
30
|
+
export type * from "./client/decorators/smartAccountClient.js";
|
|
31
|
+
export { smartAccountClientActions } from "./client/decorators/smartAccountClient.js";
|
|
32
|
+
export { isSmartAccountClient } from "./client/isSmartAccountClient.js";
|
|
33
|
+
export { ConnectionConfigSchema, SmartAccountClientOptsSchema, } from "./client/schema.js";
|
|
34
|
+
export type * from "./client/smartAccountClient.js";
|
|
35
|
+
export { createSmartAccountClient, createSmartAccountClientFromExisting, } from "./client/smartAccountClient.js";
|
|
36
|
+
export type * from "./client/types.js";
|
|
37
|
+
export { convertChainIdToCoinType, convertCoinTypeToChain, convertCoinTypeToChainId, } from "./ens/utils.js";
|
|
38
|
+
export { defaultEntryPointVersion, entryPointRegistry, getEntryPoint, isEntryPointVersion, } from "./entrypoint/index.js";
|
|
39
|
+
export type * from "./entrypoint/types.js";
|
|
40
|
+
export { AccountNotFoundError, AccountRequiresOwnerError, BatchExecutionNotSupportedError, DefaultFactoryNotDefinedError, FailedToGetStorageSlotError, GetCounterFactualAddressError, IncorrectAccountType, SignTransactionNotSupportedError, SmartAccountWithSignerRequiredError, UpgradeToAndCallNotSupportedError, UpgradesNotSupportedError, } from "./errors/account.js";
|
|
41
|
+
export { BaseError } from "./errors/base.js";
|
|
42
|
+
export { ChainNotFoundError, IncompatibleClientError, InvalidRpcUrlError, } from "./errors/client.js";
|
|
43
|
+
export { EntryPointNotFoundError, InvalidEntryPointError, } from "./errors/entrypoint.js";
|
|
44
|
+
export { InvalidSignerTypeError } from "./errors/signer.js";
|
|
45
|
+
export { FailedToFindTransactionError, TransactionMissingToParamError, } from "./errors/transaction.js";
|
|
46
|
+
export { InvalidUserOperationError, WaitForUserOperationError, } from "./errors/useroperation.js";
|
|
47
|
+
export { LogLevel, Logger } from "./logger.js";
|
|
48
|
+
export { middlewareActions } from "./middleware/actions.js";
|
|
49
|
+
export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js";
|
|
50
|
+
export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js";
|
|
51
|
+
export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js";
|
|
52
|
+
export { defaultUserOpSigner } from "./middleware/defaults/userOpSigner.js";
|
|
53
|
+
export { noopMiddleware } from "./middleware/noopMiddleware.js";
|
|
54
|
+
export type * from "./middleware/types.js";
|
|
55
|
+
export { LocalAccountSigner } from "./signer/local-account.js";
|
|
56
|
+
export { SignerSchema, isSigner } from "./signer/schema.js";
|
|
57
|
+
export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js";
|
|
58
|
+
export { verifyEIP6492Signature, wrapSignatureWith6492, } from "./signer/utils.js";
|
|
59
|
+
export { WalletClientSigner } from "./signer/wallet-client.js";
|
|
60
|
+
export { split, type SplitTransportParams } from "./transport/split.js";
|
|
61
|
+
export type * from "./types.js";
|
|
62
|
+
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, defineReadOnly, filterUndefined, getChain, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.convertChainIdToCoinType = exports.createSmartAccountClientFromExisting = exports.createSmartAccountClient = exports.SmartAccountClientOptsSchema = exports.ConnectionConfigSchema = exports.isSmartAccountClient = exports.smartAccountClientActions = exports.bundlerActions = exports.createBundlerClientFromExisting = exports.createBundlerClient = exports.zoraSepolia = exports.zora = exports.sepolia = exports.polygonMumbai = exports.polygonAmoy = exports.polygon = exports.optimismSepolia = exports.optimismGoerli = exports.optimism = exports.mainnet = exports.goerli = exports.fraxtalSepolia = exports.fraxtal = exports.baseSepolia = exports.baseGoerli = exports.base = exports.arbitrumSepolia = exports.arbitrumGoerli = exports.arbitrum = exports.waitForUserOperationTransaction = exports.sendUserOperation = exports.sendTransactions = exports.sendTransaction = exports.dropAndReplaceUserOperation = exports.checkGasSponsorshipEligibility = exports.buildUserOperationFromTxs = exports.buildUserOperationFromTx = exports.buildUserOperation = exports.toSmartContractAccount = exports.parseFactoryAddressFromAccountInitCode = exports.isSmartAccountWithSigner = exports.getAccountAddress = exports.createSimpleSmartAccount = exports.BaseSmartContractAccount = exports.SimpleAccountFactoryAbi = exports.SimpleAccountAbi_v7 = exports.SimpleAccountAbi_v6 = exports.EntryPointAbi_v7 = exports.EntryPointAbi_v6 = exports.chains = void 0;
|
|
27
|
+
exports.allEqual = exports.MultiplierSchema = exports.HexSchema = exports.ChainSchema = exports.BigNumberishSchema = exports.BigNumberishRangeSchema = exports.AlchemyChainMap = exports.split = exports.WalletClientSigner = exports.wrapSignatureWith6492 = exports.verifyEIP6492Signature = exports.isSigner = exports.SignerSchema = exports.LocalAccountSigner = exports.noopMiddleware = exports.defaultUserOpSigner = exports.defaultPaymasterAndData = exports.defaultGasEstimator = exports.defaultFeeEstimator = exports.middlewareActions = exports.Logger = exports.LogLevel = exports.WaitForUserOperationError = exports.InvalidUserOperationError = exports.TransactionMissingToParamError = exports.FailedToFindTransactionError = exports.InvalidSignerTypeError = exports.InvalidEntryPointError = exports.EntryPointNotFoundError = exports.InvalidRpcUrlError = exports.IncompatibleClientError = exports.ChainNotFoundError = exports.BaseError = exports.UpgradesNotSupportedError = exports.UpgradeToAndCallNotSupportedError = exports.SmartAccountWithSignerRequiredError = exports.SignTransactionNotSupportedError = exports.IncorrectAccountType = exports.GetCounterFactualAddressError = exports.FailedToGetStorageSlotError = exports.DefaultFactoryNotDefinedError = exports.BatchExecutionNotSupportedError = exports.AccountRequiresOwnerError = exports.AccountNotFoundError = exports.isEntryPointVersion = exports.getEntryPoint = exports.entryPointRegistry = exports.defaultEntryPointVersion = exports.convertCoinTypeToChainId = exports.convertCoinTypeToChain = void 0;
|
|
28
|
+
exports.toRecord = exports.takeBytes = exports.resolveProperties = exports.pick = exports.parsePaymasterAndData = exports.isValidRequest = exports.isMultiplier = exports.isBigNumberish = exports.getDefaultUserOperationFeeOptions = exports.getDefaultSimpleAccountFactoryAddress = exports.getChain = exports.filterUndefined = exports.defineReadOnly = exports.deepHexlify = exports.concatPaymasterAndData = exports.bypassPaymasterAndDataEmptyHex = exports.bypassPaymasterAndData = exports.bigIntMultiply = exports.bigIntMax = exports.asyncPipe = exports.applyUserOpOverrideOrFeeOption = exports.applyUserOpOverride = exports.applyUserOpFeeOption = void 0;
|
|
29
|
+
exports.chains = __importStar(require("viem/chains"));
|
|
30
|
+
var EntryPointAbi_v6_js_1 = require("./abis/EntryPointAbi_v6.js");
|
|
31
|
+
Object.defineProperty(exports, "EntryPointAbi_v6", { enumerable: true, get: function () { return EntryPointAbi_v6_js_1.EntryPointAbi_v6; } });
|
|
32
|
+
var EntryPointAbi_v7_js_1 = require("./abis/EntryPointAbi_v7.js");
|
|
33
|
+
Object.defineProperty(exports, "EntryPointAbi_v7", { enumerable: true, get: function () { return EntryPointAbi_v7_js_1.EntryPointAbi_v7; } });
|
|
34
|
+
var SimpleAccountAbi_v6_js_1 = require("./abis/SimpleAccountAbi_v6.js");
|
|
35
|
+
Object.defineProperty(exports, "SimpleAccountAbi_v6", { enumerable: true, get: function () { return SimpleAccountAbi_v6_js_1.SimpleAccountAbi_v6; } });
|
|
36
|
+
var SimpleAccountAbi_v7_js_1 = require("./abis/SimpleAccountAbi_v7.js");
|
|
37
|
+
Object.defineProperty(exports, "SimpleAccountAbi_v7", { enumerable: true, get: function () { return SimpleAccountAbi_v7_js_1.SimpleAccountAbi_v7; } });
|
|
38
|
+
var SimpleAccountFactoryAbi_js_1 = require("./abis/SimpleAccountFactoryAbi.js");
|
|
39
|
+
Object.defineProperty(exports, "SimpleAccountFactoryAbi", { enumerable: true, get: function () { return SimpleAccountFactoryAbi_js_1.SimpleAccountFactoryAbi; } });
|
|
40
|
+
var base_js_1 = require("./account/base.js");
|
|
41
|
+
Object.defineProperty(exports, "BaseSmartContractAccount", { enumerable: true, get: function () { return base_js_1.BaseSmartContractAccount; } });
|
|
42
|
+
var simple_js_1 = require("./account/simple.js");
|
|
43
|
+
Object.defineProperty(exports, "createSimpleSmartAccount", { enumerable: true, get: function () { return simple_js_1.createSimpleSmartAccount; } });
|
|
44
|
+
var smartContractAccount_js_1 = require("./account/smartContractAccount.js");
|
|
45
|
+
Object.defineProperty(exports, "getAccountAddress", { enumerable: true, get: function () { return smartContractAccount_js_1.getAccountAddress; } });
|
|
46
|
+
Object.defineProperty(exports, "isSmartAccountWithSigner", { enumerable: true, get: function () { return smartContractAccount_js_1.isSmartAccountWithSigner; } });
|
|
47
|
+
Object.defineProperty(exports, "parseFactoryAddressFromAccountInitCode", { enumerable: true, get: function () { return smartContractAccount_js_1.parseFactoryAddressFromAccountInitCode; } });
|
|
48
|
+
Object.defineProperty(exports, "toSmartContractAccount", { enumerable: true, get: function () { return smartContractAccount_js_1.toSmartContractAccount; } });
|
|
49
|
+
var buildUserOperation_js_1 = require("./actions/smartAccount/buildUserOperation.js");
|
|
50
|
+
Object.defineProperty(exports, "buildUserOperation", { enumerable: true, get: function () { return buildUserOperation_js_1.buildUserOperation; } });
|
|
51
|
+
var buildUserOperationFromTx_js_1 = require("./actions/smartAccount/buildUserOperationFromTx.js");
|
|
52
|
+
Object.defineProperty(exports, "buildUserOperationFromTx", { enumerable: true, get: function () { return buildUserOperationFromTx_js_1.buildUserOperationFromTx; } });
|
|
53
|
+
var buildUserOperationFromTxs_js_1 = require("./actions/smartAccount/buildUserOperationFromTxs.js");
|
|
54
|
+
Object.defineProperty(exports, "buildUserOperationFromTxs", { enumerable: true, get: function () { return buildUserOperationFromTxs_js_1.buildUserOperationFromTxs; } });
|
|
55
|
+
var checkGasSponsorshipEligibility_js_1 = require("./actions/smartAccount/checkGasSponsorshipEligibility.js");
|
|
56
|
+
Object.defineProperty(exports, "checkGasSponsorshipEligibility", { enumerable: true, get: function () { return checkGasSponsorshipEligibility_js_1.checkGasSponsorshipEligibility; } });
|
|
57
|
+
var dropAndReplaceUserOperation_js_1 = require("./actions/smartAccount/dropAndReplaceUserOperation.js");
|
|
58
|
+
Object.defineProperty(exports, "dropAndReplaceUserOperation", { enumerable: true, get: function () { return dropAndReplaceUserOperation_js_1.dropAndReplaceUserOperation; } });
|
|
59
|
+
var sendTransaction_js_1 = require("./actions/smartAccount/sendTransaction.js");
|
|
60
|
+
Object.defineProperty(exports, "sendTransaction", { enumerable: true, get: function () { return sendTransaction_js_1.sendTransaction; } });
|
|
61
|
+
var sendTransactions_js_1 = require("./actions/smartAccount/sendTransactions.js");
|
|
62
|
+
Object.defineProperty(exports, "sendTransactions", { enumerable: true, get: function () { return sendTransactions_js_1.sendTransactions; } });
|
|
63
|
+
var sendUserOperation_js_1 = require("./actions/smartAccount/sendUserOperation.js");
|
|
64
|
+
Object.defineProperty(exports, "sendUserOperation", { enumerable: true, get: function () { return sendUserOperation_js_1.sendUserOperation; } });
|
|
65
|
+
var waitForUserOperationTransacation_js_1 = require("./actions/smartAccount/waitForUserOperationTransacation.js");
|
|
66
|
+
Object.defineProperty(exports, "waitForUserOperationTransaction", { enumerable: true, get: function () { return waitForUserOperationTransacation_js_1.waitForUserOperationTransaction; } });
|
|
67
|
+
var index_js_1 = require("./chains/index.js");
|
|
68
|
+
Object.defineProperty(exports, "arbitrum", { enumerable: true, get: function () { return index_js_1.arbitrum; } });
|
|
69
|
+
Object.defineProperty(exports, "arbitrumGoerli", { enumerable: true, get: function () { return index_js_1.arbitrumGoerli; } });
|
|
70
|
+
Object.defineProperty(exports, "arbitrumSepolia", { enumerable: true, get: function () { return index_js_1.arbitrumSepolia; } });
|
|
71
|
+
Object.defineProperty(exports, "base", { enumerable: true, get: function () { return index_js_1.base; } });
|
|
72
|
+
Object.defineProperty(exports, "baseGoerli", { enumerable: true, get: function () { return index_js_1.baseGoerli; } });
|
|
73
|
+
Object.defineProperty(exports, "baseSepolia", { enumerable: true, get: function () { return index_js_1.baseSepolia; } });
|
|
74
|
+
Object.defineProperty(exports, "fraxtal", { enumerable: true, get: function () { return index_js_1.fraxtal; } });
|
|
75
|
+
Object.defineProperty(exports, "fraxtalSepolia", { enumerable: true, get: function () { return index_js_1.fraxtalSepolia; } });
|
|
76
|
+
Object.defineProperty(exports, "goerli", { enumerable: true, get: function () { return index_js_1.goerli; } });
|
|
77
|
+
Object.defineProperty(exports, "mainnet", { enumerable: true, get: function () { return index_js_1.mainnet; } });
|
|
78
|
+
Object.defineProperty(exports, "optimism", { enumerable: true, get: function () { return index_js_1.optimism; } });
|
|
79
|
+
Object.defineProperty(exports, "optimismGoerli", { enumerable: true, get: function () { return index_js_1.optimismGoerli; } });
|
|
80
|
+
Object.defineProperty(exports, "optimismSepolia", { enumerable: true, get: function () { return index_js_1.optimismSepolia; } });
|
|
81
|
+
Object.defineProperty(exports, "polygon", { enumerable: true, get: function () { return index_js_1.polygon; } });
|
|
82
|
+
Object.defineProperty(exports, "polygonAmoy", { enumerable: true, get: function () { return index_js_1.polygonAmoy; } });
|
|
83
|
+
Object.defineProperty(exports, "polygonMumbai", { enumerable: true, get: function () { return index_js_1.polygonMumbai; } });
|
|
84
|
+
Object.defineProperty(exports, "sepolia", { enumerable: true, get: function () { return index_js_1.sepolia; } });
|
|
85
|
+
Object.defineProperty(exports, "zora", { enumerable: true, get: function () { return index_js_1.zora; } });
|
|
86
|
+
Object.defineProperty(exports, "zoraSepolia", { enumerable: true, get: function () { return index_js_1.zoraSepolia; } });
|
|
87
|
+
var bundlerClient_js_1 = require("./client/bundlerClient.js");
|
|
88
|
+
Object.defineProperty(exports, "createBundlerClient", { enumerable: true, get: function () { return bundlerClient_js_1.createBundlerClient; } });
|
|
89
|
+
Object.defineProperty(exports, "createBundlerClientFromExisting", { enumerable: true, get: function () { return bundlerClient_js_1.createBundlerClientFromExisting; } });
|
|
90
|
+
var bundlerClient_js_2 = require("./client/decorators/bundlerClient.js");
|
|
91
|
+
Object.defineProperty(exports, "bundlerActions", { enumerable: true, get: function () { return bundlerClient_js_2.bundlerActions; } });
|
|
92
|
+
var smartAccountClient_js_1 = require("./client/decorators/smartAccountClient.js");
|
|
93
|
+
Object.defineProperty(exports, "smartAccountClientActions", { enumerable: true, get: function () { return smartAccountClient_js_1.smartAccountClientActions; } });
|
|
94
|
+
var isSmartAccountClient_js_1 = require("./client/isSmartAccountClient.js");
|
|
95
|
+
Object.defineProperty(exports, "isSmartAccountClient", { enumerable: true, get: function () { return isSmartAccountClient_js_1.isSmartAccountClient; } });
|
|
96
|
+
var schema_js_1 = require("./client/schema.js");
|
|
97
|
+
Object.defineProperty(exports, "ConnectionConfigSchema", { enumerable: true, get: function () { return schema_js_1.ConnectionConfigSchema; } });
|
|
98
|
+
Object.defineProperty(exports, "SmartAccountClientOptsSchema", { enumerable: true, get: function () { return schema_js_1.SmartAccountClientOptsSchema; } });
|
|
99
|
+
var smartAccountClient_js_2 = require("./client/smartAccountClient.js");
|
|
100
|
+
Object.defineProperty(exports, "createSmartAccountClient", { enumerable: true, get: function () { return smartAccountClient_js_2.createSmartAccountClient; } });
|
|
101
|
+
Object.defineProperty(exports, "createSmartAccountClientFromExisting", { enumerable: true, get: function () { return smartAccountClient_js_2.createSmartAccountClientFromExisting; } });
|
|
102
|
+
var utils_js_1 = require("./ens/utils.js");
|
|
103
|
+
Object.defineProperty(exports, "convertChainIdToCoinType", { enumerable: true, get: function () { return utils_js_1.convertChainIdToCoinType; } });
|
|
104
|
+
Object.defineProperty(exports, "convertCoinTypeToChain", { enumerable: true, get: function () { return utils_js_1.convertCoinTypeToChain; } });
|
|
105
|
+
Object.defineProperty(exports, "convertCoinTypeToChainId", { enumerable: true, get: function () { return utils_js_1.convertCoinTypeToChainId; } });
|
|
106
|
+
var index_js_2 = require("./entrypoint/index.js");
|
|
107
|
+
Object.defineProperty(exports, "defaultEntryPointVersion", { enumerable: true, get: function () { return index_js_2.defaultEntryPointVersion; } });
|
|
108
|
+
Object.defineProperty(exports, "entryPointRegistry", { enumerable: true, get: function () { return index_js_2.entryPointRegistry; } });
|
|
109
|
+
Object.defineProperty(exports, "getEntryPoint", { enumerable: true, get: function () { return index_js_2.getEntryPoint; } });
|
|
110
|
+
Object.defineProperty(exports, "isEntryPointVersion", { enumerable: true, get: function () { return index_js_2.isEntryPointVersion; } });
|
|
111
|
+
var account_js_1 = require("./errors/account.js");
|
|
112
|
+
Object.defineProperty(exports, "AccountNotFoundError", { enumerable: true, get: function () { return account_js_1.AccountNotFoundError; } });
|
|
113
|
+
Object.defineProperty(exports, "AccountRequiresOwnerError", { enumerable: true, get: function () { return account_js_1.AccountRequiresOwnerError; } });
|
|
114
|
+
Object.defineProperty(exports, "BatchExecutionNotSupportedError", { enumerable: true, get: function () { return account_js_1.BatchExecutionNotSupportedError; } });
|
|
115
|
+
Object.defineProperty(exports, "DefaultFactoryNotDefinedError", { enumerable: true, get: function () { return account_js_1.DefaultFactoryNotDefinedError; } });
|
|
116
|
+
Object.defineProperty(exports, "FailedToGetStorageSlotError", { enumerable: true, get: function () { return account_js_1.FailedToGetStorageSlotError; } });
|
|
117
|
+
Object.defineProperty(exports, "GetCounterFactualAddressError", { enumerable: true, get: function () { return account_js_1.GetCounterFactualAddressError; } });
|
|
118
|
+
Object.defineProperty(exports, "IncorrectAccountType", { enumerable: true, get: function () { return account_js_1.IncorrectAccountType; } });
|
|
119
|
+
Object.defineProperty(exports, "SignTransactionNotSupportedError", { enumerable: true, get: function () { return account_js_1.SignTransactionNotSupportedError; } });
|
|
120
|
+
Object.defineProperty(exports, "SmartAccountWithSignerRequiredError", { enumerable: true, get: function () { return account_js_1.SmartAccountWithSignerRequiredError; } });
|
|
121
|
+
Object.defineProperty(exports, "UpgradeToAndCallNotSupportedError", { enumerable: true, get: function () { return account_js_1.UpgradeToAndCallNotSupportedError; } });
|
|
122
|
+
Object.defineProperty(exports, "UpgradesNotSupportedError", { enumerable: true, get: function () { return account_js_1.UpgradesNotSupportedError; } });
|
|
123
|
+
var base_js_2 = require("./errors/base.js");
|
|
124
|
+
Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_js_2.BaseError; } });
|
|
125
|
+
var client_js_1 = require("./errors/client.js");
|
|
126
|
+
Object.defineProperty(exports, "ChainNotFoundError", { enumerable: true, get: function () { return client_js_1.ChainNotFoundError; } });
|
|
127
|
+
Object.defineProperty(exports, "IncompatibleClientError", { enumerable: true, get: function () { return client_js_1.IncompatibleClientError; } });
|
|
128
|
+
Object.defineProperty(exports, "InvalidRpcUrlError", { enumerable: true, get: function () { return client_js_1.InvalidRpcUrlError; } });
|
|
129
|
+
var entrypoint_js_1 = require("./errors/entrypoint.js");
|
|
130
|
+
Object.defineProperty(exports, "EntryPointNotFoundError", { enumerable: true, get: function () { return entrypoint_js_1.EntryPointNotFoundError; } });
|
|
131
|
+
Object.defineProperty(exports, "InvalidEntryPointError", { enumerable: true, get: function () { return entrypoint_js_1.InvalidEntryPointError; } });
|
|
132
|
+
var signer_js_1 = require("./errors/signer.js");
|
|
133
|
+
Object.defineProperty(exports, "InvalidSignerTypeError", { enumerable: true, get: function () { return signer_js_1.InvalidSignerTypeError; } });
|
|
134
|
+
var transaction_js_1 = require("./errors/transaction.js");
|
|
135
|
+
Object.defineProperty(exports, "FailedToFindTransactionError", { enumerable: true, get: function () { return transaction_js_1.FailedToFindTransactionError; } });
|
|
136
|
+
Object.defineProperty(exports, "TransactionMissingToParamError", { enumerable: true, get: function () { return transaction_js_1.TransactionMissingToParamError; } });
|
|
137
|
+
var useroperation_js_1 = require("./errors/useroperation.js");
|
|
138
|
+
Object.defineProperty(exports, "InvalidUserOperationError", { enumerable: true, get: function () { return useroperation_js_1.InvalidUserOperationError; } });
|
|
139
|
+
Object.defineProperty(exports, "WaitForUserOperationError", { enumerable: true, get: function () { return useroperation_js_1.WaitForUserOperationError; } });
|
|
140
|
+
var logger_js_1 = require("./logger.js");
|
|
141
|
+
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_js_1.LogLevel; } });
|
|
142
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_js_1.Logger; } });
|
|
143
|
+
var actions_js_1 = require("./middleware/actions.js");
|
|
144
|
+
Object.defineProperty(exports, "middlewareActions", { enumerable: true, get: function () { return actions_js_1.middlewareActions; } });
|
|
145
|
+
var feeEstimator_js_1 = require("./middleware/defaults/feeEstimator.js");
|
|
146
|
+
Object.defineProperty(exports, "defaultFeeEstimator", { enumerable: true, get: function () { return feeEstimator_js_1.defaultFeeEstimator; } });
|
|
147
|
+
var gasEstimator_js_1 = require("./middleware/defaults/gasEstimator.js");
|
|
148
|
+
Object.defineProperty(exports, "defaultGasEstimator", { enumerable: true, get: function () { return gasEstimator_js_1.defaultGasEstimator; } });
|
|
149
|
+
var paymasterAndData_js_1 = require("./middleware/defaults/paymasterAndData.js");
|
|
150
|
+
Object.defineProperty(exports, "defaultPaymasterAndData", { enumerable: true, get: function () { return paymasterAndData_js_1.defaultPaymasterAndData; } });
|
|
151
|
+
var userOpSigner_js_1 = require("./middleware/defaults/userOpSigner.js");
|
|
152
|
+
Object.defineProperty(exports, "defaultUserOpSigner", { enumerable: true, get: function () { return userOpSigner_js_1.defaultUserOpSigner; } });
|
|
153
|
+
var noopMiddleware_js_1 = require("./middleware/noopMiddleware.js");
|
|
154
|
+
Object.defineProperty(exports, "noopMiddleware", { enumerable: true, get: function () { return noopMiddleware_js_1.noopMiddleware; } });
|
|
155
|
+
var local_account_js_1 = require("./signer/local-account.js");
|
|
156
|
+
Object.defineProperty(exports, "LocalAccountSigner", { enumerable: true, get: function () { return local_account_js_1.LocalAccountSigner; } });
|
|
157
|
+
var schema_js_2 = require("./signer/schema.js");
|
|
158
|
+
Object.defineProperty(exports, "SignerSchema", { enumerable: true, get: function () { return schema_js_2.SignerSchema; } });
|
|
159
|
+
Object.defineProperty(exports, "isSigner", { enumerable: true, get: function () { return schema_js_2.isSigner; } });
|
|
160
|
+
var utils_js_2 = require("./signer/utils.js");
|
|
161
|
+
Object.defineProperty(exports, "verifyEIP6492Signature", { enumerable: true, get: function () { return utils_js_2.verifyEIP6492Signature; } });
|
|
162
|
+
Object.defineProperty(exports, "wrapSignatureWith6492", { enumerable: true, get: function () { return utils_js_2.wrapSignatureWith6492; } });
|
|
163
|
+
var wallet_client_js_1 = require("./signer/wallet-client.js");
|
|
164
|
+
Object.defineProperty(exports, "WalletClientSigner", { enumerable: true, get: function () { return wallet_client_js_1.WalletClientSigner; } });
|
|
165
|
+
var split_js_1 = require("./transport/split.js");
|
|
166
|
+
Object.defineProperty(exports, "split", { enumerable: true, get: function () { return split_js_1.split; } });
|
|
167
|
+
var index_js_3 = require("./utils/index.js");
|
|
168
|
+
Object.defineProperty(exports, "AlchemyChainMap", { enumerable: true, get: function () { return index_js_3.AlchemyChainMap; } });
|
|
169
|
+
Object.defineProperty(exports, "BigNumberishRangeSchema", { enumerable: true, get: function () { return index_js_3.BigNumberishRangeSchema; } });
|
|
170
|
+
Object.defineProperty(exports, "BigNumberishSchema", { enumerable: true, get: function () { return index_js_3.BigNumberishSchema; } });
|
|
171
|
+
Object.defineProperty(exports, "ChainSchema", { enumerable: true, get: function () { return index_js_3.ChainSchema; } });
|
|
172
|
+
Object.defineProperty(exports, "HexSchema", { enumerable: true, get: function () { return index_js_3.HexSchema; } });
|
|
173
|
+
Object.defineProperty(exports, "MultiplierSchema", { enumerable: true, get: function () { return index_js_3.MultiplierSchema; } });
|
|
174
|
+
Object.defineProperty(exports, "allEqual", { enumerable: true, get: function () { return index_js_3.allEqual; } });
|
|
175
|
+
Object.defineProperty(exports, "applyUserOpFeeOption", { enumerable: true, get: function () { return index_js_3.applyUserOpFeeOption; } });
|
|
176
|
+
Object.defineProperty(exports, "applyUserOpOverride", { enumerable: true, get: function () { return index_js_3.applyUserOpOverride; } });
|
|
177
|
+
Object.defineProperty(exports, "applyUserOpOverrideOrFeeOption", { enumerable: true, get: function () { return index_js_3.applyUserOpOverrideOrFeeOption; } });
|
|
178
|
+
Object.defineProperty(exports, "asyncPipe", { enumerable: true, get: function () { return index_js_3.asyncPipe; } });
|
|
179
|
+
Object.defineProperty(exports, "bigIntMax", { enumerable: true, get: function () { return index_js_3.bigIntMax; } });
|
|
180
|
+
Object.defineProperty(exports, "bigIntMultiply", { enumerable: true, get: function () { return index_js_3.bigIntMultiply; } });
|
|
181
|
+
Object.defineProperty(exports, "bypassPaymasterAndData", { enumerable: true, get: function () { return index_js_3.bypassPaymasterAndData; } });
|
|
182
|
+
Object.defineProperty(exports, "bypassPaymasterAndDataEmptyHex", { enumerable: true, get: function () { return index_js_3.bypassPaymasterAndDataEmptyHex; } });
|
|
183
|
+
Object.defineProperty(exports, "concatPaymasterAndData", { enumerable: true, get: function () { return index_js_3.concatPaymasterAndData; } });
|
|
184
|
+
Object.defineProperty(exports, "deepHexlify", { enumerable: true, get: function () { return index_js_3.deepHexlify; } });
|
|
185
|
+
Object.defineProperty(exports, "defineReadOnly", { enumerable: true, get: function () { return index_js_3.defineReadOnly; } });
|
|
186
|
+
Object.defineProperty(exports, "filterUndefined", { enumerable: true, get: function () { return index_js_3.filterUndefined; } });
|
|
187
|
+
Object.defineProperty(exports, "getChain", { enumerable: true, get: function () { return index_js_3.getChain; } });
|
|
188
|
+
Object.defineProperty(exports, "getDefaultSimpleAccountFactoryAddress", { enumerable: true, get: function () { return index_js_3.getDefaultSimpleAccountFactoryAddress; } });
|
|
189
|
+
Object.defineProperty(exports, "getDefaultUserOperationFeeOptions", { enumerable: true, get: function () { return index_js_3.getDefaultUserOperationFeeOptions; } });
|
|
190
|
+
Object.defineProperty(exports, "isBigNumberish", { enumerable: true, get: function () { return index_js_3.isBigNumberish; } });
|
|
191
|
+
Object.defineProperty(exports, "isMultiplier", { enumerable: true, get: function () { return index_js_3.isMultiplier; } });
|
|
192
|
+
Object.defineProperty(exports, "isValidRequest", { enumerable: true, get: function () { return index_js_3.isValidRequest; } });
|
|
193
|
+
Object.defineProperty(exports, "parsePaymasterAndData", { enumerable: true, get: function () { return index_js_3.parsePaymasterAndData; } });
|
|
194
|
+
Object.defineProperty(exports, "pick", { enumerable: true, get: function () { return index_js_3.pick; } });
|
|
195
|
+
Object.defineProperty(exports, "resolveProperties", { enumerable: true, get: function () { return index_js_3.resolveProperties; } });
|
|
196
|
+
Object.defineProperty(exports, "takeBytes", { enumerable: true, get: function () { return index_js_3.takeBytes; } });
|
|
197
|
+
Object.defineProperty(exports, "toRecord", { enumerable: true, get: function () { return index_js_3.toRecord; } });
|
|
198
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAsC;AAEtC,kEAA8D;AAArD,uHAAA,gBAAgB,OAAA;AACzB,kEAA8D;AAArD,uHAAA,gBAAgB,OAAA;AACzB,wEAAoE;AAA3D,6HAAA,mBAAmB,OAAA;AAC5B,wEAAoE;AAA3D,6HAAA,mBAAmB,OAAA;AAC5B,gFAA4E;AAAnE,qIAAA,uBAAuB,OAAA;AAChC,6CAA6D;AAApD,mHAAA,wBAAwB,OAAA;AACjC,iDAA+D;AAAtD,qHAAA,wBAAwB,OAAA;AAGjC,6EAK2C;AAJzC,4HAAA,iBAAiB,OAAA;AACjB,mIAAA,wBAAwB,OAAA;AACxB,iJAAA,sCAAsC,OAAA;AACtC,iIAAA,sBAAsB,OAAA;AAMxB,sFAAkF;AAAzE,2HAAA,kBAAkB,OAAA;AAC3B,kGAA8F;AAArF,uIAAA,wBAAwB,OAAA;AACjC,oGAAgG;AAAvF,yIAAA,yBAAyB,OAAA;AAClC,8GAA0G;AAAjG,mJAAA,8BAA8B,OAAA;AACvC,wGAAoG;AAA3F,6IAAA,2BAA2B,OAAA;AACpC,gFAA4E;AAAnE,qHAAA,eAAe,OAAA;AACxB,kFAA8E;AAArE,uHAAA,gBAAgB,OAAA;AACzB,oFAAgF;AAAvE,yHAAA,iBAAiB,OAAA;AAE1B,kHAA6G;AAApG,sJAAA,+BAA+B,OAAA;AACxC,8CAoB2B;AAnBzB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,gGAAA,IAAI,OAAA;AACJ,sGAAA,UAAU,OAAA;AACV,uGAAA,WAAW,OAAA;AACX,mGAAA,OAAO,OAAA;AACP,0GAAA,cAAc,OAAA;AACd,kGAAA,MAAM,OAAA;AACN,mGAAA,OAAO,OAAA;AACP,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,mGAAA,OAAO,OAAA;AACP,uGAAA,WAAW,OAAA;AACX,yGAAA,aAAa,OAAA;AACb,mGAAA,OAAO,OAAA;AACP,gGAAA,IAAI,OAAA;AACJ,uGAAA,WAAW,OAAA;AAGb,8DAGmC;AAFjC,uHAAA,mBAAmB,OAAA;AACnB,mIAAA,+BAA+B,OAAA;AAGjC,yEAAsE;AAA7D,kHAAA,cAAc,OAAA;AAEvB,mFAAsF;AAA7E,kIAAA,yBAAyB,OAAA;AAClC,4EAAwE;AAA/D,+HAAA,oBAAoB,OAAA;AAC7B,gDAG4B;AAF1B,mHAAA,sBAAsB,OAAA;AACtB,yHAAA,4BAA4B,OAAA;AAG9B,wEAGwC;AAFtC,iIAAA,wBAAwB,OAAA;AACxB,6IAAA,oCAAoC,OAAA;AAGtC,2CAIwB;AAHtB,oHAAA,wBAAwB,OAAA;AACxB,kHAAA,sBAAsB,OAAA;AACtB,oHAAA,wBAAwB,OAAA;AAE1B,kDAK+B;AAJ7B,oHAAA,wBAAwB,OAAA;AACxB,8GAAA,kBAAkB,OAAA;AAClB,yGAAA,aAAa,OAAA;AACb,+GAAA,mBAAmB,OAAA;AAGrB,kDAY6B;AAX3B,kHAAA,oBAAoB,OAAA;AACpB,uHAAA,yBAAyB,OAAA;AACzB,6HAAA,+BAA+B,OAAA;AAC/B,2HAAA,6BAA6B,OAAA;AAC7B,yHAAA,2BAA2B,OAAA;AAC3B,2HAAA,6BAA6B,OAAA;AAC7B,kHAAA,oBAAoB,OAAA;AACpB,8HAAA,gCAAgC,OAAA;AAChC,iIAAA,mCAAmC,OAAA;AACnC,+HAAA,iCAAiC,OAAA;AACjC,uHAAA,yBAAyB,OAAA;AAE3B,4CAA6C;AAApC,oGAAA,SAAS,OAAA;AAClB,gDAI4B;AAH1B,+GAAA,kBAAkB,OAAA;AAClB,oHAAA,uBAAuB,OAAA;AACvB,+GAAA,kBAAkB,OAAA;AAEpB,wDAGgC;AAF9B,wHAAA,uBAAuB,OAAA;AACvB,uHAAA,sBAAsB,OAAA;AAExB,gDAA4D;AAAnD,mHAAA,sBAAsB,OAAA;AAC/B,0DAGiC;AAF/B,8HAAA,4BAA4B,OAAA;AAC5B,gIAAA,8BAA8B,OAAA;AAEhC,8DAGmC;AAFjC,6HAAA,yBAAyB,OAAA;AACzB,6HAAA,yBAAyB,OAAA;AAE3B,yCAA+C;AAAtC,qGAAA,QAAQ,OAAA;AAAE,mGAAA,MAAM,OAAA;AACzB,sDAA4D;AAAnD,+GAAA,iBAAiB,OAAA;AAC1B,yEAA4E;AAAnE,sHAAA,mBAAmB,OAAA;AAC5B,yEAA4E;AAAnE,sHAAA,mBAAmB,OAAA;AAC5B,iFAAoF;AAA3E,8HAAA,uBAAuB,OAAA;AAChC,yEAA4E;AAAnE,sHAAA,mBAAmB,OAAA;AAC5B,oEAAgE;AAAvD,mHAAA,cAAc,OAAA;AAEvB,8DAA+D;AAAtD,sHAAA,kBAAkB,OAAA;AAC3B,gDAA4D;AAAnD,yGAAA,YAAY,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAK/B,8CAG2B;AAFzB,kHAAA,sBAAsB,OAAA;AACtB,iHAAA,qBAAqB,OAAA;AAEvB,8DAA+D;AAAtD,sHAAA,kBAAkB,OAAA;AAC3B,iDAAwE;AAA/D,iGAAA,KAAK,OAAA;AAGd,6CA+B0B;AA9BxB,2GAAA,eAAe,OAAA;AACf,mHAAA,uBAAuB,OAAA;AACvB,8GAAA,kBAAkB,OAAA;AAClB,uGAAA,WAAW,OAAA;AACX,qGAAA,SAAS,OAAA;AACT,4GAAA,gBAAgB,OAAA;AAChB,oGAAA,QAAQ,OAAA;AACR,gHAAA,oBAAoB,OAAA;AACpB,+GAAA,mBAAmB,OAAA;AACnB,0HAAA,8BAA8B,OAAA;AAC9B,qGAAA,SAAS,OAAA;AACT,qGAAA,SAAS,OAAA;AACT,0GAAA,cAAc,OAAA;AACd,kHAAA,sBAAsB,OAAA;AACtB,0HAAA,8BAA8B,OAAA;AAC9B,kHAAA,sBAAsB,OAAA;AACtB,uGAAA,WAAW,OAAA;AACX,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,oGAAA,QAAQ,OAAA;AACR,iIAAA,qCAAqC,OAAA;AACrC,6HAAA,iCAAiC,OAAA;AACjC,0GAAA,cAAc,OAAA;AACd,wGAAA,YAAY,OAAA;AACZ,0GAAA,cAAc,OAAA;AACd,iHAAA,qBAAqB,OAAA;AACrB,gGAAA,IAAI,OAAA;AACJ,6GAAA,iBAAiB,OAAA;AACjB,qGAAA,SAAS,OAAA;AACT,oGAAA,QAAQ,OAAA","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 {\n verifyEIP6492Signature,\n wrapSignatureWith6492,\n} 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 defineReadOnly,\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"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum LogLevel {
|
|
2
|
+
VERBOSE = 5,
|
|
3
|
+
DEBUG = 4,
|
|
4
|
+
INFO = 3,
|
|
5
|
+
WARN = 2,
|
|
6
|
+
ERROR = 1,
|
|
7
|
+
NONE = 0
|
|
8
|
+
}
|
|
9
|
+
export declare class Logger {
|
|
10
|
+
static logLevel: LogLevel;
|
|
11
|
+
static logFilter?: string;
|
|
12
|
+
static setLogLevel(logLevel: LogLevel): void;
|
|
13
|
+
static setLogFilter(pattern: string): void;
|
|
14
|
+
static error(msg: string, ...args: any[]): void;
|
|
15
|
+
static warn(msg: string, ...args: any[]): void;
|
|
16
|
+
static debug(msg: string, ...args: any[]): void;
|
|
17
|
+
static info(msg: string, ...args: any[]): void;
|
|
18
|
+
static verbose(msg: string, ...args: any[]): void;
|
|
19
|
+
private static shouldLog;
|
|
20
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = exports.LogLevel = void 0;
|
|
4
|
+
var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel[LogLevel["VERBOSE"] = 5] = "VERBOSE";
|
|
7
|
+
LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
|
|
8
|
+
LogLevel[LogLevel["INFO"] = 3] = "INFO";
|
|
9
|
+
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
10
|
+
LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
|
|
11
|
+
LogLevel[LogLevel["NONE"] = 0] = "NONE";
|
|
12
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
13
|
+
class Logger {
|
|
14
|
+
static setLogLevel(logLevel) {
|
|
15
|
+
this.logLevel = logLevel;
|
|
16
|
+
}
|
|
17
|
+
static setLogFilter(pattern) {
|
|
18
|
+
this.logFilter = pattern;
|
|
19
|
+
}
|
|
20
|
+
static error(msg, ...args) {
|
|
21
|
+
if (!this.shouldLog(msg, LogLevel.ERROR))
|
|
22
|
+
return;
|
|
23
|
+
console.error(msg, ...args);
|
|
24
|
+
}
|
|
25
|
+
static warn(msg, ...args) {
|
|
26
|
+
if (!this.shouldLog(msg, LogLevel.WARN))
|
|
27
|
+
return;
|
|
28
|
+
console.warn(msg, ...args);
|
|
29
|
+
}
|
|
30
|
+
static debug(msg, ...args) {
|
|
31
|
+
if (!this.shouldLog(msg, LogLevel.DEBUG))
|
|
32
|
+
return;
|
|
33
|
+
console.debug(msg, ...args);
|
|
34
|
+
}
|
|
35
|
+
static info(msg, ...args) {
|
|
36
|
+
if (!this.shouldLog(msg, LogLevel.INFO))
|
|
37
|
+
return;
|
|
38
|
+
console.info(msg, ...args);
|
|
39
|
+
}
|
|
40
|
+
static verbose(msg, ...args) {
|
|
41
|
+
if (!this.shouldLog(msg, LogLevel.VERBOSE))
|
|
42
|
+
return;
|
|
43
|
+
console.log(msg, ...args);
|
|
44
|
+
}
|
|
45
|
+
static shouldLog(msg, level) {
|
|
46
|
+
if (this.logLevel < level)
|
|
47
|
+
return false;
|
|
48
|
+
if (this.logFilter && !msg.includes(this.logFilter))
|
|
49
|
+
return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Logger = Logger;
|
|
54
|
+
Object.defineProperty(Logger, "logLevel", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: LogLevel.INFO
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,6CAAW,CAAA;IACX,yCAAS,CAAA;IACT,uCAAQ,CAAA;IACR,uCAAQ,CAAA;IACR,yCAAS,CAAA;IACT,uCAAQ,CAAA;AACV,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAED,MAAa,MAAM;IAIjB,MAAM,CAAC,WAAW,CAAC,QAAkB;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAe;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,GAAW,EAAE,GAAG,IAAW;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO;QAEjD,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,GAAG,IAAW;QACrC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO;QAEhD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,GAAW,EAAE,GAAG,IAAW;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO;QAEjD,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,GAAW,EAAE,GAAG,IAAW;QACrC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO;QAEhD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,GAAG,IAAW;QACxC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC;YAAE,OAAO;QAEnD,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC5B,CAAC;IAEO,MAAM,CAAC,SAAS,CAAC,GAAW,EAAE,KAAe;QACnD,IAAI,IAAI,CAAC,QAAQ,GAAG,KAAK;YAAE,OAAO,KAAK,CAAC;QACxC,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAAE,OAAO,KAAK,CAAC;QAElE,OAAO,IAAI,CAAC;IACd,CAAC;;AA/CH,wBAgDC;AA/CQ;;;;WAAqB,QAAQ,CAAC,IAAI;GAAC","sourcesContent":["export enum LogLevel {\n VERBOSE = 5,\n DEBUG = 4,\n INFO = 3,\n WARN = 2,\n ERROR = 1,\n NONE = 0,\n}\n\nexport class Logger {\n static logLevel: LogLevel = LogLevel.INFO;\n static logFilter?: string;\n\n static setLogLevel(logLevel: LogLevel) {\n this.logLevel = logLevel;\n }\n\n static setLogFilter(pattern: string) {\n this.logFilter = pattern;\n }\n\n static error(msg: string, ...args: any[]) {\n if (!this.shouldLog(msg, LogLevel.ERROR)) return;\n\n console.error(msg, ...args);\n }\n\n static warn(msg: string, ...args: any[]) {\n if (!this.shouldLog(msg, LogLevel.WARN)) return;\n\n console.warn(msg, ...args);\n }\n\n static debug(msg: string, ...args: any[]) {\n if (!this.shouldLog(msg, LogLevel.DEBUG)) return;\n\n console.debug(msg, ...args);\n }\n\n static info(msg: string, ...args: any[]) {\n if (!this.shouldLog(msg, LogLevel.INFO)) return;\n\n console.info(msg, ...args);\n }\n\n static verbose(msg: string, ...args: any[]) {\n if (!this.shouldLog(msg, LogLevel.VERBOSE)) return;\n\n console.log(msg, ...args);\n }\n\n private static shouldLog(msg: string, level: LogLevel) {\n if (this.logLevel < level) return false;\n if (this.logFilter && !msg.includes(this.logFilter)) return false;\n\n return true;\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import type { SmartContractAccount } from "../account/smartContractAccount.js";
|
|
3
|
+
import type { BundlerActions, BundlerRpcSchema } from "../client/decorators/bundlerClient.js";
|
|
4
|
+
import type { ClientMiddlewareConfig } from "../client/types.js";
|
|
5
|
+
import type { ClientMiddleware } from "./types.js";
|
|
6
|
+
export type MiddlewareClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined> = Client<TTransport, TChain, TAccount, [
|
|
7
|
+
...BundlerRpcSchema,
|
|
8
|
+
...PublicRpcSchema
|
|
9
|
+
], PublicActions & BundlerActions>;
|
|
10
|
+
export declare const middlewareActions: (overrides: ClientMiddlewareConfig) => <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: MiddlewareClient<TTransport, TChain, TAccount>) => {
|
|
11
|
+
middleware: ClientMiddleware;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.middlewareActions = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
const userop_js_1 = require("../utils/userop.js");
|
|
6
|
+
const feeEstimator_js_1 = require("./defaults/feeEstimator.js");
|
|
7
|
+
const gasEstimator_js_1 = require("./defaults/gasEstimator.js");
|
|
8
|
+
const paymasterAndData_js_1 = require("./defaults/paymasterAndData.js");
|
|
9
|
+
const userOpSigner_js_1 = require("./defaults/userOpSigner.js");
|
|
10
|
+
const noopMiddleware_js_1 = require("./noopMiddleware.js");
|
|
11
|
+
const middlewareActions = (overrides) => (client) => ({
|
|
12
|
+
middleware: {
|
|
13
|
+
customMiddleware: overrides.customMiddleware ?? noopMiddleware_js_1.noopMiddleware,
|
|
14
|
+
dummyPaymasterAndData: overrides.paymasterAndData?.dummyPaymasterAndData
|
|
15
|
+
? async (struct, { account }) => {
|
|
16
|
+
const data = overrides.paymasterAndData.dummyPaymasterAndData();
|
|
17
|
+
const paymasterOverrides = account.getEntryPoint().version === "0.7.0"
|
|
18
|
+
? (0, viem_1.isHex)(data)
|
|
19
|
+
? (0, userop_js_1.parsePaymasterAndData)(data)
|
|
20
|
+
: data
|
|
21
|
+
: {
|
|
22
|
+
paymasterAndData: (0, viem_1.isHex)(data)
|
|
23
|
+
? data
|
|
24
|
+
: (0, userop_js_1.concatPaymasterAndData)(data),
|
|
25
|
+
};
|
|
26
|
+
return { ...struct, ...paymasterOverrides };
|
|
27
|
+
}
|
|
28
|
+
: paymasterAndData_js_1.defaultPaymasterAndData,
|
|
29
|
+
feeEstimator: overrides.feeEstimator ?? (0, feeEstimator_js_1.defaultFeeEstimator)(client),
|
|
30
|
+
gasEstimator: overrides.gasEstimator ?? (0, gasEstimator_js_1.defaultGasEstimator)(client),
|
|
31
|
+
paymasterAndData: overrides.paymasterAndData?.paymasterAndData ?? paymasterAndData_js_1.defaultPaymasterAndData,
|
|
32
|
+
userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware_js_1.noopMiddleware,
|
|
33
|
+
signUserOperation: overrides.signUserOperation ?? userOpSigner_js_1.defaultUserOpSigner,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
exports.middlewareActions = middlewareActions;
|
|
37
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/middleware/actions.ts"],"names":[],"mappings":";;;AAAA,+BAOc;AAOd,kDAG4B;AAC5B,gEAAiE;AACjE,gEAAiE;AACjE,wEAAyE;AACzE,gEAAiE;AACjE,2DAAqD;AA+B9C,MAAM,iBAAiB,GAC5B,CAAC,SAAiC,EAAE,EAAE,CACtC,CAOE,MAAsD,EACpB,EAAE,CAAC,CAAC;IACtC,UAAU,EAAE;QACV,gBAAgB,EAAE,SAAS,CAAC,gBAAgB,IAAI,kCAAc;QAC9D,qBAAqB,EAAE,SAAS,CAAC,gBAAgB,EAAE,qBAAqB;YACtE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;gBAC5B,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAiB,CAAC,qBAAqB,EAAE,CAAC;gBACjE,MAAM,kBAAkB,GACtB,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,KAAK,OAAO;oBACzC,CAAC,CAAC,IAAA,YAAK,EAAC,IAAI,CAAC;wBACX,CAAC,CAAC,IAAA,iCAAqB,EAAC,IAAI,CAAC;wBAC7B,CAAC,CAAC,IAAI;oBACR,CAAC,CAAC;wBACE,gBAAgB,EAAE,IAAA,YAAK,EAAC,IAAI,CAAC;4BAC3B,CAAC,CAAC,IAAI;4BACN,CAAC,CAAC,IAAA,kCAAsB,EAAC,IAAI,CAAC;qBACjC,CAAC;gBACR,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;YAC9C,CAAC;YACH,CAAC,CAAC,6CAAuB;QAE3B,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,IAAA,qCAAmB,EAAC,MAAM,CAAC;QACnE,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,IAAA,qCAAmB,EAAC,MAAM,CAAC;QACnE,gBAAgB,EACd,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,IAAI,6CAAuB;QACzE,sBAAsB,EACpB,SAAS,CAAC,sBAAsB,IAAI,kCAAc;QACpD,iBAAiB,EAAE,SAAS,CAAC,iBAAiB,IAAI,qCAAmB;KACtE;CACF,CAAC,CAAC;AAtCQ,QAAA,iBAAiB,qBAsCzB","sourcesContent":["import {\n isHex,\n type Chain,\n type Client,\n type PublicActions,\n type PublicRpcSchema,\n type Transport,\n} from \"viem\";\nimport type { SmartContractAccount } from \"../account/smartContractAccount.js\";\nimport type {\n BundlerActions,\n BundlerRpcSchema,\n} from \"../client/decorators/bundlerClient.js\";\nimport type { ClientMiddlewareConfig } from \"../client/types.js\";\nimport {\n concatPaymasterAndData,\n parsePaymasterAndData,\n} from \"../utils/userop.js\";\nimport { defaultFeeEstimator } from \"./defaults/feeEstimator.js\";\nimport { defaultGasEstimator } from \"./defaults/gasEstimator.js\";\nimport { defaultPaymasterAndData } from \"./defaults/paymasterAndData.js\";\nimport { defaultUserOpSigner } from \"./defaults/userOpSigner.js\";\nimport { noopMiddleware } from \"./noopMiddleware.js\";\nimport type { ClientMiddleware } from \"./types.js\";\n\n/**\n * Middleware client type\n *\n * @template {Transport} TTransport\n * @template {Chain | undefined} TChain\n * @template {SmartContractAccount | undefined} TAccount\n */\nexport type MiddlewareClient<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n> = Client<\n TTransport,\n TChain,\n TAccount,\n [...BundlerRpcSchema, ...PublicRpcSchema],\n PublicActions & BundlerActions\n>;\n\n/**\n * export function that takes in {@link ClientMiddlewareConfig} used during client initiation\n * and returns the middleware actions object that the smart account client extends with\n *\n * @param overrides - {@link ClientMiddlewareConfig} used during client initiation for overriding default middlewares\n * @returns middleware actions object\n */\nexport const middlewareActions =\n (overrides: ClientMiddlewareConfig) =>\n <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n >(\n client: MiddlewareClient<TTransport, TChain, TAccount>\n ): { middleware: ClientMiddleware } => ({\n middleware: {\n customMiddleware: overrides.customMiddleware ?? noopMiddleware,\n dummyPaymasterAndData: overrides.paymasterAndData?.dummyPaymasterAndData\n ? async (struct, { account }) => {\n const data = overrides.paymasterAndData!.dummyPaymasterAndData();\n const paymasterOverrides =\n account.getEntryPoint().version === \"0.7.0\"\n ? isHex(data)\n ? parsePaymasterAndData(data)\n : data\n : {\n paymasterAndData: isHex(data)\n ? data\n : concatPaymasterAndData(data),\n };\n return { ...struct, ...paymasterOverrides };\n }\n : defaultPaymasterAndData,\n\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData:\n overrides.paymasterAndData?.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator:\n overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner,\n },\n });\n"]}
|