@account-kit/smart-contracts 4.35.0 → 4.36.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.
Files changed (186) hide show
  1. package/dist/esm/plugindefs/session-key/config.js.map +1 -1
  2. package/dist/esm/src/light-account/accounts/account.js.map +1 -1
  3. package/dist/esm/src/light-account/accounts/base.js.map +1 -1
  4. package/dist/esm/src/light-account/accounts/multiOwner.js.map +1 -1
  5. package/dist/esm/src/light-account/accounts/predictAddress.js.map +1 -1
  6. package/dist/esm/src/light-account/actions/transferOwnership.d.ts +1 -1
  7. package/dist/esm/src/light-account/actions/transferOwnership.js.map +1 -1
  8. package/dist/esm/src/light-account/actions/updateOwners.js.map +1 -1
  9. package/dist/esm/src/light-account/clients/alchemyClient.js.map +1 -1
  10. package/dist/esm/src/light-account/clients/client.js.map +1 -1
  11. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
  12. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js.map +1 -1
  13. package/dist/esm/src/light-account/decorators/lightAccount.js.map +1 -1
  14. package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js.map +1 -1
  15. package/dist/esm/src/light-account/types.js.map +1 -1
  16. package/dist/esm/src/light-account/utils.d.ts +1 -1
  17. package/dist/esm/src/light-account/utils.js.map +1 -1
  18. package/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js.map +1 -1
  19. package/dist/esm/src/ma-v2/account/modularAccountV2.js.map +1 -1
  20. package/dist/esm/src/ma-v2/account/nativeSMASigner.d.ts +2 -207
  21. package/dist/esm/src/ma-v2/account/nativeSMASigner.js +7 -4
  22. package/dist/esm/src/ma-v2/account/nativeSMASigner.js.map +1 -1
  23. package/dist/esm/src/ma-v2/account/predictAddress.js.map +1 -1
  24. package/dist/esm/src/ma-v2/actions/deferralActions.js.map +1 -1
  25. package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js.map +1 -1
  26. package/dist/esm/src/ma-v2/client/client.js.map +1 -1
  27. package/dist/esm/src/ma-v2/modules/allowlist-module/module.js.map +1 -1
  28. package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js.map +1 -1
  29. package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js.map +1 -1
  30. package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js.map +1 -1
  31. package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.d.ts +2 -207
  32. package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js +7 -4
  33. package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js.map +1 -1
  34. package/dist/esm/src/ma-v2/modules/time-range-module/module.js.map +1 -1
  35. package/dist/esm/src/ma-v2/modules/utils.js.map +1 -1
  36. package/dist/esm/src/ma-v2/modules/webauthn-validation/module.js.map +1 -1
  37. package/dist/esm/src/ma-v2/permissionBuilder.js.map +1 -1
  38. package/dist/esm/src/ma-v2/permissionBuilderErrors.js +1 -1
  39. package/dist/esm/src/ma-v2/permissionBuilderErrors.js.map +1 -1
  40. package/dist/esm/src/ma-v2/utils.js.map +1 -1
  41. package/dist/esm/src/msca/account/multiOwnerAccount.js.map +1 -1
  42. package/dist/esm/src/msca/account/multisigAccount.d.ts +1 -1
  43. package/dist/esm/src/msca/account/multisigAccount.js.map +1 -1
  44. package/dist/esm/src/msca/account-loupe/decorator.js.map +1 -1
  45. package/dist/esm/src/msca/account-loupe/types.js.map +1 -1
  46. package/dist/esm/src/msca/client/alchemyClient.js.map +1 -1
  47. package/dist/esm/src/msca/client/client.js.map +1 -1
  48. package/dist/esm/src/msca/client/multiSigAlchemyClient.js.map +1 -1
  49. package/dist/esm/src/msca/plugin-manager/decorator.js.map +1 -1
  50. package/dist/esm/src/msca/plugin-manager/installPlugin.js.map +1 -1
  51. package/dist/esm/src/msca/plugin-manager/uninstallPlugin.js.map +1 -1
  52. package/dist/esm/src/msca/plugins/multi-owner/extension.js.map +1 -1
  53. package/dist/esm/src/msca/plugins/multi-owner/plugin.js.map +1 -1
  54. package/dist/esm/src/msca/plugins/multi-owner/signer.d.ts +3 -208
  55. package/dist/esm/src/msca/plugins/multi-owner/signer.js.map +1 -1
  56. package/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js.map +1 -1
  57. package/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js.map +1 -1
  58. package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +1 -1
  59. package/dist/esm/src/msca/plugins/multisig/actions/readOwners.js.map +1 -1
  60. package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +1 -1
  61. package/dist/esm/src/msca/plugins/multisig/extension.js.map +1 -1
  62. package/dist/esm/src/msca/plugins/multisig/middleware.js.map +1 -1
  63. package/dist/esm/src/msca/plugins/multisig/plugin.js.map +1 -1
  64. package/dist/esm/src/msca/plugins/multisig/signer.d.ts +3 -208
  65. package/dist/esm/src/msca/plugins/multisig/signer.js.map +1 -1
  66. package/dist/esm/src/msca/plugins/multisig/types.js.map +1 -1
  67. package/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js.map +1 -1
  68. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.d.ts +1 -1
  69. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js.map +1 -1
  70. package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +1 -1
  71. package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js.map +1 -1
  72. package/dist/esm/src/msca/plugins/session-key/extension.js.map +1 -1
  73. package/dist/esm/src/msca/plugins/session-key/permissions.js.map +1 -1
  74. package/dist/esm/src/msca/plugins/session-key/plugin.js.map +1 -1
  75. package/dist/esm/src/msca/plugins/session-key/signer.d.ts +4 -209
  76. package/dist/esm/src/msca/plugins/session-key/signer.js.map +1 -1
  77. package/dist/esm/src/msca/plugins/session-key/utils.js.map +1 -1
  78. package/dist/esm/src/msca/plugins/types.js.map +1 -1
  79. package/dist/esm/src/msca/utils.js.map +1 -1
  80. package/dist/types/src/light-account/accounts/account.d.ts.map +1 -1
  81. package/dist/types/src/light-account/accounts/base.d.ts.map +1 -1
  82. package/dist/types/src/light-account/accounts/multiOwner.d.ts.map +1 -1
  83. package/dist/types/src/light-account/actions/transferOwnership.d.ts +1 -1
  84. package/dist/types/src/light-account/actions/transferOwnership.d.ts.map +1 -1
  85. package/dist/types/src/light-account/actions/updateOwners.d.ts.map +1 -1
  86. package/dist/types/src/light-account/types.d.ts.map +1 -1
  87. package/dist/types/src/light-account/utils.d.ts +1 -1
  88. package/dist/types/src/light-account/utils.d.ts.map +1 -1
  89. package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts +2 -207
  90. package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts.map +1 -1
  91. package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts.map +1 -1
  92. package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts +2 -207
  93. package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts.map +1 -1
  94. package/dist/types/src/ma-v2/modules/utils.d.ts.map +1 -1
  95. package/dist/types/src/ma-v2/permissionBuilderErrors.d.ts.map +1 -1
  96. package/dist/types/src/ma-v2/utils.d.ts.map +1 -1
  97. package/dist/types/src/msca/account/multisigAccount.d.ts +1 -1
  98. package/dist/types/src/msca/account/multisigAccount.d.ts.map +1 -1
  99. package/dist/types/src/msca/plugin-manager/decorator.d.ts.map +1 -1
  100. package/dist/types/src/msca/plugin-manager/installPlugin.d.ts.map +1 -1
  101. package/dist/types/src/msca/plugin-manager/uninstallPlugin.d.ts.map +1 -1
  102. package/dist/types/src/msca/plugins/multi-owner/plugin.d.ts.map +1 -1
  103. package/dist/types/src/msca/plugins/multi-owner/signer.d.ts +3 -208
  104. package/dist/types/src/msca/plugins/multi-owner/signer.d.ts.map +1 -1
  105. package/dist/types/src/msca/plugins/multisig/actions/proposeUserOperation.d.ts.map +1 -1
  106. package/dist/types/src/msca/plugins/multisig/plugin.d.ts.map +1 -1
  107. package/dist/types/src/msca/plugins/multisig/signer.d.ts +3 -208
  108. package/dist/types/src/msca/plugins/multisig/signer.d.ts.map +1 -1
  109. package/dist/types/src/msca/plugins/multisig/types.d.ts.map +1 -1
  110. package/dist/types/src/msca/plugins/multisig/utils/formatSignatures.d.ts.map +1 -1
  111. package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts +1 -1
  112. package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts.map +1 -1
  113. package/dist/types/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +1 -1
  114. package/dist/types/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts.map +1 -1
  115. package/dist/types/src/msca/plugins/session-key/extension.d.ts.map +1 -1
  116. package/dist/types/src/msca/plugins/session-key/plugin.d.ts.map +1 -1
  117. package/dist/types/src/msca/plugins/session-key/signer.d.ts +4 -209
  118. package/dist/types/src/msca/plugins/session-key/signer.d.ts.map +1 -1
  119. package/dist/types/src/msca/utils.d.ts.map +1 -1
  120. package/package.json +7 -9
  121. package/plugindefs/session-key/config.ts +1 -1
  122. package/src/light-account/accounts/account.ts +7 -5
  123. package/src/light-account/accounts/base.ts +18 -15
  124. package/src/light-account/accounts/multiOwner.ts +9 -6
  125. package/src/light-account/accounts/predictAddress.ts +5 -5
  126. package/src/light-account/actions/transferOwnership.ts +5 -4
  127. package/src/light-account/actions/updateOwners.ts +6 -5
  128. package/src/light-account/clients/alchemyClient.ts +3 -3
  129. package/src/light-account/clients/client.ts +6 -6
  130. package/src/light-account/clients/multiOwnerAlchemyClient.ts +3 -3
  131. package/src/light-account/clients/multiOwnerLightAccount.ts +7 -7
  132. package/src/light-account/decorators/lightAccount.ts +4 -4
  133. package/src/light-account/decorators/multiOwnerLightAccount.ts +4 -4
  134. package/src/light-account/types.ts +3 -2
  135. package/src/light-account/utils.ts +10 -10
  136. package/src/ma-v2/account/common/modularAccountV2Base.ts +8 -8
  137. package/src/ma-v2/account/modularAccountV2.ts +4 -4
  138. package/src/ma-v2/account/nativeSMASigner.ts +16 -13
  139. package/src/ma-v2/account/predictAddress.ts +13 -13
  140. package/src/ma-v2/actions/deferralActions.ts +7 -7
  141. package/src/ma-v2/actions/install-validation/installValidation.ts +14 -14
  142. package/src/ma-v2/client/client.ts +8 -8
  143. package/src/ma-v2/modules/allowlist-module/module.ts +5 -5
  144. package/src/ma-v2/modules/native-token-limit-module/module.ts +1 -1
  145. package/src/ma-v2/modules/paymaster-guard-module/module.ts +2 -2
  146. package/src/ma-v2/modules/single-signer-validation/module.ts +2 -2
  147. package/src/ma-v2/modules/single-signer-validation/signer.ts +14 -11
  148. package/src/ma-v2/modules/time-range-module/module.ts +6 -6
  149. package/src/ma-v2/modules/utils.ts +4 -4
  150. package/src/ma-v2/modules/webauthn-validation/module.ts +2 -2
  151. package/src/ma-v2/permissionBuilder.ts +14 -14
  152. package/src/ma-v2/permissionBuilderErrors.ts +9 -7
  153. package/src/ma-v2/utils.ts +4 -4
  154. package/src/msca/account/multiOwnerAccount.ts +5 -5
  155. package/src/msca/account/multisigAccount.ts +6 -6
  156. package/src/msca/account-loupe/decorator.ts +11 -11
  157. package/src/msca/account-loupe/types.ts +1 -1
  158. package/src/msca/client/alchemyClient.ts +4 -4
  159. package/src/msca/client/client.ts +12 -12
  160. package/src/msca/client/multiSigAlchemyClient.ts +4 -4
  161. package/src/msca/plugin-manager/decorator.ts +6 -5
  162. package/src/msca/plugin-manager/installPlugin.ts +8 -7
  163. package/src/msca/plugin-manager/uninstallPlugin.ts +6 -5
  164. package/src/msca/plugins/multi-owner/extension.ts +10 -10
  165. package/src/msca/plugins/multi-owner/plugin.ts +21 -19
  166. package/src/msca/plugins/multi-owner/signer.ts +4 -4
  167. package/src/msca/plugins/multisig/actions/getThreshold.ts +3 -3
  168. package/src/msca/plugins/multisig/actions/isOwnerOf.ts +2 -2
  169. package/src/msca/plugins/multisig/actions/proposeUserOperation.ts +4 -3
  170. package/src/msca/plugins/multisig/actions/readOwners.ts +3 -3
  171. package/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts +5 -5
  172. package/src/msca/plugins/multisig/extension.ts +16 -16
  173. package/src/msca/plugins/multisig/middleware.ts +2 -2
  174. package/src/msca/plugins/multisig/plugin.ts +21 -19
  175. package/src/msca/plugins/multisig/signer.ts +5 -5
  176. package/src/msca/plugins/multisig/types.ts +4 -2
  177. package/src/msca/plugins/multisig/utils/formatSignatures.ts +1 -1
  178. package/src/msca/plugins/multisig/utils/getSignerType.ts +2 -2
  179. package/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts +7 -6
  180. package/src/msca/plugins/session-key/extension.ts +16 -14
  181. package/src/msca/plugins/session-key/permissions.ts +7 -7
  182. package/src/msca/plugins/session-key/plugin.ts +30 -28
  183. package/src/msca/plugins/session-key/signer.ts +5 -5
  184. package/src/msca/plugins/session-key/utils.ts +4 -4
  185. package/src/msca/plugins/types.ts +1 -1
  186. package/src/msca/utils.ts +11 -11
@@ -17,14 +17,14 @@ import type {
17
17
  export type AccountLoupeActions<
18
18
  TAccount extends SmartContractAccount | undefined =
19
19
  | SmartContractAccount
20
- | undefined
20
+ | undefined,
21
21
  > = {
22
22
  /// @notice Gets the validation functions and plugin address for a selector
23
23
  /// @dev If the selector is a native function, the plugin address will be the address of the account
24
24
  /// @param selector The selector to get the configuration for
25
25
  /// @return The configuration for this selector
26
26
  getExecutionFunctionConfig(
27
- args: { selector: FunctionReference } & GetAccountParameter<TAccount>
27
+ args: { selector: FunctionReference } & GetAccountParameter<TAccount>,
28
28
  ): Promise<ExecutionFunctionConfig>;
29
29
 
30
30
  /// @notice Gets the pre and post execution hooks for a selector
@@ -33,7 +33,7 @@ export type AccountLoupeActions<
33
33
  getExecutionHooks(
34
34
  args: {
35
35
  selector: FunctionReference;
36
- } & GetAccountParameter<TAccount>
36
+ } & GetAccountParameter<TAccount>,
37
37
  ): Promise<ReadonlyArray<ExecutionHooks>>;
38
38
 
39
39
  /// @notice Gets the pre user op and runtime validation hooks associated with a selector
@@ -41,13 +41,13 @@ export type AccountLoupeActions<
41
41
  /// @return preUserOpValidationHooks The pre user op validation hooks for this selector
42
42
  /// @return preRuntimeValidationHooks The pre runtime validation hooks for this selector
43
43
  getPreValidationHooks(
44
- args: { selector: Hash } & GetAccountParameter<TAccount>
44
+ args: { selector: Hash } & GetAccountParameter<TAccount>,
45
45
  ): Promise<Readonly<PreValidationHooks>>;
46
46
 
47
47
  /// @notice Gets an array of all installed plugins
48
48
  /// @return The addresses of all installed plugins
49
49
  getInstalledPlugins(
50
- args: GetAccountParameter<TAccount>
50
+ args: GetAccountParameter<TAccount>,
51
51
  ): Promise<ReadonlyArray<Address>>;
52
52
  };
53
53
 
@@ -71,9 +71,9 @@ export const accountLoupeActions: <
71
71
  TChain extends Chain | undefined = Chain | undefined,
72
72
  TAccount extends SmartContractAccount | undefined =
73
73
  | SmartContractAccount
74
- | undefined
74
+ | undefined,
75
75
  >(
76
- client: Client<TTransport, TChain, TAccount>
76
+ client: Client<TTransport, TChain, TAccount>,
77
77
  ) => AccountLoupeActions<TAccount> = (client) => ({
78
78
  getExecutionFunctionConfig: async ({
79
79
  selector,
@@ -87,7 +87,7 @@ export const accountLoupeActions: <
87
87
  throw new IncompatibleClientError(
88
88
  "SmartAccountClient",
89
89
  "getExecutionFunctionConfig",
90
- client
90
+ client,
91
91
  );
92
92
  }
93
93
 
@@ -108,7 +108,7 @@ export const accountLoupeActions: <
108
108
  throw new IncompatibleClientError(
109
109
  "SmartAccountClient",
110
110
  "getExecutionHooks",
111
- client
111
+ client,
112
112
  );
113
113
  }
114
114
 
@@ -129,7 +129,7 @@ export const accountLoupeActions: <
129
129
  throw new IncompatibleClientError(
130
130
  "SmartAccountClient",
131
131
  "getPreValidationHooks",
132
- client
132
+ client,
133
133
  );
134
134
  }
135
135
 
@@ -150,7 +150,7 @@ export const accountLoupeActions: <
150
150
  throw new IncompatibleClientError(
151
151
  "SmartAccountClient",
152
152
  "getInstalledPlugins",
153
- client
153
+ client,
154
154
  );
155
155
  }
156
156
 
@@ -18,5 +18,5 @@ export type ExecutionHooks = {
18
18
 
19
19
  export type PreValidationHooks = [
20
20
  readonly FunctionReference[],
21
- readonly FunctionReference[]
21
+ readonly FunctionReference[],
22
22
  ];
@@ -15,7 +15,7 @@ import {
15
15
  import { type Chain, type HttpTransport } from "viem";
16
16
 
17
17
  export type AlchemyModularAccountClientConfig<
18
- TSigner extends SmartAccountSigner = SmartAccountSigner
18
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
19
19
  > = Omit<
20
20
  CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>,
21
21
  "transport"
@@ -26,9 +26,9 @@ export type AlchemyModularAccountClientConfig<
26
26
  >;
27
27
 
28
28
  export function createModularAccountAlchemyClient<
29
- TSigner extends SmartAccountSigner = SmartAccountSigner
29
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
30
30
  >(
31
- params: AlchemyModularAccountClientConfig<TSigner>
31
+ params: AlchemyModularAccountClientConfig<TSigner>,
32
32
  ): Promise<
33
33
  AlchemySmartAccountClient<
34
34
  Chain | undefined,
@@ -60,7 +60,7 @@ export function createModularAccountAlchemyClient<
60
60
  * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions
61
61
  */
62
62
  export async function createModularAccountAlchemyClient(
63
- config: AlchemyModularAccountClientConfig
63
+ config: AlchemyModularAccountClientConfig,
64
64
  ): Promise<AlchemySmartAccountClient> {
65
65
  return createMultiOwnerModularAccountClient(config);
66
66
  }
@@ -48,7 +48,7 @@ import type { AlchemyMultisigAccountClientConfig } from "./multiSigAlchemyClient
48
48
  export type CreateMultiOwnerModularAccountClientWithoutAlchemyParams<
49
49
  TTransport extends Transport = Transport,
50
50
  TChain extends Chain | undefined = Chain | undefined,
51
- TSigner extends SmartAccountSigner = SmartAccountSigner
51
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
52
52
  > = Omit<
53
53
  CreateMultiOwnerModularAccountParams<TTransport, TSigner>,
54
54
  "transport" | "chain"
@@ -57,7 +57,7 @@ export type CreateMultiOwnerModularAccountClientWithoutAlchemyParams<
57
57
  export type CreateMultiOwnerModularAccountClientParams<
58
58
  TTransport extends Transport = Transport,
59
59
  TChain extends Chain | undefined = Chain | undefined,
60
- TSigner extends SmartAccountSigner = SmartAccountSigner
60
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
61
61
  > =
62
62
  | CreateMultiOwnerModularAccountClientWithoutAlchemyParams<
63
63
  TTransport,
@@ -69,7 +69,7 @@ export type CreateMultiOwnerModularAccountClientParams<
69
69
  export type CreateMultisigModularAccountClientWithoutAlchemyParams<
70
70
  TTransport extends Transport = Transport,
71
71
  TChain extends Chain | undefined = Chain | undefined,
72
- TSigner extends SmartAccountSigner = SmartAccountSigner
72
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
73
73
  > = Omit<
74
74
  CreateMultisigModularAccountParams<TTransport, TSigner>,
75
75
  "transport" | "chain"
@@ -79,7 +79,7 @@ export type CreateMultisigModularAccountClientWithoutAlchemyParams<
79
79
  export type CreateMultisigModularAccountClientParams<
80
80
  TTransport extends Transport = Transport,
81
81
  TChain extends Chain | undefined = Chain | undefined,
82
- TSigner extends SmartAccountSigner = SmartAccountSigner
82
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
83
83
  > =
84
84
  | CreateMultisigModularAccountClientWithoutAlchemyParams<
85
85
  TTransport,
@@ -89,11 +89,11 @@ export type CreateMultisigModularAccountClientParams<
89
89
  | AlchemyMultisigAccountClientConfig<TSigner>;
90
90
 
91
91
  export function createMultiOwnerModularAccountClient<
92
- TSigner extends SmartAccountSigner = SmartAccountSigner
92
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
93
93
  >(
94
94
  params: AlchemyModularAccountClientConfig<TSigner> & {
95
95
  transport: AlchemyTransport;
96
- }
96
+ },
97
97
  ): Promise<
98
98
  AlchemySmartAccountClient<
99
99
  Chain | undefined,
@@ -107,14 +107,14 @@ export function createMultiOwnerModularAccountClient<
107
107
  export function createMultiOwnerModularAccountClient<
108
108
  TTransport extends Transport = Transport,
109
109
  TChain extends Chain | undefined = Chain | undefined,
110
- TSigner extends SmartAccountSigner = SmartAccountSigner
110
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
111
111
  >(
112
112
  args: CreateMultiOwnerModularAccountClientParams<
113
113
  TTransport,
114
114
  TChain,
115
115
  TSigner
116
116
  > &
117
- NotType<TTransport, AlchemyTransport>
117
+ NotType<TTransport, AlchemyTransport>,
118
118
  ): Promise<
119
119
  SmartAccountClient<
120
120
  CustomTransport,
@@ -199,9 +199,9 @@ export async function createMultiOwnerModularAccountClient({
199
199
  }
200
200
 
201
201
  export function createMultisigModularAccountClient<
202
- TSigner extends SmartAccountSigner = SmartAccountSigner
202
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
203
203
  >(
204
- params: AlchemyMultisigAccountClientConfig<TSigner>
204
+ params: AlchemyMultisigAccountClientConfig<TSigner>,
205
205
  ): Promise<
206
206
  AlchemySmartAccountClient<
207
207
  Chain | undefined,
@@ -216,10 +216,10 @@ export function createMultisigModularAccountClient<
216
216
  export function createMultisigModularAccountClient<
217
217
  TTransport extends Transport = Transport,
218
218
  TChain extends Chain | undefined = Chain | undefined,
219
- TSigner extends SmartAccountSigner = SmartAccountSigner
219
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
220
220
  >(
221
221
  args: CreateMultisigModularAccountClientParams<TTransport, TChain, TSigner> &
222
- NotType<TTransport, AlchemyTransport>
222
+ NotType<TTransport, AlchemyTransport>,
223
223
  ): Promise<
224
224
  SmartAccountClient<
225
225
  CustomTransport,
@@ -19,7 +19,7 @@ import { type Chain, type HttpTransport } from "viem";
19
19
  // todo: this file seems somewhat duplicated with ./modularAccountClient.ts, but that file has some multi-owner specific fields. Is there a way to refactor these two to de-dupe?
20
20
 
21
21
  export type AlchemyMultisigAccountClientConfig<
22
- TSigner extends SmartAccountSigner = SmartAccountSigner
22
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
23
23
  > = Omit<
24
24
  CreateMultisigModularAccountParams<HttpTransport, TSigner>,
25
25
  "transport"
@@ -34,9 +34,9 @@ export type AlchemyMultisigAccountClientConfig<
34
34
  > & { transport: AlchemyTransport };
35
35
 
36
36
  export function createMultisigAccountAlchemyClient<
37
- TSigner extends SmartAccountSigner = SmartAccountSigner
37
+ TSigner extends SmartAccountSigner = SmartAccountSigner,
38
38
  >(
39
- params: AlchemyMultisigAccountClientConfig<TSigner>
39
+ params: AlchemyMultisigAccountClientConfig<TSigner>,
40
40
  ): Promise<
41
41
  AlchemySmartAccountClient<
42
42
  Chain | undefined,
@@ -72,7 +72,7 @@ export function createMultisigAccountAlchemyClient<
72
72
  * @returns {Promise<AlchemySmartAccountClient<Transport, Chain | undefined, MultisigModularAccount<SmartAccountSigner>, MultisigPluginActions<MultisigModularAccount<SmartAccountSigner>> & PluginManagerActions<MultisigModularAccount<SmartAccountSigner>> & AccountLoupeActions<MultisigModularAccount<SmartAccountSigner>>, MultisigUserOperationContext>>} A promise that resolves to an Alchemy Smart Account Client for multisig accounts with extended functionalities.
73
73
  */
74
74
  export async function createMultisigAccountAlchemyClient(
75
- config: AlchemyMultisigAccountClientConfig
75
+ config: AlchemyMultisigAccountClientConfig,
76
76
  ): Promise<
77
77
  AlchemySmartAccountClient<
78
78
  Chain | undefined,
@@ -17,13 +17,14 @@ export type PluginManagerActions<
17
17
  TAccount extends SmartContractAccount | undefined =
18
18
  | SmartContractAccount
19
19
  | undefined,
20
- TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
20
+ TEntryPointVersion extends
21
+ GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
21
22
  > = {
22
23
  installPlugin: (
23
- params: InstallPluginParams<TAccount>
24
+ params: InstallPluginParams<TAccount>,
24
25
  ) => Promise<SendUserOperationResult<TEntryPointVersion>>;
25
26
  uninstallPlugin: (
26
- params: UninstallPluginParams<TAccount>
27
+ params: UninstallPluginParams<TAccount>,
27
28
  ) => Promise<SendUserOperationResult<TEntryPointVersion>>;
28
29
  };
29
30
 
@@ -47,9 +48,9 @@ export function pluginManagerActions<
47
48
  TChain extends Chain | undefined = Chain | undefined,
48
49
  TAccount extends SmartContractAccount | undefined =
49
50
  | SmartContractAccount
50
- | undefined
51
+ | undefined,
51
52
  >(
52
- client: Client<TTransport, TChain, TAccount>
53
+ client: Client<TTransport, TChain, TAccount>,
53
54
  ): PluginManagerActions<TAccount> {
54
55
  return {
55
56
  installPlugin: async (params) => installPlugin(client, params),
@@ -30,7 +30,8 @@ export type InstallPluginParams<
30
30
  TContext extends Record<string, unknown> | undefined =
31
31
  | Record<string, unknown>
32
32
  | undefined,
33
- TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
33
+ TEntryPointVersion extends
34
+ GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
34
35
  > = {
35
36
  pluginAddress: Address;
36
37
  manifestHash?: Hash;
@@ -69,7 +70,7 @@ export async function installPlugin<
69
70
  | undefined,
70
71
  TContext extends Record<string, unknown> | undefined =
71
72
  | Record<string, unknown>
72
- | undefined
73
+ | undefined,
73
74
  >(
74
75
  client: Client<TTransport, TChain, TAccount>,
75
76
  {
@@ -77,7 +78,7 @@ export async function installPlugin<
77
78
  context,
78
79
  account = client.account,
79
80
  ...params
80
- }: InstallPluginParams<TAccount, TContext>
81
+ }: InstallPluginParams<TAccount, TContext>,
81
82
  ) {
82
83
  if (!account) {
83
84
  throw new AccountNotFoundError();
@@ -87,7 +88,7 @@ export async function installPlugin<
87
88
  throw new IncompatibleClientError(
88
89
  "SmartAccountClient",
89
90
  "installPlugin",
90
- client
91
+ client,
91
92
  );
92
93
  }
93
94
 
@@ -106,10 +107,10 @@ export async function encodeInstallPluginUserOperation<
106
107
  TChain extends Chain | undefined = Chain | undefined,
107
108
  TAccount extends SmartContractAccount | undefined =
108
109
  | SmartContractAccount
109
- | undefined
110
+ | undefined,
110
111
  >(
111
112
  client: SmartAccountClient<TTransport, TChain, TAccount>,
112
- params: Omit<InstallPluginParams, "overrides" | "account" | "context">
113
+ params: Omit<InstallPluginParams, "overrides" | "account" | "context">,
113
114
  ) {
114
115
  const pluginManifest = await client.readContract({
115
116
  abi: IPluginAbi,
@@ -124,7 +125,7 @@ export async function encodeInstallPluginUserOperation<
124
125
  abi: IPluginAbi,
125
126
  functionName: "pluginManifest",
126
127
  result: pluginManifest,
127
- })
128
+ }),
128
129
  );
129
130
  return encodeFunctionData({
130
131
  abi: IPluginManagerAbi,
@@ -26,7 +26,8 @@ export type UninstallPluginParams<
26
26
  TContext extends UserOperationContext | undefined =
27
27
  | UserOperationContext
28
28
  | undefined,
29
- TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
29
+ TEntryPointVersion extends
30
+ GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
30
31
  > = {
31
32
  pluginAddress: Address;
32
33
  config?: Hash;
@@ -43,7 +44,7 @@ export async function uninstallPlugin<
43
44
  | undefined,
44
45
  TContext extends UserOperationContext | undefined =
45
46
  | UserOperationContext
46
- | undefined
47
+ | undefined,
47
48
  >(
48
49
  client: Client<TTransport, TChain, TAccount>,
49
50
  {
@@ -51,7 +52,7 @@ export async function uninstallPlugin<
51
52
  account = client.account,
52
53
  context,
53
54
  ...params
54
- }: UninstallPluginParams<TAccount, TContext>
55
+ }: UninstallPluginParams<TAccount, TContext>,
55
56
  ) {
56
57
  if (!account) {
57
58
  throw new AccountNotFoundError();
@@ -61,7 +62,7 @@ export async function uninstallPlugin<
61
62
  throw new IncompatibleClientError(
62
63
  "SmartAccountClient",
63
64
  "uninstallPlugin",
64
- client
65
+ client,
65
66
  );
66
67
  }
67
68
 
@@ -76,7 +77,7 @@ export async function uninstallPlugin<
76
77
  }
77
78
 
78
79
  export async function encodeUninstallPluginUserOperation(
79
- params: Omit<UninstallPluginParams, "account" | "overrides" | "context">
80
+ params: Omit<UninstallPluginParams, "account" | "overrides" | "context">,
80
81
  ) {
81
82
  return encodeFunctionData({
82
83
  abi: IPluginManagerAbi,
@@ -15,20 +15,20 @@ import {
15
15
  export type MultiOwnerPluginActions<
16
16
  TAccount extends SmartContractAccount | undefined =
17
17
  | SmartContractAccount
18
- | undefined
18
+ | undefined,
19
19
  > = MultiOwnerPluginActions_<TAccount, undefined> & {
20
20
  readOwners: (
21
- params: GetPluginAddressParameter & GetAccountParameter<TAccount>
21
+ params: GetPluginAddressParameter & GetAccountParameter<TAccount>,
22
22
  ) => Promise<ReadonlyArray<Address>>;
23
23
 
24
24
  isOwnerOf: (
25
25
  params: { address: Address } & GetPluginAddressParameter &
26
- GetAccountParameter<TAccount>
26
+ GetAccountParameter<TAccount>,
27
27
  ) => Promise<boolean>;
28
28
  } & (IsUndefined<TAccount> extends false
29
29
  ? {
30
30
  readOwners: (
31
- params?: GetPluginAddressParameter & GetAccountParameter<TAccount>
31
+ params?: GetPluginAddressParameter & GetAccountParameter<TAccount>,
32
32
  ) => Promise<ReadonlyArray<Address>>;
33
33
  }
34
34
  : {});
@@ -53,21 +53,21 @@ export const multiOwnerPluginActions: <
53
53
  TChain extends Chain | undefined = Chain | undefined,
54
54
  TAccount extends SmartContractAccount | undefined =
55
55
  | SmartContractAccount
56
- | undefined
56
+ | undefined,
57
57
  >(
58
- client: Client<TTransport, TChain, TAccount>
58
+ client: Client<TTransport, TChain, TAccount>,
59
59
  ) => MultiOwnerPluginActions<TAccount> = <
60
60
  TTransport extends Transport = Transport,
61
61
  TChain extends Chain | undefined = Chain | undefined,
62
62
  TAccount extends SmartContractAccount | undefined =
63
63
  | SmartContractAccount
64
- | undefined
64
+ | undefined,
65
65
  >(
66
- client: Client<TTransport, TChain, TAccount>
66
+ client: Client<TTransport, TChain, TAccount>,
67
67
  ) => ({
68
68
  ...multiOwnerPluginActions_(client),
69
69
  async readOwners(
70
- args: GetPluginAddressParameter & GetAccountParameter<TAccount>
70
+ args: GetPluginAddressParameter & GetAccountParameter<TAccount>,
71
71
  ) {
72
72
  const account = args?.account ?? client.account;
73
73
  if (!account) {
@@ -81,7 +81,7 @@ export const multiOwnerPluginActions: <
81
81
 
82
82
  async isOwnerOf(
83
83
  args: { address: Address } & GetPluginAddressParameter &
84
- GetAccountParameter<TAccount>
84
+ GetAccountParameter<TAccount>,
85
85
  ) {
86
86
  const account = args.account ?? client.account;
87
87
  if (!account) {
@@ -38,7 +38,8 @@ type ExecutionActions<
38
38
  TContext extends UserOperationContext | undefined =
39
39
  | UserOperationContext
40
40
  | undefined,
41
- TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
41
+ TEntryPointVersion extends
42
+ GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
42
43
  > = {
43
44
  updateOwners: (
44
45
  args: Pick<
@@ -50,7 +51,7 @@ type ExecutionActions<
50
51
  > &
51
52
  UserOperationOverridesParameter<TEntryPointVersion> &
52
53
  GetAccountParameter<TAccount> &
53
- GetContextParameter<TContext>
54
+ GetContextParameter<TContext>,
54
55
  ) => Promise<SendUserOperationResult<TEntryPointVersion>>;
55
56
  };
56
57
 
@@ -69,20 +70,21 @@ type ManagementActions<
69
70
  TContext extends UserOperationContext | undefined =
70
71
  | Record<string, any>
71
72
  | undefined,
72
- TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>
73
+ TEntryPointVersion extends
74
+ GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
73
75
  > = {
74
76
  installMultiOwnerPlugin: (
75
77
  args: UserOperationOverridesParameter<TEntryPointVersion> &
76
78
  InstallMultiOwnerPluginParams &
77
79
  GetAccountParameter<TAccount> &
78
- GetContextParameter<TContext>
80
+ GetContextParameter<TContext>,
79
81
  ) => Promise<SendUserOperationResult<TEntryPointVersion>>;
80
82
  };
81
83
 
82
84
  type ReadAndEncodeActions<
83
85
  TAccount extends SmartContractAccount | undefined =
84
86
  | SmartContractAccount
85
- | undefined
87
+ | undefined,
86
88
  > = {
87
89
  encodeUpdateOwners: (
88
90
  args: Pick<
@@ -91,7 +93,7 @@ type ReadAndEncodeActions<
91
93
  "updateOwners"
92
94
  >,
93
95
  "args"
94
- >
96
+ >,
95
97
  ) => Hex;
96
98
 
97
99
  encodeEip712Domain: (
@@ -101,11 +103,11 @@ type ReadAndEncodeActions<
101
103
  "eip712Domain"
102
104
  >,
103
105
  "args"
104
- >
106
+ >,
105
107
  ) => Hex;
106
108
 
107
109
  readEip712Domain: (
108
- args: GetAccountParameter<TAccount>
110
+ args: GetAccountParameter<TAccount>,
109
111
  ) => Promise<
110
112
  ReadContractReturnType<
111
113
  typeof MultiOwnerPluginExecutionFunctionAbi,
@@ -120,7 +122,7 @@ type ReadAndEncodeActions<
120
122
  "isValidSignature"
121
123
  >,
122
124
  "args"
123
- >
125
+ >,
124
126
  ) => Hex;
125
127
 
126
128
  readIsValidSignature: (
@@ -131,7 +133,7 @@ type ReadAndEncodeActions<
131
133
  >,
132
134
  "args"
133
135
  > &
134
- GetAccountParameter<TAccount>
136
+ GetAccountParameter<TAccount>,
135
137
  ) => Promise<
136
138
  ReadContractReturnType<
137
139
  typeof MultiOwnerPluginExecutionFunctionAbi,
@@ -146,7 +148,7 @@ export type MultiOwnerPluginActions<
146
148
  | undefined,
147
149
  TContext extends UserOperationContext | undefined =
148
150
  | UserOperationContext
149
- | undefined
151
+ | undefined,
150
152
  > = ExecutionActions<TAccount, TContext> &
151
153
  ManagementActions<TAccount, TContext> &
152
154
  ReadAndEncodeActions<TAccount>;
@@ -177,7 +179,7 @@ export const MultiOwnerPlugin: Plugin<typeof MultiOwnerPluginAbi> = {
177
179
  },
178
180
  getContract: <C extends Client>(
179
181
  client: C,
180
- address?: Address
182
+ address?: Address,
181
183
  ): GetContractReturnType<
182
184
  typeof MultiOwnerPluginAbi,
183
185
  PublicClient,
@@ -205,9 +207,9 @@ export const multiOwnerPluginActions: <
205
207
  | undefined,
206
208
  TContext extends UserOperationContext | undefined =
207
209
  | UserOperationContext
208
- | undefined
210
+ | undefined,
209
211
  >(
210
- client: Client<TTransport, TChain, TAccount>
212
+ client: Client<TTransport, TChain, TAccount>,
211
213
  ) => MultiOwnerPluginActions<TAccount, TContext> = (client) => ({
212
214
  updateOwners({ args, overrides, context, account = client.account }) {
213
215
  if (!account) {
@@ -217,7 +219,7 @@ export const multiOwnerPluginActions: <
217
219
  throw new IncompatibleClientError(
218
220
  "SmartAccountClient",
219
221
  "updateOwners",
220
- client
222
+ client,
221
223
  );
222
224
  }
223
225
 
@@ -243,7 +245,7 @@ export const multiOwnerPluginActions: <
243
245
  throw new IncompatibleClientError(
244
246
  "SmartAccountClient",
245
247
  "installMultiOwnerPlugin",
246
- client
248
+ client,
247
249
  );
248
250
  }
249
251
 
@@ -259,7 +261,7 @@ export const multiOwnerPluginActions: <
259
261
 
260
262
  if (!pluginAddress) {
261
263
  throw new Error(
262
- "missing MultiOwnerPlugin address for chain " + chain.name
264
+ "missing MultiOwnerPlugin address for chain " + chain.name,
263
265
  );
264
266
  }
265
267
 
@@ -295,7 +297,7 @@ export const multiOwnerPluginActions: <
295
297
  throw new IncompatibleClientError(
296
298
  "SmartAccountClient",
297
299
  "readEip712Domain",
298
- client
300
+ client,
299
301
  );
300
302
  }
301
303
 
@@ -322,7 +324,7 @@ export const multiOwnerPluginActions: <
322
324
  throw new IncompatibleClientError(
323
325
  "SmartAccountClient",
324
326
  "readIsValidSignature",
325
- client
327
+ client,
326
328
  );
327
329
  }
328
330
 
@@ -13,12 +13,12 @@ import { MultiOwnerPlugin, MultiOwnerPluginAbi } from "./plugin.js";
13
13
 
14
14
  export const multiOwnerMessageSigner = <
15
15
  TTransport extends Transport,
16
- TSigner extends SmartAccountSigner
16
+ TSigner extends SmartAccountSigner,
17
17
  >(
18
18
  client: BundlerClient<TTransport>,
19
19
  accountAddress: Address,
20
20
  signer: () => TSigner,
21
- pluginAddress: Address = MultiOwnerPlugin.meta.addresses[client.chain.id]
21
+ pluginAddress: Address = MultiOwnerPlugin.meta.addresses[client.chain.id],
22
22
  ) => {
23
23
  const signWith712Wrapper = async (msg: Hash): Promise<`0x${string}`> => {
24
24
  const [, name, version, chainId, verifyingContract, salt] =
@@ -66,9 +66,9 @@ export const multiOwnerMessageSigner = <
66
66
 
67
67
  signTypedData: <
68
68
  const typedData extends TypedData | Record<string, unknown>,
69
- primaryType extends keyof typedData | "EIP712Domain" = keyof typedData
69
+ primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
70
70
  >(
71
- typedDataDefinition: TypedDataDefinition<typedData, primaryType>
71
+ typedDataDefinition: TypedDataDefinition<typedData, primaryType>,
72
72
  ): Promise<Hex> => {
73
73
  return signWith712Wrapper(hashTypedData(typedDataDefinition));
74
74
  },
@@ -14,10 +14,10 @@ export async function getThreshold<
14
14
  TChain extends Chain | undefined = Chain | undefined,
15
15
  TAccount extends SmartContractAccount | undefined =
16
16
  | SmartContractAccount
17
- | undefined
17
+ | undefined,
18
18
  >(
19
19
  client: Client<TTransport, TChain, TAccount>,
20
- args: GetPluginAddressParameter & GetAccountParameter<TAccount>
20
+ args: GetPluginAddressParameter & GetAccountParameter<TAccount>,
21
21
  ) {
22
22
  const account = args.account ?? client.account;
23
23
  if (!account) {
@@ -30,7 +30,7 @@ export async function getThreshold<
30
30
 
31
31
  const [, threshold] = await MultisigPlugin.getContract(
32
32
  client,
33
- args.pluginAddress
33
+ args.pluginAddress,
34
34
  ).read.ownershipInfoOf([account.address]);
35
35
 
36
36
  return threshold === 0n ? account.getLocalThreshold() : threshold;
@@ -13,11 +13,11 @@ export async function isOwnerOf<
13
13
  TChain extends Chain | undefined = Chain | undefined,
14
14
  TAccount extends SmartContractAccount | undefined =
15
15
  | SmartContractAccount
16
- | undefined
16
+ | undefined,
17
17
  >(
18
18
  client: Client<TTransport, TChain, TAccount>,
19
19
  args: { address: Address } & GetPluginAddressParameter &
20
- GetAccountParameter<TAccount>
20
+ GetAccountParameter<TAccount>,
21
21
  ) {
22
22
  const account = args.account ?? client.account;
23
23
  if (!account) {