@aa-sdk/core 4.0.0-alpha.1 → 4.0.0-alpha.11
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 +11 -6
- package/dist/cjs/account/smartContractAccount.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 +1 -5
- 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/sendUserOperation.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/isSmartAccountClient.js.map +1 -1
- package/dist/cjs/client/smartAccountClient.js +6 -0
- 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/errors/account.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 +3 -6
- package/dist/cjs/index.js +38 -64
- 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/gasEstimator.js +4 -2
- package/dist/cjs/middleware/defaults/gasEstimator.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/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 -3
- package/dist/cjs/utils/index.js +1 -25
- 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 +6 -1
- package/dist/esm/account/smartContractAccount.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 +2 -6
- 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/sendUserOperation.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/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js +6 -0
- 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/errors/account.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 +3 -6
- package/dist/esm/index.js +2 -4
- 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/gasEstimator.js +4 -2
- package/dist/esm/middleware/defaults/gasEstimator.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/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 -3
- package/dist/esm/utils/index.js +0 -11
- 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 +17 -11
- package/dist/types/account/smartContractAccount.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.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/sendUserOperation.d.ts +17 -3
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/dist/types/client/bundlerClient.d.ts +2 -2
- package/dist/types/client/decorators/bundlerClient.d.ts +8 -8
- 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 +1 -1
- package/dist/types/ens/utils.d.ts.map +1 -1
- package/dist/types/errors/account.d.ts +53 -4
- package/dist/types/errors/account.d.ts.map +1 -1
- package/dist/types/errors/client.d.ts +15 -0
- package/dist/types/errors/client.d.ts.map +1 -1
- package/dist/types/errors/entrypoint.d.ts +12 -0
- package/dist/types/errors/entrypoint.d.ts.map +1 -1
- package/dist/types/errors/signer.d.ts +5 -0
- package/dist/types/errors/signer.d.ts.map +1 -1
- package/dist/types/errors/transaction.d.ts +8 -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 +3 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logger.d.ts +88 -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/gasEstimator.d.ts +2 -2
- package/dist/types/middleware/defaults/gasEstimator.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 +137 -45
- package/dist/types/signer/local-account.d.ts.map +1 -1
- package/dist/types/signer/wallet-client.d.ts +133 -44
- package/dist/types/signer/wallet-client.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts +3 -3
- 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 +12 -22
- 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 +19 -13
- 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 +10 -10
- 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/sendUserOperation.ts +17 -3
- package/src/client/bundlerClient.ts +2 -2
- package/src/client/decorators/bundlerClient.ts +8 -8
- package/src/client/isSmartAccountClient.ts +4 -4
- package/src/client/smartAccountClient.ts +7 -0
- package/src/client/types.ts +2 -15
- package/src/ens/utils.ts +1 -2
- package/src/errors/account.ts +64 -4
- package/src/errors/client.ts +18 -0
- package/src/errors/entrypoint.ts +12 -0
- package/src/errors/signer.ts +6 -0
- package/src/errors/transaction.ts +10 -1
- package/src/errors/useroperation.ts +5 -6
- package/src/index.ts +2 -31
- package/src/logger.ts +88 -0
- package/src/middleware/actions.ts +6 -27
- package/src/middleware/defaults/gasEstimator.ts +9 -5
- 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 +94 -2
- package/src/signer/wallet-client.ts +89 -0
- package/src/transport/split.ts +3 -3
- 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 +12 -35
- 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 -221
- package/src/account/types.ts +0 -184
- package/src/chains/index.ts +0 -194
|
@@ -3,43 +3,43 @@ import type { GetEntryPointFromAccount, SmartContractAccount } from "../../accou
|
|
|
3
3
|
import type { UserOperationOverrides, UserOperationStruct } from "../../types.js";
|
|
4
4
|
import type { UserOperationContext } from "./types.js";
|
|
5
5
|
/**
|
|
6
|
-
* Performs
|
|
6
|
+
* Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured `ClientMiddlewares` on the `SmartAccountClient`
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
10
|
-
import type { RpcTransactionRequest } from "viem";
|
|
11
|
-
import { smartAccountClient } from "./smartAccountClient";
|
|
12
|
-
// [!code focus:99]
|
|
13
|
-
// buildUserOperationFromTx converts a traditional Ethereum transaction and returns
|
|
14
|
-
// the unsigned user operation struct after constructing the user operation struct
|
|
15
|
-
// through the middleware pipeline
|
|
16
|
-
const tx: RpcTransactionRequest = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx);
|
|
26
|
-
|
|
27
|
-
// signUserOperation signs the above unsigned user operation struct built
|
|
28
|
-
// using the account connected to the smart account client
|
|
29
|
-
const request = await smartAccountClient.signUserOperation({ uoStruct });
|
|
30
|
-
|
|
31
|
-
// You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
|
|
32
|
-
// to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
|
|
33
|
-
// EntryPoint contract pointed at by the entryPoint address parameter
|
|
34
|
-
const entryPointAddress = client.account.getEntryPoint().address;
|
|
35
|
-
const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress });
|
|
36
|
-
```
|
|
10
|
+
* import type { RpcTransactionRequest } from "viem";
|
|
11
|
+
* import { smartAccountClient } from "./smartAccountClient";
|
|
12
|
+
* // [!code focus:99]
|
|
13
|
+
* // buildUserOperationFromTx converts a traditional Ethereum transaction and returns
|
|
14
|
+
* // the unsigned user operation struct after constructing the user operation struct
|
|
15
|
+
* // through the middleware pipeline
|
|
16
|
+
* const tx: RpcTransactionRequest = {
|
|
17
|
+
* from, // ignored
|
|
18
|
+
* to,
|
|
19
|
+
* data: encodeFunctionData({
|
|
20
|
+
* abi: ContractABI.abi,
|
|
21
|
+
* functionName: "func",
|
|
22
|
+
* args: [arg1, arg2, ...],
|
|
23
|
+
* }),
|
|
24
|
+
* };
|
|
25
|
+
* const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx);
|
|
37
26
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
27
|
+
* // signUserOperation signs the above unsigned user operation struct built
|
|
28
|
+
* // using the account connected to the smart account client
|
|
29
|
+
* const request = await smartAccountClient.signUserOperation({ uoStruct });
|
|
30
|
+
*
|
|
31
|
+
* // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
|
|
32
|
+
* // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
|
|
33
|
+
* // EntryPoint contract pointed at by the entryPoint address parameter
|
|
34
|
+
* const entryPointAddress = client.account.getEntryPoint().address;
|
|
35
|
+
* const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param {Client<Transport, TChain, TAccount>} client the smart account client to use for RPC requests
|
|
39
|
+
* @param {SendTransactionParameters} args the send tx parameters
|
|
40
|
+
* @param {UserOperationOverrides} overrides optional overrides to use for any of the fields
|
|
41
|
+
* @param {TContext} context if the smart account client requires additinoal context for building UOs
|
|
42
|
+
* @returns {Promise<UserOperationStruct<TEntryPointVersion>>} a Promise containing the built user operation
|
|
43
43
|
*/
|
|
44
44
|
export declare function buildUserOperationFromTx<TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TChainOverride extends Chain | undefined = Chain | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: Client<Transport, TChain, TAccount>, args: SendTransactionParameters<TChain, TAccount, TChainOverride>, overrides?: UserOperationOverrides<TEntryPointVersion>, context?: TContext): Promise<UserOperationStruct<TEntryPointVersion>>;
|
|
45
45
|
//# sourceMappingURL=buildUserOperationFromTx.d.ts.map
|
|
@@ -2,74 +2,58 @@ import { type Chain, type Client, type Transport } from "viem";
|
|
|
2
2
|
import type { GetEntryPointFromAccount, SmartContractAccount } from "../../account/smartContractAccount";
|
|
3
3
|
import type { BuildTransactionParameters, BuildUserOperationFromTransactionsResult, UserOperationContext } from "./types";
|
|
4
4
|
/**
|
|
5
|
-
* Performs
|
|
5
|
+
* Performs `buildUserOperationFromTx` in batch and builds into a single,
|
|
6
6
|
* yet to be signed `UserOperation` (UO) struct. The output user operation struct
|
|
7
7
|
* will be filled with all gas fields (and paymaster data if a paymaster is used)
|
|
8
8
|
* based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`,
|
|
9
|
-
* `maxPriorityFeePerGas`) computed using the configured
|
|
10
|
-
* [`ClientMiddlewares`](/packages/aa-core/smart-account-client/middleware/index) on the `SmartAccountClient`
|
|
9
|
+
* `maxPriorityFeePerGas`) computed using the configured ClientMiddlewares on the SmartAccountClient.
|
|
11
10
|
*
|
|
12
11
|
* @example
|
|
13
12
|
* ```ts
|
|
14
13
|
* import type { RpcTransactionRequest } from "viem";
|
|
15
|
-
import { smartAccountClient } from "./smartAccountClient";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// signUserOperation signs the above unsigned user operation struct built
|
|
55
|
-
// using the account connected to the smart account client
|
|
56
|
-
const request = await smartAccountClient.signUserOperation({ uoStruct });
|
|
57
|
-
|
|
58
|
-
// You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
|
|
59
|
-
// to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
|
|
60
|
-
// EntryPoint contract pointed at by the entryPoint address parameter
|
|
61
|
-
const entryPointAddress = client.account.getEntryPoint().address;
|
|
62
|
-
const uoHash = await smartAccountClient.sendRawUserOperation({
|
|
63
|
-
request,
|
|
64
|
-
entryPoint: entryPointAddress,
|
|
65
|
-
});
|
|
14
|
+
* import { smartAccountClient } from "./smartAccountClient";
|
|
15
|
+
*
|
|
16
|
+
* const requests: RpcTransactionRequest[] = [
|
|
17
|
+
* {
|
|
18
|
+
* from, // ignored
|
|
19
|
+
* to,
|
|
20
|
+
* data: encodeFunctionData({
|
|
21
|
+
* abi: ContractABI.abi,
|
|
22
|
+
* functionName: "func",
|
|
23
|
+
* args: [arg1, arg2, ...],
|
|
24
|
+
* }),
|
|
25
|
+
* },
|
|
26
|
+
* {
|
|
27
|
+
* from, // ignored
|
|
28
|
+
* to,
|
|
29
|
+
* data: encodeFunctionData({
|
|
30
|
+
* abi: ContractABI.abi,
|
|
31
|
+
* functionName: "func",
|
|
32
|
+
* args: [arg1, arg2, ...],
|
|
33
|
+
* }),
|
|
34
|
+
* },
|
|
35
|
+
* ];
|
|
36
|
+
* const uoStruct = await smartAccountClient.buildUserOperationFromTxs({
|
|
37
|
+
* requests,
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* // signUserOperation signs the above unsigned user operation struct built
|
|
41
|
+
* // using the account connected to the smart account client
|
|
42
|
+
* const request = await smartAccountClient.signUserOperation({ uoStruct });
|
|
43
|
+
*
|
|
44
|
+
* // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
|
|
45
|
+
* // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
|
|
46
|
+
* // EntryPoint contract pointed at by the entryPoint address parameter
|
|
47
|
+
* const entryPointAddress = client.account.getEntryPoint().address;
|
|
48
|
+
* const uoHash = await smartAccountClient.sendRawUserOperation({
|
|
49
|
+
* request,
|
|
50
|
+
* entryPoint: entryPointAddress,
|
|
51
|
+
* });
|
|
66
52
|
* ```
|
|
67
53
|
*
|
|
68
|
-
* @param client the smart account client to use to make RPC calls
|
|
69
|
-
* @param
|
|
70
|
-
*
|
|
71
|
-
* optionally a flag to enable signing of the UO via the underlying middleware
|
|
72
|
-
* @returns a Promise containing the built user operation
|
|
54
|
+
* @param {Client<TTransport, TChain, TAccount>} client the smart account client to use to make RPC calls
|
|
55
|
+
* @param {BuildTransactionParameters} args an object containing the requests to build as well as, the account if not hoisted, the context, the overrides, and optionally a flag to enable signing of the UO via the underlying middleware
|
|
56
|
+
* @returns {Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>} a Promise containing the built user operation
|
|
73
57
|
*/
|
|
74
58
|
export declare function buildUserOperationFromTxs<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(client: Client<TTransport, TChain, TAccount>, args: BuildTransactionParameters<TAccount, TContext, TEntryPointVersion>): Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>;
|
|
75
59
|
//# sourceMappingURL=buildUserOperationFromTxs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildUserOperationFromTxs.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTxs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAQ5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wCAAwC,EACxC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB
|
|
1
|
+
{"version":3,"file":"buildUserOperationFromTxs.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/buildUserOperationFromTxs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAQ5C,OAAO,KAAK,EACV,0BAA0B,EAC1B,wCAAwC,EACxC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,yBAAyB,CAC7C,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,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAClG,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EAEb,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACvE,OAAO,CAAC,wCAAwC,CAAC,kBAAkB,CAAC,CAAC,CAkEvE"}
|
|
@@ -3,31 +3,31 @@ import type { SmartContractAccount } from "../../account/smartContractAccount.js
|
|
|
3
3
|
import type { SendUserOperationParameters, UserOperationContext } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* This function verifies the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent.
|
|
6
|
-
* Internally, this method invokes
|
|
6
|
+
* Internally, this method invokes `buildUserOperation`, which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field.
|
|
7
7
|
* You can utilize this method before sending the user operation to confirm its eligibility for gas sponsorship. Depending on the outcome, it allows you to tailor the user experience accordingly, based on eligibility.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* import { smartAccountClient } from "./smartAccountClient";
|
|
12
|
-
// [!code focus:99]
|
|
13
|
-
const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
console.log(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
12
|
+
* // [!code focus:99]
|
|
13
|
+
* const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
|
|
14
|
+
* uo: {
|
|
15
|
+
* data: "0xCalldata",
|
|
16
|
+
* target: "0xTarget",
|
|
17
|
+
* value: 0n,
|
|
18
|
+
* },
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* console.log(
|
|
22
|
+
* `User Operation is ${
|
|
23
|
+
* eligible ? "eligible" : "ineligible"
|
|
24
|
+
* } for gas sponsorship.`
|
|
25
|
+
* );
|
|
26
26
|
* ```
|
|
27
27
|
*
|
|
28
|
-
* @param client the smart account client to use for making RPC calls
|
|
29
|
-
* @param
|
|
30
|
-
* @returns a Promise containing a boolean indicating if the account is elgibile for sponsorship
|
|
28
|
+
* @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for making RPC calls
|
|
29
|
+
* @param {SendUserOperationParameters} args containing the user operation, account, context, and overrides
|
|
30
|
+
* @returns {Promise<boolean>} a Promise containing a boolean indicating if the account is elgibile for sponsorship
|
|
31
31
|
*/
|
|
32
32
|
export declare function checkGasSponsorshipEligibility<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<boolean>;
|
|
33
33
|
//# sourceMappingURL=checkGasSponsorshipEligibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"dropAndReplaceUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/dropAndReplaceUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAelE,OAAO,KAAK,EACV,qCAAqC,EACrC,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,2BAA2B,CAC/C,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,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,qCAAqC,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAC9D,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAuEtD"}
|
|
@@ -11,9 +11,9 @@ import type { SendUserOperationParameters, UserOperationContext } from "./types.
|
|
|
11
11
|
* @template {SmartContractAccount | undefined} TAccount
|
|
12
12
|
* @template {UserOperationContext | undefined} TContext
|
|
13
13
|
* @template {GetEntryPointFromAccount<TAccount>} TEntryPointVersion
|
|
14
|
-
* @param client smart account client
|
|
15
|
-
* @param args send user operation parameters
|
|
16
|
-
* @returns user operation gas estimate response
|
|
14
|
+
* @param {Client<TTransport, TChain, TAccount>} client smart account client
|
|
15
|
+
* @param {SendUserOperationParameters<TAccount, TContext>} args send user operation parameters
|
|
16
|
+
* @returns {Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>}user operation gas estimate response
|
|
17
17
|
*/
|
|
18
18
|
export declare function estimateUserOperationGas<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>;
|
|
19
19
|
//# sourceMappingURL=estimateUserOperationGas.d.ts.map
|
|
@@ -8,15 +8,14 @@ import type { BuildUserOperationParameters, SendUserOperationParameters, UserOpe
|
|
|
8
8
|
* Description internal action function of SmartAccountClient for initializing
|
|
9
9
|
* a user operation for the sender account
|
|
10
10
|
*
|
|
11
|
-
* @async
|
|
12
11
|
* @template {Transport} TTransport
|
|
13
12
|
* @template {Chain | undefined} TChain
|
|
14
13
|
* @template {SmartContractAccount | undefined} TAccount
|
|
15
14
|
* @template {UserOperationContext | undefined} TContext
|
|
16
15
|
* @template {GetEntryPointFromAccount} TEntryPointVersion
|
|
17
|
-
* @param client smart account client
|
|
18
|
-
* @param args send user operation parameters
|
|
19
|
-
* @returns initialized user operation struct
|
|
16
|
+
* @param {BaseSmartAccountClient<TTransport, TChain, TAccount>} client smart account client
|
|
17
|
+
* @param {SendUserOperationParameters<TAccount, TContext, TEntryPointVersion> | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>} args send user operation parameters
|
|
18
|
+
* @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} initialized user operation struct
|
|
20
19
|
*/
|
|
21
20
|
export declare function _initUserOperation<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: BaseSmartAccountClient<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext, TEntryPointVersion> | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>): Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>;
|
|
22
21
|
//# sourceMappingURL=initUserOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initUserOperation.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/initUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB
|
|
1
|
+
{"version":3,"file":"initUserOperation.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/initUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,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,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5D,IAAI,EACA,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACnE,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GACvE,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CA+C9D"}
|
|
@@ -4,20 +4,6 @@ import type { BaseSmartAccountClient } from "../../../client/smartAccountClient"
|
|
|
4
4
|
import type { UserOperationOverridesParameter, UserOperationStruct } from "../../../types";
|
|
5
5
|
import { type Deferrable } from "../../../utils/index.js";
|
|
6
6
|
import type { UserOperationContext } from "../types";
|
|
7
|
-
/**
|
|
8
|
-
* Internal method of {@link SmartAccountClient} running the middleware stack for a user operation
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @template TTransport
|
|
12
|
-
* @template TChain
|
|
13
|
-
* @template TAccount
|
|
14
|
-
* @template TContext the {@link UserOperationContext} passed to the middleware
|
|
15
|
-
* @template TEntryPointVersion
|
|
16
|
-
* @param client the smart account client instance that runs the middleware pipeline with
|
|
17
|
-
* @param args the Deferrable {@link UserOperationStruct} to run the middleware pipeline on
|
|
18
|
-
*
|
|
19
|
-
* @returns the resolved {@link UserOperationStruct} after running the middleware pipeline
|
|
20
|
-
*/
|
|
21
7
|
export declare function _runMiddlewareStack<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: BaseSmartAccountClient<TTransport, TChain, TAccount>, args: {
|
|
22
8
|
uo: Deferrable<UserOperationStruct<TEntryPointVersion>>;
|
|
23
9
|
context?: TContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runMiddlewareStack.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/runMiddlewareStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"runMiddlewareStack.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/runMiddlewareStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAYrD,wBAAsB,mBAAmB,CACvC,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,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5D,IAAI,EAAE;IACJ,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACxD,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,GAC/B,+BAA+B,CAAC,kBAAkB,CAAC,GACpD,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAkDlD"}
|
|
@@ -4,13 +4,6 @@ import type { BaseSmartAccountClient } from "../../../client/smartAccountClient"
|
|
|
4
4
|
import type { SendUserOperationResult } from "../../../client/types";
|
|
5
5
|
import type { UserOperationOverrides, UserOperationStruct } from "../../../types";
|
|
6
6
|
import type { GetContextParameter, UserOperationContext } from "../types";
|
|
7
|
-
/**
|
|
8
|
-
* Used internally to send a user operation that has **already** been signed
|
|
9
|
-
*
|
|
10
|
-
* @param client a base smart account client instance with middleware configured
|
|
11
|
-
* @param args user operation struct, overrides, account, and context to be used in sending
|
|
12
|
-
* @returns A Promise containing the send user operation result {@link SendUserOperationResult}
|
|
13
|
-
*/
|
|
14
7
|
export declare function _sendUserOperation<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: BaseSmartAccountClient<TTransport, TChain, TAccount>, args: {
|
|
15
8
|
uoStruct: UserOperationStruct<TEntryPointVersion>;
|
|
16
9
|
overrides?: UserOperationOverrides<TEntryPointVersion>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGrE,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE1E
|
|
1
|
+
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../../src/actions/smartAccount/internal/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGrE,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE1E,wBAAsB,kBAAkB,CACtC,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,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5D,IAAI,EAAE;IACJ,QAAQ,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;CACxD,GAAG,mBAAmB,CAAC,QAAQ,CAAC,GAC/B,mBAAmB,CAAC,QAAQ,CAAC,GAC9B,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAsBtD"}
|
|
@@ -5,9 +5,23 @@ import type { SendUserOperationParameters, UserOperationContext } from "./types.
|
|
|
5
5
|
/**
|
|
6
6
|
* Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
|
|
11
|
+
*
|
|
12
|
+
* const account = await toSmartContractAccount(...);
|
|
13
|
+
* const result = await createSmartAccountClient(...).sendUserOperation({
|
|
14
|
+
* uo: {
|
|
15
|
+
* target: "0x...",
|
|
16
|
+
* data: "0x...", // or "0x",
|
|
17
|
+
* value: 0n, // optional
|
|
18
|
+
* }
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for RPC requests
|
|
23
|
+
* @param {SendUserOperationParameters<TAccount, TContext>} args contains the UO or batch to send, context, overrides, and account if not hoisted on the client
|
|
24
|
+
* @returns {Promise<SendUserOperationResult<TEntryPointVersion>>} a Promise containing the result of the user operation
|
|
11
25
|
*/
|
|
12
26
|
export declare function sendUserOperation<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<SendUserOperationResult<TEntryPointVersion>>;
|
|
13
27
|
//# sourceMappingURL=sendUserOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB
|
|
1
|
+
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CACrC,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,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CA4BtD"}
|
|
@@ -23,8 +23,8 @@ export declare const createBundlerClientFromExisting: <T extends Transport | Fal
|
|
|
23
23
|
/**
|
|
24
24
|
* Creates a PublicClient with methods for calling Bundler RPC methods
|
|
25
25
|
*
|
|
26
|
-
* @param args - configuration for the client
|
|
27
|
-
* @returns a PublicClient with methods for calling Bundler RPC methods
|
|
26
|
+
* @param {PublicClientConfig<TTransport, Chain> & { type?: string }} args - configuration for the client
|
|
27
|
+
* @returns {BundlerClient<TTransport>} a PublicClient with methods for calling Bundler RPC methods
|
|
28
28
|
*/
|
|
29
29
|
export declare function createBundlerClient<TTransport extends Transport>(args: PublicClientConfig<TTransport, Chain> & {
|
|
30
30
|
type?: string;
|
|
@@ -32,38 +32,38 @@ export type BundlerActions = {
|
|
|
32
32
|
/**
|
|
33
33
|
* calls `eth_estimateUserOperationGas` and returns the result
|
|
34
34
|
*
|
|
35
|
-
* @param request - the
|
|
35
|
+
* @param request - the UserOperationRequest to estimate gas for
|
|
36
36
|
* @param entryPoint - the entry point address the op will be sent to
|
|
37
37
|
* @param stateOverride - the state override to use for the estimation
|
|
38
|
-
* @returns the gas estimates for the given response
|
|
38
|
+
* @returns the gas estimates for the given response
|
|
39
39
|
*/
|
|
40
40
|
estimateUserOperationGas<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationRequest<TEntryPointVersion>, entryPoint: Address, stateOverride?: StateOverride): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>;
|
|
41
41
|
/**
|
|
42
42
|
* calls `eth_sendUserOperation` and returns the hash of the sent UserOperation
|
|
43
43
|
*
|
|
44
|
-
* @param request - the
|
|
44
|
+
* @param request - the UserOperationRequest to send
|
|
45
45
|
* @param entryPoint - the entry point address the op will be sent to
|
|
46
46
|
* @returns the hash of the sent UserOperation
|
|
47
47
|
*/
|
|
48
48
|
sendRawUserOperation<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationRequest<TEntryPointVersion>, entryPoint: Address): Promise<Hash>;
|
|
49
49
|
/**
|
|
50
|
-
* calls `eth_getUserOperationByHash` and returns the
|
|
50
|
+
* calls `eth_getUserOperationByHash` and returns the UserOperationResponse
|
|
51
51
|
*
|
|
52
52
|
* @param hash - the hash of the UserOperation to fetch
|
|
53
|
-
* @returns -
|
|
53
|
+
* @returns - the user operation if found or null
|
|
54
54
|
*/
|
|
55
55
|
getUserOperationByHash(hash: Hash): Promise<UserOperationResponse | null>;
|
|
56
56
|
/**
|
|
57
|
-
* calls `eth_getUserOperationReceipt` and returns the
|
|
57
|
+
* calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt
|
|
58
58
|
*
|
|
59
59
|
* @param hash - the hash of the UserOperation to get the receipt for
|
|
60
|
-
* @returns -
|
|
60
|
+
* @returns - a user operation receipt or null if not found
|
|
61
61
|
*/
|
|
62
62
|
getUserOperationReceipt(hash: Hash): Promise<UserOperationReceipt | null>;
|
|
63
63
|
/**
|
|
64
64
|
* calls `eth_supportedEntryPoints` and returns the entry points the RPC supports
|
|
65
65
|
*
|
|
66
|
-
* @returns -
|
|
66
|
+
* @returns - an array of the entrypoint addresses supported
|
|
67
67
|
*/
|
|
68
68
|
getSupportedEntryPoints(): Promise<Address[]>;
|
|
69
69
|
};
|
|
@@ -6,8 +6,8 @@ import type { BaseSmartAccountClient, SmartAccountClient } from "./smartAccountC
|
|
|
6
6
|
* Useful for narrowing the type of the client down when used within the
|
|
7
7
|
* smart account client decorators
|
|
8
8
|
*
|
|
9
|
-
* @param client a viem client
|
|
10
|
-
* @returns true if the client is a SmartAccountClient
|
|
9
|
+
* @param {Client<TTransport, TChain, TAccount>} client a viem client
|
|
10
|
+
* @returns {boolean} true if the client is a SmartAccountClient
|
|
11
11
|
*/
|
|
12
12
|
export declare function isSmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: Client<TTransport, TChain, TAccount>): client is SmartAccountClient<TTransport, TChain, TAccount>;
|
|
13
13
|
/**
|
|
@@ -15,8 +15,8 @@ export declare function isSmartAccountClient<TTransport extends Transport = Tran
|
|
|
15
15
|
* Useful for narrowing the type of the client down when used within the
|
|
16
16
|
* smart account action decorators
|
|
17
17
|
*
|
|
18
|
-
* @param client a viem client
|
|
19
|
-
* @returns true if the account is a BaseSmartAccountClient
|
|
18
|
+
* @param {Client<TTransport, TChain, TAccount>} client a viem client
|
|
19
|
+
* @returns {boolean} true if the account is a BaseSmartAccountClient
|
|
20
20
|
*/
|
|
21
21
|
export declare function isBaseSmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: Client<TTransport, TChain, TAccount>): client is BaseSmartAccountClient<TTransport, TChain, TAccount>;
|
|
22
22
|
//# sourceMappingURL=isSmartAccountClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,eAAe,EAEpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,oCAAoC,CA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ACrE,QAAQ,SAAS,yBAAyB,CACxC,MAAM,EACN,QAAQ,EACR,QAAQ,CACT,GAAG,yBAAyB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC/C,UAAU,SAAS,2BAA2B,GAAG,2BAA2B,EAC5E,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EAEb,MAAM,EAAE,IAAI,CACV,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAC/D,WAAW,GAAG,OAAO,CACtB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACtB,kBAAkB,CACnB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,CACT,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { Hash, Hex } from "viem";
|
|
|
3
3
|
import type { z } from "zod";
|
|
4
4
|
import type { UserOperationContext } from "../actions/smartAccount/types.js";
|
|
5
5
|
import type { EntryPointVersion } from "../entrypoint/types.js";
|
|
6
|
-
import type { ClientMiddleware
|
|
6
|
+
import type { ClientMiddleware } from "../middleware/types.js";
|
|
7
7
|
import type { UserOperationRequest } from "../types.js";
|
|
8
8
|
import type { ConnectionConfigSchema } from "./schema.js";
|
|
9
9
|
export type ConnectorData = {
|
|
@@ -18,10 +18,5 @@ export type UpgradeToData = {
|
|
|
18
18
|
implAddress: Address;
|
|
19
19
|
initializationData: Hex;
|
|
20
20
|
};
|
|
21
|
-
export type ClientMiddlewareConfig<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> =
|
|
22
|
-
paymasterAndData?: {
|
|
23
|
-
dummyPaymasterAndData: () => UserOperationRequest<"0.6.0">["paymasterAndData"] | Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">;
|
|
24
|
-
paymasterAndData: ClientMiddlewareFn<TContext>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
21
|
+
export type ClientMiddlewareConfig<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = Partial<ClientMiddleware<TContext>>;
|
|
27
22
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,MAAM,MAAM,uBAAuB,CACjC,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D;IACF,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;CACnD,CAAC;AAIF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,GAAG,CAAC;CACzB,CAAC;AAIF,MAAM,MAAM,sBAAsB,CAChC,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,IACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Chain } from "viem/chains";
|
|
2
1
|
import * as chains from "viem/chains";
|
|
2
|
+
import { type Chain } from "viem/chains";
|
|
3
3
|
export declare const ChainsById: Map<number, chains.Chain>;
|
|
4
4
|
/**
|
|
5
5
|
* Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAEhD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,MAQ1D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,KAAG,MAQ3D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,KAQzD,CAAC"}
|