@aa-sdk/core 4.0.0-alpha.8 → 4.0.0-beta.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/dist/esm/abis/EntryPointAbi_v7.js +1 -0
- package/dist/esm/abis/EntryPointAbi_v7.js.map +1 -1
- package/dist/esm/account/smartContractAccount.d.ts +50 -1
- package/dist/esm/account/smartContractAccount.js +111 -2
- package/dist/esm/account/smartContractAccount.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperation.d.ts +23 -0
- package/dist/esm/actions/smartAccount/buildUserOperation.js +23 -0
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.d.ts +39 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js +39 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.d.ts +54 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js +55 -0
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +28 -0
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js +28 -0
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.d.ts +22 -0
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js +27 -6
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.d.ts +13 -0
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js +13 -0
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.d.ts +13 -0
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js +14 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js +2 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransaction.d.ts +24 -0
- package/dist/esm/actions/smartAccount/sendTransaction.js +24 -0
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransactions.d.ts +23 -0
- package/dist/esm/actions/smartAccount/sendTransactions.js +23 -0
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendUserOperation.d.ts +21 -0
- package/dist/esm/actions/smartAccount/sendUserOperation.js +21 -0
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/types.d.ts +14 -0
- package/dist/esm/actions/smartAccount/types.js +1 -0
- package/dist/esm/actions/smartAccount/types.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.d.ts +24 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js +24 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/bundlerClient.d.ts +21 -0
- package/dist/esm/client/bundlerClient.js +32 -0
- package/dist/esm/client/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.d.ts +41 -0
- package/dist/esm/client/decorators/bundlerClient.js +10 -0
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/smartAccountClient.d.ts +8 -0
- package/dist/esm/client/decorators/smartAccountClient.js +12 -1
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/esm/client/isSmartAccountClient.d.ts +16 -0
- package/dist/esm/client/isSmartAccountClient.js +16 -0
- package/dist/esm/client/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/schema.d.ts +12 -0
- package/dist/esm/client/schema.js +14 -0
- package/dist/esm/client/schema.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js +53 -0
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.js +1 -0
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/ens/utils.d.ts +45 -0
- package/dist/esm/ens/utils.js +49 -0
- package/dist/esm/ens/utils.js.map +1 -1
- package/dist/esm/entrypoint/index.d.ts +14 -0
- package/dist/esm/entrypoint/index.js +30 -0
- package/dist/esm/entrypoint/index.js.map +1 -1
- package/dist/esm/entrypoint/types.d.ts +17 -0
- package/dist/esm/errors/account.d.ts +87 -4
- package/dist/esm/errors/account.js +88 -4
- package/dist/esm/errors/account.js.map +1 -1
- package/dist/esm/errors/base.d.ts +5 -0
- package/dist/esm/errors/base.js +5 -0
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/client.d.ts +24 -0
- package/dist/esm/errors/client.js +24 -0
- package/dist/esm/errors/client.js.map +1 -1
- package/dist/esm/errors/entrypoint.d.ts +18 -0
- package/dist/esm/errors/entrypoint.js +18 -0
- package/dist/esm/errors/entrypoint.js.map +1 -1
- package/dist/esm/errors/signer.d.ts +8 -0
- package/dist/esm/errors/signer.js +8 -0
- package/dist/esm/errors/signer.js.map +1 -1
- package/dist/esm/errors/transaction.d.ts +14 -1
- package/dist/esm/errors/transaction.js +14 -1
- package/dist/esm/errors/transaction.js.map +1 -1
- package/dist/esm/errors/useroperation.d.ts +25 -0
- package/dist/esm/errors/useroperation.js +26 -0
- package/dist/esm/errors/useroperation.js.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logger.d.ts +91 -0
- package/dist/esm/logger.js +91 -0
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/middleware/actions.d.ts +14 -0
- package/dist/esm/middleware/actions.js +7 -0
- package/dist/esm/middleware/actions.js.map +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.d.ts +20 -0
- package/dist/esm/middleware/defaults/feeEstimator.js +28 -0
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/gasEstimator.d.ts +8 -0
- package/dist/esm/middleware/defaults/gasEstimator.js +10 -1
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/paymasterAndData.d.ts +8 -0
- package/dist/esm/middleware/defaults/paymasterAndData.js +8 -0
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/esm/middleware/defaults/userOpSigner.d.ts +10 -0
- package/dist/esm/middleware/defaults/userOpSigner.js +10 -0
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/esm/middleware/erc7677middleware.d.ts +21 -0
- package/dist/esm/middleware/erc7677middleware.js +23 -0
- package/dist/esm/middleware/erc7677middleware.js.map +1 -1
- package/dist/esm/middleware/noopMiddleware.d.ts +6 -0
- package/dist/esm/middleware/noopMiddleware.js +6 -0
- package/dist/esm/middleware/noopMiddleware.js.map +1 -1
- package/dist/esm/middleware/types.js +1 -0
- package/dist/esm/middleware/types.js.map +1 -1
- package/dist/esm/signer/local-account.d.ts +96 -1
- package/dist/esm/signer/local-account.js +97 -2
- package/dist/esm/signer/local-account.js.map +1 -1
- package/dist/esm/signer/schema.d.ts +14 -0
- package/dist/esm/signer/schema.js +14 -0
- package/dist/esm/signer/schema.js.map +1 -1
- package/dist/esm/signer/types.d.ts +12 -0
- package/dist/esm/signer/types.js +1 -0
- package/dist/esm/signer/types.js.map +1 -1
- package/dist/esm/signer/utils.d.ts +20 -0
- package/dist/esm/signer/utils.js +27 -0
- package/dist/esm/signer/utils.js.map +1 -1
- package/dist/esm/signer/wallet-client.d.ts +92 -0
- package/dist/esm/signer/wallet-client.js +92 -0
- package/dist/esm/signer/wallet-client.js.map +1 -1
- package/dist/esm/transport/split.d.ts +32 -0
- package/dist/esm/transport/split.js +32 -0
- package/dist/esm/transport/split.js.map +1 -1
- package/dist/esm/types.d.ts +17 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/bigint.d.ts +45 -0
- package/dist/esm/utils/bigint.js +46 -0
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/bytes.d.ts +9 -0
- package/dist/esm/utils/bytes.js +10 -1
- package/dist/esm/utils/bytes.js.map +1 -1
- package/dist/esm/utils/index.d.ts +86 -0
- package/dist/esm/utils/index.js +86 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/schema.d.ts +3 -0
- package/dist/esm/utils/schema.js +9 -0
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/stateOverride.js +2 -0
- package/dist/esm/utils/stateOverride.js.map +1 -1
- package/dist/esm/utils/types.d.ts +22 -0
- package/dist/esm/utils/types.js +1 -0
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/userop.d.ts +79 -0
- package/dist/esm/utils/userop.js +83 -0
- package/dist/esm/utils/userop.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +3 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/account/smartContractAccount.d.ts +1 -1
- package/dist/types/account/smartContractAccount.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +1 -1
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
- package/dist/types/client/smartAccountClient.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +11 -12
- package/src/account/smartContractAccount.ts +3 -4
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +1 -1
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +10 -10
- package/src/actions/smartAccount/internal/initUserOperation.ts +1 -1
- package/src/client/smartAccountClient.ts +7 -0
- package/src/index.ts +0 -1
- package/src/middleware/defaults/gasEstimator.ts +2 -1
- package/src/transport/split.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/cjs/abis/EntryPointAbi_v6.d.ts +0 -1018
- package/dist/cjs/abis/EntryPointAbi_v6.js +0 -1313
- package/dist/cjs/abis/EntryPointAbi_v6.js.map +0 -1
- package/dist/cjs/abis/EntryPointAbi_v7.d.ts +0 -775
- package/dist/cjs/abis/EntryPointAbi_v7.js +0 -661
- package/dist/cjs/abis/EntryPointAbi_v7.js.map +0 -1
- package/dist/cjs/abis/SimpleAccountAbi_v6.d.ts +0 -405
- package/dist/cjs/abis/SimpleAccountAbi_v6.js +0 -528
- package/dist/cjs/abis/SimpleAccountAbi_v6.js.map +0 -1
- package/dist/cjs/abis/SimpleAccountAbi_v7.d.ts +0 -410
- package/dist/cjs/abis/SimpleAccountAbi_v7.js +0 -538
- package/dist/cjs/abis/SimpleAccountAbi_v7.js.map +0 -1
- package/dist/cjs/abis/SimpleAccountFactoryAbi.d.ts +0 -55
- package/dist/cjs/abis/SimpleAccountFactoryAbi.js +0 -78
- package/dist/cjs/abis/SimpleAccountFactoryAbi.js.map +0 -1
- package/dist/cjs/account/smartContractAccount.d.ts +0 -74
- package/dist/cjs/account/smartContractAccount.js +0 -180
- package/dist/cjs/account/smartContractAccount.js.map +0 -1
- package/dist/cjs/actions/bundler/estimateUserOperationGas.d.ts +0 -8
- package/dist/cjs/actions/bundler/estimateUserOperationGas.js +0 -18
- package/dist/cjs/actions/bundler/estimateUserOperationGas.js.map +0 -1
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.d.ts +0 -3
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.js +0 -11
- package/dist/cjs/actions/bundler/getSupportedEntryPoints.js.map +0 -1
- package/dist/cjs/actions/bundler/getUserOperationByHash.d.ts +0 -6
- package/dist/cjs/actions/bundler/getUserOperationByHash.js +0 -11
- package/dist/cjs/actions/bundler/getUserOperationByHash.js.map +0 -1
- package/dist/cjs/actions/bundler/getUserOperationReceipt.d.ts +0 -6
- package/dist/cjs/actions/bundler/getUserOperationReceipt.js +0 -11
- package/dist/cjs/actions/bundler/getUserOperationReceipt.js.map +0 -1
- package/dist/cjs/actions/bundler/sendRawUserOperation.d.ts +0 -7
- package/dist/cjs/actions/bundler/sendRawUserOperation.js +0 -11
- package/dist/cjs/actions/bundler/sendRawUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/buildUserOperation.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/buildUserOperation.js +0 -25
- package/dist/cjs/actions/smartAccount/buildUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js +0 -39
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js.map +0 -1
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js +0 -62
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js.map +0 -1
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js +0 -34
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js.map +0 -1
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js +0 -64
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js +0 -23
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js.map +0 -1
- package/dist/cjs/actions/smartAccount/getAddress.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/getAddress.js +0 -13
- package/dist/cjs/actions/smartAccount/getAddress.js.map +0 -1
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.d.ts +0 -7
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.js +0 -42
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -10
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js +0 -47
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +0 -1
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.d.ts +0 -10
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js +0 -28
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/sendTransaction.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/sendTransaction.js +0 -35
- package/dist/cjs/actions/smartAccount/sendTransaction.js.map +0 -1
- package/dist/cjs/actions/smartAccount/sendTransactions.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/sendTransactions.js +0 -36
- package/dist/cjs/actions/smartAccount/sendTransactions.js.map +0 -1
- package/dist/cjs/actions/smartAccount/sendUserOperation.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/sendUserOperation.js +0 -31
- package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/signMessage.d.ts +0 -6
- package/dist/cjs/actions/smartAccount/signMessage.js +0 -12
- package/dist/cjs/actions/smartAccount/signMessage.js.map +0 -1
- package/dist/cjs/actions/smartAccount/signMessageWith6492.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/signMessageWith6492.js +0 -12
- package/dist/cjs/actions/smartAccount/signMessageWith6492.js.map +0 -1
- package/dist/cjs/actions/smartAccount/signTypedData.d.ts +0 -10
- package/dist/cjs/actions/smartAccount/signTypedData.js +0 -12
- package/dist/cjs/actions/smartAccount/signTypedData.js.map +0 -1
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.d.ts +0 -6
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js +0 -12
- package/dist/cjs/actions/smartAccount/signTypedDataWith6492.js.map +0 -1
- package/dist/cjs/actions/smartAccount/signUserOperation.d.ts +0 -5
- package/dist/cjs/actions/smartAccount/signUserOperation.js +0 -30
- package/dist/cjs/actions/smartAccount/signUserOperation.js.map +0 -1
- package/dist/cjs/actions/smartAccount/types.d.ts +0 -42
- package/dist/cjs/actions/smartAccount/types.js +0 -3
- package/dist/cjs/actions/smartAccount/types.js.map +0 -1
- package/dist/cjs/actions/smartAccount/upgradeAccount.d.ts +0 -4
- package/dist/cjs/actions/smartAccount/upgradeAccount.js +0 -38
- package/dist/cjs/actions/smartAccount/upgradeAccount.js.map +0 -1
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.d.ts +0 -3
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js +0 -36
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js.map +0 -1
- package/dist/cjs/client/bundlerClient.d.ts +0 -10
- package/dist/cjs/client/bundlerClient.js +0 -51
- package/dist/cjs/client/bundlerClient.js.map +0 -1
- package/dist/cjs/client/decorators/bundlerClient.d.ts +0 -41
- package/dist/cjs/client/decorators/bundlerClient.js +0 -17
- package/dist/cjs/client/decorators/bundlerClient.js.map +0 -1
- package/dist/cjs/client/decorators/smartAccountClient.d.ts +0 -35
- package/dist/cjs/client/decorators/smartAccountClient.js +0 -43
- package/dist/cjs/client/decorators/smartAccountClient.js.map +0 -1
- package/dist/cjs/client/isSmartAccountClient.d.ts +0 -5
- package/dist/cjs/client/isSmartAccountClient.js +0 -18
- package/dist/cjs/client/isSmartAccountClient.js.map +0 -1
- package/dist/cjs/client/schema.d.ts +0 -767
- package/dist/cjs/client/schema.js +0 -63
- package/dist/cjs/client/schema.js.map +0 -1
- package/dist/cjs/client/smartAccountClient.d.ts +0 -33
- package/dist/cjs/client/smartAccountClient.js +0 -93
- package/dist/cjs/client/smartAccountClient.js.map +0 -1
- package/dist/cjs/client/types.d.ts +0 -21
- package/dist/cjs/client/types.js +0 -3
- package/dist/cjs/client/types.js.map +0 -1
- package/dist/cjs/ens/utils.d.ts +0 -6
- package/dist/cjs/ens/utils.js +0 -53
- package/dist/cjs/ens/utils.js.map +0 -1
- package/dist/cjs/entrypoint/0.6.d.ts +0 -1029
- package/dist/cjs/entrypoint/0.6.js +0 -49
- package/dist/cjs/entrypoint/0.6.js.map +0 -1
- package/dist/cjs/entrypoint/0.7.d.ts +0 -792
- package/dist/cjs/entrypoint/0.7.js +0 -88
- package/dist/cjs/entrypoint/0.7.js.map +0 -1
- package/dist/cjs/entrypoint/index.d.ts +0 -8
- package/dist/cjs/entrypoint/index.js +0 -53
- package/dist/cjs/entrypoint/index.js.map +0 -1
- package/dist/cjs/entrypoint/types.d.ts +0 -46
- package/dist/cjs/entrypoint/types.js +0 -3
- package/dist/cjs/entrypoint/types.js.map +0 -1
- package/dist/cjs/errors/account.d.ts +0 -47
- package/dist/cjs/errors/account.js +0 -140
- package/dist/cjs/errors/account.js.map +0 -1
- package/dist/cjs/errors/base.d.ts +0 -18
- package/dist/cjs/errors/base.js +0 -39
- package/dist/cjs/errors/base.js.map +0 -1
- package/dist/cjs/errors/client.d.ts +0 -14
- package/dist/cjs/errors/client.js +0 -44
- package/dist/cjs/errors/client.js.map +0 -1
- package/dist/cjs/errors/entrypoint.d.ts +0 -10
- package/dist/cjs/errors/entrypoint.js +0 -32
- package/dist/cjs/errors/entrypoint.js.map +0 -1
- package/dist/cjs/errors/signer.d.ts +0 -5
- package/dist/cjs/errors/signer.js +0 -20
- package/dist/cjs/errors/signer.js.map +0 -1
- package/dist/cjs/errors/transaction.d.ts +0 -10
- package/dist/cjs/errors/transaction.js +0 -29
- package/dist/cjs/errors/transaction.js.map +0 -1
- package/dist/cjs/errors/useroperation.d.ts +0 -10
- package/dist/cjs/errors/useroperation.js +0 -34
- package/dist/cjs/errors/useroperation.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -60
- package/dist/cjs/index.js +0 -170
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/logger.d.ts +0 -20
- package/dist/cjs/logger.js +0 -60
- package/dist/cjs/logger.js.map +0 -1
- package/dist/cjs/middleware/actions.d.ts +0 -12
- package/dist/cjs/middleware/actions.js +0 -21
- package/dist/cjs/middleware/actions.js.map +0 -1
- package/dist/cjs/middleware/defaults/feeEstimator.d.ts +0 -3
- package/dist/cjs/middleware/defaults/feeEstimator.js +0 -23
- package/dist/cjs/middleware/defaults/feeEstimator.js.map +0 -1
- package/dist/cjs/middleware/defaults/gasEstimator.d.ts +0 -3
- package/dist/cjs/middleware/defaults/gasEstimator.js +0 -27
- package/dist/cjs/middleware/defaults/gasEstimator.js.map +0 -1
- package/dist/cjs/middleware/defaults/paymasterAndData.d.ts +0 -2
- package/dist/cjs/middleware/defaults/paymasterAndData.js +0 -12
- package/dist/cjs/middleware/defaults/paymasterAndData.js.map +0 -1
- package/dist/cjs/middleware/defaults/userOpSigner.d.ts +0 -2
- package/dist/cjs/middleware/defaults/userOpSigner.js +0 -26
- package/dist/cjs/middleware/defaults/userOpSigner.js.map +0 -1
- package/dist/cjs/middleware/erc7677middleware.d.ts +0 -40
- package/dist/cjs/middleware/erc7677middleware.js +0 -77
- package/dist/cjs/middleware/erc7677middleware.js.map +0 -1
- package/dist/cjs/middleware/noopMiddleware.d.ts +0 -3
- package/dist/cjs/middleware/noopMiddleware.js +0 -8
- package/dist/cjs/middleware/noopMiddleware.js.map +0 -1
- package/dist/cjs/middleware/types.d.ts +0 -22
- package/dist/cjs/middleware/types.js +0 -3
- package/dist/cjs/middleware/types.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/signer/local-account.d.ts +0 -219
- package/dist/cjs/signer/local-account.js +0 -56
- package/dist/cjs/signer/local-account.js.map +0 -1
- package/dist/cjs/signer/schema.d.ts +0 -4
- package/dist/cjs/signer/schema.js +0 -16
- package/dist/cjs/signer/schema.js.map +0 -1
- package/dist/cjs/signer/types.d.ts +0 -15
- package/dist/cjs/signer/types.js +0 -3
- package/dist/cjs/signer/types.js.map +0 -1
- package/dist/cjs/signer/utils.d.ts +0 -7
- package/dist/cjs/signer/utils.js +0 -16
- package/dist/cjs/signer/utils.js.map +0 -1
- package/dist/cjs/signer/wallet-client.d.ts +0 -217
- package/dist/cjs/signer/wallet-client.js +0 -58
- package/dist/cjs/signer/wallet-client.js.map +0 -1
- package/dist/cjs/transport/split.d.ts +0 -9
- package/dist/cjs/transport/split.js +0 -26
- package/dist/cjs/transport/split.js.map +0 -1
- package/dist/cjs/types.d.ts +0 -158
- package/dist/cjs/types.js +0 -3
- package/dist/cjs/types.js.map +0 -1
- package/dist/cjs/utils/bigint.d.ts +0 -10
- package/dist/cjs/utils/bigint.js +0 -55
- package/dist/cjs/utils/bigint.js.map +0 -1
- package/dist/cjs/utils/bytes.d.ts +0 -7
- package/dist/cjs/utils/bytes.js +0 -11
- package/dist/cjs/utils/bytes.js.map +0 -1
- package/dist/cjs/utils/defaults.d.ts +0 -4
- package/dist/cjs/utils/defaults.js +0 -19
- package/dist/cjs/utils/defaults.js.map +0 -1
- package/dist/cjs/utils/index.d.ts +0 -19
- package/dist/cjs/utils/index.js +0 -95
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/cjs/utils/schema.d.ts +0 -25
- package/dist/cjs/utils/schema.js +0 -35
- package/dist/cjs/utils/schema.js.map +0 -1
- package/dist/cjs/utils/stateOverride.d.ts +0 -4
- package/dist/cjs/utils/stateOverride.js +0 -52
- package/dist/cjs/utils/stateOverride.js.map +0 -1
- package/dist/cjs/utils/testUtils.d.ts +0 -6
- package/dist/cjs/utils/testUtils.js +0 -33
- package/dist/cjs/utils/testUtils.js.map +0 -1
- package/dist/cjs/utils/types.d.ts +0 -16
- package/dist/cjs/utils/types.js +0 -3
- package/dist/cjs/utils/types.js.map +0 -1
- package/dist/cjs/utils/userop.d.ts +0 -49
- package/dist/cjs/utils/userop.js +0 -75
- package/dist/cjs/utils/userop.js.map +0 -1
- package/dist/cjs/version.d.ts +0 -1
- package/dist/cjs/version.js +0 -5
- package/dist/cjs/version.js.map +0 -1
- package/dist/esm/package.json +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAKtC,MAAa,sBAAuB,SAAQ,mBAAS;IAQnD,YAAY,UAAmB;QAC7B,KAAK,CACH;YACE,6DAA6D;YAC7D,UAAU,IAAI,gCAAgC;SAC/C,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QAbK;;;;mBAAO,wBAAwB;WAAC;IAczC,CAAC;CACF;AAhBD,wDAgBC","sourcesContent":["import { BaseError } from \"./base.js\";\n\n/**\n * Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner.\n */\nexport class InvalidSignerTypeError extends BaseError {\n override name = \"InvalidSignerTypeError\";\n\n /**\n * Constructs an error message when an invalid signer type is passed to SmartAccountSigner.\n *\n * @param {string} [signerType] An optional parameter specifying the signer type. If not provided, a default error message will be used.\n */\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"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/errors/transaction.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAKtC,MAAa,8BAA+B,SAAQ,mBAAS;IAKvD;QACF,KAAK,CAAC,oDAAoD,CAAC,CAAC;QALrD;;;;mBAAO,gCAAgC;WAAC;IAMjD,CAAC;CACF;AARD,wEAQC;AAKD,MAAa,4BAA6B,SAAQ,mBAAS;IAQzD,YAAY,IAAS;QACnB,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;QARxD;;;;mBAAO,8BAA8B;WAAC;IAS/C,CAAC;CACF;AAXD,oEAWC","sourcesContent":["import type { Hex } from \"viem\";\nimport { BaseError } from \"./base.js\";\n\n/**\n * Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class.\n */\nexport class TransactionMissingToParamError extends BaseError {\n override name = \"TransactionMissingToParamError\";\n\n /**\n * Throws an error indicating that a transaction is missing the `to` address in the request.\n */ constructor() {\n super(\"Transaction is missing `to` address set on request\");\n }\n}\n\n/**\n * Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found.\n */\nexport class FailedToFindTransactionError extends BaseError {\n override name = \"FailedToFindTransactionError\";\n\n /**\n * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.\n *\n * @param {Hex} hash The hexadecimal value representing the user operation hash.\n */\n constructor(hash: Hex) {\n super(`Failed to find transaction for user operation ${hash}`);\n }\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useroperation.js","sourceRoot":"","sources":["../../../src/errors/useroperation.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAQtC,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\n\n/**\n * Thrown when a 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 {UserOperationStruct} 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 dropAndReplaceUserOperation to retry the operation.\n */\nexport class WaitForUserOperationError extends BaseError {\n /**\n * @param {UserOperationRequest} request the user operation request that failed\n * @param {Error} 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"]}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
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 type * from "./account/smartContractAccount.js";
|
|
10
|
-
export { getAccountAddress, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, toSmartContractAccount, } from "./account/smartContractAccount.js";
|
|
11
|
-
export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js";
|
|
12
|
-
export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js";
|
|
13
|
-
export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js";
|
|
14
|
-
export { checkGasSponsorshipEligibility } from "./actions/smartAccount/checkGasSponsorshipEligibility.js";
|
|
15
|
-
export { dropAndReplaceUserOperation } from "./actions/smartAccount/dropAndReplaceUserOperation.js";
|
|
16
|
-
export { sendTransaction } from "./actions/smartAccount/sendTransaction.js";
|
|
17
|
-
export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
|
|
18
|
-
export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
|
|
19
|
-
export type * from "./actions/smartAccount/types.js";
|
|
20
|
-
export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
|
|
21
|
-
export type * from "./client/bundlerClient.js";
|
|
22
|
-
export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
|
|
23
|
-
export type * from "./client/decorators/bundlerClient.js";
|
|
24
|
-
export { bundlerActions } from "./client/decorators/bundlerClient.js";
|
|
25
|
-
export type * from "./client/decorators/smartAccountClient.js";
|
|
26
|
-
export { smartAccountClientActions } from "./client/decorators/smartAccountClient.js";
|
|
27
|
-
export { isSmartAccountClient } from "./client/isSmartAccountClient.js";
|
|
28
|
-
export { ConnectionConfigSchema, SmartAccountClientOptsSchema, } from "./client/schema.js";
|
|
29
|
-
export type * from "./client/smartAccountClient.js";
|
|
30
|
-
export { createSmartAccountClient, createSmartAccountClientFromExisting, } from "./client/smartAccountClient.js";
|
|
31
|
-
export type * from "./client/types.js";
|
|
32
|
-
export { convertChainIdToCoinType, convertCoinTypeToChain, convertCoinTypeToChainId, } from "./ens/utils.js";
|
|
33
|
-
export { defaultEntryPointVersion, entryPointRegistry, getEntryPoint, isEntryPointVersion, } from "./entrypoint/index.js";
|
|
34
|
-
export type * from "./entrypoint/types.js";
|
|
35
|
-
export { AccountNotFoundError, AccountRequiresOwnerError, BatchExecutionNotSupportedError, DefaultFactoryNotDefinedError, FailedToGetStorageSlotError, GetCounterFactualAddressError, IncorrectAccountType, SignTransactionNotSupportedError, SmartAccountWithSignerRequiredError, UpgradeToAndCallNotSupportedError, UpgradesNotSupportedError, } from "./errors/account.js";
|
|
36
|
-
export { BaseError } from "./errors/base.js";
|
|
37
|
-
export { ChainNotFoundError, IncompatibleClientError, InvalidRpcUrlError, } from "./errors/client.js";
|
|
38
|
-
export { EntryPointNotFoundError, InvalidEntryPointError, } from "./errors/entrypoint.js";
|
|
39
|
-
export { InvalidSignerTypeError } from "./errors/signer.js";
|
|
40
|
-
export { FailedToFindTransactionError, TransactionMissingToParamError, } from "./errors/transaction.js";
|
|
41
|
-
export { InvalidUserOperationError, WaitForUserOperationError, } from "./errors/useroperation.js";
|
|
42
|
-
export { LogLevel, Logger } from "./logger.js";
|
|
43
|
-
export { middlewareActions } from "./middleware/actions.js";
|
|
44
|
-
export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js";
|
|
45
|
-
export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js";
|
|
46
|
-
export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js";
|
|
47
|
-
export { defaultUserOpSigner } from "./middleware/defaults/userOpSigner.js";
|
|
48
|
-
export type * from "./middleware/erc7677middleware.js";
|
|
49
|
-
export { erc7677Middleware } from "./middleware/erc7677middleware.js";
|
|
50
|
-
export { noopMiddleware } from "./middleware/noopMiddleware.js";
|
|
51
|
-
export type * from "./middleware/types.js";
|
|
52
|
-
export { LocalAccountSigner } from "./signer/local-account.js";
|
|
53
|
-
export { SignerSchema, isSigner } from "./signer/schema.js";
|
|
54
|
-
export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js";
|
|
55
|
-
export { wrapSignatureWith6492 } from "./signer/utils.js";
|
|
56
|
-
export { WalletClientSigner } from "./signer/wallet-client.js";
|
|
57
|
-
export { split, type SplitTransportParams } from "./transport/split.js";
|
|
58
|
-
export type * from "./types.js";
|
|
59
|
-
export type * from "./utils/index.js";
|
|
60
|
-
export { BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
|
package/dist/cjs/index.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
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.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 = exports.convertChainIdToCoinType = exports.createSmartAccountClientFromExisting = exports.createSmartAccountClient = exports.SmartAccountClientOptsSchema = exports.ConnectionConfigSchema = exports.isSmartAccountClient = exports.smartAccountClientActions = exports.bundlerActions = exports.createBundlerClientFromExisting = exports.createBundlerClient = 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.SimpleAccountFactoryAbi = exports.SimpleAccountAbi_v7 = exports.SimpleAccountAbi_v6 = exports.EntryPointAbi_v7 = exports.EntryPointAbi_v6 = exports.chains = void 0;
|
|
27
|
-
exports.toRecord = exports.takeBytes = exports.resolveProperties = exports.pick = exports.parsePaymasterAndData = exports.isValidRequest = exports.isMultiplier = exports.isBigNumberish = exports.getDefaultUserOperationFeeOptions = exports.filterUndefined = exports.deepHexlify = exports.concatPaymasterAndData = exports.bypassPaymasterAndDataEmptyHex = exports.bypassPaymasterAndData = exports.bigIntMultiply = exports.bigIntMax = exports.asyncPipe = exports.applyUserOpOverrideOrFeeOption = exports.applyUserOpOverride = exports.applyUserOpFeeOption = exports.allEqual = exports.MultiplierSchema = exports.HexSchema = exports.ChainSchema = exports.BigNumberishSchema = exports.BigNumberishRangeSchema = exports.split = exports.WalletClientSigner = exports.wrapSignatureWith6492 = exports.isSigner = exports.SignerSchema = exports.LocalAccountSigner = exports.noopMiddleware = exports.erc7677Middleware = 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 = void 0;
|
|
28
|
-
exports.chains = __importStar(require("viem/chains"));
|
|
29
|
-
var EntryPointAbi_v6_js_1 = require("./abis/EntryPointAbi_v6.js");
|
|
30
|
-
Object.defineProperty(exports, "EntryPointAbi_v6", { enumerable: true, get: function () { return EntryPointAbi_v6_js_1.EntryPointAbi_v6; } });
|
|
31
|
-
var EntryPointAbi_v7_js_1 = require("./abis/EntryPointAbi_v7.js");
|
|
32
|
-
Object.defineProperty(exports, "EntryPointAbi_v7", { enumerable: true, get: function () { return EntryPointAbi_v7_js_1.EntryPointAbi_v7; } });
|
|
33
|
-
var SimpleAccountAbi_v6_js_1 = require("./abis/SimpleAccountAbi_v6.js");
|
|
34
|
-
Object.defineProperty(exports, "SimpleAccountAbi_v6", { enumerable: true, get: function () { return SimpleAccountAbi_v6_js_1.SimpleAccountAbi_v6; } });
|
|
35
|
-
var SimpleAccountAbi_v7_js_1 = require("./abis/SimpleAccountAbi_v7.js");
|
|
36
|
-
Object.defineProperty(exports, "SimpleAccountAbi_v7", { enumerable: true, get: function () { return SimpleAccountAbi_v7_js_1.SimpleAccountAbi_v7; } });
|
|
37
|
-
var SimpleAccountFactoryAbi_js_1 = require("./abis/SimpleAccountFactoryAbi.js");
|
|
38
|
-
Object.defineProperty(exports, "SimpleAccountFactoryAbi", { enumerable: true, get: function () { return SimpleAccountFactoryAbi_js_1.SimpleAccountFactoryAbi; } });
|
|
39
|
-
var smartContractAccount_js_1 = require("./account/smartContractAccount.js");
|
|
40
|
-
Object.defineProperty(exports, "getAccountAddress", { enumerable: true, get: function () { return smartContractAccount_js_1.getAccountAddress; } });
|
|
41
|
-
Object.defineProperty(exports, "isSmartAccountWithSigner", { enumerable: true, get: function () { return smartContractAccount_js_1.isSmartAccountWithSigner; } });
|
|
42
|
-
Object.defineProperty(exports, "parseFactoryAddressFromAccountInitCode", { enumerable: true, get: function () { return smartContractAccount_js_1.parseFactoryAddressFromAccountInitCode; } });
|
|
43
|
-
Object.defineProperty(exports, "toSmartContractAccount", { enumerable: true, get: function () { return smartContractAccount_js_1.toSmartContractAccount; } });
|
|
44
|
-
var buildUserOperation_js_1 = require("./actions/smartAccount/buildUserOperation.js");
|
|
45
|
-
Object.defineProperty(exports, "buildUserOperation", { enumerable: true, get: function () { return buildUserOperation_js_1.buildUserOperation; } });
|
|
46
|
-
var buildUserOperationFromTx_js_1 = require("./actions/smartAccount/buildUserOperationFromTx.js");
|
|
47
|
-
Object.defineProperty(exports, "buildUserOperationFromTx", { enumerable: true, get: function () { return buildUserOperationFromTx_js_1.buildUserOperationFromTx; } });
|
|
48
|
-
var buildUserOperationFromTxs_js_1 = require("./actions/smartAccount/buildUserOperationFromTxs.js");
|
|
49
|
-
Object.defineProperty(exports, "buildUserOperationFromTxs", { enumerable: true, get: function () { return buildUserOperationFromTxs_js_1.buildUserOperationFromTxs; } });
|
|
50
|
-
var checkGasSponsorshipEligibility_js_1 = require("./actions/smartAccount/checkGasSponsorshipEligibility.js");
|
|
51
|
-
Object.defineProperty(exports, "checkGasSponsorshipEligibility", { enumerable: true, get: function () { return checkGasSponsorshipEligibility_js_1.checkGasSponsorshipEligibility; } });
|
|
52
|
-
var dropAndReplaceUserOperation_js_1 = require("./actions/smartAccount/dropAndReplaceUserOperation.js");
|
|
53
|
-
Object.defineProperty(exports, "dropAndReplaceUserOperation", { enumerable: true, get: function () { return dropAndReplaceUserOperation_js_1.dropAndReplaceUserOperation; } });
|
|
54
|
-
var sendTransaction_js_1 = require("./actions/smartAccount/sendTransaction.js");
|
|
55
|
-
Object.defineProperty(exports, "sendTransaction", { enumerable: true, get: function () { return sendTransaction_js_1.sendTransaction; } });
|
|
56
|
-
var sendTransactions_js_1 = require("./actions/smartAccount/sendTransactions.js");
|
|
57
|
-
Object.defineProperty(exports, "sendTransactions", { enumerable: true, get: function () { return sendTransactions_js_1.sendTransactions; } });
|
|
58
|
-
var sendUserOperation_js_1 = require("./actions/smartAccount/sendUserOperation.js");
|
|
59
|
-
Object.defineProperty(exports, "sendUserOperation", { enumerable: true, get: function () { return sendUserOperation_js_1.sendUserOperation; } });
|
|
60
|
-
var waitForUserOperationTransacation_js_1 = require("./actions/smartAccount/waitForUserOperationTransacation.js");
|
|
61
|
-
Object.defineProperty(exports, "waitForUserOperationTransaction", { enumerable: true, get: function () { return waitForUserOperationTransacation_js_1.waitForUserOperationTransaction; } });
|
|
62
|
-
var bundlerClient_js_1 = require("./client/bundlerClient.js");
|
|
63
|
-
Object.defineProperty(exports, "createBundlerClient", { enumerable: true, get: function () { return bundlerClient_js_1.createBundlerClient; } });
|
|
64
|
-
Object.defineProperty(exports, "createBundlerClientFromExisting", { enumerable: true, get: function () { return bundlerClient_js_1.createBundlerClientFromExisting; } });
|
|
65
|
-
var bundlerClient_js_2 = require("./client/decorators/bundlerClient.js");
|
|
66
|
-
Object.defineProperty(exports, "bundlerActions", { enumerable: true, get: function () { return bundlerClient_js_2.bundlerActions; } });
|
|
67
|
-
var smartAccountClient_js_1 = require("./client/decorators/smartAccountClient.js");
|
|
68
|
-
Object.defineProperty(exports, "smartAccountClientActions", { enumerable: true, get: function () { return smartAccountClient_js_1.smartAccountClientActions; } });
|
|
69
|
-
var isSmartAccountClient_js_1 = require("./client/isSmartAccountClient.js");
|
|
70
|
-
Object.defineProperty(exports, "isSmartAccountClient", { enumerable: true, get: function () { return isSmartAccountClient_js_1.isSmartAccountClient; } });
|
|
71
|
-
var schema_js_1 = require("./client/schema.js");
|
|
72
|
-
Object.defineProperty(exports, "ConnectionConfigSchema", { enumerable: true, get: function () { return schema_js_1.ConnectionConfigSchema; } });
|
|
73
|
-
Object.defineProperty(exports, "SmartAccountClientOptsSchema", { enumerable: true, get: function () { return schema_js_1.SmartAccountClientOptsSchema; } });
|
|
74
|
-
var smartAccountClient_js_2 = require("./client/smartAccountClient.js");
|
|
75
|
-
Object.defineProperty(exports, "createSmartAccountClient", { enumerable: true, get: function () { return smartAccountClient_js_2.createSmartAccountClient; } });
|
|
76
|
-
Object.defineProperty(exports, "createSmartAccountClientFromExisting", { enumerable: true, get: function () { return smartAccountClient_js_2.createSmartAccountClientFromExisting; } });
|
|
77
|
-
var utils_js_1 = require("./ens/utils.js");
|
|
78
|
-
Object.defineProperty(exports, "convertChainIdToCoinType", { enumerable: true, get: function () { return utils_js_1.convertChainIdToCoinType; } });
|
|
79
|
-
Object.defineProperty(exports, "convertCoinTypeToChain", { enumerable: true, get: function () { return utils_js_1.convertCoinTypeToChain; } });
|
|
80
|
-
Object.defineProperty(exports, "convertCoinTypeToChainId", { enumerable: true, get: function () { return utils_js_1.convertCoinTypeToChainId; } });
|
|
81
|
-
var index_js_1 = require("./entrypoint/index.js");
|
|
82
|
-
Object.defineProperty(exports, "defaultEntryPointVersion", { enumerable: true, get: function () { return index_js_1.defaultEntryPointVersion; } });
|
|
83
|
-
Object.defineProperty(exports, "entryPointRegistry", { enumerable: true, get: function () { return index_js_1.entryPointRegistry; } });
|
|
84
|
-
Object.defineProperty(exports, "getEntryPoint", { enumerable: true, get: function () { return index_js_1.getEntryPoint; } });
|
|
85
|
-
Object.defineProperty(exports, "isEntryPointVersion", { enumerable: true, get: function () { return index_js_1.isEntryPointVersion; } });
|
|
86
|
-
var account_js_1 = require("./errors/account.js");
|
|
87
|
-
Object.defineProperty(exports, "AccountNotFoundError", { enumerable: true, get: function () { return account_js_1.AccountNotFoundError; } });
|
|
88
|
-
Object.defineProperty(exports, "AccountRequiresOwnerError", { enumerable: true, get: function () { return account_js_1.AccountRequiresOwnerError; } });
|
|
89
|
-
Object.defineProperty(exports, "BatchExecutionNotSupportedError", { enumerable: true, get: function () { return account_js_1.BatchExecutionNotSupportedError; } });
|
|
90
|
-
Object.defineProperty(exports, "DefaultFactoryNotDefinedError", { enumerable: true, get: function () { return account_js_1.DefaultFactoryNotDefinedError; } });
|
|
91
|
-
Object.defineProperty(exports, "FailedToGetStorageSlotError", { enumerable: true, get: function () { return account_js_1.FailedToGetStorageSlotError; } });
|
|
92
|
-
Object.defineProperty(exports, "GetCounterFactualAddressError", { enumerable: true, get: function () { return account_js_1.GetCounterFactualAddressError; } });
|
|
93
|
-
Object.defineProperty(exports, "IncorrectAccountType", { enumerable: true, get: function () { return account_js_1.IncorrectAccountType; } });
|
|
94
|
-
Object.defineProperty(exports, "SignTransactionNotSupportedError", { enumerable: true, get: function () { return account_js_1.SignTransactionNotSupportedError; } });
|
|
95
|
-
Object.defineProperty(exports, "SmartAccountWithSignerRequiredError", { enumerable: true, get: function () { return account_js_1.SmartAccountWithSignerRequiredError; } });
|
|
96
|
-
Object.defineProperty(exports, "UpgradeToAndCallNotSupportedError", { enumerable: true, get: function () { return account_js_1.UpgradeToAndCallNotSupportedError; } });
|
|
97
|
-
Object.defineProperty(exports, "UpgradesNotSupportedError", { enumerable: true, get: function () { return account_js_1.UpgradesNotSupportedError; } });
|
|
98
|
-
var base_js_1 = require("./errors/base.js");
|
|
99
|
-
Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_js_1.BaseError; } });
|
|
100
|
-
var client_js_1 = require("./errors/client.js");
|
|
101
|
-
Object.defineProperty(exports, "ChainNotFoundError", { enumerable: true, get: function () { return client_js_1.ChainNotFoundError; } });
|
|
102
|
-
Object.defineProperty(exports, "IncompatibleClientError", { enumerable: true, get: function () { return client_js_1.IncompatibleClientError; } });
|
|
103
|
-
Object.defineProperty(exports, "InvalidRpcUrlError", { enumerable: true, get: function () { return client_js_1.InvalidRpcUrlError; } });
|
|
104
|
-
var entrypoint_js_1 = require("./errors/entrypoint.js");
|
|
105
|
-
Object.defineProperty(exports, "EntryPointNotFoundError", { enumerable: true, get: function () { return entrypoint_js_1.EntryPointNotFoundError; } });
|
|
106
|
-
Object.defineProperty(exports, "InvalidEntryPointError", { enumerable: true, get: function () { return entrypoint_js_1.InvalidEntryPointError; } });
|
|
107
|
-
var signer_js_1 = require("./errors/signer.js");
|
|
108
|
-
Object.defineProperty(exports, "InvalidSignerTypeError", { enumerable: true, get: function () { return signer_js_1.InvalidSignerTypeError; } });
|
|
109
|
-
var transaction_js_1 = require("./errors/transaction.js");
|
|
110
|
-
Object.defineProperty(exports, "FailedToFindTransactionError", { enumerable: true, get: function () { return transaction_js_1.FailedToFindTransactionError; } });
|
|
111
|
-
Object.defineProperty(exports, "TransactionMissingToParamError", { enumerable: true, get: function () { return transaction_js_1.TransactionMissingToParamError; } });
|
|
112
|
-
var useroperation_js_1 = require("./errors/useroperation.js");
|
|
113
|
-
Object.defineProperty(exports, "InvalidUserOperationError", { enumerable: true, get: function () { return useroperation_js_1.InvalidUserOperationError; } });
|
|
114
|
-
Object.defineProperty(exports, "WaitForUserOperationError", { enumerable: true, get: function () { return useroperation_js_1.WaitForUserOperationError; } });
|
|
115
|
-
var logger_js_1 = require("./logger.js");
|
|
116
|
-
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_js_1.LogLevel; } });
|
|
117
|
-
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_js_1.Logger; } });
|
|
118
|
-
var actions_js_1 = require("./middleware/actions.js");
|
|
119
|
-
Object.defineProperty(exports, "middlewareActions", { enumerable: true, get: function () { return actions_js_1.middlewareActions; } });
|
|
120
|
-
var feeEstimator_js_1 = require("./middleware/defaults/feeEstimator.js");
|
|
121
|
-
Object.defineProperty(exports, "defaultFeeEstimator", { enumerable: true, get: function () { return feeEstimator_js_1.defaultFeeEstimator; } });
|
|
122
|
-
var gasEstimator_js_1 = require("./middleware/defaults/gasEstimator.js");
|
|
123
|
-
Object.defineProperty(exports, "defaultGasEstimator", { enumerable: true, get: function () { return gasEstimator_js_1.defaultGasEstimator; } });
|
|
124
|
-
var paymasterAndData_js_1 = require("./middleware/defaults/paymasterAndData.js");
|
|
125
|
-
Object.defineProperty(exports, "defaultPaymasterAndData", { enumerable: true, get: function () { return paymasterAndData_js_1.defaultPaymasterAndData; } });
|
|
126
|
-
var userOpSigner_js_1 = require("./middleware/defaults/userOpSigner.js");
|
|
127
|
-
Object.defineProperty(exports, "defaultUserOpSigner", { enumerable: true, get: function () { return userOpSigner_js_1.defaultUserOpSigner; } });
|
|
128
|
-
var erc7677middleware_js_1 = require("./middleware/erc7677middleware.js");
|
|
129
|
-
Object.defineProperty(exports, "erc7677Middleware", { enumerable: true, get: function () { return erc7677middleware_js_1.erc7677Middleware; } });
|
|
130
|
-
var noopMiddleware_js_1 = require("./middleware/noopMiddleware.js");
|
|
131
|
-
Object.defineProperty(exports, "noopMiddleware", { enumerable: true, get: function () { return noopMiddleware_js_1.noopMiddleware; } });
|
|
132
|
-
var local_account_js_1 = require("./signer/local-account.js");
|
|
133
|
-
Object.defineProperty(exports, "LocalAccountSigner", { enumerable: true, get: function () { return local_account_js_1.LocalAccountSigner; } });
|
|
134
|
-
var schema_js_2 = require("./signer/schema.js");
|
|
135
|
-
Object.defineProperty(exports, "SignerSchema", { enumerable: true, get: function () { return schema_js_2.SignerSchema; } });
|
|
136
|
-
Object.defineProperty(exports, "isSigner", { enumerable: true, get: function () { return schema_js_2.isSigner; } });
|
|
137
|
-
var utils_js_2 = require("./signer/utils.js");
|
|
138
|
-
Object.defineProperty(exports, "wrapSignatureWith6492", { enumerable: true, get: function () { return utils_js_2.wrapSignatureWith6492; } });
|
|
139
|
-
var wallet_client_js_1 = require("./signer/wallet-client.js");
|
|
140
|
-
Object.defineProperty(exports, "WalletClientSigner", { enumerable: true, get: function () { return wallet_client_js_1.WalletClientSigner; } });
|
|
141
|
-
var split_js_1 = require("./transport/split.js");
|
|
142
|
-
Object.defineProperty(exports, "split", { enumerable: true, get: function () { return split_js_1.split; } });
|
|
143
|
-
var index_js_2 = require("./utils/index.js");
|
|
144
|
-
Object.defineProperty(exports, "BigNumberishRangeSchema", { enumerable: true, get: function () { return index_js_2.BigNumberishRangeSchema; } });
|
|
145
|
-
Object.defineProperty(exports, "BigNumberishSchema", { enumerable: true, get: function () { return index_js_2.BigNumberishSchema; } });
|
|
146
|
-
Object.defineProperty(exports, "ChainSchema", { enumerable: true, get: function () { return index_js_2.ChainSchema; } });
|
|
147
|
-
Object.defineProperty(exports, "HexSchema", { enumerable: true, get: function () { return index_js_2.HexSchema; } });
|
|
148
|
-
Object.defineProperty(exports, "MultiplierSchema", { enumerable: true, get: function () { return index_js_2.MultiplierSchema; } });
|
|
149
|
-
Object.defineProperty(exports, "allEqual", { enumerable: true, get: function () { return index_js_2.allEqual; } });
|
|
150
|
-
Object.defineProperty(exports, "applyUserOpFeeOption", { enumerable: true, get: function () { return index_js_2.applyUserOpFeeOption; } });
|
|
151
|
-
Object.defineProperty(exports, "applyUserOpOverride", { enumerable: true, get: function () { return index_js_2.applyUserOpOverride; } });
|
|
152
|
-
Object.defineProperty(exports, "applyUserOpOverrideOrFeeOption", { enumerable: true, get: function () { return index_js_2.applyUserOpOverrideOrFeeOption; } });
|
|
153
|
-
Object.defineProperty(exports, "asyncPipe", { enumerable: true, get: function () { return index_js_2.asyncPipe; } });
|
|
154
|
-
Object.defineProperty(exports, "bigIntMax", { enumerable: true, get: function () { return index_js_2.bigIntMax; } });
|
|
155
|
-
Object.defineProperty(exports, "bigIntMultiply", { enumerable: true, get: function () { return index_js_2.bigIntMultiply; } });
|
|
156
|
-
Object.defineProperty(exports, "bypassPaymasterAndData", { enumerable: true, get: function () { return index_js_2.bypassPaymasterAndData; } });
|
|
157
|
-
Object.defineProperty(exports, "bypassPaymasterAndDataEmptyHex", { enumerable: true, get: function () { return index_js_2.bypassPaymasterAndDataEmptyHex; } });
|
|
158
|
-
Object.defineProperty(exports, "concatPaymasterAndData", { enumerable: true, get: function () { return index_js_2.concatPaymasterAndData; } });
|
|
159
|
-
Object.defineProperty(exports, "deepHexlify", { enumerable: true, get: function () { return index_js_2.deepHexlify; } });
|
|
160
|
-
Object.defineProperty(exports, "filterUndefined", { enumerable: true, get: function () { return index_js_2.filterUndefined; } });
|
|
161
|
-
Object.defineProperty(exports, "getDefaultUserOperationFeeOptions", { enumerable: true, get: function () { return index_js_2.getDefaultUserOperationFeeOptions; } });
|
|
162
|
-
Object.defineProperty(exports, "isBigNumberish", { enumerable: true, get: function () { return index_js_2.isBigNumberish; } });
|
|
163
|
-
Object.defineProperty(exports, "isMultiplier", { enumerable: true, get: function () { return index_js_2.isMultiplier; } });
|
|
164
|
-
Object.defineProperty(exports, "isValidRequest", { enumerable: true, get: function () { return index_js_2.isValidRequest; } });
|
|
165
|
-
Object.defineProperty(exports, "parsePaymasterAndData", { enumerable: true, get: function () { return index_js_2.parsePaymasterAndData; } });
|
|
166
|
-
Object.defineProperty(exports, "pick", { enumerable: true, get: function () { return index_js_2.pick; } });
|
|
167
|
-
Object.defineProperty(exports, "resolveProperties", { enumerable: true, get: function () { return index_js_2.resolveProperties; } });
|
|
168
|
-
Object.defineProperty(exports, "takeBytes", { enumerable: true, get: function () { return index_js_2.takeBytes; } });
|
|
169
|
-
Object.defineProperty(exports, "toRecord", { enumerable: true, get: function () { return index_js_2.toRecord; } });
|
|
170
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAEhC,6EAK2C;AAJzC,4HAAA,iBAAiB,OAAA;AACjB,mIAAA,wBAAwB,OAAA;AACxB,iJAAA,sCAAsC,OAAA;AACtC,iIAAA,sBAAsB,OAAA;AAExB,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;AAExC,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;AAE5B,0EAAsE;AAA7D,yHAAA,iBAAiB,OAAA;AAC1B,oEAAgE;AAAvD,mHAAA,cAAc,OAAA;AAEvB,8DAA+D;AAAtD,sHAAA,kBAAkB,OAAA;AAC3B,gDAA4D;AAAnD,yGAAA,YAAY,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAK/B,8CAA0D;AAAjD,iHAAA,qBAAqB,OAAA;AAC9B,8DAA+D;AAAtD,sHAAA,kBAAkB,OAAA;AAC3B,iDAAwE;AAA/D,iGAAA,KAAK,OAAA;AAGd,6CA2B0B;AA1BxB,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,2GAAA,eAAe,OAAA;AACf,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 type * from \"./account/smartContractAccount.js\";\nexport {\n getAccountAddress,\n isSmartAccountWithSigner,\n parseFactoryAddressFromAccountInitCode,\n toSmartContractAccount,\n} from \"./account/smartContractAccount.js\";\nexport { buildUserOperation } from \"./actions/smartAccount/buildUserOperation.js\";\nexport { buildUserOperationFromTx } from \"./actions/smartAccount/buildUserOperationFromTx.js\";\nexport { buildUserOperationFromTxs } from \"./actions/smartAccount/buildUserOperationFromTxs.js\";\nexport { checkGasSponsorshipEligibility } from \"./actions/smartAccount/checkGasSponsorshipEligibility.js\";\nexport { dropAndReplaceUserOperation } from \"./actions/smartAccount/dropAndReplaceUserOperation.js\";\nexport { sendTransaction } from \"./actions/smartAccount/sendTransaction.js\";\nexport { sendTransactions } from \"./actions/smartAccount/sendTransactions.js\";\nexport { sendUserOperation } from \"./actions/smartAccount/sendUserOperation.js\";\nexport type * from \"./actions/smartAccount/types.js\";\nexport { waitForUserOperationTransaction } from \"./actions/smartAccount/waitForUserOperationTransacation.js\";\nexport type * from \"./client/bundlerClient.js\";\nexport {\n createBundlerClient,\n createBundlerClientFromExisting,\n} from \"./client/bundlerClient.js\";\nexport type * from \"./client/decorators/bundlerClient.js\";\nexport { bundlerActions } from \"./client/decorators/bundlerClient.js\";\nexport type * from \"./client/decorators/smartAccountClient.js\";\nexport { smartAccountClientActions } from \"./client/decorators/smartAccountClient.js\";\nexport { isSmartAccountClient } from \"./client/isSmartAccountClient.js\";\nexport {\n ConnectionConfigSchema,\n SmartAccountClientOptsSchema,\n} from \"./client/schema.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport {\n createSmartAccountClient,\n createSmartAccountClientFromExisting,\n} from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport {\n convertChainIdToCoinType,\n convertCoinTypeToChain,\n convertCoinTypeToChainId,\n} from \"./ens/utils.js\";\nexport {\n defaultEntryPointVersion,\n entryPointRegistry,\n getEntryPoint,\n isEntryPointVersion,\n} from \"./entrypoint/index.js\";\nexport type * from \"./entrypoint/types.js\";\nexport {\n AccountNotFoundError,\n AccountRequiresOwnerError,\n BatchExecutionNotSupportedError,\n DefaultFactoryNotDefinedError,\n FailedToGetStorageSlotError,\n GetCounterFactualAddressError,\n IncorrectAccountType,\n SignTransactionNotSupportedError,\n SmartAccountWithSignerRequiredError,\n UpgradeToAndCallNotSupportedError,\n UpgradesNotSupportedError,\n} from \"./errors/account.js\";\nexport { BaseError } from \"./errors/base.js\";\nexport {\n ChainNotFoundError,\n IncompatibleClientError,\n InvalidRpcUrlError,\n} from \"./errors/client.js\";\nexport {\n EntryPointNotFoundError,\n InvalidEntryPointError,\n} from \"./errors/entrypoint.js\";\nexport { InvalidSignerTypeError } from \"./errors/signer.js\";\nexport {\n FailedToFindTransactionError,\n TransactionMissingToParamError,\n} from \"./errors/transaction.js\";\nexport {\n InvalidUserOperationError,\n WaitForUserOperationError,\n} from \"./errors/useroperation.js\";\nexport { LogLevel, Logger } from \"./logger.js\";\nexport { middlewareActions } from \"./middleware/actions.js\";\nexport { defaultFeeEstimator } from \"./middleware/defaults/feeEstimator.js\";\nexport { defaultGasEstimator } from \"./middleware/defaults/gasEstimator.js\";\nexport { defaultPaymasterAndData } from \"./middleware/defaults/paymasterAndData.js\";\nexport { defaultUserOpSigner } from \"./middleware/defaults/userOpSigner.js\";\nexport type * from \"./middleware/erc7677middleware.js\";\nexport { erc7677Middleware } from \"./middleware/erc7677middleware.js\";\nexport { noopMiddleware } from \"./middleware/noopMiddleware.js\";\nexport type * from \"./middleware/types.js\";\nexport { LocalAccountSigner } from \"./signer/local-account.js\";\nexport { SignerSchema, isSigner } from \"./signer/schema.js\";\nexport type {\n SmartAccountAuthenticator,\n SmartAccountSigner,\n} from \"./signer/types.js\";\nexport { wrapSignatureWith6492 } from \"./signer/utils.js\";\nexport { WalletClientSigner } from \"./signer/wallet-client.js\";\nexport { split, type SplitTransportParams } from \"./transport/split.js\";\nexport type * from \"./types.js\";\nexport type * from \"./utils/index.js\";\nexport {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n ChainSchema,\n HexSchema,\n MultiplierSchema,\n allEqual,\n applyUserOpFeeOption,\n applyUserOpOverride,\n applyUserOpOverrideOrFeeOption,\n asyncPipe,\n bigIntMax,\n bigIntMultiply,\n bypassPaymasterAndData,\n bypassPaymasterAndDataEmptyHex,\n concatPaymasterAndData,\n deepHexlify,\n filterUndefined,\n getDefaultUserOperationFeeOptions,\n isBigNumberish,\n isMultiplier,\n isValidRequest,\n parsePaymasterAndData,\n pick,\n resolveProperties,\n takeBytes,\n toRecord,\n} from \"./utils/index.js\";\n"]}
|
package/dist/cjs/logger.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/cjs/logger.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
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
|
package/dist/cjs/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAKD,MAAa,MAAM;IAejB,MAAM,CAAC,WAAW,CAAC,QAAkB;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAcD,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;;AAvIH,wBAwIC;AAvIQ;;;;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\n/**\n * Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior.\n */\nexport class Logger {\n static logLevel: LogLevel = LogLevel.INFO;\n static logFilter?: string;\n\n /**\n * Sets the log level for logging purposes.\n *\n * @example\n * ```ts\n * import { Logger, LogLevel } from \"@aa-sdk/core\";\n * Logger.setLogLevel(LogLevel.DEBUG);\n * ```\n *\n * @param {LogLevel} logLevel The desired log level\n */\n static setLogLevel(logLevel: LogLevel) {\n this.logLevel = logLevel;\n }\n\n /**\n * Sets the log filter pattern.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.setLogFilter(\"error\");\n * ```\n *\n * @param {string} pattern The pattern to set as the log filter\n */\n static setLogFilter(pattern: string) {\n this.logFilter = pattern;\n }\n\n /**\n * Logs an error message to the console if the logging condition is met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.error(\"An error occurred while processing the request\");\n * ```\n *\n * @param {string} msg The primary error message to be logged\n * @param {...any[]} args Additional arguments to be logged along with the error message\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 /**\n * Logs a warning message if the logging conditions are met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.warn(\"Careful...\");\n * ```\n *\n * @param {string} msg The message to log as a warning\n * @param {...any[]} args Additional parameters to log along with the message\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 /**\n * Logs a debug message to the console if the log level allows it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.debug(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to pass to the console.debug method\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 /**\n * Logs an informational message to the console if the logging level is set to INFO.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.info(\"Something is happening\");\n * ```\n *\n * @param {string} msg the message to log\n * @param {...any[]} args additional arguments to log alongside the message\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 /**\n * Logs a message with additional arguments if the logging level permits it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.verbose(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to be logged\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"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.middlewareActions = void 0;
|
|
4
|
-
const feeEstimator_js_1 = require("./defaults/feeEstimator.js");
|
|
5
|
-
const gasEstimator_js_1 = require("./defaults/gasEstimator.js");
|
|
6
|
-
const paymasterAndData_js_1 = require("./defaults/paymasterAndData.js");
|
|
7
|
-
const userOpSigner_js_1 = require("./defaults/userOpSigner.js");
|
|
8
|
-
const noopMiddleware_js_1 = require("./noopMiddleware.js");
|
|
9
|
-
const middlewareActions = (overrides) => (client) => ({
|
|
10
|
-
middleware: {
|
|
11
|
-
customMiddleware: overrides.customMiddleware ?? noopMiddleware_js_1.noopMiddleware,
|
|
12
|
-
dummyPaymasterAndData: overrides.dummyPaymasterAndData ?? paymasterAndData_js_1.defaultPaymasterAndData,
|
|
13
|
-
feeEstimator: overrides.feeEstimator ?? (0, feeEstimator_js_1.defaultFeeEstimator)(client),
|
|
14
|
-
gasEstimator: overrides.gasEstimator ?? (0, gasEstimator_js_1.defaultGasEstimator)(client),
|
|
15
|
-
paymasterAndData: overrides.paymasterAndData ?? paymasterAndData_js_1.defaultPaymasterAndData,
|
|
16
|
-
userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware_js_1.noopMiddleware,
|
|
17
|
-
signUserOperation: overrides.signUserOperation ?? userOpSigner_js_1.defaultUserOpSigner,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
exports.middlewareActions = middlewareActions;
|
|
21
|
-
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/middleware/actions.ts"],"names":[],"mappings":";;;AAaA,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,EACnB,SAAS,CAAC,qBAAqB,IAAI,6CAAuB;QAC5D,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,EAAE,SAAS,CAAC,gBAAgB,IAAI,6CAAuB;QACvE,sBAAsB,EACpB,SAAS,CAAC,sBAAsB,IAAI,kCAAc;QACpD,iBAAiB,EAAE,SAAS,CAAC,iBAAiB,IAAI,qCAAmB;KACtE;CACF,CAAC,CAAC;AAtBQ,QAAA,iBAAiB,qBAsBzB","sourcesContent":["import {\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 { 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 * function that takes in ClientMiddlewareConfig used during client initiation\n * and returns the middleware actions object that the smart account client extends with\n *\n * @param {ClientMiddlewareConfig} overrides config used during client initiation for overriding default middlewares\n * @returns {(client: MiddlewareClient<TTransport, TChain, TAccount>) => { middleware: ClientMiddleware }} 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:\n overrides.dummyPaymasterAndData ?? defaultPaymasterAndData,\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator:\n overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner,\n },\n });\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultFeeEstimator = void 0;
|
|
4
|
-
const index_js_1 = require("../../utils/index.js");
|
|
5
|
-
function defaultFeeEstimator(client) {
|
|
6
|
-
return async (struct, { overrides, feeOptions }) => {
|
|
7
|
-
const feeData = await client.estimateFeesPerGas();
|
|
8
|
-
if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {
|
|
9
|
-
throw new Error("feeData is missing maxFeePerGas or maxPriorityFeePerGas");
|
|
10
|
-
}
|
|
11
|
-
let maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas();
|
|
12
|
-
maxPriorityFeePerGas = (0, index_js_1.applyUserOpOverrideOrFeeOption)(maxPriorityFeePerGas, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);
|
|
13
|
-
let maxFeePerGas = feeData.maxFeePerGas -
|
|
14
|
-
feeData.maxPriorityFeePerGas +
|
|
15
|
-
BigInt(maxPriorityFeePerGas);
|
|
16
|
-
maxFeePerGas = (0, index_js_1.applyUserOpOverrideOrFeeOption)(maxFeePerGas, overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);
|
|
17
|
-
struct.maxFeePerGas = maxFeePerGas;
|
|
18
|
-
struct.maxPriorityFeePerGas = maxPriorityFeePerGas;
|
|
19
|
-
return struct;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.defaultFeeEstimator = defaultFeeEstimator;
|
|
23
|
-
//# sourceMappingURL=feeEstimator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feeEstimator.js","sourceRoot":"","sources":["../../../../src/middleware/defaults/feeEstimator.ts"],"names":[],"mappings":";;;AACA,mDAAsE;AAwBtE,SAAgB,mBAAmB,CACjC,MAAS;IAET,OAAO,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE;QAUjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;QAClD,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,oBAAoB,IAAI,IAAI,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;QACJ,CAAC;QAED,IAAI,oBAAoB,GACtB,MAAM,MAAM,CAAC,4BAA4B,EAAE,CAAC;QAE9C,oBAAoB,GAAG,IAAA,yCAA8B,EACnD,oBAAoB,EACpB,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,oBAAoB,CACjC,CAAC;QAEF,IAAI,YAAY,GACd,OAAO,CAAC,YAAY;YACpB,OAAO,CAAC,oBAAoB;YAC5B,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAE/B,YAAY,GAAG,IAAA,yCAA8B,EAC3C,YAAY,EACZ,SAAS,EAAE,YAAY,EACvB,UAAU,EAAE,YAAY,CACzB,CAAC;QAEF,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,MAAM,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACnD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AA5CD,kDA4CC","sourcesContent":["import type { BigNumberish } from \"../../types\";\nimport { applyUserOpOverrideOrFeeOption } from \"../../utils/index.js\";\nimport type { MiddlewareClient } from \"../actions\";\nimport type { ClientMiddlewareFn } from \"../types\";\n\n/**\n * Default fee estimator middleware function that estimates the maximum fee per gas and maximum priority fee per gas for a given client and applies the necessary overrides and fee options.\n *\n * @example\n * ```ts\n * import { createSmartAccountClient, defaultFeeEstimator, createBundlerClient } from \"@aa-sdk/core\";\n *\n * const bundlerClient = createBundlerClient(...);\n *\n * // NOTE: this is already provided by the smart account client\n * const client = createSmartAccountClient({\n * feeEstimator: defaultFeeEstimator(bundlerClient),\n * ...otherParams\n * });\n * ```\n *\n * @template {MiddlewareClient} C The type of the client\n * @param {C} client The client to perform the fee estimation\n * @returns {ClientMiddlewareFn} A middleware function that takes in the struct and options, estimates the fees, and updates the struct with the estimated fees\n */\nexport function defaultFeeEstimator<C extends MiddlewareClient>(\n client: C\n): ClientMiddlewareFn {\n return async (struct, { overrides, feeOptions }) => {\n // maxFeePerGas must be at least the sum of maxPriorityFeePerGas and baseFee\n // so we need to accommodate for the fee option applied maxPriorityFeePerGas for the maxFeePerGas\n //\n // Note that if maxFeePerGas is not at least the sum of maxPriorityFeePerGas and required baseFee\n // after applying the fee options, then the transaction will fail\n //\n // Refer to https://docs.alchemy.com/docs/maxpriorityfeepergas-vs-maxfeepergas\n // for more information about maxFeePerGas and maxPriorityFeePerGas\n\n const feeData = await client.estimateFeesPerGas();\n if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {\n throw new Error(\n \"feeData is missing maxFeePerGas or maxPriorityFeePerGas\"\n );\n }\n\n let maxPriorityFeePerGas: BigNumberish =\n await client.estimateMaxPriorityFeePerGas();\n\n maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(\n maxPriorityFeePerGas,\n overrides?.maxPriorityFeePerGas,\n feeOptions?.maxPriorityFeePerGas\n );\n\n let maxFeePerGas: BigNumberish =\n feeData.maxFeePerGas -\n feeData.maxPriorityFeePerGas +\n BigInt(maxPriorityFeePerGas);\n\n maxFeePerGas = applyUserOpOverrideOrFeeOption(\n maxFeePerGas,\n overrides?.maxFeePerGas,\n feeOptions?.maxFeePerGas\n );\n\n struct.maxFeePerGas = maxFeePerGas;\n struct.maxPriorityFeePerGas = maxPriorityFeePerGas;\n return struct;\n };\n}\n"]}
|