@account-kit/smart-contracts 4.6.1 → 4.8.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/ma-v2/abis/accountFactoryAbi.d.ts +492 -0
- package/dist/esm/src/ma-v2/abis/accountFactoryAbi.js +639 -0
- package/dist/esm/src/ma-v2/abis/accountFactoryAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.d.ts +954 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.js +1242 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts +991 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js +1289 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts +1001 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js +1302 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.d.ts +238 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js +88 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js.map +1 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.d.ts +41 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.js +148 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/common/types.d.ts +31 -0
- package/dist/esm/src/ma-v2/actions/common/types.js +6 -0
- package/dist/esm/src/ma-v2/actions/common/types.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/common/utils.d.ts +76 -0
- package/dist/esm/src/ma-v2/actions/common/utils.js +100 -0
- package/dist/esm/src/ma-v2/actions/common/utils.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.d.ts +71 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js +109 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js.map +1 -0
- package/dist/esm/src/ma-v2/client/client.d.ts +6 -0
- package/dist/esm/src/ma-v2/client/client.js +40 -0
- package/dist/esm/src/ma-v2/client/client.js.map +1 -0
- package/dist/esm/src/ma-v2/index.d.ts +26 -0
- package/dist/esm/src/ma-v2/index.js +24 -0
- package/dist/esm/src/ma-v2/index.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts +556 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.js +716 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.d.ts +579 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.js +56 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts +312 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js +404 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.d.ts +322 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js +14 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts +186 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js +242 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.d.ts +196 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js +25 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts +45 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js +331 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.d.ts +10 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js +16 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.d.ts +239 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js +93 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts +229 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.js +296 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.d.ts +245 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.js +42 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/utils.d.ts +91 -0
- package/dist/esm/src/ma-v2/modules/utils.js +188 -0
- package/dist/esm/src/ma-v2/modules/utils.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts +287 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.js +374 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/utils.d.ts +16 -0
- package/dist/esm/src/ma-v2/utils.js +105 -0
- package/dist/esm/src/ma-v2/utils.js.map +1 -0
- package/dist/types/src/ma-v2/abis/accountFactoryAbi.d.ts +493 -0
- package/dist/types/src/ma-v2/abis/accountFactoryAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/modularAccountAbi.d.ts +955 -0
- package/dist/types/src/ma-v2/abis/modularAccountAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts +992 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts +1002 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts +239 -0
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts +42 -0
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/common/types.d.ts +32 -0
- package/dist/types/src/ma-v2/actions/common/types.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/common/utils.d.ts +77 -0
- package/dist/types/src/ma-v2/actions/common/utils.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts +72 -0
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts.map +1 -0
- package/dist/types/src/ma-v2/client/client.d.ts +7 -0
- package/dist/types/src/ma-v2/client/client.d.ts.map +1 -0
- package/dist/types/src/ma-v2/index.d.ts +27 -0
- package/dist/types/src/ma-v2/index.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts +557 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts +580 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts +313 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/module.d.ts +323 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts +187 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/module.d.ts +197 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts +46 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/module.d.ts +11 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts +240 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts +230 -0
- package/dist/types/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/time-range-module/module.d.ts +246 -0
- package/dist/types/src/ma-v2/modules/time-range-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/utils.d.ts +92 -0
- package/dist/types/src/ma-v2/modules/utils.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts +288 -0
- package/dist/types/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/utils.d.ts +17 -0
- package/dist/types/src/ma-v2/utils.d.ts.map +1 -0
- package/package.json +10 -5
- package/src/ma-v2/abis/accountFactoryAbi.ts +638 -0
- package/src/ma-v2/abis/modularAccountAbi.ts +1241 -0
- package/src/ma-v2/abis/semiModularAccountBytecodeAbi.ts +1288 -0
- package/src/ma-v2/abis/semiModularAccountStorageAbi.ts +1301 -0
- package/src/ma-v2/account/nativeSMASigner.ts +121 -0
- package/src/ma-v2/account/semiModularAccountV2.ts +289 -0
- package/src/ma-v2/actions/common/types.ts +37 -0
- package/src/ma-v2/actions/common/utils.ts +103 -0
- package/src/ma-v2/actions/install-validation/installValidation.ts +213 -0
- package/src/ma-v2/client/client.ts +74 -0
- package/src/ma-v2/index.ts +47 -0
- package/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.ts +715 -0
- package/src/ma-v2/modules/allowlist-module/module.ts +87 -0
- package/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.ts +403 -0
- package/src/ma-v2/modules/native-token-limit-module/module.ts +21 -0
- package/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.ts +241 -0
- package/src/ma-v2/modules/paymaster-guard-module/module.ts +35 -0
- package/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.ts +330 -0
- package/src/ma-v2/modules/single-signer-validation/module.ts +24 -0
- package/src/ma-v2/modules/single-signer-validation/signer.ts +127 -0
- package/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.ts +295 -0
- package/src/ma-v2/modules/time-range-module/module.ts +63 -0
- package/src/ma-v2/modules/utils.ts +213 -0
- package/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.ts +373 -0
- package/src/ma-v2/utils.ts +138 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semiModularAccountStorageAbi.d.ts","sourceRoot":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoxC/B,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import type { SmartAccountSigner } from "@aa-sdk/core";
|
|
2
|
+
import { type Hex, type SignableMessage, type TypedDataDefinition, type Chain, type Address } from "viem";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { nativeSMASigner } from "@account-kit/smart-contracts";
|
|
9
|
+
|
|
10
|
+
* import { LocalAccountSigner } from "@aa-sdk/core";
|
|
11
|
+
*
|
|
12
|
+
* const MNEMONIC = "...":
|
|
13
|
+
*
|
|
14
|
+
* const account = createSMAV2Account({ config });
|
|
15
|
+
*
|
|
16
|
+
* const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC);
|
|
17
|
+
*
|
|
18
|
+
* const messageSigner = nativeSMASigner(signer, chain, account.address);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param {SmartAccountSigner} signer Signer to use for signing operations
|
|
22
|
+
* @param {Chain} chain Chain object for the signer
|
|
23
|
+
* @param {Address} accountAddress address of the smart account using this signer
|
|
24
|
+
* @returns {object} an object with methods for signing operations and managing signatures
|
|
25
|
+
*/
|
|
26
|
+
export declare const nativeSMASigner: (signer: SmartAccountSigner, chain: Chain, accountAddress: Address) => {
|
|
27
|
+
getDummySignature: () => Hex;
|
|
28
|
+
signUserOperationHash: (uoHash: Hex) => Promise<Hex>;
|
|
29
|
+
signMessage({ message }: {
|
|
30
|
+
message: SignableMessage;
|
|
31
|
+
}): Promise<Hex>;
|
|
32
|
+
signTypedData: <const typedData extends Record<string, unknown> | {
|
|
33
|
+
[x: string]: readonly import("viem").TypedDataParameter[];
|
|
34
|
+
[x: `string[${string}]`]: undefined;
|
|
35
|
+
[x: `function[${string}]`]: undefined;
|
|
36
|
+
[x: `address[${string}]`]: undefined;
|
|
37
|
+
[x: `uint64[${string}]`]: undefined;
|
|
38
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
39
|
+
[x: `bytes[${string}]`]: undefined;
|
|
40
|
+
[x: `uint256[${string}]`]: undefined;
|
|
41
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
42
|
+
[x: `bool[${string}]`]: undefined;
|
|
43
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
44
|
+
[x: `uint32[${string}]`]: undefined;
|
|
45
|
+
[x: `bytes2[${string}]`]: undefined;
|
|
46
|
+
[x: `bytes3[${string}]`]: undefined;
|
|
47
|
+
[x: `bytes5[${string}]`]: undefined;
|
|
48
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
49
|
+
[x: `bytes11[${string}]`]: undefined;
|
|
50
|
+
[x: `bytes7[${string}]`]: undefined;
|
|
51
|
+
[x: `bytes9[${string}]`]: undefined;
|
|
52
|
+
[x: `bytes27[${string}]`]: undefined;
|
|
53
|
+
[x: `bytes22[${string}]`]: undefined;
|
|
54
|
+
[x: `bytes8[${string}]`]: undefined;
|
|
55
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
56
|
+
[x: `bytes12[${string}]`]: undefined;
|
|
57
|
+
[x: `bytes13[${string}]`]: undefined;
|
|
58
|
+
[x: `bytes14[${string}]`]: undefined;
|
|
59
|
+
[x: `bytes15[${string}]`]: undefined;
|
|
60
|
+
[x: `bytes16[${string}]`]: undefined;
|
|
61
|
+
[x: `bytes17[${string}]`]: undefined;
|
|
62
|
+
[x: `bytes18[${string}]`]: undefined;
|
|
63
|
+
[x: `bytes19[${string}]`]: undefined;
|
|
64
|
+
[x: `bytes20[${string}]`]: undefined;
|
|
65
|
+
[x: `bytes21[${string}]`]: undefined;
|
|
66
|
+
[x: `bytes23[${string}]`]: undefined;
|
|
67
|
+
[x: `bytes24[${string}]`]: undefined;
|
|
68
|
+
[x: `bytes25[${string}]`]: undefined;
|
|
69
|
+
[x: `bytes26[${string}]`]: undefined;
|
|
70
|
+
[x: `bytes28[${string}]`]: undefined;
|
|
71
|
+
[x: `bytes29[${string}]`]: undefined;
|
|
72
|
+
[x: `bytes30[${string}]`]: undefined;
|
|
73
|
+
[x: `bytes31[${string}]`]: undefined;
|
|
74
|
+
[x: `int[${string}]`]: undefined;
|
|
75
|
+
[x: `int8[${string}]`]: undefined;
|
|
76
|
+
[x: `int16[${string}]`]: undefined;
|
|
77
|
+
[x: `int24[${string}]`]: undefined;
|
|
78
|
+
[x: `int32[${string}]`]: undefined;
|
|
79
|
+
[x: `int40[${string}]`]: undefined;
|
|
80
|
+
[x: `int48[${string}]`]: undefined;
|
|
81
|
+
[x: `int56[${string}]`]: undefined;
|
|
82
|
+
[x: `int64[${string}]`]: undefined;
|
|
83
|
+
[x: `int72[${string}]`]: undefined;
|
|
84
|
+
[x: `int80[${string}]`]: undefined;
|
|
85
|
+
[x: `int88[${string}]`]: undefined;
|
|
86
|
+
[x: `int96[${string}]`]: undefined;
|
|
87
|
+
[x: `int104[${string}]`]: undefined;
|
|
88
|
+
[x: `int112[${string}]`]: undefined;
|
|
89
|
+
[x: `int120[${string}]`]: undefined;
|
|
90
|
+
[x: `int128[${string}]`]: undefined;
|
|
91
|
+
[x: `int136[${string}]`]: undefined;
|
|
92
|
+
[x: `int144[${string}]`]: undefined;
|
|
93
|
+
[x: `int152[${string}]`]: undefined;
|
|
94
|
+
[x: `int160[${string}]`]: undefined;
|
|
95
|
+
[x: `int168[${string}]`]: undefined;
|
|
96
|
+
[x: `int176[${string}]`]: undefined;
|
|
97
|
+
[x: `int184[${string}]`]: undefined;
|
|
98
|
+
[x: `int192[${string}]`]: undefined;
|
|
99
|
+
[x: `int200[${string}]`]: undefined;
|
|
100
|
+
[x: `int208[${string}]`]: undefined;
|
|
101
|
+
[x: `int216[${string}]`]: undefined;
|
|
102
|
+
[x: `int224[${string}]`]: undefined;
|
|
103
|
+
[x: `int232[${string}]`]: undefined;
|
|
104
|
+
[x: `int240[${string}]`]: undefined;
|
|
105
|
+
[x: `int248[${string}]`]: undefined;
|
|
106
|
+
[x: `int256[${string}]`]: undefined;
|
|
107
|
+
[x: `uint[${string}]`]: undefined;
|
|
108
|
+
[x: `uint8[${string}]`]: undefined;
|
|
109
|
+
[x: `uint16[${string}]`]: undefined;
|
|
110
|
+
[x: `uint24[${string}]`]: undefined;
|
|
111
|
+
[x: `uint40[${string}]`]: undefined;
|
|
112
|
+
[x: `uint48[${string}]`]: undefined;
|
|
113
|
+
[x: `uint56[${string}]`]: undefined;
|
|
114
|
+
[x: `uint72[${string}]`]: undefined;
|
|
115
|
+
[x: `uint80[${string}]`]: undefined;
|
|
116
|
+
[x: `uint88[${string}]`]: undefined;
|
|
117
|
+
[x: `uint96[${string}]`]: undefined;
|
|
118
|
+
[x: `uint104[${string}]`]: undefined;
|
|
119
|
+
[x: `uint112[${string}]`]: undefined;
|
|
120
|
+
[x: `uint120[${string}]`]: undefined;
|
|
121
|
+
[x: `uint128[${string}]`]: undefined;
|
|
122
|
+
[x: `uint136[${string}]`]: undefined;
|
|
123
|
+
[x: `uint144[${string}]`]: undefined;
|
|
124
|
+
[x: `uint152[${string}]`]: undefined;
|
|
125
|
+
[x: `uint160[${string}]`]: undefined;
|
|
126
|
+
[x: `uint168[${string}]`]: undefined;
|
|
127
|
+
[x: `uint176[${string}]`]: undefined;
|
|
128
|
+
[x: `uint184[${string}]`]: undefined;
|
|
129
|
+
[x: `uint192[${string}]`]: undefined;
|
|
130
|
+
[x: `uint200[${string}]`]: undefined;
|
|
131
|
+
[x: `uint208[${string}]`]: undefined;
|
|
132
|
+
[x: `uint216[${string}]`]: undefined;
|
|
133
|
+
[x: `uint224[${string}]`]: undefined;
|
|
134
|
+
[x: `uint232[${string}]`]: undefined;
|
|
135
|
+
[x: `uint240[${string}]`]: undefined;
|
|
136
|
+
[x: `uint248[${string}]`]: undefined;
|
|
137
|
+
string?: undefined;
|
|
138
|
+
address?: undefined;
|
|
139
|
+
uint64?: undefined;
|
|
140
|
+
bytes32?: undefined;
|
|
141
|
+
bytes?: undefined;
|
|
142
|
+
uint256?: undefined;
|
|
143
|
+
bytes4?: undefined;
|
|
144
|
+
bool?: undefined;
|
|
145
|
+
bytes1?: undefined;
|
|
146
|
+
uint32?: undefined;
|
|
147
|
+
bytes2?: undefined;
|
|
148
|
+
bytes3?: undefined;
|
|
149
|
+
bytes5?: undefined;
|
|
150
|
+
bytes6?: undefined;
|
|
151
|
+
bytes11?: undefined;
|
|
152
|
+
bytes7?: undefined;
|
|
153
|
+
bytes9?: undefined;
|
|
154
|
+
bytes27?: undefined;
|
|
155
|
+
bytes22?: undefined;
|
|
156
|
+
bytes8?: undefined;
|
|
157
|
+
bytes10?: undefined;
|
|
158
|
+
bytes12?: undefined;
|
|
159
|
+
bytes13?: undefined;
|
|
160
|
+
bytes14?: undefined;
|
|
161
|
+
bytes15?: undefined;
|
|
162
|
+
bytes16?: undefined;
|
|
163
|
+
bytes17?: undefined;
|
|
164
|
+
bytes18?: undefined;
|
|
165
|
+
bytes19?: undefined;
|
|
166
|
+
bytes20?: undefined;
|
|
167
|
+
bytes21?: undefined;
|
|
168
|
+
bytes23?: undefined;
|
|
169
|
+
bytes24?: undefined;
|
|
170
|
+
bytes25?: undefined;
|
|
171
|
+
bytes26?: undefined;
|
|
172
|
+
bytes28?: undefined;
|
|
173
|
+
bytes29?: undefined;
|
|
174
|
+
bytes30?: undefined;
|
|
175
|
+
bytes31?: undefined;
|
|
176
|
+
int8?: undefined;
|
|
177
|
+
int16?: undefined;
|
|
178
|
+
int24?: undefined;
|
|
179
|
+
int32?: undefined;
|
|
180
|
+
int40?: undefined;
|
|
181
|
+
int48?: undefined;
|
|
182
|
+
int56?: undefined;
|
|
183
|
+
int64?: undefined;
|
|
184
|
+
int72?: undefined;
|
|
185
|
+
int80?: undefined;
|
|
186
|
+
int88?: undefined;
|
|
187
|
+
int96?: undefined;
|
|
188
|
+
int104?: undefined;
|
|
189
|
+
int112?: undefined;
|
|
190
|
+
int120?: undefined;
|
|
191
|
+
int128?: undefined;
|
|
192
|
+
int136?: undefined;
|
|
193
|
+
int144?: undefined;
|
|
194
|
+
int152?: undefined;
|
|
195
|
+
int160?: undefined;
|
|
196
|
+
int168?: undefined;
|
|
197
|
+
int176?: undefined;
|
|
198
|
+
int184?: undefined;
|
|
199
|
+
int192?: undefined;
|
|
200
|
+
int200?: undefined;
|
|
201
|
+
int208?: undefined;
|
|
202
|
+
int216?: undefined;
|
|
203
|
+
int224?: undefined;
|
|
204
|
+
int232?: undefined;
|
|
205
|
+
int240?: undefined;
|
|
206
|
+
int248?: undefined;
|
|
207
|
+
int256?: undefined;
|
|
208
|
+
uint8?: undefined;
|
|
209
|
+
uint16?: undefined;
|
|
210
|
+
uint24?: undefined;
|
|
211
|
+
uint40?: undefined;
|
|
212
|
+
uint48?: undefined;
|
|
213
|
+
uint56?: undefined;
|
|
214
|
+
uint72?: undefined;
|
|
215
|
+
uint80?: undefined;
|
|
216
|
+
uint88?: undefined;
|
|
217
|
+
uint96?: undefined;
|
|
218
|
+
uint104?: undefined;
|
|
219
|
+
uint112?: undefined;
|
|
220
|
+
uint120?: undefined;
|
|
221
|
+
uint128?: undefined;
|
|
222
|
+
uint136?: undefined;
|
|
223
|
+
uint144?: undefined;
|
|
224
|
+
uint152?: undefined;
|
|
225
|
+
uint160?: undefined;
|
|
226
|
+
uint168?: undefined;
|
|
227
|
+
uint176?: undefined;
|
|
228
|
+
uint184?: undefined;
|
|
229
|
+
uint192?: undefined;
|
|
230
|
+
uint200?: undefined;
|
|
231
|
+
uint208?: undefined;
|
|
232
|
+
uint216?: undefined;
|
|
233
|
+
uint224?: undefined;
|
|
234
|
+
uint232?: undefined;
|
|
235
|
+
uint240?: undefined;
|
|
236
|
+
uint248?: undefined;
|
|
237
|
+
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
|
|
238
|
+
};
|
|
239
|
+
//# sourceMappingURL=nativeSMASigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativeSMASigner.d.ts","sourceRoot":"","sources":["../../../../../src/ma-v2/account/nativeSMASigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,MAAM,CAAC;AAOd;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,eAAe,WAClB,kBAAkB,SACnB,KAAK,kBACI,OAAO;6BAGE,GAAG;oCAUM,GAAG,KAAG,QAAQ,GAAG,CAAC;;iBAUR,eAAe;QAAK,QAAQ,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oJA4BvE,QAAQ,GAAG,CAAC;CA0BlB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { EntryPointDef, SmartAccountSigner, SmartContractAccountWithSigner, ToSmartContractAccountParams } from "@aa-sdk/core";
|
|
2
|
+
import { type Address, type Chain, type Hex, type Transport } from "viem";
|
|
3
|
+
export type SignerEntity = {
|
|
4
|
+
isGlobalValidation: boolean;
|
|
5
|
+
entityId: number;
|
|
6
|
+
};
|
|
7
|
+
export type ExecutionDataView = {
|
|
8
|
+
module: Address;
|
|
9
|
+
skipRuntimeValidation: boolean;
|
|
10
|
+
allowGlobalValidation: boolean;
|
|
11
|
+
executionHooks: readonly Hex[];
|
|
12
|
+
};
|
|
13
|
+
export type ValidationDataView = {
|
|
14
|
+
validationHooks: readonly Hex[];
|
|
15
|
+
executionHooks: readonly Hex[];
|
|
16
|
+
selectors: readonly Hex[];
|
|
17
|
+
validationFlags: number;
|
|
18
|
+
};
|
|
19
|
+
export type ValidationDataParams = {
|
|
20
|
+
validationModuleAddress: Address;
|
|
21
|
+
entityId?: never;
|
|
22
|
+
} | {
|
|
23
|
+
validationModuleAddress?: never;
|
|
24
|
+
entityId: number;
|
|
25
|
+
};
|
|
26
|
+
export type MAV2Account<TSigner extends SmartAccountSigner = SmartAccountSigner> = SmartContractAccountWithSigner<"MAV2Account", TSigner, "0.7.0"> & {
|
|
27
|
+
signerEntity: SignerEntity;
|
|
28
|
+
getExecutionData: (selector: Hex) => Promise<ExecutionDataView>;
|
|
29
|
+
getValidationData: (args: ValidationDataParams) => Promise<ValidationDataView>;
|
|
30
|
+
encodeCallData: (callData: Hex) => Promise<Hex>;
|
|
31
|
+
};
|
|
32
|
+
export type CreateSMAV2AccountParams<TTransport extends Transport = Transport, TSigner extends SmartAccountSigner = SmartAccountSigner> = Pick<ToSmartContractAccountParams<"MAV2Account", TTransport, Chain, "0.7.0">, "transport" | "chain" | "accountAddress"> & {
|
|
33
|
+
signer: TSigner;
|
|
34
|
+
salt?: bigint;
|
|
35
|
+
factoryAddress?: Address;
|
|
36
|
+
initCode?: Hex;
|
|
37
|
+
initialOwner?: Address;
|
|
38
|
+
entryPoint?: EntryPointDef<"0.7.0", Chain>;
|
|
39
|
+
signerEntity?: SignerEntity;
|
|
40
|
+
};
|
|
41
|
+
export declare function createSMAV2Account<TTransport extends Transport = Transport, TSigner extends SmartAccountSigner = SmartAccountSigner>(config: CreateSMAV2AccountParams<TTransport, TSigner>): Promise<MAV2Account<TSigner>>;
|
|
42
|
+
//# sourceMappingURL=semiModularAccountV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semiModularAccountV2.d.ts","sourceRoot":"","sources":["../../../../../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AO,CAAC,kBAAkB,CAAC,CAAC;IACjC,cAAc,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAClC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,4BAA4B,CAAC,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,EACvE,WAAW,GAAG,OAAO,GAAG,gBAAgB,CACzC,GAAG;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,wBAAwB,CAAC,UAAU,EAAE,OAAO,CAAC,GACpD,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
export type ModuleEntity = {
|
|
3
|
+
moduleAddress: Address;
|
|
4
|
+
entityId: number;
|
|
5
|
+
};
|
|
6
|
+
export type ValidationConfig = {
|
|
7
|
+
moduleAddress: Address;
|
|
8
|
+
entityId: number;
|
|
9
|
+
isGlobal: boolean;
|
|
10
|
+
isSignatureValidation: boolean;
|
|
11
|
+
isUserOpValidation: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare enum HookType {
|
|
14
|
+
EXECUTION = "0x00",
|
|
15
|
+
VALIDATION = "0x01"
|
|
16
|
+
}
|
|
17
|
+
export type HookConfig = {
|
|
18
|
+
address: Address;
|
|
19
|
+
entityId: number;
|
|
20
|
+
hookType: HookType;
|
|
21
|
+
hasPreHooks: boolean;
|
|
22
|
+
hasPostHooks: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type ValidationData = {
|
|
25
|
+
isGlobal: boolean;
|
|
26
|
+
isSignatureValidation: boolean;
|
|
27
|
+
isUserOpValidation: boolean;
|
|
28
|
+
validationHooks: HookConfig[];
|
|
29
|
+
executionHooks: Hex[];
|
|
30
|
+
selectors: Hex[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,QAAQ;IAClB,SAAS,SAAS;IAClB,UAAU,SAAS;CACpB;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAGF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9B,cAAc,EAAE,GAAG,EAAE,CAAC;IACtB,SAAS,EAAE,GAAG,EAAE,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
import type { ValidationConfig, HookConfig, ModuleEntity } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Serializes a validation configuration into a hexadecimal string representation. This involves converting boolean flags into bitwise representation and combining them with serialized module entity data.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { serializeValidationConfig } from "@account-kit/smart-contracts";
|
|
9
|
+
* import { Address } from "viem";
|
|
10
|
+
*
|
|
11
|
+
* const moduleAddress: Address = "0x1234";
|
|
12
|
+
* const entityId: number = 1234;
|
|
13
|
+
* const isGlobal: boolean = true;
|
|
14
|
+
* const isSignatureValidation: boolean = false;
|
|
15
|
+
* const isUserOpValidation: boolean = true;
|
|
16
|
+
*
|
|
17
|
+
* const validationConfigHex = serializeValidationConfig({
|
|
18
|
+
* moduleAddress,
|
|
19
|
+
* entityId
|
|
20
|
+
* isGlobal,
|
|
21
|
+
* isSignatureValidation,
|
|
22
|
+
* isUserOpValidation
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
* @param {ValidationConfig} config The validation configuration object containing details to serialize
|
|
26
|
+
* @returns {Hex} A hexadecimal string representing the serialized configuration
|
|
27
|
+
*/
|
|
28
|
+
export declare function serializeValidationConfig(config: ValidationConfig): Hex;
|
|
29
|
+
/**
|
|
30
|
+
* Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { type HookType, serializeHookConfig } from "@account-kit/smart-contracts";
|
|
35
|
+
* import { Address } from "viem";
|
|
36
|
+
*
|
|
37
|
+
* const moduleAddress: Address = "0x1234";
|
|
38
|
+
* const entityId: number = 1234;
|
|
39
|
+
* const hookType: HookType = HookType.Validation;
|
|
40
|
+
* const hasPostHooks: boolean = false;
|
|
41
|
+
* const hasPreHooks: boolean = true;
|
|
42
|
+
*
|
|
43
|
+
* const hookConfigHex = serializeHookConfig({
|
|
44
|
+
* moduleAddress,
|
|
45
|
+
* entityId
|
|
46
|
+
* hookType,
|
|
47
|
+
* hasPostHooks,
|
|
48
|
+
* hasPreHooks
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param {HookConfig} config The hook configuration containing address, entity ID, hook type, and post/pre hook indicators
|
|
53
|
+
* @returns {Hex} The serialized hook configuration in hexadecimal format
|
|
54
|
+
*/
|
|
55
|
+
export declare function serializeHookConfig(config: HookConfig): Hex;
|
|
56
|
+
/**
|
|
57
|
+
* Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* import { serializeModuleEntity } from "@account-kit/smart-contracts";
|
|
62
|
+
* import { Address } from "viem";
|
|
63
|
+
*
|
|
64
|
+
* const moduleAddress: Address = "0x1234";
|
|
65
|
+
* const entityId: number = 1234;
|
|
66
|
+
*
|
|
67
|
+
* const moduleEntityHex = serializeModuleEntity({
|
|
68
|
+
* moduleAddress,
|
|
69
|
+
* entityId
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @param {ModuleEntity} config The module entity configuration containing the module address and entity ID
|
|
74
|
+
* @returns {Hex} A hexadecimal string representation of the serialized module entity
|
|
75
|
+
*/
|
|
76
|
+
export declare function serializeModuleEntity(config: ModuleEntity): Hex;
|
|
77
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/ma-v2/actions/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAoB,MAAM,MAAM,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,GAAG,CAUvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,GAAG,CAW3D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAE/D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type GetEntryPointFromAccount, type SendUserOperationResult, type UserOperationOverridesParameter, type SmartAccountSigner } from "@aa-sdk/core";
|
|
2
|
+
import { type Address, type Hex } from "viem";
|
|
3
|
+
import type { HookConfig, ValidationConfig } from "../common/types.js";
|
|
4
|
+
import { type SMAV2AccountClient } from "../../client/client.js";
|
|
5
|
+
import { type MAV2Account } from "../../account/semiModularAccountV2.js";
|
|
6
|
+
export type InstallValidationParams<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
7
|
+
validationConfig: ValidationConfig;
|
|
8
|
+
selectors: Hex[];
|
|
9
|
+
installData: Hex;
|
|
10
|
+
hooks: {
|
|
11
|
+
hookConfig: HookConfig;
|
|
12
|
+
initData: Hex;
|
|
13
|
+
}[];
|
|
14
|
+
account?: MAV2Account<TSigner> | undefined;
|
|
15
|
+
} & UserOperationOverridesParameter<GetEntryPointFromAccount<MAV2Account<TSigner>>>;
|
|
16
|
+
export type UninstallValidationParams<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
17
|
+
moduleAddress: Address;
|
|
18
|
+
entityId: number;
|
|
19
|
+
uninstallData: Hex;
|
|
20
|
+
hookUninstallDatas: Hex[];
|
|
21
|
+
account?: MAV2Account<TSigner> | undefined;
|
|
22
|
+
} & UserOperationOverridesParameter<GetEntryPointFromAccount<MAV2Account<TSigner>>>;
|
|
23
|
+
export type InstallValidationActions<TSigner extends SmartAccountSigner = SmartAccountSigner> = {
|
|
24
|
+
installValidation: (args: InstallValidationParams<TSigner>) => Promise<SendUserOperationResult>;
|
|
25
|
+
uninstallValidation: (args: UninstallValidationParams<TSigner>) => Promise<SendUserOperationResult>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { createSMAV2AccountClient, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@account-kit/smart-contracts";
|
|
33
|
+
* import { Address } from "viem";
|
|
34
|
+
*
|
|
35
|
+
* const client = (await createSMAV2AccountClient({ ... })).extend(installValidationActions);
|
|
36
|
+
* const sessionKeyAddress: Address = "0x1234";
|
|
37
|
+
* const sessionKeyEntityId: number = 1;
|
|
38
|
+
*
|
|
39
|
+
* await client.installValidation({
|
|
40
|
+
* validationConfig: {
|
|
41
|
+
* moduleAddress: getDefaultSingleSignerValidationModuleAddress(
|
|
42
|
+
* client.chain
|
|
43
|
+
* ),
|
|
44
|
+
* entityId: sessionKeyEntityId,
|
|
45
|
+
* isGlobal: true,
|
|
46
|
+
* isSignatureValidation: false,
|
|
47
|
+
* isUserOpValidation: true,
|
|
48
|
+
* },
|
|
49
|
+
* selectors: [],
|
|
50
|
+
* installData: SingleSignerValidationModule.encodeOnInstallData({
|
|
51
|
+
* entityId: sessionKeyEntityId,
|
|
52
|
+
* signer: sessionKeyAddress,
|
|
53
|
+
* }),
|
|
54
|
+
* hooks: [],
|
|
55
|
+
* });
|
|
56
|
+
*
|
|
57
|
+
* await client.uninstallValidation({
|
|
58
|
+
* moduleAddress: sessionKeyAddress,
|
|
59
|
+
* entityId: sessionKeyEntityId,
|
|
60
|
+
* uninstallData: SingleSignerValidationModule.encodeOnUninstallData({
|
|
61
|
+
* entityId: sessionKeyEntityId,
|
|
62
|
+
* }),
|
|
63
|
+
* hookUninstallDatas: [],
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param {object} client - The client instance which provides account and sendUserOperation functionality.
|
|
69
|
+
* @returns {object} - An object containing two methods, `installValidation` and `uninstallValidation`.
|
|
70
|
+
*/
|
|
71
|
+
export declare const installValidationActions: <TSigner extends SmartAccountSigner = SmartAccountSigner>(client: SMAV2AccountClient<TSigner>) => InstallValidationActions<TSigner>;
|
|
72
|
+
//# sourceMappingURL=installValidation.d.ts.map
|
|
@@ -0,0 +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,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,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,UAAU,CAAC;QACvB,QAAQ,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CAC5C,GAAG,+BAA+B,CACjC,wBAAwB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAC/C,CAAC;AAEF,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD;IACF,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,kBAAkB,EAAE,GAAG,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CAC5C,GAAG,+BAA+B,CACjC,wBAAwB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAC/C,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAClC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD;IACF,iBAAiB,EAAE,CACjB,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,KACnC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,mBAAmB,EAAE,CACnB,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,KACrC,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,wBAAwB,EAAE,CACrC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAChC,wBAAwB,CAAC,OAAO,CAgGnC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SmartAccountClient, type SmartAccountSigner, type SmartAccountClientConfig } from "@aa-sdk/core";
|
|
2
|
+
import { type Chain, type Transport } from "viem";
|
|
3
|
+
import { type CreateSMAV2AccountParams, type MAV2Account } from "../account/semiModularAccountV2.js";
|
|
4
|
+
export type SMAV2AccountClient<TSigner extends SmartAccountSigner = SmartAccountSigner> = SmartAccountClient<Transport, Chain, MAV2Account<TSigner>>;
|
|
5
|
+
export type CreateSMAV2AccountClientParams<TTransport extends Transport = Transport, TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner> = CreateSMAV2AccountParams<TTransport, TSigner> & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
|
|
6
|
+
export declare function createSMAV2AccountClient<TChain extends Chain = Chain, TSigner extends SmartAccountSigner = SmartAccountSigner>(args: CreateSMAV2AccountClientParams<Transport, TChain, TSigner>): Promise<SMAV2AccountClient<TSigner>>;
|
|
7
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../src/ma-v2/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,kBAAkB,CAC5B,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,kBAAkB,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;AAE/D,MAAM,MAAM,8BAA8B,CACxC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,wBAAwB,CAAC,UAAU,EAAE,OAAO,CAAC,GAC/C,IAAI,CACF,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,EAC5C,WAAW,GAAG,SAAS,GAAG,OAAO,CAClC,CAAC;AAEJ,wBAAgB,wBAAwB,CACtC,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,IAAI,EAAE,8BAA8B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,GAC/D,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { accountFactoryAbi } from "./abis/accountFactoryAbi.js";
|
|
2
|
+
export { modularAccountAbi } from "./abis/modularAccountAbi.js";
|
|
3
|
+
export { semiModularAccountBytecodeAbi } from "./abis/semiModularAccountBytecodeAbi.js";
|
|
4
|
+
export { semiModularAccountStorageAbi } from "./abis/semiModularAccountStorageAbi.js";
|
|
5
|
+
export { nativeSMASigner } from "./account/nativeSMASigner.js";
|
|
6
|
+
export type * from "./account/semiModularAccountV2.js";
|
|
7
|
+
export { createSMAV2Account } from "./account/semiModularAccountV2.js";
|
|
8
|
+
export type { ModuleEntity, ValidationConfig, HookConfig, ValidationData, } from "./actions/common/types.js";
|
|
9
|
+
export { HookType } from "./actions/common/types.js";
|
|
10
|
+
export { serializeValidationConfig, serializeHookConfig, serializeModuleEntity, } from "./actions/common/utils.js";
|
|
11
|
+
export type * from "./actions/install-validation/installValidation.js";
|
|
12
|
+
export { installValidationActions } from "./actions/install-validation/installValidation.js";
|
|
13
|
+
export type * from "./client/client.js";
|
|
14
|
+
export { createSMAV2AccountClient } from "./client/client.js";
|
|
15
|
+
export { getDefaultAllowlistModuleAddress, getDefaultNativeTokenLimitModuleAddress, getDefaultPaymasterGuardModuleAddress, getDefaultSingleSignerValidationModuleAddress, getDefaultTimeRangeModuleAddress, getDefaultWebauthnValidationModuleAddress, } from "./modules/utils.js";
|
|
16
|
+
export { allowlistModuleAbi } from "./modules/allowlist-module/abis/allowlistModuleAbi.js";
|
|
17
|
+
export { AllowlistModule } from "./modules/allowlist-module/module.js";
|
|
18
|
+
export { nativeTokenLimitModuleAbi } from "./modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js";
|
|
19
|
+
export { NativeTokenLimitModule } from "./modules/native-token-limit-module/module.js";
|
|
20
|
+
export { paymasterGuardModuleAbi } from "./modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js";
|
|
21
|
+
export { PaymasterGuardModule } from "./modules/paymaster-guard-module/module.js";
|
|
22
|
+
export { singleSignerValidationModuleAbi } from "./modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js";
|
|
23
|
+
export { SingleSignerValidationModule } from "./modules/single-signer-validation/module.js";
|
|
24
|
+
export { timeRangeModuleAbi } from "./modules/time-range-module/abis/timeRangeModuleAbi.js";
|
|
25
|
+
export { TimeRangeModule } from "./modules/time-range-module/module.js";
|
|
26
|
+
export { webauthnValidationModuleAbi } from "./modules/webauthn-validation/abis/webauthnValidationAbi.js";
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ma-v2/index.ts"],"names":[],"mappings":"AACA,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;AAC/D,mBAAmB,mCAAmC,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAA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