@account-kit/smart-contracts 4.12.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/src/index.d.ts +5 -0
- package/dist/esm/src/index.js +2 -0
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/ma-v2/account/common/modularAccountV2Base.d.ts +39 -0
- package/dist/esm/src/ma-v2/account/{semiModularAccountV2.js → common/modularAccountV2Base.js} +32 -61
- package/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js.map +1 -0
- package/dist/esm/src/ma-v2/account/modularAccountV2.d.ts +16 -0
- package/dist/esm/src/ma-v2/account/modularAccountV2.js +113 -0
- package/dist/esm/src/ma-v2/account/modularAccountV2.js.map +1 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.d.ts +1 -1
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js +1 -1
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js.map +1 -1
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.d.ts +11 -9
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js +43 -23
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js.map +1 -1
- package/dist/esm/src/ma-v2/client/client.d.ts +7 -6
- package/dist/esm/src/ma-v2/client/client.js +21 -18
- package/dist/esm/src/ma-v2/client/client.js.map +1 -1
- package/dist/esm/src/ma-v2/index.d.ts +0 -4
- package/dist/esm/src/ma-v2/index.js +0 -2
- package/dist/esm/src/ma-v2/index.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.d.ts +1 -1
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js +1 -1
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js.map +1 -1
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/ma-v2/account/common/modularAccountV2Base.d.ts +40 -0
- package/dist/types/src/ma-v2/account/common/modularAccountV2Base.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/modularAccountV2.d.ts +17 -0
- package/dist/types/src/ma-v2/account/modularAccountV2.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts +1 -1
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts +11 -9
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts.map +1 -1
- package/dist/types/src/ma-v2/client/client.d.ts +7 -6
- package/dist/types/src/ma-v2/client/client.d.ts.map +1 -1
- package/dist/types/src/ma-v2/index.d.ts +0 -4
- package/dist/types/src/ma-v2/index.d.ts.map +1 -1
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts +1 -1
- package/package.json +6 -6
- package/src/index.ts +7 -0
- package/src/ma-v2/account/{semiModularAccountV2.ts → common/modularAccountV2Base.ts} +62 -105
- package/src/ma-v2/account/modularAccountV2.ts +193 -0
- package/src/ma-v2/account/nativeSMASigner.ts +1 -1
- package/src/ma-v2/actions/install-validation/installValidation.ts +75 -36
- package/src/ma-v2/client/client.ts +54 -34
- package/src/ma-v2/index.ts +0 -5
- package/src/ma-v2/modules/single-signer-validation/signer.ts +1 -1
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.d.ts +0 -41
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.js.map +0 -1
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts +0 -42
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts.map +0 -1
|
@@ -3,17 +3,17 @@ import { encodeFunctionData, concatHex, zeroAddress, } from "viem";
|
|
|
3
3
|
import { semiModularAccountBytecodeAbi } from "../../abis/semiModularAccountBytecodeAbi.js";
|
|
4
4
|
import { serializeValidationConfig, serializeHookConfig, serializeModuleEntity, } from "../common/utils.js";
|
|
5
5
|
import {} from "../../client/client.js";
|
|
6
|
-
import {} from "../../account/
|
|
6
|
+
import {} from "../../account/common/modularAccountV2Base.js";
|
|
7
7
|
import { DEFAULT_OWNER_ENTITY_ID } from "../../utils.js";
|
|
8
8
|
/**
|
|
9
9
|
* Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
|
-
* import {
|
|
13
|
+
* import { createModularAccountV2Client, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@account-kit/smart-contracts";
|
|
14
14
|
* import { Address } from "viem";
|
|
15
15
|
*
|
|
16
|
-
* const client = (await
|
|
16
|
+
* const client = (await createModularAccountV2Client({ ... })).extend(installValidationActions);
|
|
17
17
|
* const sessionKeyAddress: Address = "0x1234";
|
|
18
18
|
* const sessionKeyEntityId: number = 1;
|
|
19
19
|
*
|
|
@@ -49,8 +49,8 @@ import { DEFAULT_OWNER_ENTITY_ID } from "../../utils.js";
|
|
|
49
49
|
* @param {object} client - The client instance which provides account and sendUserOperation functionality.
|
|
50
50
|
* @returns {object} - An object containing two methods, `installValidation` and `uninstallValidation`.
|
|
51
51
|
*/
|
|
52
|
-
export const installValidationActions = (client) =>
|
|
53
|
-
|
|
52
|
+
export const installValidationActions = (client) => {
|
|
53
|
+
const encodeInstallValidation = async ({ validationConfig, selectors, installData, hooks, account = client.account, }) => {
|
|
54
54
|
if (!account) {
|
|
55
55
|
throw new AccountNotFoundError();
|
|
56
56
|
}
|
|
@@ -62,8 +62,7 @@ export const installValidationActions = (client) => ({
|
|
|
62
62
|
validationConfig.moduleAddress !== zeroAddress) {
|
|
63
63
|
throw new EntityIdOverrideError();
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
const callData = await encodeCallData(encodeFunctionData({
|
|
65
|
+
return account.encodeCallData(encodeFunctionData({
|
|
67
66
|
abi: semiModularAccountBytecodeAbi,
|
|
68
67
|
functionName: "installValidation",
|
|
69
68
|
args: [
|
|
@@ -73,21 +72,15 @@ export const installValidationActions = (client) => ({
|
|
|
73
72
|
hooks.map((hook) => concatHex([serializeHookConfig(hook.hookConfig), hook.initData])),
|
|
74
73
|
],
|
|
75
74
|
}));
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
account,
|
|
79
|
-
overrides,
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
uninstallValidation: async ({ moduleAddress, entityId, uninstallData, hookUninstallDatas, account = client.account, overrides, }) => {
|
|
75
|
+
};
|
|
76
|
+
const encodeUninstallValidation = async ({ moduleAddress, entityId, uninstallData, hookUninstallDatas, account = client.account, }) => {
|
|
83
77
|
if (!account) {
|
|
84
78
|
throw new AccountNotFoundError();
|
|
85
79
|
}
|
|
86
80
|
if (!isSmartAccountClient(client)) {
|
|
87
81
|
throw new IncompatibleClientError("SmartAccountClient", "uninstallValidation", client);
|
|
88
82
|
}
|
|
89
|
-
|
|
90
|
-
const callData = await encodeCallData(encodeFunctionData({
|
|
83
|
+
return account.encodeCallData(encodeFunctionData({
|
|
91
84
|
abi: semiModularAccountBytecodeAbi,
|
|
92
85
|
functionName: "uninstallValidation",
|
|
93
86
|
args: [
|
|
@@ -99,11 +92,38 @@ export const installValidationActions = (client) => ({
|
|
|
99
92
|
hookUninstallDatas,
|
|
100
93
|
],
|
|
101
94
|
}));
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
encodeInstallValidation,
|
|
98
|
+
encodeUninstallValidation,
|
|
99
|
+
installValidation: async ({ validationConfig, selectors, installData, hooks, account = client.account, overrides, }) => {
|
|
100
|
+
const callData = await encodeInstallValidation({
|
|
101
|
+
validationConfig,
|
|
102
|
+
selectors,
|
|
103
|
+
installData,
|
|
104
|
+
hooks,
|
|
105
|
+
account,
|
|
106
|
+
});
|
|
107
|
+
return client.sendUserOperation({
|
|
108
|
+
uo: callData,
|
|
109
|
+
account,
|
|
110
|
+
overrides,
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
uninstallValidation: async ({ moduleAddress, entityId, uninstallData, hookUninstallDatas, account = client.account, overrides, }) => {
|
|
114
|
+
const callData = await encodeUninstallValidation({
|
|
115
|
+
moduleAddress,
|
|
116
|
+
entityId,
|
|
117
|
+
uninstallData,
|
|
118
|
+
hookUninstallDatas,
|
|
119
|
+
account,
|
|
120
|
+
});
|
|
121
|
+
return client.sendUserOperation({
|
|
122
|
+
uo: callData,
|
|
123
|
+
account,
|
|
124
|
+
overrides,
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
};
|
|
109
129
|
//# sourceMappingURL=installValidation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installValidation.js","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/install-validation/installValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,GAKtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,kBAAkB,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,
|
|
1
|
+
{"version":3,"file":"installValidation.js","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/install-validation/installValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,GAKtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,kBAAkB,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AA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aAAa;gBACb,kBAAkB;gBAClB,OAAO;aACR,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,iBAAiB,CAAC;gBAC9B,EAAE,EAAE,QAAQ;gBACZ,OAAO;gBACP,SAAS;aACV,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n AccountNotFoundError,\n IncompatibleClientError,\n isSmartAccountClient,\n EntityIdOverrideError,\n type GetEntryPointFromAccount,\n type SendUserOperationResult,\n type UserOperationOverridesParameter,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n type Address,\n type Hex,\n encodeFunctionData,\n concatHex,\n zeroAddress,\n} from \"viem\";\n\nimport { semiModularAccountBytecodeAbi } from \"../../abis/semiModularAccountBytecodeAbi.js\";\nimport type { HookConfig, ValidationConfig } from \"../common/types.js\";\nimport {\n serializeValidationConfig,\n serializeHookConfig,\n serializeModuleEntity,\n} from \"../common/utils.js\";\n\nimport { type ModularAccountV2Client } from \"../../client/client.js\";\nimport { type ModularAccountV2 } from \"../../account/common/modularAccountV2Base.js\";\nimport { DEFAULT_OWNER_ENTITY_ID } from \"../../utils.js\";\n\nexport type InstallValidationParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n validationConfig: ValidationConfig;\n selectors: Hex[];\n installData: Hex;\n hooks: {\n hookConfig: HookConfig;\n initData: Hex;\n }[];\n account?: ModularAccountV2<TSigner> | undefined;\n} & UserOperationOverridesParameter<\n GetEntryPointFromAccount<ModularAccountV2<TSigner>>\n>;\n\nexport type UninstallValidationParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n moduleAddress: Address;\n entityId: number;\n uninstallData: Hex;\n hookUninstallDatas: Hex[];\n account?: ModularAccountV2<TSigner> | undefined;\n} & UserOperationOverridesParameter<\n GetEntryPointFromAccount<ModularAccountV2<TSigner>>\n>;\n\nexport type InstallValidationActions<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n installValidation: (\n args: InstallValidationParams<TSigner>\n ) => Promise<SendUserOperationResult>;\n encodeInstallValidation: (\n // TODO: omit the user op sending related parameters from this type\n args: InstallValidationParams<TSigner>\n ) => Promise<Hex>;\n uninstallValidation: (\n args: UninstallValidationParams<TSigner>\n ) => Promise<SendUserOperationResult>;\n encodeUninstallValidation: (\n args: UninstallValidationParams<TSigner>\n ) => Promise<Hex>;\n};\n\n/**\n * Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`.\n *\n * @example\n * ```ts\n * import { createModularAccountV2Client, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from \"@account-kit/smart-contracts\";\n * import { Address } from \"viem\";\n *\n * const client = (await createModularAccountV2Client({ ... })).extend(installValidationActions);\n * const sessionKeyAddress: Address = \"0x1234\";\n * const sessionKeyEntityId: number = 1;\n *\n * await client.installValidation({\n * validationConfig: {\n * moduleAddress: getDefaultSingleSignerValidationModuleAddress(\n * client.chain\n * ),\n * entityId: sessionKeyEntityId,\n * isGlobal: true,\n * isSignatureValidation: false,\n * isUserOpValidation: true,\n * },\n * selectors: [],\n * installData: SingleSignerValidationModule.encodeOnInstallData({\n * entityId: sessionKeyEntityId,\n * signer: sessionKeyAddress,\n * }),\n * hooks: [],\n * });\n *\n * await client.uninstallValidation({\n * moduleAddress: sessionKeyAddress,\n * entityId: sessionKeyEntityId,\n * uninstallData: SingleSignerValidationModule.encodeOnUninstallData({\n * entityId: sessionKeyEntityId,\n * }),\n * hookUninstallDatas: [],\n * });\n *\n * ```\n *\n * @param {object} client - The client instance which provides account and sendUserOperation functionality.\n * @returns {object} - An object containing two methods, `installValidation` and `uninstallValidation`.\n */\nexport const installValidationActions: <\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n client: ModularAccountV2Client<TSigner>\n) => InstallValidationActions<TSigner> = (client) => {\n const encodeInstallValidation = async ({\n validationConfig,\n selectors,\n installData,\n hooks,\n account = client.account,\n }: InstallValidationParams) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"installValidation\",\n client\n );\n }\n\n // an entityId of zero is only allowed if we're installing or uninstalling hooks on the fallback validation\n if (\n validationConfig.entityId === DEFAULT_OWNER_ENTITY_ID &&\n validationConfig.moduleAddress !== zeroAddress\n ) {\n throw new EntityIdOverrideError();\n }\n\n return account.encodeCallData(\n encodeFunctionData({\n abi: semiModularAccountBytecodeAbi,\n functionName: \"installValidation\",\n args: [\n serializeValidationConfig(validationConfig),\n selectors,\n installData,\n hooks.map((hook: { hookConfig: HookConfig; initData: Hex }) =>\n concatHex([serializeHookConfig(hook.hookConfig), hook.initData])\n ),\n ],\n })\n );\n };\n\n const encodeUninstallValidation = async ({\n moduleAddress,\n entityId,\n uninstallData,\n hookUninstallDatas,\n account = client.account,\n }: UninstallValidationParams) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"uninstallValidation\",\n client\n );\n }\n\n return account.encodeCallData(\n encodeFunctionData({\n abi: semiModularAccountBytecodeAbi,\n functionName: \"uninstallValidation\",\n args: [\n serializeModuleEntity({\n moduleAddress,\n entityId,\n }),\n uninstallData,\n hookUninstallDatas,\n ],\n })\n );\n };\n\n return {\n encodeInstallValidation,\n encodeUninstallValidation,\n installValidation: async ({\n validationConfig,\n selectors,\n installData,\n hooks,\n account = client.account,\n overrides,\n }) => {\n const callData = await encodeInstallValidation({\n validationConfig,\n selectors,\n installData,\n hooks,\n account,\n });\n\n return client.sendUserOperation({\n uo: callData,\n account,\n overrides,\n });\n },\n\n uninstallValidation: async ({\n moduleAddress,\n entityId,\n uninstallData,\n hookUninstallDatas,\n account = client.account,\n overrides,\n }) => {\n const callData = await encodeUninstallValidation({\n moduleAddress,\n entityId,\n uninstallData,\n hookUninstallDatas,\n account,\n });\n\n return client.sendUserOperation({\n uo: callData,\n account,\n overrides,\n });\n },\n };\n};\n"]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type SmartAccountClient, type SmartAccountSigner, type SmartAccountClientConfig, type NotType } from "@aa-sdk/core";
|
|
2
2
|
import { type Chain, type Transport } from "viem";
|
|
3
|
-
import { type
|
|
3
|
+
import { type CreateModularAccountV2Params } from "../account/modularAccountV2.js";
|
|
4
4
|
import { type AlchemySmartAccountClientConfig, type AlchemyTransport } from "@account-kit/infra";
|
|
5
5
|
import type { LightAccount } from "../../light-account/accounts/account.js";
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
6
|
+
import type { ModularAccountV2 } from "../account/common/modularAccountV2Base.js";
|
|
7
|
+
export type ModularAccountV2Client<TSigner extends SmartAccountSigner = SmartAccountSigner, TChain extends Chain = Chain, TTransport extends Transport | AlchemyTransport = Transport> = SmartAccountClient<TTransport, TChain, ModularAccountV2<TSigner>>;
|
|
8
|
+
export type CreateModularAccountV2ClientParams<TTransport extends Transport = Transport, TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner> = CreateModularAccountV2Params<TTransport, TSigner> & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
|
|
9
|
+
export type CreateModularAccountV2AlchemyClientParams<TTransport extends Transport = Transport, TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateModularAccountV2ClientParams<TTransport, TChain, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<TChain, LightAccount<TSigner>>, "account"> & {
|
|
9
10
|
paymasterAndData?: never;
|
|
10
11
|
dummyPaymasterAndData?: never;
|
|
11
12
|
};
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function createModularAccountV2Client<TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner>(args: CreateModularAccountV2AlchemyClientParams<AlchemyTransport, TChain, TSigner>): Promise<ModularAccountV2Client<TSigner, TChain, AlchemyTransport>>;
|
|
14
|
+
export declare function createModularAccountV2Client<TTransport extends Transport = Transport, TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner>(args: CreateModularAccountV2ClientParams<TTransport, TChain, TSigner> & NotType<TTransport, AlchemyTransport>): Promise<ModularAccountV2Client<TSigner, TChain>>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { createSmartAccountClient, } from "@aa-sdk/core";
|
|
1
|
+
import { createSmartAccountClient, default7702GasEstimator, default7702UserOpSigner, } from "@aa-sdk/core";
|
|
2
2
|
import {} from "viem";
|
|
3
|
-
import {
|
|
3
|
+
import { createModularAccountV2, } from "../account/modularAccountV2.js";
|
|
4
4
|
import { createAlchemySmartAccountClient, isAlchemyTransport, } from "@account-kit/infra";
|
|
5
5
|
/**
|
|
6
|
-
* Creates a
|
|
6
|
+
* Creates a Modular Account V2 client using the provided configuration parameters.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* import {
|
|
11
|
-
* import { createSMAV2AccountClient } from "@account-kit/smart-contracts";
|
|
9
|
+
* ```ts twoslash
|
|
10
|
+
* import { createModularAccountV2Client } from "@account-kit/smart-contracts";
|
|
12
11
|
* import { LocalAccountSigner } from "@aa-sdk/core";
|
|
13
|
-
* import { sepolia } from "@account-kit/infra";
|
|
12
|
+
* import { alchemy, sepolia } from "@account-kit/infra";
|
|
14
13
|
*
|
|
15
14
|
* const MNEMONIC = "...";
|
|
16
15
|
* const RPC_URL = "...";
|
|
@@ -19,11 +18,11 @@ import { createAlchemySmartAccountClient, isAlchemyTransport, } from "@account-k
|
|
|
19
18
|
*
|
|
20
19
|
* const chain = sepolia;
|
|
21
20
|
*
|
|
22
|
-
* const transport =
|
|
21
|
+
* const transport = alchemy({ rpcUrl: RPC_URL });
|
|
23
22
|
*
|
|
24
23
|
* const policyId = "...";
|
|
25
24
|
*
|
|
26
|
-
* const
|
|
25
|
+
* const modularAccountV2Client = await createModularAccountV2Client({
|
|
27
26
|
* chain,
|
|
28
27
|
* signer,
|
|
29
28
|
* transport,
|
|
@@ -31,27 +30,31 @@ import { createAlchemySmartAccountClient, isAlchemyTransport, } from "@account-k
|
|
|
31
30
|
* });
|
|
32
31
|
* ```
|
|
33
32
|
*
|
|
34
|
-
* @param {
|
|
33
|
+
* @param {CreateModularAccountV2ClientParams} config The configuration parameters required to create the Modular Account v2 account client
|
|
35
34
|
* @returns {Promise<SmartAccountClient>} A promise that resolves to a `SmartAccountClient` instance
|
|
36
35
|
*/
|
|
37
|
-
export async function
|
|
36
|
+
export async function createModularAccountV2Client(config) {
|
|
38
37
|
const { transport, chain } = config;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const account = await createModularAccountV2(config);
|
|
39
|
+
const middlewareToAppend = config.mode === "7702"
|
|
40
|
+
? {
|
|
41
|
+
gasEstimator: default7702GasEstimator(config.gasEstimator),
|
|
42
|
+
signUserOperation: default7702UserOpSigner(config.signUserOperation),
|
|
43
|
+
}
|
|
44
|
+
: {};
|
|
44
45
|
if (isAlchemyTransport(transport, chain)) {
|
|
45
46
|
return createAlchemySmartAccountClient({
|
|
46
47
|
...config,
|
|
47
48
|
transport,
|
|
48
49
|
chain,
|
|
49
|
-
account
|
|
50
|
+
account,
|
|
51
|
+
...middlewareToAppend,
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
return createSmartAccountClient({
|
|
53
55
|
...config,
|
|
54
|
-
account
|
|
56
|
+
account,
|
|
57
|
+
...middlewareToAppend,
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/ma-v2/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/ma-v2/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA8B,MAAM,MAAM,CAAC;AAElD,OAAO,EACL,sBAAsB,GAEvB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,+BAA+B,EAC/B,kBAAkB,GAInB,MAAM,oBAAoB,CAAC;AAsD5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,MAE6C;IAE7C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEpC,MAAM,OAAO,GAAG,MAAM,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAErD,MAAM,kBAAkB,GACtB,MAAM,CAAC,IAAI,KAAK,MAAM;QACpB,CAAC,CAAC;YACE,YAAY,EAAE,uBAAuB,CAAC,MAAM,CAAC,YAAY,CAAC;YAC1D,iBAAiB,EAAE,uBAAuB,CAAC,MAAM,CAAC,iBAAiB,CAAC;SACrE;QACH,CAAC,CAAC,EAAE,CAAC;IAET,IAAI,kBAAkB,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO,+BAA+B,CAAC;YACrC,GAAG,MAAM;YACT,SAAS;YACT,KAAK;YACL,OAAO;YACP,GAAG,kBAAkB;SACtB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,wBAAwB,CAAC;QAC9B,GAAG,MAAM;QACT,OAAO;QACP,GAAG,kBAAkB;KACtB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n type SmartAccountClient,\n type SmartAccountSigner,\n type SmartAccountClientConfig,\n type NotType,\n createSmartAccountClient,\n default7702GasEstimator,\n default7702UserOpSigner,\n} from \"@aa-sdk/core\";\nimport { type Chain, type Transport } from \"viem\";\n\nimport {\n createModularAccountV2,\n type CreateModularAccountV2Params,\n} from \"../account/modularAccountV2.js\";\n\nimport {\n createAlchemySmartAccountClient,\n isAlchemyTransport,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n type AlchemyTransport,\n} from \"@account-kit/infra\";\nimport type { LightAccount } from \"../../light-account/accounts/account.js\";\n\nimport type { ModularAccountV2 } from \"../account/common/modularAccountV2Base.js\";\n\nexport type ModularAccountV2Client<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TChain extends Chain = Chain,\n TTransport extends Transport | AlchemyTransport = Transport\n> = SmartAccountClient<TTransport, TChain, ModularAccountV2<TSigner>>;\n\nexport type CreateModularAccountV2ClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain = Chain,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = CreateModularAccountV2Params<TTransport, TSigner> &\n Omit<\n SmartAccountClientConfig<TTransport, TChain>,\n \"transport\" | \"account\" | \"chain\"\n >;\n\nexport type CreateModularAccountV2AlchemyClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain = Chain,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateModularAccountV2ClientParams<TTransport, TChain, TSigner>,\n \"transport\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<TChain, LightAccount<TSigner>>,\n \"account\"\n > & { paymasterAndData?: never; dummyPaymasterAndData?: never };\n\nexport function createModularAccountV2Client<\n TChain extends Chain = Chain,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateModularAccountV2AlchemyClientParams<\n AlchemyTransport,\n TChain,\n TSigner\n >\n): Promise<ModularAccountV2Client<TSigner, TChain, AlchemyTransport>>;\n\nexport function createModularAccountV2Client<\n TTransport extends Transport = Transport,\n TChain extends Chain = Chain,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateModularAccountV2ClientParams<TTransport, TChain, TSigner> &\n NotType<TTransport, AlchemyTransport>\n): Promise<ModularAccountV2Client<TSigner, TChain>>;\n\n/**\n * Creates a Modular Account V2 client using the provided configuration parameters.\n *\n * @example\n * ```ts twoslash\n * import { createModularAccountV2Client } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { alchemy, sepolia } from \"@account-kit/infra\";\n *\n * const MNEMONIC = \"...\";\n * const RPC_URL = \"...\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);\n *\n * const chain = sepolia;\n *\n * const transport = alchemy({ rpcUrl: RPC_URL });\n *\n * const policyId = \"...\";\n *\n * const modularAccountV2Client = await createModularAccountV2Client({\n * chain,\n * signer,\n * transport,\n * policyId, // NOTE: you may only pass in a gas policy ID if you provide an Alchemy transport!\n * });\n * ```\n *\n * @param {CreateModularAccountV2ClientParams} config The configuration parameters required to create the Modular Account v2 account client\n * @returns {Promise<SmartAccountClient>} A promise that resolves to a `SmartAccountClient` instance\n */\nexport async function createModularAccountV2Client(\n config:\n | CreateModularAccountV2ClientParams\n | CreateModularAccountV2AlchemyClientParams\n): Promise<SmartAccountClient | AlchemySmartAccountClient> {\n const { transport, chain } = config;\n\n const account = await createModularAccountV2(config);\n\n const middlewareToAppend =\n config.mode === \"7702\"\n ? {\n gasEstimator: default7702GasEstimator(config.gasEstimator),\n signUserOperation: default7702UserOpSigner(config.signUserOperation),\n }\n : {};\n\n if (isAlchemyTransport(transport, chain)) {\n return createAlchemySmartAccountClient({\n ...config,\n transport,\n chain,\n account,\n ...middlewareToAppend,\n });\n }\n\n return createSmartAccountClient({\n ...config,\n account,\n ...middlewareToAppend,\n });\n}\n"]}
|
|
@@ -3,15 +3,11 @@ export { modularAccountAbi } from "./abis/modularAccountAbi.js";
|
|
|
3
3
|
export { semiModularAccountBytecodeAbi } from "./abis/semiModularAccountBytecodeAbi.js";
|
|
4
4
|
export { semiModularAccountStorageAbi } from "./abis/semiModularAccountStorageAbi.js";
|
|
5
5
|
export { nativeSMASigner } from "./account/nativeSMASigner.js";
|
|
6
|
-
export type * from "./account/semiModularAccountV2.js";
|
|
7
|
-
export { createSMAV2Account } from "./account/semiModularAccountV2.js";
|
|
8
6
|
export type { ModuleEntity, ValidationConfig, HookConfig, ValidationData, } from "./actions/common/types.js";
|
|
9
7
|
export { HookType } from "./actions/common/types.js";
|
|
10
8
|
export { serializeValidationConfig, serializeHookConfig, serializeModuleEntity, } from "./actions/common/utils.js";
|
|
11
9
|
export type * from "./actions/install-validation/installValidation.js";
|
|
12
10
|
export { installValidationActions } from "./actions/install-validation/installValidation.js";
|
|
13
|
-
export type * from "./client/client.js";
|
|
14
|
-
export { createSMAV2AccountClient } from "./client/client.js";
|
|
15
11
|
export { getDefaultAllowlistModuleAddress, getDefaultNativeTokenLimitModuleAddress, getDefaultPaymasterGuardModuleAddress, getDefaultSingleSignerValidationModuleAddress, getDefaultTimeRangeModuleAddress, getDefaultWebauthnValidationModuleAddress, } from "./modules/utils.js";
|
|
16
12
|
export { allowlistModuleAbi } from "./modules/allowlist-module/abis/allowlistModuleAbi.js";
|
|
17
13
|
export { AllowlistModule } from "./modules/allowlist-module/module.js";
|
|
@@ -4,11 +4,9 @@ export { modularAccountAbi } from "./abis/modularAccountAbi.js";
|
|
|
4
4
|
export { semiModularAccountBytecodeAbi } from "./abis/semiModularAccountBytecodeAbi.js";
|
|
5
5
|
export { semiModularAccountStorageAbi } from "./abis/semiModularAccountStorageAbi.js";
|
|
6
6
|
export { nativeSMASigner } from "./account/nativeSMASigner.js";
|
|
7
|
-
export { createSMAV2Account } from "./account/semiModularAccountV2.js";
|
|
8
7
|
export { HookType } from "./actions/common/types.js";
|
|
9
8
|
export { serializeValidationConfig, serializeHookConfig, serializeModuleEntity, } from "./actions/common/utils.js";
|
|
10
9
|
export { installValidationActions } from "./actions/install-validation/installValidation.js";
|
|
11
|
-
export { createSMAV2AccountClient } from "./client/client.js";
|
|
12
10
|
export { getDefaultAllowlistModuleAddress, getDefaultNativeTokenLimitModuleAddress, getDefaultPaymasterGuardModuleAddress, getDefaultSingleSignerValidationModuleAddress, getDefaultTimeRangeModuleAddress, getDefaultWebauthnValidationModuleAddress, } from "./modules/utils.js";
|
|
13
11
|
export { allowlistModuleAbi } from "./modules/allowlist-module/abis/allowlistModuleAbi.js";
|
|
14
12
|
export { AllowlistModule } from "./modules/allowlist-module/module.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ma-v2/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ma-v2/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAE7F,OAAO,EACL,gCAAgC,EAChC,uCAAuC,EACvC,qCAAqC,EACrC,6CAA6C,EAC7C,gCAAgC,EAChC,yCAAyC,GAC1C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAC;AAClH,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4EAA4E,CAAC;AAC7H,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC","sourcesContent":["// ma v2 exports\nexport { accountFactoryAbi } from \"./abis/accountFactoryAbi.js\";\nexport { modularAccountAbi } from \"./abis/modularAccountAbi.js\";\nexport { semiModularAccountBytecodeAbi } from \"./abis/semiModularAccountBytecodeAbi.js\";\nexport { semiModularAccountStorageAbi } from \"./abis/semiModularAccountStorageAbi.js\";\n\nexport { nativeSMASigner } from \"./account/nativeSMASigner.js\";\n\nexport type {\n ModuleEntity,\n ValidationConfig,\n HookConfig,\n ValidationData,\n} from \"./actions/common/types.js\";\nexport { HookType } from \"./actions/common/types.js\";\nexport {\n serializeValidationConfig,\n serializeHookConfig,\n serializeModuleEntity,\n} from \"./actions/common/utils.js\";\nexport type * from \"./actions/install-validation/installValidation.js\";\nexport { installValidationActions } from \"./actions/install-validation/installValidation.js\";\n\nexport {\n getDefaultAllowlistModuleAddress,\n getDefaultNativeTokenLimitModuleAddress,\n getDefaultPaymasterGuardModuleAddress,\n getDefaultSingleSignerValidationModuleAddress,\n getDefaultTimeRangeModuleAddress,\n getDefaultWebauthnValidationModuleAddress,\n} from \"./modules/utils.js\";\nexport { allowlistModuleAbi } from \"./modules/allowlist-module/abis/allowlistModuleAbi.js\";\nexport { AllowlistModule } from \"./modules/allowlist-module/module.js\";\nexport { nativeTokenLimitModuleAbi } from \"./modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js\";\nexport { NativeTokenLimitModule } from \"./modules/native-token-limit-module/module.js\";\nexport { paymasterGuardModuleAbi } from \"./modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js\";\nexport { PaymasterGuardModule } from \"./modules/paymaster-guard-module/module.js\";\nexport { singleSignerValidationModuleAbi } from \"./modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js\";\nexport { SingleSignerValidationModule } from \"./modules/single-signer-validation/module.js\";\nexport { timeRangeModuleAbi } from \"./modules/time-range-module/abis/timeRangeModuleAbi.js\";\nexport { TimeRangeModule } from \"./modules/time-range-module/module.js\";\nexport { webauthnValidationModuleAbi } from \"./modules/webauthn-validation/abis/webauthnValidationAbi.js\";\n"]}
|
|
@@ -11,7 +11,7 @@ import { type Hex, type SignableMessage, type TypedDataDefinition, type Chain, t
|
|
|
11
11
|
*
|
|
12
12
|
* const MNEMONIC = "...":
|
|
13
13
|
*
|
|
14
|
-
* const account =
|
|
14
|
+
* const account = createModularAccountV2({ config });
|
|
15
15
|
*
|
|
16
16
|
* const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);
|
|
17
17
|
*
|
|
@@ -12,7 +12,7 @@ import { packUOSignature, pack1271Signature } from "../../utils.js";
|
|
|
12
12
|
*
|
|
13
13
|
* const MNEMONIC = "...":
|
|
14
14
|
*
|
|
15
|
-
* const account =
|
|
15
|
+
* const account = createModularAccountV2({ config });
|
|
16
16
|
*
|
|
17
17
|
* const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../../../../src/ma-v2/modules/single-signer-validation/signer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW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,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;qBACpD;oBACD,OAAO,EAAE;wBACP,IAAI;qBACL;oBACD,WAAW,EAAE,gBAAgB;iBAC9B,CAAC;gBACF,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QAED,mEAAmE;QACnE,qHAAqH;QACrH,aAAa,EAAE,KAAK,EAIlB,mBAAgE,EAClD,EAAE;YAChB,uIAAuI;YACvI,MAAM,gBAAgB,GACpB,mBAAmB,EAAE,WAAW,KAAK,gBAAgB;gBACrD,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,KAAK,cAAc,CAAC;YAEpE,MAAM,mBAAmB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC;gBACrD,MAAM,EAAE;oBACN,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;oBACzB,iBAAiB,EACf,6CAA6C,CAAC,KAAK,CAAC;oBACtD,IAAI,EAAE,SAAS,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;iBAC1D;gBACD,KAAK,EAAE;oBACL,cAAc,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;iBACpD;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,aAAa,CAAC,mBAAmB,CAAC;iBAC/C;gBACD,WAAW,EAAE,gBAAgB;aAC9B,CAAC,CAAC;YAEH,OAAO,gBAAgB;gBACrB,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,iBAAiB,CAAC;oBAChB,mBAAmB;oBACnB,QAAQ;iBACT,CAAC,CAAC;QACT,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n hashMessage,\n hashTypedData,\n concatHex,\n type Hex,\n type SignableMessage,\n type TypedData,\n type TypedDataDefinition,\n type Chain,\n type Address,\n} from \"viem\";\nimport { getDefaultSingleSignerValidationModuleAddress } from \"../utils.js\";\n\nimport { packUOSignature, pack1271Signature } from \"../../utils.js\";\n/**\n * Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data.\n *\n * @example \n \n * ```ts\n * import { singleSignerMessageSigner } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const MNEMONIC = \"...\":\n * \n * const account =
|
|
1
|
+
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../../../../src/ma-v2/modules/single-signer-validation/signer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,EACb,SAAS,GAOV,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACpE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,MAA0B,EAC1B,KAAY,EACZ,cAAuB,EACvB,QAAgB,EAChB,EAAE;IACF,OAAO;QACL,iBAAiB,EAAE,GAAQ,EAAE;YAC3B,MAAM,mBAAmB,GACvB,sIAAsI,CAAC;YAEzI,OAAO,eAAe,CAAC;gBACrB,uBAAuB;gBACvB,mBAAmB,EAAE,mBAAmB;aACzC,CAAC,CAAC;QACL,CAAC;QAED,qBAAqB,EAAE,CAAC,MAAW,EAAgB,EAAE;YACnD,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAc,EAAE,EAAE,CACjE,eAAe,CAAC;gBACd,uBAAuB;gBACvB,mBAAmB,EAAE,SAAS;aAC/B,CAAC,CACH,CAAC;QACJ,CAAC;QAED,oFAAoF;QACpF,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,EAAgC;YACzD,MAAM,IAAI,GAAG,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EAAE,MAAM,aAAa,CAAC,mBAAmB,CAAC;iBAC/C;gBACD,WAAW,EAAE,gBAAgB;aAC9B,CAAC,CAAC;YAEH,OAAO,gBAAgB;gBACrB,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,iBAAiB,CAAC;oBAChB,mBAAmB;oBACnB,QAAQ;iBACT,CAAC,CAAC;QACT,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n hashMessage,\n hashTypedData,\n concatHex,\n type Hex,\n type SignableMessage,\n type TypedData,\n type TypedDataDefinition,\n type Chain,\n type Address,\n} from \"viem\";\nimport { getDefaultSingleSignerValidationModuleAddress } from \"../utils.js\";\n\nimport { packUOSignature, pack1271Signature } from \"../../utils.js\";\n/**\n * Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data.\n *\n * @example \n \n * ```ts\n * import { singleSignerMessageSigner } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const MNEMONIC = \"...\":\n * \n * const account = createModularAccountV2({ config });\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);\n *\n * const messageSigner = singleSignerMessageSigner(signer, chain, account.address, account.signerEntity.entityId);\n * ```\n *\n * @param {SmartAccountSigner} signer Signer to use for signing operations\n * @param {Chain} chain Chain object for the signer\n * @param {Address} accountAddress address of the smart account using this signer\n * @param {number} entityId the entity id of the signing validation\n * @returns {object} an object with methods for signing operations and managing signatures\n */\nexport const singleSignerMessageSigner = (\n signer: SmartAccountSigner,\n chain: Chain,\n accountAddress: Address,\n entityId: number\n) => {\n return {\n getDummySignature: (): Hex => {\n const dummyEcdsaSignature =\n \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n\n return packUOSignature({\n // orderedHookData: [],\n validationSignature: dummyEcdsaSignature,\n });\n },\n\n signUserOperationHash: (uoHash: Hex): Promise<Hex> => {\n return signer.signMessage({ raw: uoHash }).then((signature: Hex) =>\n packUOSignature({\n // orderedHookData: [],\n validationSignature: signature,\n })\n );\n },\n\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }: { message: SignableMessage }): Promise<Hex> {\n const hash = await hashMessage(message);\n\n return pack1271Signature({\n validationSignature: await signer.signTypedData({\n domain: {\n chainId: Number(chain.id),\n verifyingContract:\n getDefaultSingleSignerValidationModuleAddress(chain),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress]),\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }],\n },\n message: {\n hash,\n },\n primaryType: \"ReplaySafeHash\",\n }),\n entityId,\n });\n },\n\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async <\n const typedData extends TypedData | Record<string, unknown>,\n primaryType extends keyof typedData | \"EIP712Domain\" = keyof typedData\n >(\n typedDataDefinition: TypedDataDefinition<typedData, primaryType>\n ): Promise<Hex> => {\n // the accounts domain already gives replay protection across accounts for deferred actions, so we don't need to apply another wrapping\n const isDeferredAction =\n typedDataDefinition?.primaryType === \"DeferredAction\" &&\n typedDataDefinition?.domain?.verifyingContract === accountAddress;\n\n const validationSignature = await signer.signTypedData({\n domain: {\n chainId: Number(chain.id),\n verifyingContract:\n getDefaultSingleSignerValidationModuleAddress(chain),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress]),\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }],\n },\n message: {\n hash: await hashTypedData(typedDataDefinition),\n },\n primaryType: \"ReplaySafeHash\",\n });\n\n return isDeferredAction\n ? validationSignature\n : pack1271Signature({\n validationSignature,\n entityId,\n });\n },\n };\n};\n"]}
|
|
@@ -51,4 +51,9 @@ export { SessionKeySigner } from "./msca/plugins/session-key/signer.js";
|
|
|
51
51
|
export { buildSessionKeysToRemoveStruct } from "./msca/plugins/session-key/utils.js";
|
|
52
52
|
export type * from "./msca/plugins/types.js";
|
|
53
53
|
export { getDefaultMultiOwnerModularAccountFactoryAddress, getDefaultMultisigModularAccountFactoryAddress, getMAInitializationData, getMSCAUpgradeToData, } from "./msca/utils.js";
|
|
54
|
+
export type * from "./ma-v2/account/modularAccountV2.js";
|
|
55
|
+
export type * from "./ma-v2/account/common/modularAccountV2Base.js";
|
|
56
|
+
export { createModularAccountV2 } from "./ma-v2/account/modularAccountV2.js";
|
|
57
|
+
export type * from "./ma-v2/client/client.js";
|
|
58
|
+
export { createModularAccountV2Client } from "./ma-v2/client/client.js";
|
|
54
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,qCAAqC,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,IAAI,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAClH,OAAO,EACL,+BAA+B,EAC/B,KAAK,+BAA+B,GACrC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,yCAAyC,EACzC,KAAK,yCAAyC,GAC/C,MAAM,oDAAoD,CAAC;AAC5D,mBAAmB,4CAA4C,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,mBAAmB,0BAA0B,CAAC;AAE9C,OAAO,EACL,sBAAsB,EACtB,oCAAoC,EACpC,gCAAgC,EAChC,0BAA0B,EAC1B,oCAAoC,EACpC,8CAA8C,EAC9C,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAGlC,mBAAmB,wCAAwC,CAAC;AAC5D,OAAO,E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,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EACL,gDAAgD,EAChD,8CAA8C,EAC9C,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAGzB,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,gDAAgD,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,mBAAmB,0BAA0B,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type SmartAccountSigner, type SmartContractAccountWithSigner, type ToSmartContractAccountParams } from "@aa-sdk/core";
|
|
2
|
+
import { type Hex, type Address, type Chain, type Transport } from "viem";
|
|
3
|
+
export declare const executeUserOpSelector: Hex;
|
|
4
|
+
export type SignerEntity = {
|
|
5
|
+
isGlobalValidation: boolean;
|
|
6
|
+
entityId: number;
|
|
7
|
+
};
|
|
8
|
+
export type ExecutionDataView = {
|
|
9
|
+
module: Address;
|
|
10
|
+
skipRuntimeValidation: boolean;
|
|
11
|
+
allowGlobalValidation: boolean;
|
|
12
|
+
executionHooks: readonly Hex[];
|
|
13
|
+
};
|
|
14
|
+
export type ValidationDataView = {
|
|
15
|
+
validationHooks: readonly Hex[];
|
|
16
|
+
executionHooks: readonly Hex[];
|
|
17
|
+
selectors: readonly Hex[];
|
|
18
|
+
validationFlags: number;
|
|
19
|
+
};
|
|
20
|
+
export type ValidationDataParams = {
|
|
21
|
+
validationModuleAddress: Address;
|
|
22
|
+
entityId?: never;
|
|
23
|
+
} | {
|
|
24
|
+
validationModuleAddress?: never;
|
|
25
|
+
entityId: number;
|
|
26
|
+
};
|
|
27
|
+
export type ModularAccountV2<TSigner extends SmartAccountSigner = SmartAccountSigner> = SmartContractAccountWithSigner<"ModularAccountV2", TSigner, "0.7.0"> & {
|
|
28
|
+
signerEntity: SignerEntity;
|
|
29
|
+
getExecutionData: (selector: Hex) => Promise<ExecutionDataView>;
|
|
30
|
+
getValidationData: (args: ValidationDataParams) => Promise<ValidationDataView>;
|
|
31
|
+
encodeCallData: (callData: Hex) => Promise<Hex>;
|
|
32
|
+
};
|
|
33
|
+
export type CreateMAV2BaseParams<TSigner extends SmartAccountSigner = SmartAccountSigner, TTransport extends Transport = Transport> = Omit<ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, "encodeExecute" | "encodeBatchExecute" | "getNonce" | "signMessage" | "signTypedData" | "getDummySignature"> & {
|
|
34
|
+
signer: TSigner;
|
|
35
|
+
signerEntity?: SignerEntity;
|
|
36
|
+
accountAddress: Address;
|
|
37
|
+
};
|
|
38
|
+
export type CreateMAV2BaseReturnType<TSigner extends SmartAccountSigner = SmartAccountSigner> = Promise<ModularAccountV2<TSigner>>;
|
|
39
|
+
export declare function createMAv2Base<TSigner extends SmartAccountSigner = SmartAccountSigner>(config: CreateMAV2BaseParams<TSigner>): CreateMAV2BaseReturnType<TSigner>;
|
|
40
|
+
//# sourceMappingURL=modularAccountV2Base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modularAccountV2Base.d.ts","sourceRoot":"","sources":["../../../../../../src/ma-v2/account/common/modularAccountV2Base.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAClC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,EAOf,MAAM,MAAM,CAAC;AAMd,eAAO,MAAM,qBAAqB,EA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,SAAS,IACtC,IAAI,CACN,4BAA4B,CAAC,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,EAE1E,eAAe,GACf,oBAAoB,GACpB,UAAU,GACV,aAAa,GACb,eAAe,GACf,mBAAmB,CACtB,GAAG;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAClC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAEvC,wBAAsB,cAAc,CAClC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EACvD,MAAM,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAsJ1E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EntryPointDef, SmartAccountSigner, ToSmartContractAccountParams } from "@aa-sdk/core";
|
|
2
|
+
import { type Address, type Chain, type Hex, type Transport } from "viem";
|
|
3
|
+
import { type SignerEntity, type ModularAccountV2 } from "./common/modularAccountV2Base.js";
|
|
4
|
+
export type CreateModularAccountV2Params<TTransport extends Transport = Transport, TSigner extends SmartAccountSigner = SmartAccountSigner> = (Pick<ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, "transport" | "chain" | "accountAddress"> & {
|
|
5
|
+
signer: TSigner;
|
|
6
|
+
entryPoint?: EntryPointDef<"0.7.0", Chain>;
|
|
7
|
+
signerEntity?: SignerEntity;
|
|
8
|
+
}) & ({
|
|
9
|
+
mode?: "default";
|
|
10
|
+
salt?: bigint;
|
|
11
|
+
factoryAddress?: Address;
|
|
12
|
+
initCode?: Hex;
|
|
13
|
+
} | {
|
|
14
|
+
mode: "7702";
|
|
15
|
+
});
|
|
16
|
+
export declare function createModularAccountV2<TTransport extends Transport = Transport, TSigner extends SmartAccountSigner = SmartAccountSigner>(config: CreateModularAccountV2Params<TTransport, TSigner>): Promise<ModularAccountV2<TSigner>>;
|
|
17
|
+
//# sourceMappingURL=modularAccountV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modularAccountV2.d.ts","sourceRoot":"","sources":["../../../../../src/ma-v2/account/modularAccountV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AAQtB,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAGd,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAEtB,MAAM,kCAAkC,CAAC;AAG1C,MAAM,MAAM,4BAA4B,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,CAAC,IAAI,CACP,4BAA4B,CAAC,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,EAC5E,WAAW,GAAG,OAAO,GAAG,gBAAgB,CACzC,GAAG;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC,GACA,CACI;IACE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CACJ,CAAC;AAEJ,wBAAsB,sBAAsB,CAC1C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,4BAA4B,CAAC,UAAU,EAAE,OAAO,CAAC,GACxD,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { type Hex, type SignableMessage, type TypedDataDefinition, type Chain, t
|
|
|
11
11
|
*
|
|
12
12
|
* const MNEMONIC = "...":
|
|
13
13
|
*
|
|
14
|
-
* const account =
|
|
14
|
+
* const account = createModularAccountV2({ config });
|
|
15
15
|
*
|
|
16
16
|
* const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);
|
|
17
17
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type GetEntryPointFromAccount, type SendUserOperationResult, type UserOperationOverridesParameter, type SmartAccountSigner } from "@aa-sdk/core";
|
|
2
2
|
import { type Address, type Hex } from "viem";
|
|
3
3
|
import type { HookConfig, ValidationConfig } from "../common/types.js";
|
|
4
|
-
import { type
|
|
5
|
-
import { type
|
|
4
|
+
import { type ModularAccountV2Client } from "../../client/client.js";
|
|
5
|
+
import { type ModularAccountV2 } from "../../account/common/modularAccountV2Base.js";
|
|
6
6
|
export type InstallValidationParams<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
7
7
|
validationConfig: ValidationConfig;
|
|
8
8
|
selectors: Hex[];
|
|
@@ -11,28 +11,30 @@ export type InstallValidationParams<TSigner extends SmartAccountSigner = SmartAc
|
|
|
11
11
|
hookConfig: HookConfig;
|
|
12
12
|
initData: Hex;
|
|
13
13
|
}[];
|
|
14
|
-
account?:
|
|
15
|
-
} & UserOperationOverridesParameter<GetEntryPointFromAccount<
|
|
14
|
+
account?: ModularAccountV2<TSigner> | undefined;
|
|
15
|
+
} & UserOperationOverridesParameter<GetEntryPointFromAccount<ModularAccountV2<TSigner>>>;
|
|
16
16
|
export type UninstallValidationParams<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
17
17
|
moduleAddress: Address;
|
|
18
18
|
entityId: number;
|
|
19
19
|
uninstallData: Hex;
|
|
20
20
|
hookUninstallDatas: Hex[];
|
|
21
|
-
account?:
|
|
22
|
-
} & UserOperationOverridesParameter<GetEntryPointFromAccount<
|
|
21
|
+
account?: ModularAccountV2<TSigner> | undefined;
|
|
22
|
+
} & UserOperationOverridesParameter<GetEntryPointFromAccount<ModularAccountV2<TSigner>>>;
|
|
23
23
|
export type InstallValidationActions<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
24
24
|
installValidation: (args: InstallValidationParams<TSigner>) => Promise<SendUserOperationResult>;
|
|
25
|
+
encodeInstallValidation: (args: InstallValidationParams<TSigner>) => Promise<Hex>;
|
|
25
26
|
uninstallValidation: (args: UninstallValidationParams<TSigner>) => Promise<SendUserOperationResult>;
|
|
27
|
+
encodeUninstallValidation: (args: UninstallValidationParams<TSigner>) => Promise<Hex>;
|
|
26
28
|
};
|
|
27
29
|
/**
|
|
28
30
|
* Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`.
|
|
29
31
|
*
|
|
30
32
|
* @example
|
|
31
33
|
* ```ts
|
|
32
|
-
* import {
|
|
34
|
+
* import { createModularAccountV2Client, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@account-kit/smart-contracts";
|
|
33
35
|
* import { Address } from "viem";
|
|
34
36
|
*
|
|
35
|
-
* const client = (await
|
|
37
|
+
* const client = (await createModularAccountV2Client({ ... })).extend(installValidationActions);
|
|
36
38
|
* const sessionKeyAddress: Address = "0x1234";
|
|
37
39
|
* const sessionKeyEntityId: number = 1;
|
|
38
40
|
*
|
|
@@ -68,5 +70,5 @@ export type InstallValidationActions<TSigner extends SmartAccountSigner = SmartA
|
|
|
68
70
|
* @param {object} client - The client instance which provides account and sendUserOperation functionality.
|
|
69
71
|
* @returns {object} - An object containing two methods, `installValidation` and `uninstallValidation`.
|
|
70
72
|
*/
|
|
71
|
-
export declare const installValidationActions: <TSigner extends SmartAccountSigner = SmartAccountSigner>(client:
|
|
73
|
+
export declare const installValidationActions: <TSigner extends SmartAccountSigner = SmartAccountSigner>(client: ModularAccountV2Client<TSigner>) => InstallValidationActions<TSigner>;
|
|
72
74
|
//# sourceMappingURL=installValidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/install-validation/installValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOvE,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"installValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/install-validation/installValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOvE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD;IACF,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC;IACjB,KAAK,EAAE;QACL,UAAU,EAAE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