@aa-sdk/core 4.0.0-alpha.0 → 4.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/account/smartContractAccount.d.ts +9 -3
- package/dist/cjs/account/smartContractAccount.js +13 -7
- package/dist/cjs/account/smartContractAccount.js.map +1 -1
- package/dist/cjs/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
- package/dist/cjs/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/cjs/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/cjs/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/cjs/client/bundlerClient.js.map +1 -1
- package/dist/cjs/client/decorators/bundlerClient.js.map +1 -1
- package/dist/cjs/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/cjs/client/isSmartAccountClient.js.map +1 -1
- package/dist/cjs/client/smartAccountClient.js.map +1 -1
- package/dist/cjs/client/types.d.ts +2 -7
- package/dist/cjs/client/types.js.map +1 -1
- package/dist/cjs/ens/utils.d.ts +1 -1
- package/dist/cjs/ens/utils.js +3 -3
- package/dist/cjs/ens/utils.js.map +1 -1
- package/dist/cjs/entrypoint/index.js.map +1 -1
- package/dist/cjs/errors/account.js.map +1 -1
- package/dist/cjs/errors/base.js.map +1 -1
- package/dist/cjs/errors/client.js.map +1 -1
- package/dist/cjs/errors/entrypoint.js.map +1 -1
- package/dist/cjs/errors/signer.js.map +1 -1
- package/dist/cjs/errors/transaction.js.map +1 -1
- package/dist/cjs/errors/useroperation.js.map +1 -1
- package/dist/cjs/index.d.ts +4 -7
- package/dist/cjs/index.js +38 -66
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logger.js.map +1 -1
- package/dist/cjs/middleware/actions.js +2 -18
- package/dist/cjs/middleware/actions.js.map +1 -1
- package/dist/cjs/middleware/defaults/feeEstimator.d.ts +1 -1
- package/dist/cjs/middleware/defaults/feeEstimator.js +17 -15
- package/dist/cjs/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/cjs/middleware/defaults/gasEstimator.js +4 -2
- package/dist/cjs/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/cjs/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/cjs/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/cjs/middleware/erc7677middleware.d.ts +40 -0
- package/dist/cjs/middleware/erc7677middleware.js +77 -0
- package/dist/cjs/middleware/erc7677middleware.js.map +1 -0
- package/dist/cjs/middleware/noopMiddleware.d.ts +2 -1
- package/dist/cjs/middleware/noopMiddleware.js.map +1 -1
- package/dist/cjs/middleware/types.d.ts +3 -2
- package/dist/cjs/middleware/types.js.map +1 -1
- package/dist/cjs/signer/local-account.d.ts +44 -44
- package/dist/cjs/signer/local-account.js.map +1 -1
- package/dist/cjs/signer/schema.js.map +1 -1
- package/dist/cjs/signer/utils.d.ts +1 -9
- package/dist/cjs/signer/utils.js +1 -16
- package/dist/cjs/signer/utils.js.map +1 -1
- package/dist/cjs/signer/wallet-client.d.ts +44 -44
- package/dist/cjs/signer/wallet-client.js.map +1 -1
- package/dist/cjs/transport/split.js.map +1 -1
- package/dist/cjs/utils/bigint.js.map +1 -1
- package/dist/cjs/utils/bytes.js.map +1 -1
- package/dist/cjs/utils/defaults.d.ts +2 -4
- package/dist/cjs/utils/defaults.js +5 -45
- package/dist/cjs/utils/defaults.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +0 -4
- package/dist/cjs/utils/index.js +1 -33
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/types.js.map +1 -1
- package/dist/cjs/utils/userop.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/account/smartContractAccount.d.ts +9 -3
- package/dist/esm/account/smartContractAccount.js +8 -2
- package/dist/esm/account/smartContractAccount.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/esm/client/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.d.ts +2 -7
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/ens/utils.d.ts +1 -1
- package/dist/esm/ens/utils.js +1 -1
- package/dist/esm/ens/utils.js.map +1 -1
- package/dist/esm/entrypoint/index.js.map +1 -1
- package/dist/esm/errors/account.js.map +1 -1
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/client.js.map +1 -1
- package/dist/esm/errors/entrypoint.js.map +1 -1
- package/dist/esm/errors/signer.js.map +1 -1
- package/dist/esm/errors/transaction.js.map +1 -1
- package/dist/esm/errors/useroperation.js.map +1 -1
- package/dist/esm/index.d.ts +4 -7
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/middleware/actions.js +3 -18
- package/dist/esm/middleware/actions.js.map +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.d.ts +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.js +17 -15
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/gasEstimator.js +4 -2
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/esm/middleware/erc7677middleware.d.ts +40 -0
- package/dist/esm/middleware/erc7677middleware.js +73 -0
- package/dist/esm/middleware/erc7677middleware.js.map +1 -0
- package/dist/esm/middleware/noopMiddleware.d.ts +2 -1
- package/dist/esm/middleware/noopMiddleware.js.map +1 -1
- package/dist/esm/middleware/types.d.ts +3 -2
- package/dist/esm/middleware/types.js.map +1 -1
- package/dist/esm/signer/local-account.d.ts +44 -44
- package/dist/esm/signer/local-account.js.map +1 -1
- package/dist/esm/signer/schema.js.map +1 -1
- package/dist/esm/signer/utils.d.ts +1 -9
- package/dist/esm/signer/utils.js +0 -14
- package/dist/esm/signer/utils.js.map +1 -1
- package/dist/esm/signer/wallet-client.d.ts +44 -44
- package/dist/esm/signer/wallet-client.js.map +1 -1
- package/dist/esm/transport/split.js.map +1 -1
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/bytes.js.map +1 -1
- package/dist/esm/utils/defaults.d.ts +2 -4
- package/dist/esm/utils/defaults.js +1 -40
- package/dist/esm/utils/defaults.js.map +1 -1
- package/dist/esm/utils/index.d.ts +0 -4
- package/dist/esm/utils/index.js +0 -18
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/userop.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/account/smartContractAccount.d.ts +58 -3
- package/dist/types/account/smartContractAccount.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts +23 -0
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +33 -33
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts +43 -59
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +18 -18
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts +22 -0
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts +3 -3
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts +3 -4
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -14
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts +0 -7
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendTransaction.d.ts +24 -0
- package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendTransactions.d.ts +23 -0
- package/dist/types/actions/smartAccount/sendTransactions.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts +17 -3
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/waitForUserOperationTransacation.d.ts +24 -0
- package/dist/types/actions/smartAccount/waitForUserOperationTransacation.d.ts.map +1 -1
- package/dist/types/client/bundlerClient.d.ts +17 -2
- package/dist/types/client/bundlerClient.d.ts.map +1 -1
- package/dist/types/client/decorators/bundlerClient.d.ts +17 -8
- package/dist/types/client/decorators/bundlerClient.d.ts.map +1 -1
- package/dist/types/client/decorators/smartAccountClient.d.ts +8 -0
- package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/isSmartAccountClient.d.ts +4 -4
- package/dist/types/client/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/types.d.ts +2 -7
- package/dist/types/client/types.d.ts.map +1 -1
- package/dist/types/ens/utils.d.ts +46 -1
- package/dist/types/ens/utils.d.ts.map +1 -1
- package/dist/types/entrypoint/index.d.ts +14 -0
- package/dist/types/entrypoint/index.d.ts.map +1 -1
- package/dist/types/errors/account.d.ts +87 -4
- package/dist/types/errors/account.d.ts.map +1 -1
- package/dist/types/errors/base.d.ts +5 -0
- package/dist/types/errors/base.d.ts.map +1 -1
- package/dist/types/errors/client.d.ts +24 -0
- package/dist/types/errors/client.d.ts.map +1 -1
- package/dist/types/errors/entrypoint.d.ts +18 -0
- package/dist/types/errors/entrypoint.d.ts.map +1 -1
- package/dist/types/errors/signer.d.ts +8 -0
- package/dist/types/errors/signer.d.ts.map +1 -1
- package/dist/types/errors/transaction.d.ts +14 -1
- package/dist/types/errors/transaction.d.ts.map +1 -1
- package/dist/types/errors/useroperation.d.ts +5 -5
- package/dist/types/errors/useroperation.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logger.d.ts +91 -0
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/middleware/actions.d.ts +3 -3
- package/dist/types/middleware/actions.d.ts.map +1 -1
- package/dist/types/middleware/defaults/feeEstimator.d.ts +21 -1
- package/dist/types/middleware/defaults/feeEstimator.d.ts.map +1 -1
- package/dist/types/middleware/defaults/gasEstimator.d.ts +2 -2
- package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -1
- package/dist/types/middleware/defaults/paymasterAndData.d.ts +8 -0
- package/dist/types/middleware/defaults/paymasterAndData.d.ts.map +1 -1
- package/dist/types/middleware/defaults/userOpSigner.d.ts +10 -0
- package/dist/types/middleware/defaults/userOpSigner.d.ts.map +1 -1
- package/dist/types/middleware/erc7677middleware.d.ts +62 -0
- package/dist/types/middleware/erc7677middleware.d.ts.map +1 -0
- package/dist/types/middleware/noopMiddleware.d.ts +4 -4
- package/dist/types/middleware/noopMiddleware.d.ts.map +1 -1
- package/dist/types/middleware/types.d.ts +3 -2
- package/dist/types/middleware/types.d.ts.map +1 -1
- package/dist/types/signer/local-account.d.ts +140 -45
- package/dist/types/signer/local-account.d.ts.map +1 -1
- package/dist/types/signer/schema.d.ts +14 -0
- package/dist/types/signer/schema.d.ts.map +1 -1
- package/dist/types/signer/utils.d.ts +21 -9
- package/dist/types/signer/utils.d.ts.map +1 -1
- package/dist/types/signer/wallet-client.d.ts +136 -44
- package/dist/types/signer/wallet-client.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts +2 -2
- package/dist/types/utils/bigint.d.ts +14 -14
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/bytes.d.ts +5 -5
- package/dist/types/utils/defaults.d.ts +2 -12
- package/dist/types/utils/defaults.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +66 -23
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/utils/userop.d.ts +33 -33
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/account/smartContractAccount.ts +134 -23
- package/src/actions/smartAccount/buildUserOperation.ts +23 -0
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +35 -35
- package/src/actions/smartAccount/buildUserOperationFromTxs.ts +44 -60
- package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +19 -19
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +22 -0
- package/src/actions/smartAccount/estimateUserOperationGas.ts +3 -3
- package/src/actions/smartAccount/internal/initUserOperation.ts +3 -4
- package/src/actions/smartAccount/internal/runMiddlewareStack.ts +0 -22
- package/src/actions/smartAccount/internal/sendUserOperation.ts +0 -7
- package/src/actions/smartAccount/sendTransaction.ts +24 -0
- package/src/actions/smartAccount/sendTransactions.ts +23 -0
- package/src/actions/smartAccount/sendUserOperation.ts +17 -3
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +24 -0
- package/src/client/bundlerClient.ts +34 -2
- package/src/client/decorators/bundlerClient.ts +17 -8
- package/src/client/decorators/smartAccountClient.ts +8 -0
- package/src/client/isSmartAccountClient.ts +4 -4
- package/src/client/smartAccountClient.ts +41 -0
- package/src/client/types.ts +2 -15
- package/src/ens/utils.ts +46 -2
- package/src/entrypoint/index.ts +30 -62
- package/src/errors/account.ts +98 -4
- package/src/errors/base.ts +5 -2
- package/src/errors/client.ts +27 -0
- package/src/errors/entrypoint.ts +18 -0
- package/src/errors/signer.ts +9 -0
- package/src/errors/transaction.ts +16 -1
- package/src/errors/useroperation.ts +5 -6
- package/src/index.ts +3 -36
- package/src/logger.ts +91 -0
- package/src/middleware/actions.ts +6 -27
- package/src/middleware/defaults/feeEstimator.ts +24 -4
- package/src/middleware/defaults/gasEstimator.ts +9 -5
- package/src/middleware/defaults/paymasterAndData.ts +8 -0
- package/src/middleware/defaults/userOpSigner.ts +10 -0
- package/src/middleware/erc7677middleware.ts +201 -0
- package/src/middleware/noopMiddleware.ts +6 -4
- package/src/middleware/types.ts +16 -7
- package/src/signer/local-account.ts +97 -2
- package/src/signer/schema.ts +14 -0
- package/src/signer/utils.ts +20 -32
- package/src/signer/wallet-client.ts +92 -0
- package/src/transport/split.ts +2 -2
- package/src/utils/bigint.ts +15 -15
- package/src/utils/bytes.ts +5 -5
- package/src/utils/defaults.ts +3 -76
- package/src/utils/index.ts +66 -48
- package/src/utils/types.ts +2 -2
- package/src/utils/userop.ts +33 -33
- package/src/version.ts +1 -1
- package/dist/cjs/account/base.d.ts +0 -49
- package/dist/cjs/account/base.js +0 -257
- package/dist/cjs/account/base.js.map +0 -1
- package/dist/cjs/account/schema.d.ts +0 -100
- package/dist/cjs/account/schema.js +0 -43
- package/dist/cjs/account/schema.js.map +0 -1
- package/dist/cjs/account/simple.d.ts +0 -14
- package/dist/cjs/account/simple.js +0 -119
- package/dist/cjs/account/simple.js.map +0 -1
- package/dist/cjs/account/types.d.ts +0 -30
- package/dist/cjs/account/types.js +0 -3
- package/dist/cjs/account/types.js.map +0 -1
- package/dist/cjs/chains/index.d.ts +0 -20
- package/dist/cjs/chains/index.js +0 -169
- package/dist/cjs/chains/index.js.map +0 -1
- package/dist/esm/account/base.d.ts +0 -49
- package/dist/esm/account/base.js +0 -253
- package/dist/esm/account/base.js.map +0 -1
- package/dist/esm/account/schema.d.ts +0 -100
- package/dist/esm/account/schema.js +0 -35
- package/dist/esm/account/schema.js.map +0 -1
- package/dist/esm/account/simple.d.ts +0 -14
- package/dist/esm/account/simple.js +0 -115
- package/dist/esm/account/simple.js.map +0 -1
- package/dist/esm/account/types.d.ts +0 -30
- package/dist/esm/account/types.js +0 -2
- package/dist/esm/account/types.js.map +0 -1
- package/dist/esm/chains/index.d.ts +0 -20
- package/dist/esm/chains/index.js +0 -166
- package/dist/esm/chains/index.js.map +0 -1
- package/dist/types/account/base.d.ts +0 -128
- package/dist/types/account/base.d.ts.map +0 -1
- package/dist/types/account/schema.d.ts +0 -101
- package/dist/types/account/schema.d.ts.map +0 -1
- package/dist/types/account/simple.d.ts +0 -15
- package/dist/types/account/simple.d.ts.map +0 -1
- package/dist/types/account/types.d.ts +0 -144
- package/dist/types/account/types.d.ts.map +0 -1
- package/dist/types/chains/index.d.ts +0 -21
- package/dist/types/chains/index.d.ts.map +0 -1
- package/src/account/base.ts +0 -415
- package/src/account/schema.ts +0 -51
- package/src/account/simple.ts +0 -215
- package/src/account/types.ts +0 -184
- package/src/chains/index.ts +0 -194
|
@@ -1,48 +1,131 @@
|
|
|
1
1
|
import type { Chain } from "viem";
|
|
2
2
|
import type { EntryPointVersion } from "../entrypoint/types.js";
|
|
3
3
|
import { BaseError } from "./base.js";
|
|
4
|
+
/**
|
|
5
|
+
* This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class.
|
|
6
|
+
*/
|
|
4
7
|
export declare class AccountNotFoundError extends BaseError {
|
|
5
8
|
name: string;
|
|
6
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Constructor for initializing an error message indicating that an account could not be found to execute the specified action.
|
|
11
|
+
*/ constructor();
|
|
7
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version.
|
|
15
|
+
* This error suggests providing an override via the `factoryAddress` parameter when creating an account.
|
|
16
|
+
*/
|
|
8
17
|
export declare class DefaultFactoryNotDefinedError extends BaseError {
|
|
9
18
|
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Constructs an error message indicating that no default factory was found for the given account type, chain, and entry point version.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} accountType the type of account
|
|
23
|
+
* @param {Chain} chain the blockchain chain
|
|
24
|
+
* @param {EntryPointVersion} version the entry point version
|
|
25
|
+
*/
|
|
10
26
|
constructor(accountType: string, chain: Chain, version: EntryPointVersion);
|
|
11
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name.
|
|
30
|
+
*/
|
|
12
31
|
export declare class GetCounterFactualAddressError extends BaseError {
|
|
13
32
|
name: string;
|
|
14
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Constructor for initializing an error message indicating the failure of fetching the counter-factual address.
|
|
35
|
+
*/ constructor();
|
|
15
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type.
|
|
39
|
+
*/
|
|
16
40
|
export declare class UpgradesNotSupportedError extends BaseError {
|
|
17
41
|
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Error constructor for indicating that upgrades are not supported by the given account type.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} accountType The type of account that does not support upgrades
|
|
46
|
+
*/
|
|
18
47
|
constructor(accountType: string);
|
|
19
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Error thrown when attempting to sign a transaction that is not supported by smart contracts.
|
|
51
|
+
*/
|
|
20
52
|
export declare class SignTransactionNotSupportedError extends BaseError {
|
|
21
53
|
name: string;
|
|
22
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Throws an error indicating that signing a transaction is not supported by smart contracts.
|
|
56
|
+
*
|
|
57
|
+
|
|
58
|
+
*/ constructor();
|
|
23
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`.
|
|
62
|
+
*/
|
|
24
63
|
export declare class FailedToGetStorageSlotError extends BaseError {
|
|
25
64
|
name: string;
|
|
65
|
+
/**
|
|
66
|
+
* Custom error message constructor for failing to get a specific storage slot.
|
|
67
|
+
*
|
|
68
|
+
* @param {string} slot The storage slot that failed to be accessed or retrieved
|
|
69
|
+
* @param {string} slotDescriptor A description of the storage slot, for additional context in the error message
|
|
70
|
+
*/
|
|
26
71
|
constructor(slot: string, slotDescriptor: string);
|
|
27
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Represents an error indicating that batch execution is not supported for a specific account type.
|
|
75
|
+
*/
|
|
28
76
|
export declare class BatchExecutionNotSupportedError extends BaseError {
|
|
29
77
|
name: string;
|
|
78
|
+
/**
|
|
79
|
+
* Constructs an error message indicating that batch execution is not supported by the specified account type.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} accountType the type of account that does not support batch execution
|
|
82
|
+
*/
|
|
30
83
|
constructor(accountType: string);
|
|
31
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Represents an error that occurs when an account requires an owner to execute but none is provided.
|
|
87
|
+
*/
|
|
32
88
|
export declare class AccountRequiresOwnerError extends BaseError {
|
|
33
89
|
name: string;
|
|
90
|
+
/**
|
|
91
|
+
* Constructs an error indicating that an account of the specified type requires an owner to execute.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} accountType The type of account that requires an owner
|
|
94
|
+
*/
|
|
34
95
|
constructor(accountType: string);
|
|
35
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message.
|
|
99
|
+
*/
|
|
36
100
|
export declare class UpgradeToAndCallNotSupportedError extends BaseError {
|
|
37
101
|
name: string;
|
|
102
|
+
/**
|
|
103
|
+
* Constructs an error message indicating that `UpgradeToAndCall` is not supported by the specified account type.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} accountType The type of account that does not support `UpgradeToAndCall`
|
|
106
|
+
*/
|
|
38
107
|
constructor(accountType: string);
|
|
39
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Represents an error thrown when an account type does not match the expected type.
|
|
111
|
+
*/
|
|
40
112
|
export declare class IncorrectAccountType extends BaseError {
|
|
41
113
|
name: string;
|
|
114
|
+
/**
|
|
115
|
+
* Constructs an error object indicating that the expected account type does not match the actual account type.
|
|
116
|
+
*
|
|
117
|
+
* @param {string} expected the expected account type
|
|
118
|
+
* @param {string} actual the actual account type that was received
|
|
119
|
+
*/
|
|
42
120
|
constructor(expected: string, actual: string);
|
|
43
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Error class indicating that a smart account operation requires a signer.
|
|
124
|
+
*/
|
|
44
125
|
export declare class SmartAccountWithSignerRequiredError extends BaseError {
|
|
45
126
|
name: string;
|
|
46
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.
|
|
129
|
+
*/ constructor();
|
|
47
130
|
}
|
|
48
131
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +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;;
|
|
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;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,SAAS;IACxC,IAAI,SAA0B;IAIvC;;OAEG;CAGJ;AAED;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;IACjD,IAAI,SAAmC;IAEhD;;;;;;OAMG;gBACS,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB;CAQ1E;AAED;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;IACjD,IAAI,SAAmC;IAEhD;;OAEG;CAGJ;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IAC7C,IAAI,SAA0B;IAEvC;;;;OAIG;gBACS,WAAW,EAAE,MAAM;CAGhC;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,SAAS;IACpD,IAAI,SAAiC;IAE9C;;;;OAIG;CAGJ;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,SAAS;IAC/C,IAAI,SAAiC;IAE9C;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;CAGjD;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,SAAS;IACnD,IAAI,SAAqC;IAElD;;;;OAIG;gBACS,WAAW,EAAE,MAAM;CAGhC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IAC7C,IAAI,SAA+B;IAE5C;;;;OAIG;gBACS,WAAW,EAAE,MAAM;CAGhC;AAED;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,SAAS;IACrD,IAAI,SAAuC;IAEpD;;;;OAIG;gBACS,WAAW,EAAE,MAAM;CAGhC;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,SAAS;IACxC,IAAI,SAA+B;IAE5C;;;;;OAKG;gBACS,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAG7C;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,SAAS;IACvD,IAAI,SAAyC;IAEtD;;OAEG;CAGJ"}
|
|
@@ -10,6 +10,11 @@ type BaseErrorParameters = {
|
|
|
10
10
|
cause: BaseError | Error;
|
|
11
11
|
details?: never;
|
|
12
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters.
|
|
15
|
+
* This is based on on viem's BaseError type (obviously from the import and extend)
|
|
16
|
+
* we want the errors here to point to our docs if we supply a docsPath though
|
|
17
|
+
*/
|
|
13
18
|
export declare class BaseError extends ViemBaseError {
|
|
14
19
|
name: string;
|
|
15
20
|
version: string;
|
|
@@ -1 +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;
|
|
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;AAEF;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,aAAa;IACjC,IAAI,SAAgB;IACpB,OAAO,SAAW;gBAEf,YAAY,EAAE,MAAM,EAAE,IAAI,GAAE,mBAAwB;CAuBjE"}
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
import type { Client } from "viem";
|
|
2
2
|
import { BaseError } from "./base.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client.
|
|
5
|
+
*/
|
|
3
6
|
export declare class IncompatibleClientError extends BaseError {
|
|
4
7
|
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Throws an error when the client type does not match the expected client type.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} expectedClient The expected type of the client.
|
|
12
|
+
* @param {string} method The method that was called.
|
|
13
|
+
* @param {Client} client The client instance.
|
|
14
|
+
*/
|
|
5
15
|
constructor(expectedClient: string, method: string, client: Client);
|
|
6
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Represents an error that occurs when an invalid RPC URL is provided. This class extends the `BaseError` class and includes the invalid URL in the error message.
|
|
19
|
+
*/
|
|
7
20
|
export declare class InvalidRpcUrlError extends BaseError {
|
|
8
21
|
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an instance of an error with a message indicating an invalid RPC URL.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} [rpcUrl] The invalid RPC URL that caused the error
|
|
26
|
+
*/
|
|
9
27
|
constructor(rpcUrl?: string);
|
|
10
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client.
|
|
31
|
+
*/
|
|
11
32
|
export declare class ChainNotFoundError extends BaseError {
|
|
12
33
|
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.
|
|
36
|
+
*/
|
|
13
37
|
constructor();
|
|
14
38
|
}
|
|
15
39
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +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;
|
|
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;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;IAE1C;;;;;;OAMG;gBACS,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAQnE;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;IAErC;;;;OAIG;gBACS,MAAM,CAAC,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;IAErC;;OAEG;;CAIJ"}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import type { Chain } from "viem";
|
|
2
2
|
import { BaseError } from "./base.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents an error thrown when an entry point is not found for a specific chain and entry point version. This error indicates that a default entry point does not exist for the given chain and version, and suggests providing an override.
|
|
5
|
+
*/
|
|
3
6
|
export declare class EntryPointNotFoundError extends BaseError {
|
|
4
7
|
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Constructs an error message indicating that no default entry point exists for the given chain and entry point version.
|
|
10
|
+
*
|
|
11
|
+
* @param {Chain} chain The blockchain network for which the entry point is being queried
|
|
12
|
+
* @param {any} entryPointVersion The version of the entry point for which no default exists
|
|
13
|
+
*/
|
|
5
14
|
constructor(chain: Chain, entryPointVersion: any);
|
|
6
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents an error thrown when an invalid entry point version is encountered for a specific chain. This error extends the `BaseError` class.
|
|
18
|
+
*/
|
|
7
19
|
export declare class InvalidEntryPointError extends BaseError {
|
|
8
20
|
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* Constructs an error indicating an invalid entry point version for a specific chain.
|
|
23
|
+
*
|
|
24
|
+
* @param {Chain} chain The chain object containing information about the blockchain
|
|
25
|
+
* @param {any} entryPointVersion The entry point version that is invalid
|
|
26
|
+
*/
|
|
9
27
|
constructor(chain: Chain, entryPointVersion: any);
|
|
10
28
|
}
|
|
11
29
|
//# sourceMappingURL=entrypoint.d.ts.map
|
|
@@ -1 +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;
|
|
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;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAQjD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;IAEzC;;;;;OAKG;gBACS,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAKjD"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { BaseError } from "./base.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner.
|
|
4
|
+
*/
|
|
2
5
|
export declare class InvalidSignerTypeError extends BaseError {
|
|
3
6
|
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs an error message when an invalid signer type is passed to SmartAccountSigner.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} [signerType] An optional parameter specifying the signer type. If not provided, a default error message will be used.
|
|
11
|
+
*/
|
|
4
12
|
constructor(signerType?: string);
|
|
5
13
|
}
|
|
6
14
|
//# sourceMappingURL=signer.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;IAEzC;;;;OAIG;gBACS,UAAU,CAAC,EAAE,MAAM;CAQhC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { Hex } from "viem";
|
|
2
2
|
import { BaseError } from "./base.js";
|
|
3
|
+
/**
|
|
4
|
+
* Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class.
|
|
5
|
+
*/
|
|
3
6
|
export declare class TransactionMissingToParamError extends BaseError {
|
|
4
7
|
name: string;
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Throws an error indicating that a transaction is missing the `to` address in the request.
|
|
10
|
+
*/ constructor();
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
7
15
|
export declare class FailedToFindTransactionError extends BaseError {
|
|
8
16
|
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.
|
|
19
|
+
*
|
|
20
|
+
* @param {Hex} hash The hexadecimal value representing the user operation hash.
|
|
21
|
+
*/
|
|
9
22
|
constructor(hash: Hex);
|
|
10
23
|
}
|
|
11
24
|
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -1 +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;;
|
|
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;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,SAAS;IAClD,IAAI,SAAoC;IAEjD;;OAEG;CAGJ;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IAChD,IAAI,SAAkC;IAE/C;;;;OAIG;gBACS,IAAI,EAAE,GAAG;CAGtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UserOperationRequest, UserOperationStruct } from "../types.js";
|
|
2
2
|
import { BaseError } from "./base.js";
|
|
3
3
|
/**
|
|
4
|
-
* Thrown when a
|
|
4
|
+
* Thrown when a UserOperationStruct is not a valid request
|
|
5
5
|
*
|
|
6
6
|
* extends viem BaseError
|
|
7
7
|
*/
|
|
@@ -15,7 +15,7 @@ export declare class InvalidUserOperationError extends BaseError {
|
|
|
15
15
|
*
|
|
16
16
|
* InvalidUserOperationError constructor
|
|
17
17
|
*
|
|
18
|
-
* @param uo the invalid user operation struct
|
|
18
|
+
* @param {UserOperationStruct} uo the invalid user operation struct
|
|
19
19
|
*/
|
|
20
20
|
constructor(uo: UserOperationStruct);
|
|
21
21
|
}
|
|
@@ -23,13 +23,13 @@ export declare class InvalidUserOperationError extends BaseError {
|
|
|
23
23
|
* Error thrown when waiting for user operation request to be mined.
|
|
24
24
|
*
|
|
25
25
|
* Includes the internal error as well as the request that failed. This request
|
|
26
|
-
* can then be used with
|
|
26
|
+
* can then be used with dropAndReplaceUserOperation to retry the operation.
|
|
27
27
|
*/
|
|
28
28
|
export declare class WaitForUserOperationError extends BaseError {
|
|
29
29
|
request: UserOperationRequest;
|
|
30
30
|
/**
|
|
31
|
-
* @param request the user operation request that failed
|
|
32
|
-
* @param error the underlying error that caused the failure
|
|
31
|
+
* @param {UserOperationRequest} request the user operation request that failed
|
|
32
|
+
* @param {Error} error the underlying error that caused the failure
|
|
33
33
|
*/
|
|
34
34
|
constructor(request: UserOperationRequest, error: Error);
|
|
35
35
|
}
|
|
@@ -1 +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;
|
|
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;AAGtC;;;;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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,12 +6,8 @@ export { EntryPointAbi_v7 } from "./abis/EntryPointAbi_v7.js";
|
|
|
6
6
|
export { SimpleAccountAbi_v6 } from "./abis/SimpleAccountAbi_v6.js";
|
|
7
7
|
export { SimpleAccountAbi_v7 } from "./abis/SimpleAccountAbi_v7.js";
|
|
8
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
9
|
export type * from "./account/smartContractAccount.js";
|
|
13
10
|
export { getAccountAddress, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, toSmartContractAccount, } from "./account/smartContractAccount.js";
|
|
14
|
-
export type { BaseSmartAccountParams, SignTypedDataParams, } from "./account/types.js";
|
|
15
11
|
export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js";
|
|
16
12
|
export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js";
|
|
17
13
|
export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js";
|
|
@@ -22,7 +18,6 @@ export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
|
|
|
22
18
|
export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
|
|
23
19
|
export type * from "./actions/smartAccount/types.js";
|
|
24
20
|
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
21
|
export type * from "./client/bundlerClient.js";
|
|
27
22
|
export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
|
|
28
23
|
export type * from "./client/decorators/bundlerClient.js";
|
|
@@ -50,15 +45,17 @@ export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js";
|
|
|
50
45
|
export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js";
|
|
51
46
|
export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js";
|
|
52
47
|
export { defaultUserOpSigner } from "./middleware/defaults/userOpSigner.js";
|
|
48
|
+
export type * from "./middleware/erc7677middleware.js";
|
|
49
|
+
export { erc7677Middleware } from "./middleware/erc7677middleware.js";
|
|
53
50
|
export { noopMiddleware } from "./middleware/noopMiddleware.js";
|
|
54
51
|
export type * from "./middleware/types.js";
|
|
55
52
|
export { LocalAccountSigner } from "./signer/local-account.js";
|
|
56
53
|
export { SignerSchema, isSigner } from "./signer/schema.js";
|
|
57
54
|
export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js";
|
|
58
|
-
export {
|
|
55
|
+
export { wrapSignatureWith6492 } from "./signer/utils.js";
|
|
59
56
|
export { WalletClientSigner } from "./signer/wallet-client.js";
|
|
60
57
|
export { split, type SplitTransportParams } from "./transport/split.js";
|
|
61
58
|
export type * from "./types.js";
|
|
62
59
|
export type * from "./utils/index.js";
|
|
63
|
-
export {
|
|
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";
|
|
64
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/types/logger.d.ts
CHANGED
|
@@ -6,15 +6,106 @@ export declare enum LogLevel {
|
|
|
6
6
|
ERROR = 1,
|
|
7
7
|
NONE = 0
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
9
12
|
export declare class Logger {
|
|
10
13
|
static logLevel: LogLevel;
|
|
11
14
|
static logFilter?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the log level for logging purposes.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { Logger, LogLevel } from "@aa-sdk/core";
|
|
21
|
+
* Logger.setLogLevel(LogLevel.DEBUG);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param {LogLevel} logLevel The desired log level
|
|
25
|
+
*/
|
|
12
26
|
static setLogLevel(logLevel: LogLevel): void;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the log filter pattern.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { Logger } from "@aa-sdk/core";
|
|
33
|
+
*
|
|
34
|
+
* Logger.setLogFilter("error");
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @param {string} pattern The pattern to set as the log filter
|
|
38
|
+
*/
|
|
13
39
|
static setLogFilter(pattern: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Logs an error message to the console if the logging condition is met.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { Logger } from "@aa-sdk/core";
|
|
46
|
+
*
|
|
47
|
+
* Logger.error("An error occurred while processing the request");
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param {string} msg The primary error message to be logged
|
|
51
|
+
* @param {...any[]} args Additional arguments to be logged along with the error message
|
|
52
|
+
*/
|
|
14
53
|
static error(msg: string, ...args: any[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Logs a warning message if the logging conditions are met.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* import { Logger } from "@aa-sdk/core";
|
|
60
|
+
*
|
|
61
|
+
* Logger.warn("Careful...");
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @param {string} msg The message to log as a warning
|
|
65
|
+
* @param {...any[]} args Additional parameters to log along with the message
|
|
66
|
+
*/
|
|
15
67
|
static warn(msg: string, ...args: any[]): void;
|
|
68
|
+
/**
|
|
69
|
+
* Logs a debug message to the console if the log level allows it.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* import { Logger } from "@aa-sdk/core";
|
|
74
|
+
*
|
|
75
|
+
* Logger.debug("Something is happening");
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param {string} msg The message to log
|
|
79
|
+
* @param {...any[]} args Additional arguments to pass to the console.debug method
|
|
80
|
+
*/
|
|
16
81
|
static debug(msg: string, ...args: any[]): void;
|
|
82
|
+
/**
|
|
83
|
+
* Logs an informational message to the console if the logging level is set to INFO.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* import { Logger } from "@aa-sdk/core";
|
|
88
|
+
*
|
|
89
|
+
* Logger.info("Something is happening");
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @param {string} msg the message to log
|
|
93
|
+
* @param {...any[]} args additional arguments to log alongside the message
|
|
94
|
+
*/
|
|
17
95
|
static info(msg: string, ...args: any[]): void;
|
|
96
|
+
/**
|
|
97
|
+
* Logs a message with additional arguments if the logging level permits it.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { Logger } from "@aa-sdk/core";
|
|
102
|
+
*
|
|
103
|
+
* Logger.verbose("Something is happening");
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @param {string} msg The message to log
|
|
107
|
+
* @param {...any[]} args Additional arguments to be logged
|
|
108
|
+
*/
|
|
18
109
|
static verbose(msg: string, ...args: any[]): void;
|
|
19
110
|
private static shouldLog;
|
|
20
111
|
}
|
|
@@ -1 +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"}
|
|
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;;GAEG;AACH,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAiB;IAC1C,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAIrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM;IAInC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMvC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMvC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAM1C,OAAO,CAAC,MAAM,CAAC,SAAS;CAMzB"}
|
|
@@ -15,11 +15,11 @@ export type MiddlewareClient<TTransport extends Transport = Transport, TChain ex
|
|
|
15
15
|
...PublicRpcSchema
|
|
16
16
|
], PublicActions & BundlerActions>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* function that takes in ClientMiddlewareConfig used during client initiation
|
|
19
19
|
* and returns the middleware actions object that the smart account client extends with
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @returns middleware actions object
|
|
21
|
+
* @param {ClientMiddlewareConfig} overrides config used during client initiation for overriding default middlewares
|
|
22
|
+
* @returns {(client: MiddlewareClient<TTransport, TChain, TAccount>) => { middleware: ClientMiddleware }} middleware actions object
|
|
23
23
|
*/
|
|
24
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
25
|
middleware: ClientMiddleware;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/middleware/actions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/middleware/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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;AAMjE,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;CAY/B,CAAC"}
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import type { MiddlewareClient } from "../actions";
|
|
2
2
|
import type { ClientMiddlewareFn } from "../types";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 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.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { createSmartAccountClient, defaultFeeEstimator, createBundlerClient } from "@aa-sdk/core";
|
|
9
|
+
*
|
|
10
|
+
* const bundlerClient = createBundlerClient(...);
|
|
11
|
+
*
|
|
12
|
+
* // NOTE: this is already provided by the smart account client
|
|
13
|
+
* const client = createSmartAccountClient({
|
|
14
|
+
* feeEstimator: defaultFeeEstimator(bundlerClient),
|
|
15
|
+
* ...otherParams
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @template {MiddlewareClient} C The type of the client
|
|
20
|
+
* @param {C} client The client to perform the fee estimation
|
|
21
|
+
* @returns {ClientMiddlewareFn} A middleware function that takes in the struct and options, estimates the fees, and updates the struct with the estimated fees
|
|
22
|
+
*/
|
|
23
|
+
export declare function defaultFeeEstimator<C extends MiddlewareClient>(client: C): ClientMiddlewareFn;
|
|
4
24
|
//# sourceMappingURL=feeEstimator.d.ts.map
|
|
@@ -1 +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,
|
|
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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,gBAAgB,EAC5D,MAAM,EAAE,CAAC,GACR,kBAAkB,CA0CpB"}
|
|
@@ -5,8 +5,8 @@ import type { ClientMiddlewareFn } from "../types.js";
|
|
|
5
5
|
* You can override this middleware with your custom gas estimator middleware
|
|
6
6
|
* by passing it to the client constructor
|
|
7
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
|
|
8
|
+
* @param {MiddlewareClient} client smart account client instance to apply the middleware to
|
|
9
|
+
* @returns {ClientMiddlewareFn} middleware execution function used to estimate gas for user operations
|
|
10
10
|
*/
|
|
11
11
|
export declare const defaultGasEstimator: <C extends MiddlewareClient>(client: C) => ClientMiddlewareFn;
|
|
12
12
|
//# sourceMappingURL=gasEstimator.d.ts.map
|
|
@@ -1 +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,
|
|
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,kBAiDF,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { ClientMiddlewareFn } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Middleware function that sets the `paymasterAndData` field in the given struct based on the entry point version of the account.
|
|
4
|
+
* This is the default used by `createSmartAccountClient` and is not necessary to be used directly.
|
|
5
|
+
*
|
|
6
|
+
* @param {UserOperationStruct} struct the user operation structure to be modified
|
|
7
|
+
* @param {{ account: Account }} context an object containing the account information
|
|
8
|
+
* @returns {Promise<UserOperationStruct>} a promise that resolves to the modified user operation structure
|
|
9
|
+
*/
|
|
2
10
|
export declare const defaultPaymasterAndData: ClientMiddlewareFn;
|
|
3
11
|
//# sourceMappingURL=paymasterAndData.d.ts.map
|
|
@@ -1 +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"}
|
|
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;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,kBASrC,CAAC"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import type { ClientMiddlewareFn } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a default middleware function for signing user operations with a client account. This function validates the request and adds the signature to it.
|
|
4
|
+
* This is already included in the client returned from `createSmartAccountClient`
|
|
5
|
+
*
|
|
6
|
+
* @param {UserOperationStruct} struct The user operation structure to be signed
|
|
7
|
+
* @param {*} context The middleware context containing the client and account information
|
|
8
|
+
* @param {Client} context.client The client object, which should include account and chain information
|
|
9
|
+
* @param {Account} [context.account] Optional, the account used for signing, defaults to the client's account if not provided
|
|
10
|
+
* @returns {Promise<UserOperationStruct>} A promise that resolves to the signed user operation structure
|
|
11
|
+
*/
|
|
2
12
|
export declare const defaultUserOpSigner: ClientMiddlewareFn;
|
|
3
13
|
//# sourceMappingURL=userOpSigner.d.ts.map
|
|
@@ -1 +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"}
|
|
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;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAwBjC,CAAC"}
|