@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 @@
|
|
|
1
|
+
{"version":3,"file":"0.7.d.ts","sourceRoot":"","sources":["../../../src/entrypoint/0.7.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,OAAO,EAEZ,KAAK,IAAI,EACT,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAyER,qBAAqB,OAAO,CAAC,qBACnB,OAAO,WACjB,MAAM,KACd,IAAI;;;AAbT,wBA2ByE;AAEzE,wBAAgB,oBAAoB,CAClC,IAAI,EACA,IAAI,CAAC,uBAAuB,EAAE,sBAAsB,GAAG,cAAc,CAAC,GACtE,IAAI,CAAC,uBAAuB,EAAE,sBAAsB,GAAG,cAAc,CAAC,GACzE,GAAG,CAEL;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,6BAA6B,EAC7B,uBAAuB,EACvB,aAAa,GACd,EAAE,IAAI,CACL,uBAAuB,EACrB,WAAW,GACX,+BAA+B,GAC/B,yBAAyB,GACzB,eAAe,CAClB,GAAG,GAAG,CAeN;AAED,wBAAgB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,GAAG;IAChE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;CACtB,CAKA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Chain } from "viem";
|
|
2
|
+
import type { DefaultEntryPointVersion, EntryPointDefRegistry, EntryPointRegistry, EntryPointVersion, GetEntryPointOptions } from "./types.js";
|
|
3
|
+
export declare const defaultEntryPointVersion: DefaultEntryPointVersion;
|
|
4
|
+
export declare const entryPointRegistry: EntryPointRegistry;
|
|
5
|
+
export declare const isEntryPointVersion: (value: any) => value is keyof EntryPointRegistry<Chain>;
|
|
6
|
+
export declare function getEntryPoint<TEntryPointVersion extends EntryPointVersion = DefaultEntryPointVersion, TChain extends Chain = Chain>(chain: TChain, options: GetEntryPointOptions<TEntryPointVersion>): EntryPointDefRegistry<TChain>[TEntryPointVersion];
|
|
7
|
+
export declare function getEntryPoint<TEntryPointVersion extends DefaultEntryPointVersion = DefaultEntryPointVersion, TChain extends Chain = Chain>(chain: TChain, options?: GetEntryPointOptions<TEntryPointVersion>): EntryPointDefRegistry<TChain>[TEntryPointVersion];
|
|
8
|
+
export declare function getEntryPoint<TChain extends Chain = Chain>(chain: TChain, options?: GetEntryPointOptions<DefaultEntryPointVersion>): EntryPointDefRegistry<TChain>[DefaultEntryPointVersion];
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAIlC,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,wBAAwB,EAAE,wBAAkC,CAAC;AAE1E,eAAO,MAAM,kBAAkB,EAAE,kBAGhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACvB,GAAG,6CAGX,CAAC;AAEF,wBAAgB,aAAa,CAC3B,kBAAkB,SAAS,iBAAiB,GAAG,wBAAwB,EACvE,MAAM,SAAS,KAAK,GAAG,KAAK,EAE5B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,GAChD,qBAAqB,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAErD,wBAAgB,aAAa,CAC3B,kBAAkB,SAAS,wBAAwB,GAAG,wBAAwB,EAC9E,MAAM,SAAS,KAAK,GAAG,KAAK,EAE5B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,GACjD,qBAAqB,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAErD,wBAAgB,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,EACxD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,oBAAoB,CAAC,wBAAwB,CAAC,GACvD,qBAAqB,CAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Abi, Account, Address, Chain, GetContractParameters, Hash, Hex, Transport } from "viem";
|
|
2
|
+
import type { EntryPointAbi_v6 } from "../abis/EntryPointAbi_v6";
|
|
3
|
+
import type { EntryPointAbi_v7 } from "../abis/EntryPointAbi_v7";
|
|
4
|
+
import type { UserOperationRequest } from "../types";
|
|
5
|
+
import type { EQ, IsOneOf, OneOf } from "../utils";
|
|
6
|
+
export interface EntryPointRegistryBase<T> {
|
|
7
|
+
"0.6.0": T;
|
|
8
|
+
"0.7.0": T;
|
|
9
|
+
}
|
|
10
|
+
export type EntryPointVersion = keyof EntryPointRegistryBase<unknown>;
|
|
11
|
+
export type DefaultEntryPointVersion = OneOf<"0.6.0", EntryPointVersion>;
|
|
12
|
+
export type SupportedEntryPoint<TEntryPointVersion extends EntryPointVersion = EntryPointVersion, TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi> = {
|
|
13
|
+
version: TEntryPointVersion;
|
|
14
|
+
address: Record<TChain["id"] | "default", Address>;
|
|
15
|
+
abi: GetContractParameters<Transport, TChain, Account, TAbi>["abi"];
|
|
16
|
+
/**
|
|
17
|
+
* Generates a hash for a UserOperation valid from entry point version 0.6 onwards
|
|
18
|
+
*
|
|
19
|
+
* @param request - the UserOperation to get the hash for
|
|
20
|
+
* @param entryPointAddress - the entry point address that will be used to execute the UserOperation
|
|
21
|
+
* @param chainId - the chain on which this UserOperation will be executed
|
|
22
|
+
* @returns the hash of the UserOperation
|
|
23
|
+
*/
|
|
24
|
+
getUserOperationHash: (request: UserOperationRequest<TEntryPointVersion>, entryPointAddress: Address, chainId: number) => Hash;
|
|
25
|
+
/**
|
|
26
|
+
* Pack the user operation data into bytes for hashing for entry point version 0.6 onwards
|
|
27
|
+
* Reference:
|
|
28
|
+
* v6: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOp.ts#L16-L61
|
|
29
|
+
* v7: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOp.ts#L28-L67
|
|
30
|
+
*
|
|
31
|
+
* @param request - the UserOperation to get the hash for
|
|
32
|
+
* @returns the hash of the UserOperation
|
|
33
|
+
*/
|
|
34
|
+
packUserOperation: (userOperation: UserOperationRequest<TEntryPointVersion>) => Hex;
|
|
35
|
+
};
|
|
36
|
+
export interface EntryPointRegistry<TChain extends Chain = Chain> extends EntryPointRegistryBase<SupportedEntryPoint<EntryPointVersion, TChain, Abi>> {
|
|
37
|
+
"0.6.0": SupportedEntryPoint<"0.6.0", TChain, typeof EntryPointAbi_v6>;
|
|
38
|
+
"0.7.0": SupportedEntryPoint<"0.7.0", TChain, typeof EntryPointAbi_v7>;
|
|
39
|
+
}
|
|
40
|
+
export type EntryPointDef<TEntryPointVersion extends EntryPointVersion = EntryPointVersion, TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi> = {
|
|
41
|
+
version: TEntryPointVersion;
|
|
42
|
+
address: Address;
|
|
43
|
+
chain: TChain;
|
|
44
|
+
abi: GetContractParameters<Transport, TChain, Account, TAbi>["abi"];
|
|
45
|
+
getUserOperationHash: (request: UserOperationRequest<TEntryPointVersion>) => Hex;
|
|
46
|
+
packUserOperation: (userOperation: UserOperationRequest<TEntryPointVersion>) => Hex;
|
|
47
|
+
};
|
|
48
|
+
export interface EntryPointDefRegistry<TChain extends Chain = Chain> extends EntryPointRegistryBase<EntryPointDef<EntryPointVersion, TChain, Abi>> {
|
|
49
|
+
"0.6.0": EntryPointDef<"0.6.0", TChain, typeof EntryPointAbi_v6>;
|
|
50
|
+
"0.7.0": EntryPointDef<"0.7.0", TChain, typeof EntryPointAbi_v7>;
|
|
51
|
+
}
|
|
52
|
+
export type GetEntryPointOptions<TEntryPointVersion extends EntryPointVersion = DefaultEntryPointVersion> = EQ<TEntryPointVersion, DefaultEntryPointVersion> extends true ? {
|
|
53
|
+
addressOverride?: Address;
|
|
54
|
+
version?: OneOf<TEntryPointVersion, EntryPointVersion>;
|
|
55
|
+
} | undefined : {
|
|
56
|
+
addressOverride?: Address;
|
|
57
|
+
version: OneOf<TEntryPointVersion, EntryPointVersion>;
|
|
58
|
+
};
|
|
59
|
+
export type EntryPointParameter<TEntryPointVersion extends EntryPointVersion, TChain extends Chain = Chain> = EQ<TEntryPointVersion, DefaultEntryPointVersion> extends true ? {
|
|
60
|
+
entryPoint?: EntryPointDef<TEntryPointVersion, TChain>;
|
|
61
|
+
} : {
|
|
62
|
+
entryPoint: IsOneOf<TEntryPointVersion, EntryPointVersion> extends true ? EntryPointDef<TEntryPointVersion, TChain> : never;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entrypoint/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,OAAO,EACP,KAAK,EACL,qBAAqB,EACrB,IAAI,EACJ,GAAG,EACH,SAAS,EACV,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,CAAC,CAAC;CACZ;AACD,MAAM,MAAM,iBAAiB,GAAG,MAAM,sBAAs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EAAE,wBAAwB,CAAC,SAAS,IAAI,GAC7D;IACE,UAAU,CAAC,EAAE,aAAa,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;CACxD,GACD;IACE,UAAU,EAAE,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,SAAS,IAAI,GACnE,aAAa,CAAC,kBAAkB,EAAE,MAAM,CAAC,GACzC,KAAK,CAAC;CACX,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Chain } from "viem";
|
|
2
|
+
import type { EntryPointVersion } from "../entrypoint/types.js";
|
|
3
|
+
import { BaseError } from "./base.js";
|
|
4
|
+
export declare class AccountNotFoundError extends BaseError {
|
|
5
|
+
name: string;
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class DefaultFactoryNotDefinedError extends BaseError {
|
|
9
|
+
name: string;
|
|
10
|
+
constructor(accountType: string, chain: Chain, version: EntryPointVersion);
|
|
11
|
+
}
|
|
12
|
+
export declare class GetCounterFactualAddressError extends BaseError {
|
|
13
|
+
name: string;
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare class UpgradesNotSupportedError extends BaseError {
|
|
17
|
+
name: string;
|
|
18
|
+
constructor(accountType: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class SignTransactionNotSupportedError extends BaseError {
|
|
21
|
+
name: string;
|
|
22
|
+
constructor();
|
|
23
|
+
}
|
|
24
|
+
export declare class FailedToGetStorageSlotError extends BaseError {
|
|
25
|
+
name: string;
|
|
26
|
+
constructor(slot: string, slotDescriptor: string);
|
|
27
|
+
}
|
|
28
|
+
export declare class BatchExecutionNotSupportedError extends BaseError {
|
|
29
|
+
name: string;
|
|
30
|
+
constructor(accountType: string);
|
|
31
|
+
}
|
|
32
|
+
export declare class AccountRequiresOwnerError extends BaseError {
|
|
33
|
+
name: string;
|
|
34
|
+
constructor(accountType: string);
|
|
35
|
+
}
|
|
36
|
+
export declare class UpgradeToAndCallNotSupportedError extends BaseError {
|
|
37
|
+
name: string;
|
|
38
|
+
constructor(accountType: string);
|
|
39
|
+
}
|
|
40
|
+
export declare class IncorrectAccountType extends BaseError {
|
|
41
|
+
name: string;
|
|
42
|
+
constructor(expected: string, actual: string);
|
|
43
|
+
}
|
|
44
|
+
export declare class SmartAccountWithSignerRequiredError extends BaseError {
|
|
45
|
+
name: string;
|
|
46
|
+
constructor();
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/errors/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,oBAAqB,SAAQ,SAAS;IACxC,IAAI,SAA0B;;CAMxC;AAED,qBAAa,6BAA8B,SAAQ,SAAS;IACjD,IAAI,SAAmC;gBACpC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB;CAQ1E;AAED,qBAAa,6BAA8B,SAAQ,SAAS;IACjD,IAAI,SAAmC;;CAIjD;AAED,qBAAa,yBAA0B,SAAQ,SAAS;IAC7C,IAAI,SAA0B;gBAC3B,WAAW,EAAE,MAAM;CAGhC;AAED,qBAAa,gCAAiC,SAAQ,SAAS;IACpD,IAAI,SAAiC;;CAI/C;AAED,qBAAa,2BAA4B,SAAQ,SAAS;IAC/C,IAAI,SAAiC;gBAClC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;CAGjD;AAED,qBAAa,+BAAgC,SAAQ,SAAS;IACnD,IAAI,SAAqC;gBACtC,WAAW,EAAE,MAAM;CAGhC;AAED,qBAAa,yBAA0B,SAAQ,SAAS;IAC7C,IAAI,SAA+B;gBAChC,WAAW,EAAE,MAAM;CAGhC;AAED,qBAAa,iCAAkC,SAAQ,SAAS;IACrD,IAAI,SAAuC;gBACxC,WAAW,EAAE,MAAM;CAGhC;AAED,qBAAa,oBAAqB,SAAQ,SAAS;IACxC,IAAI,SAA+B;gBAChC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAG7C;AAED,qBAAa,mCAAoC,SAAQ,SAAS;IACvD,IAAI,SAAyC;;CAIvD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseError as ViemBaseError } from "viem";
|
|
2
|
+
type BaseErrorParameters = {
|
|
3
|
+
docsPath?: string;
|
|
4
|
+
docsSlug?: string;
|
|
5
|
+
metaMessages?: string[];
|
|
6
|
+
} & ({
|
|
7
|
+
cause?: never;
|
|
8
|
+
details?: string;
|
|
9
|
+
} | {
|
|
10
|
+
cause: BaseError | Error;
|
|
11
|
+
details?: never;
|
|
12
|
+
});
|
|
13
|
+
export declare class BaseError extends ViemBaseError {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
constructor(shortMessage: string, args?: BaseErrorParameters);
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/errors/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAGlD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,GAAG,CACA;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD;IACE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CACJ,CAAC;AAIF,qBAAa,SAAU,SAAQ,aAAa;IACjC,IAAI,SAAgB;IACpB,OAAO,SAAW;gBAEf,YAAY,EAAE,MAAM,EAAE,IAAI,GAAE,mBAAwB;CAuBjE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Client } from "viem";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
export declare class IncompatibleClientError extends BaseError {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor(expectedClient: string, method: string, client: Client);
|
|
6
|
+
}
|
|
7
|
+
export declare class InvalidRpcUrlError extends BaseError {
|
|
8
|
+
name: string;
|
|
9
|
+
constructor(rpcUrl?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class ChainNotFoundError extends BaseError {
|
|
12
|
+
name: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/errors/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;gBAC9B,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAQnE;AAED,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;gBACzB,MAAM,CAAC,EAAE,MAAM;CAG5B;AAED,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;;CAItC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Chain } from "viem";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
export declare class EntryPointNotFoundError extends BaseError {
|
|
4
|
+
name: string;
|
|
5
|
+
constructor(chain: Chain, entryPointVersion: any);
|
|
6
|
+
}
|
|
7
|
+
export declare class InvalidEntryPointError extends BaseError {
|
|
8
|
+
name: string;
|
|
9
|
+
constructor(chain: Chain, entryPointVersion: any);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=entrypoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../../src/errors/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;gBAE9B,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAQjD;AAED,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;gBAE7B,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAKjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;gBAC7B,UAAU,CAAC,EAAE,MAAM;CAQhC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
11
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/errors/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,8BAA+B,SAAQ,SAAS;IAClD,IAAI,SAAoC;;CAIlD;AAED,qBAAa,4BAA6B,SAAQ,SAAS;IAChD,IAAI,SAAkC;gBACnC,IAAI,EAAE,GAAG;CAGtB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UserOperationRequest, UserOperationStruct } from "../types.js";
|
|
2
|
+
import { BaseError } from "./base.js";
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when a {@link UserOperationStruct} is not a valid request
|
|
5
|
+
*
|
|
6
|
+
* extends viem BaseError
|
|
7
|
+
*/
|
|
8
|
+
export declare class InvalidUserOperationError extends BaseError {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritdoc
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Creates an instance of InvalidUserOperationError.
|
|
15
|
+
*
|
|
16
|
+
* InvalidUserOperationError constructor
|
|
17
|
+
*
|
|
18
|
+
* @param uo the invalid user operation struct
|
|
19
|
+
*/
|
|
20
|
+
constructor(uo: UserOperationStruct);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Error thrown when waiting for user operation request to be mined.
|
|
24
|
+
*
|
|
25
|
+
* Includes the internal error as well as the request that failed. This request
|
|
26
|
+
* can then be used with {@link dropAndReplaceUserOperation} to retry the operation.
|
|
27
|
+
*/
|
|
28
|
+
export declare class WaitForUserOperationError extends BaseError {
|
|
29
|
+
request: UserOperationRequest;
|
|
30
|
+
/**
|
|
31
|
+
* @param request the user operation request that failed
|
|
32
|
+
* @param error the underlying error that caused the failure
|
|
33
|
+
*/
|
|
34
|
+
constructor(request: UserOperationRequest, error: Error);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=useroperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useroperation.d.ts","sourceRoot":"","sources":["../../../src/errors/useroperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD;;OAEG;IACM,IAAI,SAA+B;IAC5C;;;;;;OAMG;gBACS,EAAE,EAAE,mBAAmB;CAepC;AAED;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IAKnC,OAAO,EAAE,oBAAoB;IAJhD;;;OAGG;gBACgB,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK;CAG/D"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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";
|
|
64
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,C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
+
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
|
+
}
|
|
21
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAiB;IAC1C,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE1B,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAIrC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM;IAInC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMvC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMvC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAM1C,OAAO,CAAC,MAAM,CAAC,SAAS;CAMzB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Middleware client type
|
|
8
|
+
*
|
|
9
|
+
* @template {Transport} TTransport
|
|
10
|
+
* @template {Chain | undefined} TChain
|
|
11
|
+
* @template {SmartContractAccount | undefined} TAccount
|
|
12
|
+
*/
|
|
13
|
+
export type MiddlewareClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined> = Client<TTransport, TChain, TAccount, [
|
|
14
|
+
...BundlerRpcSchema,
|
|
15
|
+
...PublicRpcSchema
|
|
16
|
+
], PublicActions & BundlerActions>;
|
|
17
|
+
/**
|
|
18
|
+
* export function that takes in {@link ClientMiddlewareConfig} used during client initiation
|
|
19
|
+
* and returns the middleware actions object that the smart account client extends with
|
|
20
|
+
*
|
|
21
|
+
* @param overrides - {@link ClientMiddlewareConfig} used during client initiation for overriding default middlewares
|
|
22
|
+
* @returns middleware actions object
|
|
23
|
+
*/
|
|
24
|
+
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>) => {
|
|
25
|
+
middleware: ClientMiddleware;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/middleware/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAUjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,CAC1B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,IACX,MAAM,CACR,UAAU,EACV,MAAM,EACN,QAAQ,EACR;IAAC,GAAG,gBAAgB;IAAE,GAAG,eAAe;CAAC,EACzC,aAAa,GAAG,cAAc,CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,cAChB,sBAAsB,uPAS/B;IAAE,UAAU,EAAE,gBAAgB,CAAA;CA4B/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeEstimator.d.ts","sourceRoot":"","sources":["../../../../src/middleware/defaults/feeEstimator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,SAAS,gBAAgB,EAC3D,MAAM,EAAE,CAAC,KACN,kBA0CF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MiddlewareClient } from "../actions.js";
|
|
2
|
+
import type { ClientMiddlewareFn } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Description default gas estimator middleware for `SmartAccountClient`
|
|
5
|
+
* You can override this middleware with your custom gas estimator middleware
|
|
6
|
+
* by passing it to the client constructor
|
|
7
|
+
*
|
|
8
|
+
* @param client smart account client instance to apply the middleware to
|
|
9
|
+
* @returns middleware execution function used to estimate gas for user operations
|
|
10
|
+
*/
|
|
11
|
+
export declare const defaultGasEstimator: <C extends MiddlewareClient>(client: C) => ClientMiddlewareFn;
|
|
12
|
+
//# sourceMappingURL=gasEstimator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gasEstimator.d.ts","sourceRoot":"","sources":["../../../../src/middleware/defaults/gasEstimator.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,SAAS,gBAAgB,EAC3D,MAAM,EAAE,CAAC,KACN,kBA6CF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymasterAndData.d.ts","sourceRoot":"","sources":["../../../../src/middleware/defaults/paymasterAndData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,uBAAuB,EAAE,kBASrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userOpSigner.d.ts","sourceRoot":"","sources":["../../../../src/middleware/defaults/userOpSigner.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,kBAwBjC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ClientMiddlewareFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Noop middleware that does nothing and passes the arguments through
|
|
4
|
+
*
|
|
5
|
+
* @async
|
|
6
|
+
* @param args the client middleware arguments passed to the middleware
|
|
7
|
+
* @returns the arguments passed to the middleware and returned as is without modification
|
|
8
|
+
*/
|
|
9
|
+
export declare const noopMiddleware: ClientMiddlewareFn;
|
|
10
|
+
//# sourceMappingURL=noopMiddleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noopMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middleware/noopMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,kBAE5B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { GetEntryPointFromAccount, SmartContractAccount } from "../account/smartContractAccount";
|
|
2
|
+
import type { UserOperationContext } from "../actions/smartAccount/types";
|
|
3
|
+
import type { UserOperationFeeOptions, UserOperationOverrides, UserOperationStruct } from "../types";
|
|
4
|
+
import type { Deferrable } from "../utils";
|
|
5
|
+
import type { MiddlewareClient } from "./actions";
|
|
6
|
+
export type ClientMiddlewareFn<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = <TAccount extends SmartContractAccount, C extends MiddlewareClient, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(struct: Deferrable<UserOperationStruct<TEntryPointVersion>>, args: {
|
|
7
|
+
overrides?: UserOperationOverrides<TEntryPointVersion>;
|
|
8
|
+
context?: TContext;
|
|
9
|
+
feeOptions?: UserOperationFeeOptions;
|
|
10
|
+
account: TAccount;
|
|
11
|
+
client: C;
|
|
12
|
+
}) => Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>;
|
|
13
|
+
export type ClientMiddleware<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = {
|
|
14
|
+
dummyPaymasterAndData: ClientMiddlewareFn<TContext>;
|
|
15
|
+
feeEstimator: ClientMiddlewareFn<TContext>;
|
|
16
|
+
gasEstimator: ClientMiddlewareFn<TContext>;
|
|
17
|
+
customMiddleware: ClientMiddlewareFn<TContext>;
|
|
18
|
+
paymasterAndData: ClientMiddlewareFn<TContext>;
|
|
19
|
+
userOperationSimulator: ClientMiddlewareFn<TContext>;
|
|
20
|
+
signUserOperation: ClientMiddlewareFn<TContext>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/middleware/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGlD,MAAM,MAAM,kBAAkB,CAC5B,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,IACX,CACF,QAAQ,SAAS,oBAAoB,EACrC,CAAC,SAAS,gBAAgB,EAC1B,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ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