@account-kit/smart-contracts 4.0.0-beta.6 → 4.0.0-beta.8

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 (28) hide show
  1. package/dist/esm/src/light-account/clients/alchemyClient.d.ts +3 -3
  2. package/dist/esm/src/light-account/clients/alchemyClient.js +10 -13
  3. package/dist/esm/src/light-account/clients/alchemyClient.js.map +1 -1
  4. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.d.ts +3 -3
  5. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js +13 -14
  6. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
  7. package/dist/esm/src/msca/client/alchemyClient.d.ts +3 -3
  8. package/dist/esm/src/msca/client/alchemyClient.js +8 -12
  9. package/dist/esm/src/msca/client/alchemyClient.js.map +1 -1
  10. package/dist/esm/src/msca/client/multiSigAlchemyClient.d.ts +3 -3
  11. package/dist/esm/src/msca/client/multiSigAlchemyClient.js +7 -11
  12. package/dist/esm/src/msca/client/multiSigAlchemyClient.js.map +1 -1
  13. package/dist/types/src/light-account/clients/alchemyClient.d.ts +3 -3
  14. package/dist/types/src/light-account/clients/alchemyClient.d.ts.map +1 -1
  15. package/dist/types/src/light-account/clients/multiOwnerAlchemyClient.d.ts +3 -3
  16. package/dist/types/src/light-account/clients/multiOwnerAlchemyClient.d.ts.map +1 -1
  17. package/dist/types/src/msca/client/alchemyClient.d.ts +3 -3
  18. package/dist/types/src/msca/client/alchemyClient.d.ts.map +1 -1
  19. package/dist/types/src/msca/client/multiSigAlchemyClient.d.ts +3 -3
  20. package/dist/types/src/msca/client/multiSigAlchemyClient.d.ts.map +1 -1
  21. package/package.json +5 -5
  22. package/src/light-account/clients/alchemyClient.ts +17 -26
  23. package/src/light-account/clients/multiOwnerAlchemyClient.ts +20 -28
  24. package/src/msca/client/alchemyClient.ts +10 -25
  25. package/src/msca/client/multiSigAlchemyClient.ts +8 -29
  26. package/src/msca/plugins/multi-owner/plugin.ts +21 -19
  27. package/src/msca/plugins/multisig/plugin.ts +21 -19
  28. package/src/msca/plugins/session-key/plugin.ts +30 -28
@@ -1,6 +1,6 @@
1
1
  import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type CreateLightAccountParams, type LightAccount, type LightAccountClientActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type Transport } from "viem";
5
- export type AlchemyLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>, "account">;
6
- export declare function createLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, LightAccount<TSigner>, LightAccountClientActions<TSigner>>>;
4
+ import { type Chain } from "viem";
5
+ export type AlchemyLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>, "account">;
6
+ export declare function createLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, LightAccount<TSigner>, LightAccountClientActions<TSigner>>>;
@@ -1,18 +1,18 @@
1
- import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
1
+ import { createAlchemySmartAccountClient, } from "@account-kit/infra";
2
2
  import { createLightAccount, lightAccountClientActions, } from "@account-kit/smart-contracts";
3
- import { custom } from "viem";
3
+ import {} from "viem";
4
4
  /**
5
5
  * Creates an Alchemy smart account client connected to a Light Account instance.
6
6
  *
7
7
  * @example
8
8
  * ```ts
9
9
  * import { createLightAccountAlchemyClient } from "@account-kit/smart-contracts";
10
- * import { sepolia } from "@account-kit/infra";
10
+ * import { sepolia, alchemy } from "@account-kit/infra";
11
11
  * import { LocalAccountSigner } from "@aa-sdk/core";
12
12
  * import { generatePrivateKey } from "viem"
13
13
  *
14
14
  * const lightAccountClient = await createLightAccountAlchemyClient({
15
- * apiKey: "your-api-key",
15
+ * transport: alchemy({ apiKey: "your-api-key" }),
16
16
  * chain: sepolia,
17
17
  * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
18
18
  * });
@@ -21,19 +21,16 @@ import { custom } from "viem";
21
21
  * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client
22
22
  * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client
23
23
  */
24
- export async function createLightAccountAlchemyClient(config) {
25
- const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
26
- const client = createAlchemyPublicRpcClient({
27
- chain,
28
- connectionConfig,
29
- });
24
+ export async function createLightAccountAlchemyClient({ opts, transport, chain, ...config }) {
30
25
  const account = await createLightAccount({
31
- transport: custom(client),
32
26
  ...config,
27
+ transport,
28
+ chain,
33
29
  });
34
- return createAlchemySmartAccountClientFromExisting({
30
+ return createAlchemySmartAccountClient({
35
31
  ...config,
36
- client,
32
+ transport,
33
+ chain,
37
34
  account,
38
35
  opts,
39
36
  }).extend(lightAccountClientActions);
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAI1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA0BhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAuC;IAEvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createLightAccount,\n lightAccountClientActions,\n type CreateLightAccountParams,\n type LightAccount,\n type LightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport async function createLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n LightAccount<TSigner>,\n LightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates an Alchemy smart account client connected to a Light Account instance.\n *\n * @example\n * ```ts\n * import { createLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client\n */\nexport async function createLightAccountAlchemyClient(\n config: AlchemyLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(lightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,+BAA+B,GAGhC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAI1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAc,MAAM,MAAM,CAAC;AAsBlC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,EACpD,IAAI,EACJ,SAAS,EACT,KAAK,EACL,GAAG,MAAM,EACuB;IAChC,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;QACvC,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,+BAA+B,CAAC;QACrC,GAAG,MAAM;QACT,SAAS;QACT,KAAK;QACL,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n createAlchemySmartAccountClient,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createLightAccount,\n lightAccountClientActions,\n type CreateLightAccountParams,\n type LightAccount,\n type LightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { type Chain } from \"viem\";\n\nexport type AlchemyLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, \"transport\"> &\n Omit<\n AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport async function createLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n Chain | undefined,\n LightAccount<TSigner>,\n LightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates an Alchemy smart account client connected to a Light Account instance.\n *\n * @example\n * ```ts\n * import { createLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia, alchemy } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createLightAccountAlchemyClient({\n * transport: alchemy({ apiKey: \"your-api-key\" }),\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client\n */\nexport async function createLightAccountAlchemyClient({\n opts,\n transport,\n chain,\n ...config\n}: AlchemyLightAccountClientConfig): Promise<AlchemySmartAccountClient> {\n const account = await createLightAccount({\n ...config,\n transport,\n chain,\n });\n\n return createAlchemySmartAccountClient({\n ...config,\n transport,\n chain,\n account,\n opts,\n }).extend(lightAccountClientActions);\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type CreateMultiOwnerLightAccountParams, type MultiOwnerLightAccount, type MultiOwnerLightAccountClientActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type Transport } from "viem";
5
- export type AlchemyMultiOwnerLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>, "transport" | "chain" | "type"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, MultiOwnerLightAccount<TSigner>>, "account">;
6
- export declare function createMultiOwnerLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultiOwnerLightAccount<TSigner>, MultiOwnerLightAccountClientActions<TSigner>>>;
4
+ import { type Chain } from "viem";
5
+ export type AlchemyMultiOwnerLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>, "transport" | "type"> & Omit<AlchemySmartAccountClientConfig<Chain, MultiOwnerLightAccount<TSigner>>, "account">;
6
+ export declare function createMultiOwnerLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultiOwnerLightAccount<TSigner>, MultiOwnerLightAccountClientActions<TSigner>>>;
@@ -1,19 +1,21 @@
1
- import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
1
+ import { createAlchemySmartAccountClient, } from "@account-kit/infra";
2
2
  import { createMultiOwnerLightAccount, multiOwnerLightAccountClientActions, } from "@account-kit/smart-contracts";
3
- import { custom } from "viem";
3
+ import {} from "viem";
4
4
  /**
5
5
  * Creates a multi-owner light account Alchemy client using the provided configuration.
6
6
  *
7
7
  * @example
8
8
  * ```ts
9
9
  * import { createMultiOwnerLightAccountAlchemyClient } from "@account-kit/smart-contracts";
10
- * import { sepolia } from "@account-kit/infra";
10
+ * import { sepolia, alchemy } from "@account-kit/infra";
11
11
  * import { LocalAccountSigner } from "@aa-sdk/core";
12
12
  * import { generatePrivateKey } from "viem"
13
13
  *
14
14
  * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({
15
- * apiKey: "your-api-key",
16
- * chain: sepolia,
15
+ * transport: alchemy({
16
+ * apiKey: "your-api-key",
17
+ * }),
18
+ * chain: sepolia
17
19
  * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
18
20
  * });
19
21
  * ```
@@ -21,19 +23,16 @@ import { custom } from "viem";
21
23
  * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client
22
24
  * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods
23
25
  */
24
- export async function createMultiOwnerLightAccountAlchemyClient(config) {
25
- const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
26
- const client = createAlchemyPublicRpcClient({
27
- chain,
28
- connectionConfig,
29
- });
26
+ export async function createMultiOwnerLightAccountAlchemyClient({ opts, transport, chain, ...config }) {
30
27
  const account = await createMultiOwnerLightAccount({
31
- transport: custom(client),
32
28
  ...config,
29
+ transport,
30
+ chain,
33
31
  });
34
- return createAlchemySmartAccountClientFromExisting({
32
+ return createAlchemySmartAccountClient({
35
33
  ...config,
36
- client,
34
+ transport,
35
+ chain,
37
36
  account,
38
37
  opts,
39
38
  }).extend(multiOwnerLightAccountClientActions);
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwnerAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,GAIpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA8BhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAAiD;IAEjD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createMultiOwnerLightAccount,\n multiOwnerLightAccountClientActions,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n type MultiOwnerLightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyMultiOwnerLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\" | \"type\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<\n Transport,\n Chain,\n MultiOwnerLightAccount<TSigner>\n >,\n \"account\"\n >;\n\nexport async function createMultiOwnerLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n MultiOwnerLightAccount<TSigner>,\n MultiOwnerLightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates a multi-owner light account Alchemy client using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods\n */\nexport async function createMultiOwnerLightAccountAlchemyClient(\n config: AlchemyMultiOwnerLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createMultiOwnerLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"multiOwnerAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,+BAA+B,GAGhC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,GAIpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAc,MAAM,MAAM,CAAC;AAyBlC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAAC,EAC9D,IAAI,EACJ,SAAS,EACT,KAAK,EACL,GAAG,MAAM,EACiC;IAC1C,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,+BAA+B,CAAC;QACrC,GAAG,MAAM;QACT,SAAS;QACT,KAAK;QACL,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n createAlchemySmartAccountClient,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createMultiOwnerLightAccount,\n multiOwnerLightAccountClientActions,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n type MultiOwnerLightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { type Chain } from \"viem\";\n\nexport type AlchemyMultiOwnerLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"type\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Chain, MultiOwnerLightAccount<TSigner>>,\n \"account\"\n >;\n\nexport async function createMultiOwnerLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n Chain | undefined,\n MultiOwnerLightAccount<TSigner>,\n MultiOwnerLightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates a multi-owner light account Alchemy client using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia, alchemy } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({\n * transport: alchemy({\n * apiKey: \"your-api-key\",\n * }),\n * chain: sepolia\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods\n */\nexport async function createMultiOwnerLightAccountAlchemyClient({\n opts,\n transport,\n chain,\n ...config\n}: AlchemyMultiOwnerLightAccountClientConfig): Promise<AlchemySmartAccountClient> {\n const account = await createMultiOwnerLightAccount({\n ...config,\n transport,\n chain,\n });\n\n return createAlchemySmartAccountClient({\n ...config,\n transport,\n chain,\n account,\n opts,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type AccountLoupeActions, type CreateMultiOwnerModularAccountParams, type LightAccount, type MultiOwnerModularAccount, type MultiOwnerPluginActions, type PluginManagerActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type HttpTransport, type Transport } from "viem";
5
- export type AlchemyModularAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>, "account">;
6
- export declare function createModularAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyModularAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultiOwnerModularAccount<TSigner>, MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>;
4
+ import { type Chain, type HttpTransport } from "viem";
5
+ export type AlchemyModularAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>, "account">;
6
+ export declare function createModularAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyModularAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultiOwnerModularAccount<TSigner>, MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>;
@@ -1,18 +1,18 @@
1
- import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
1
+ import { createAlchemySmartAccountClient, } from "@account-kit/infra";
2
2
  import { accountLoupeActions, createMultiOwnerModularAccount, multiOwnerPluginActions, pluginManagerActions, } from "@account-kit/smart-contracts";
3
- import { custom, } from "viem";
3
+ import {} from "viem";
4
4
  /**
5
5
  * Creates a modular account Alchemy client with the provided configuration.
6
6
  *
7
7
  * @example
8
8
  * ```ts
9
9
  * import { createModularAccountAlchemyClient } from "@account-kit/smart-contracts";
10
- * import { sepolia } from "@account-kit/infra";
10
+ * import { sepolia, alchemy } from "@account-kit/infra";
11
11
  * import { LocalAccountSigner } from "@aa-sdk/core";
12
12
  * import { generatePrivateKey } from "viem"
13
13
  *
14
14
  * const alchemyAccountClient = await createModularAccountAlchemyClient({
15
- * apiKey: "your-api-key",
15
+ * transport: alchemy({ apiKey: "your-api-key" }),
16
16
  * chain: sepolia,
17
17
  * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
18
18
  * });
@@ -22,18 +22,14 @@ import { custom, } from "viem";
22
22
  * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions
23
23
  */
24
24
  export async function createModularAccountAlchemyClient(config) {
25
- const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
26
- const client = createAlchemyPublicRpcClient({
27
- chain,
28
- connectionConfig,
29
- });
25
+ const { transport, chain, opts } = config;
30
26
  const account = await createMultiOwnerModularAccount({
31
- transport: custom(client),
32
27
  ...config,
28
+ transport,
29
+ chain,
33
30
  });
34
- return createAlchemySmartAccountClientFromExisting({
31
+ return createAlchemySmartAccountClient({
35
32
  ...config,
36
- client,
37
33
  account,
38
34
  opts,
39
35
  })
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/msca/client/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,uBAAuB,EACvB,oBAAoB,GAOrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,MAAM,GAKP,MAAM,MAAM,CAAC;AA4Bd;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,MAAyC;IAEzC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,8BAA8B,CAAC;QACnD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC;SACC,MAAM,CAAC,uBAAuB,CAAC;SAC/B,MAAM,CAAC,oBAAoB,CAAC;SAC5B,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n accountLoupeActions,\n createMultiOwnerModularAccount,\n multiOwnerPluginActions,\n pluginManagerActions,\n type AccountLoupeActions,\n type CreateMultiOwnerModularAccountParams,\n type LightAccount,\n type MultiOwnerModularAccount,\n type MultiOwnerPluginActions,\n type PluginManagerActions,\n} from \"@account-kit/smart-contracts\";\nimport {\n custom,\n type Chain,\n type CustomTransport,\n type HttpTransport,\n type Transport,\n} from \"viem\";\n\nexport type AlchemyModularAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport function createModularAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyModularAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n MultiOwnerModularAccount<TSigner>,\n MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> &\n PluginManagerActions<MultiOwnerModularAccount<TSigner>> &\n AccountLoupeActions<MultiOwnerModularAccount<TSigner>>\n >\n>;\n\n/**\n * Creates a modular account Alchemy client with the provided configuration.\n *\n * @example\n * ```ts\n * import { createModularAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const alchemyAccountClient = await createModularAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyModularAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions\n */\nexport async function createModularAccountAlchemyClient(\n config: AlchemyModularAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createMultiOwnerModularAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n })\n .extend(multiOwnerPluginActions)\n .extend(pluginManagerActions)\n .extend(accountLoupeActions);\n}\n"]}
1
+ {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/msca/client/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,+BAA+B,GAGhC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,uBAAuB,EACvB,oBAAoB,GAOrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAkC,MAAM,MAAM,CAAC;AA2BtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,MAAyC;IAEzC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAE1C,MAAM,OAAO,GAAG,MAAM,8BAA8B,CAAC;QACnD,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,+BAA+B,CAAC;QACrC,GAAG,MAAM;QACT,OAAO;QACP,IAAI;KACL,CAAC;SACC,MAAM,CAAC,uBAAuB,CAAC;SAC/B,MAAM,CAAC,oBAAoB,CAAC;SAC5B,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n createAlchemySmartAccountClient,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n accountLoupeActions,\n createMultiOwnerModularAccount,\n multiOwnerPluginActions,\n pluginManagerActions,\n type AccountLoupeActions,\n type CreateMultiOwnerModularAccountParams,\n type LightAccount,\n type MultiOwnerModularAccount,\n type MultiOwnerPluginActions,\n type PluginManagerActions,\n} from \"@account-kit/smart-contracts\";\nimport { type Chain, type HttpTransport } from \"viem\";\n\nexport type AlchemyModularAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>,\n \"transport\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport function createModularAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyModularAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n Chain | undefined,\n MultiOwnerModularAccount<TSigner>,\n MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> &\n PluginManagerActions<MultiOwnerModularAccount<TSigner>> &\n AccountLoupeActions<MultiOwnerModularAccount<TSigner>>\n >\n>;\n\n/**\n * Creates a modular account Alchemy client with the provided configuration.\n *\n * @example\n * ```ts\n * import { createModularAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia, alchemy } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const alchemyAccountClient = await createModularAccountAlchemyClient({\n * transport: alchemy({ apiKey: \"your-api-key\" }),\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyModularAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions\n */\nexport async function createModularAccountAlchemyClient(\n config: AlchemyModularAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { transport, chain, opts } = config;\n\n const account = await createMultiOwnerModularAccount({\n ...config,\n transport,\n chain,\n });\n\n return createAlchemySmartAccountClient({\n ...config,\n account,\n opts,\n })\n .extend(multiOwnerPluginActions)\n .extend(pluginManagerActions)\n .extend(accountLoupeActions);\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { type SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type AccountLoupeActions, type CreateMultisigModularAccountParams, type LightAccount, type MultisigModularAccount, type MultisigPluginActions, type MultisigUserOperationContext, type PluginManagerActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type HttpTransport, type Transport } from "viem";
5
- export type AlchemyMultisigAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultisigModularAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>, MultisigUserOperationContext>, "account">;
6
- export declare function createMultisigAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultisigAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultisigModularAccount<TSigner>, MultisigPluginActions<MultisigModularAccount<TSigner>> & PluginManagerActions<MultisigModularAccount<TSigner>> & AccountLoupeActions<MultisigModularAccount<TSigner>>, MultisigUserOperationContext>>;
4
+ import { type Chain, type HttpTransport } from "viem";
5
+ export type AlchemyMultisigAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultisigModularAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>, MultisigUserOperationContext>, "account">;
6
+ export declare function createMultisigAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultisigAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultisigModularAccount<TSigner>, MultisigPluginActions<MultisigModularAccount<TSigner>> & PluginManagerActions<MultisigModularAccount<TSigner>> & AccountLoupeActions<MultisigModularAccount<TSigner>>, MultisigUserOperationContext>>;
@@ -1,7 +1,7 @@
1
1
  import { smartAccountClientActions, } from "@aa-sdk/core";
2
- import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
2
+ import { createAlchemySmartAccountClient, } from "@account-kit/infra";
3
3
  import { accountLoupeActions, createMultisigModularAccount, multisigPluginActions, multisigSignatureMiddleware, pluginManagerActions, } from "@account-kit/smart-contracts";
4
- import { custom, } from "viem";
4
+ import {} from "viem";
5
5
  /**
6
6
  * Creates an Alchemy client for a multisig account using the provided configuration.
7
7
  *
@@ -13,7 +13,7 @@ import { custom, } from "viem";
13
13
  * import { generatePrivateKey } from "viem"
14
14
  *
15
15
  * const alchemyAccountClient = await createMultisigAccountAlchemyClient({
16
- * apiKey: "your-api-key",
16
+ * transport: alchemy({ apiKey: "your-api-key" }),
17
17
  * chain: sepolia,
18
18
  * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
19
19
  * owners: [...], // other owners on the account
@@ -25,18 +25,14 @@ import { custom, } from "viem";
25
25
  * @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.
26
26
  */
27
27
  export async function createMultisigAccountAlchemyClient(config) {
28
- const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
29
- const client = createAlchemyPublicRpcClient({
30
- chain,
31
- connectionConfig,
32
- });
28
+ const { transport, opts, chain } = config;
33
29
  const account = await createMultisigModularAccount({
34
- transport: custom(client),
35
30
  ...config,
31
+ transport,
32
+ chain,
36
33
  });
37
- return createAlchemySmartAccountClientFromExisting({
34
+ return createAlchemySmartAccountClient({
38
35
  ...config,
39
- client,
40
36
  account,
41
37
  opts,
42
38
  signUserOperation: multisigSignatureMiddleware,
@@ -1 +1 @@
1
- {"version":3,"file":"multiSigAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/msca/client/multiSigAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,GAQrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,MAAM,GAKP,MAAM,MAAM,CAAC;AAoCd;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,MAA0C;IAY1C,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAIhD;QACA,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;QACJ,iBAAiB,EAAE,2BAA2B;KAC/C,CAAC;SACC,MAAM,CAAC,yBAAyB,CAAC;SACjC,MAAM,CAAC,qBAAqB,CAAC;SAC7B,MAAM,CAAC,oBAAoB,CAAC;SAC5B,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import {\n smartAccountClientActions,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n accountLoupeActions,\n createMultisigModularAccount,\n multisigPluginActions,\n multisigSignatureMiddleware,\n pluginManagerActions,\n type AccountLoupeActions,\n type CreateMultisigModularAccountParams,\n type LightAccount,\n type MultisigModularAccount,\n type MultisigPluginActions,\n type MultisigUserOperationContext,\n type PluginManagerActions,\n} from \"@account-kit/smart-contracts\";\nimport {\n custom,\n type Chain,\n type CustomTransport,\n type HttpTransport,\n type Transport,\n} from \"viem\";\n\n// 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?\n\nexport type AlchemyMultisigAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultisigModularAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<\n Transport,\n Chain,\n LightAccount<TSigner>,\n MultisigUserOperationContext\n >,\n \"account\"\n >;\n\nexport function createMultisigAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultisigAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n MultisigModularAccount<TSigner>,\n MultisigPluginActions<MultisigModularAccount<TSigner>> &\n PluginManagerActions<MultisigModularAccount<TSigner>> &\n AccountLoupeActions<MultisigModularAccount<TSigner>>,\n MultisigUserOperationContext\n >\n>;\n\n/**\n * Creates an Alchemy client for a multisig account using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultisigAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const alchemyAccountClient = await createMultisigAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),\n * owners: [...], // other owners on the account\n * threshold: 2, // 2 of N signatures\n * });\n * ```\n *\n * @param {AlchemyMultisigAccountClientConfig} config The configuration for the Alchemy multisig account client\n * @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.\n */\nexport async function createMultisigAccountAlchemyClient(\n config: AlchemyMultisigAccountClientConfig\n): Promise<\n AlchemySmartAccountClient<\n Transport,\n Chain | undefined,\n MultisigModularAccount<SmartAccountSigner>,\n MultisigPluginActions<MultisigModularAccount<SmartAccountSigner>> &\n PluginManagerActions<MultisigModularAccount<SmartAccountSigner>> &\n AccountLoupeActions<MultisigModularAccount<SmartAccountSigner>>,\n MultisigUserOperationContext\n >\n> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createMultisigModularAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting<\n Chain | undefined,\n MultisigModularAccount<SmartAccountSigner>,\n MultisigUserOperationContext\n >({\n ...config,\n client,\n account,\n opts,\n signUserOperation: multisigSignatureMiddleware,\n })\n .extend(smartAccountClientActions)\n .extend(multisigPluginActions)\n .extend(pluginManagerActions)\n .extend(accountLoupeActions);\n}\n"]}
1
+ {"version":3,"file":"multiSigAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/msca/client/multiSigAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,+BAA+B,GAGhC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,GAQrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAkC,MAAM,MAAM,CAAC;AAkCtD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,MAA0C;IAW1C,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAE1C,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,+BAA+B,CAAC;QACrC,GAAG,MAAM;QACT,OAAO;QACP,IAAI;QACJ,iBAAiB,EAAE,2BAA2B;KAC/C,CAAC;SACC,MAAM,CAAC,yBAAyB,CAAC;SACjC,MAAM,CAAC,qBAAqB,CAAC;SAC7B,MAAM,CAAC,oBAAoB,CAAC;SAC5B,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import {\n smartAccountClientActions,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n createAlchemySmartAccountClient,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n accountLoupeActions,\n createMultisigModularAccount,\n multisigPluginActions,\n multisigSignatureMiddleware,\n pluginManagerActions,\n type AccountLoupeActions,\n type CreateMultisigModularAccountParams,\n type LightAccount,\n type MultisigModularAccount,\n type MultisigPluginActions,\n type MultisigUserOperationContext,\n type PluginManagerActions,\n} from \"@account-kit/smart-contracts\";\nimport { type Chain, type HttpTransport } from \"viem\";\n\n// 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?\n\nexport type AlchemyMultisigAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultisigModularAccountParams<HttpTransport, TSigner>,\n \"transport\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<\n Chain,\n LightAccount<TSigner>,\n MultisigUserOperationContext\n >,\n \"account\"\n >;\n\nexport function createMultisigAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultisigAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n Chain | undefined,\n MultisigModularAccount<TSigner>,\n MultisigPluginActions<MultisigModularAccount<TSigner>> &\n PluginManagerActions<MultisigModularAccount<TSigner>> &\n AccountLoupeActions<MultisigModularAccount<TSigner>>,\n MultisigUserOperationContext\n >\n>;\n\n/**\n * Creates an Alchemy client for a multisig account using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultisigAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const alchemyAccountClient = await createMultisigAccountAlchemyClient({\n * transport: alchemy({ apiKey: \"your-api-key\" }),\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),\n * owners: [...], // other owners on the account\n * threshold: 2, // 2 of N signatures\n * });\n * ```\n *\n * @param {AlchemyMultisigAccountClientConfig} config The configuration for the Alchemy multisig account client\n * @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.\n */\nexport async function createMultisigAccountAlchemyClient(\n config: AlchemyMultisigAccountClientConfig\n): Promise<\n AlchemySmartAccountClient<\n Chain | undefined,\n MultisigModularAccount<SmartAccountSigner>,\n MultisigPluginActions<MultisigModularAccount<SmartAccountSigner>> &\n PluginManagerActions<MultisigModularAccount<SmartAccountSigner>> &\n AccountLoupeActions<MultisigModularAccount<SmartAccountSigner>>,\n MultisigUserOperationContext\n >\n> {\n const { transport, opts, chain } = config;\n\n const account = await createMultisigModularAccount({\n ...config,\n transport,\n chain,\n });\n\n return createAlchemySmartAccountClient({\n ...config,\n account,\n opts,\n signUserOperation: multisigSignatureMiddleware,\n })\n .extend(smartAccountClientActions)\n .extend(multisigPluginActions)\n .extend(pluginManagerActions)\n .extend(accountLoupeActions);\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type CreateLightAccountParams, type LightAccount, type LightAccountClientActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type Transport } from "viem";
5
- export type AlchemyLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>, "account">;
6
- export declare function createLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, LightAccount<TSigner>, LightAccountClientActions<TSigner>>>;
4
+ import { type Chain } from "viem";
5
+ export type AlchemyLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>, "account">;
6
+ export declare function createLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, LightAccount<TSigner>, LightAccountClientActions<TSigner>>>;
7
7
  //# sourceMappingURL=alchemyClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAU,KAAK,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAEhF,MAAM,MAAM,+BAA+B,CACzC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,wBAAwB,CAAC,aAAa,EAAE,OAAO,CAAC,EAChD,WAAW,GAAG,OAAO,CACtB,GACC,IAAI,CACF,+BAA+B,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,EACxE,SAAS,CACV,CAAC;AAEJ,wBAAsB,+BAA+B,CACnD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC/C,OAAO,CACR,yBAAyB,CACvB,eAAe,EACf,KAAK,GAAG,SAAS,EACjB,YAAY,CAAC,OAAO,CAAC,EACrB,yBAAyB,CAAC,OAAO,CAAC,CACnC,CACF,CAAC"}
1
+ {"version":3,"file":"alchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,MAAM,+BAA+B,CACzC,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CAAC,wBAAwB,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,GACrE,IAAI,CACF,+BAA+B,CAAC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,EAC7D,SAAS,CACV,CAAC;AAEJ,wBAAsB,+BAA+B,CACnD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC/C,OAAO,CACR,yBAAyB,CACvB,KAAK,GAAG,SAAS,EACjB,YAAY,CAAC,OAAO,CAAC,EACrB,yBAAyB,CAAC,OAAO,CAAC,CACnC,CACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type CreateMultiOwnerLightAccountParams, type MultiOwnerLightAccount, type MultiOwnerLightAccountClientActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type Transport } from "viem";
5
- export type AlchemyMultiOwnerLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>, "transport" | "chain" | "type"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, MultiOwnerLightAccount<TSigner>>, "account">;
6
- export declare function createMultiOwnerLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultiOwnerLightAccount<TSigner>, MultiOwnerLightAccountClientActions<TSigner>>>;
4
+ import { type Chain } from "viem";
5
+ export type AlchemyMultiOwnerLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>, "transport" | "type"> & Omit<AlchemySmartAccountClientConfig<Chain, MultiOwnerLightAccount<TSigner>>, "account">;
6
+ export declare function createMultiOwnerLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultiOwnerLightAccount<TSigner>, MultiOwnerLightAccountClientActions<TSigner>>>;
7
7
  //# sourceMappingURL=multiOwnerAlchemyClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwnerAlchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,mCAAmC,EACzC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAU,KAAK,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAEhF,MAAM,MAAM,yCAAyC,CACnD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,kCAAkC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC1D,WAAW,GAAG,OAAO,GAAG,MAAM,CAC/B,GACC,IAAI,CACF,+BAA+B,CAC7B,SAAS,EACT,KAAK,EACL,sBAAsB,CAAC,OAAO,CAAC,CAChC,EACD,SAAS,CACV,CAAC;AAEJ,wBAAsB,yCAAyC,CAC7D,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,yCAAyC,CAAC,OAAO,CAAC,GACzD,OAAO,CACR,yBAAyB,CACvB,eAAe,EACf,KAAK,GAAG,SAAS,EACjB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,mCAAmC,CAAC,OAAO,CAAC,CAC7C,CACF,CAAC"}
1
+ {"version":3,"file":"multiOwnerAlchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,mCAAmC,EACzC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,MAAM,yCAAyC,CACnD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,kCAAkC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC1D,WAAW,GAAG,MAAM,CACrB,GACC,IAAI,CACF,+BAA+B,CAAC,KAAK,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,EACvE,SAAS,CACV,CAAC;AAEJ,wBAAsB,yCAAyC,CAC7D,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,yCAAyC,CAAC,OAAO,CAAC,GACzD,OAAO,CACR,yBAAyB,CACvB,KAAK,GAAG,SAAS,EACjB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,mCAAmC,CAAC,OAAO,CAAC,CAC7C,CACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type AccountLoupeActions, type CreateMultiOwnerModularAccountParams, type LightAccount, type MultiOwnerModularAccount, type MultiOwnerPluginActions, type PluginManagerActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type HttpTransport, type Transport } from "viem";
5
- export type AlchemyModularAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>, "account">;
6
- export declare function createModularAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyModularAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultiOwnerModularAccount<TSigner>, MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>;
4
+ import { type Chain, type HttpTransport } from "viem";
5
+ export type AlchemyModularAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultiOwnerModularAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>, "account">;
6
+ export declare function createModularAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyModularAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultiOwnerModularAccount<TSigner>, MultiOwnerPluginActions<MultiOwnerModularAccount<TSigner>> & PluginManagerActions<MultiOwnerModularAccount<TSigner>> & AccountLoupeActions<MultiOwnerModularAccount<TSigner>>>>;
7
7
  //# sourceMappingURL=alchemyClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/msca/client/alchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,oCAAoC,EACzC,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAEd,MAAM,MAAM,iCAAiC,CAC3C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,oCAAoC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC5D,WAAW,GAAG,OAAO,CACtB,GACC,IAAI,CACF,+BAA+B,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,EACxE,SAAS,CACV,CAAC;AAEJ,wBAAgB,iCAAiC,CAC/C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,iCAAiC,CAAC,OAAO,CAAC,GACjD,OAAO,CACR,yBAAyB,CACvB,eAAe,EACf,KAAK,GAAG,SAAS,EACjB,wBAAwB,CAAC,OAAO,CAAC,EACjC,uBAAuB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,GACxD,oBAAoB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,GACvD,mBAAmB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CACzD,CACF,CAAC"}
1
+ {"version":3,"file":"alchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/msca/client/alchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,oCAAoC,EACzC,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,MAAM,iCAAiC,CAC3C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,oCAAoC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC5D,WAAW,CACZ,GACC,IAAI,CACF,+BAA+B,CAAC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,EAC7D,SAAS,CACV,CAAC;AAEJ,wBAAgB,iCAAiC,CAC/C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,iCAAiC,CAAC,OAAO,CAAC,GACjD,OAAO,CACR,yBAAyB,CACvB,KAAK,GAAG,SAAS,EACjB,wBAAwB,CAAC,OAAO,CAAC,EACjC,uBAAuB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,GACxD,oBAAoB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,GACvD,mBAAmB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CACzD,CACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { type SmartAccountSigner } from "@aa-sdk/core";
2
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
3
3
  import { type AccountLoupeActions, type CreateMultisigModularAccountParams, type LightAccount, type MultisigModularAccount, type MultisigPluginActions, type MultisigUserOperationContext, type PluginManagerActions } from "@account-kit/smart-contracts";
4
- import { type Chain, type CustomTransport, type HttpTransport, type Transport } from "viem";
5
- export type AlchemyMultisigAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultisigModularAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>, MultisigUserOperationContext>, "account">;
6
- export declare function createMultisigAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultisigAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, MultisigModularAccount<TSigner>, MultisigPluginActions<MultisigModularAccount<TSigner>> & PluginManagerActions<MultisigModularAccount<TSigner>> & AccountLoupeActions<MultisigModularAccount<TSigner>>, MultisigUserOperationContext>>;
4
+ import { type Chain, type HttpTransport } from "viem";
5
+ export type AlchemyMultisigAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateMultisigModularAccountParams<HttpTransport, TSigner>, "transport"> & Omit<AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>, MultisigUserOperationContext>, "account">;
6
+ export declare function createMultisigAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyMultisigAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<Chain | undefined, MultisigModularAccount<TSigner>, MultisigPluginActions<MultisigModularAccount<TSigner>> & PluginManagerActions<MultisigModularAccount<TSigner>> & AccountLoupeActions<MultisigModularAccount<TSigner>>, MultisigUserOperationContext>>;
7
7
  //# sourceMappingURL=multiSigAlchemyClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiSigAlchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/msca/client/multiSigAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,kCAAkC,EACvC,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAId,MAAM,MAAM,kCAAkC,CAC5C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,kCAAkC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC1D,WAAW,GAAG,OAAO,CACtB,GACC,IAAI,CACF,+BAA+B,CAC7B,SAAS,EACT,KAAK,EACL,YAAY,CAAC,OAAO,CAAC,EACrB,4BAA4B,CAC7B,EACD,SAAS,CACV,CAAC;AAEJ,wBAAgB,kCAAkC,CAChD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,kCAAkC,CAAC,OAAO,CAAC,GAClD,OAAO,CACR,yBAAyB,CACvB,eAAe,EACf,KAAK,GAAG,SAAS,EACjB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GACpD,oBAAoB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GACrD,mBAAmB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,EACtD,4BAA4B,CAC7B,CACF,CAAC"}
1
+ {"version":3,"file":"multiSigAlchemyClient.d.ts","sourceRoot":"","sources":["../../../../../src/msca/client/multiSigAlchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,kCAAkC,EACvC,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAItD,MAAM,MAAM,kCAAkC,CAC5C,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,IACrD,IAAI,CACN,kCAAkC,CAAC,aAAa,EAAE,OAAO,CAAC,EAC1D,WAAW,CACZ,GACC,IAAI,CACF,+BAA+B,CAC7B,KAAK,EACL,YAAY,CAAC,OAAO,CAAC,EACrB,4BAA4B,CAC7B,EACD,SAAS,CACV,CAAC;AAEJ,wBAAgB,kCAAkC,CAChD,OAAO,SAAS,kBAAkB,GAAG,kBAAkB,EAEvD,MAAM,EAAE,kCAAkC,CAAC,OAAO,CAAC,GAClD,OAAO,CACR,yBAAyB,CACvB,KAAK,GAAG,SAAS,EACjB,sBAAsB,CAAC,OAAO,CAAC,EAC/B,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GACpD,oBAAoB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GACrD,mBAAmB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,EACtD,4BAA4B,CAC7B,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@account-kit/smart-contracts",
3
- "version": "4.0.0-beta.6",
3
+ "version": "4.0.0-beta.8",
4
4
  "description": "aa-sdk compatible interfaces for Alchemy Smart Accounts",
5
5
  "author": "Alchemy",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "test:run-e2e": "vitest run --config vitest.config.e2e.ts"
47
47
  },
48
48
  "devDependencies": {
49
- "@account-kit/plugingen": "^4.0.0-beta.6",
49
+ "@account-kit/plugingen": "^4.0.0-beta.8",
50
50
  "change-case": "^5.1.2",
51
51
  "dedent": "^1.5.1",
52
52
  "dotenv": "^16.3.1",
@@ -66,10 +66,10 @@
66
66
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
67
67
  },
68
68
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
69
- "gitHead": "c25850c8617a78ee1956896b64c85db7a9ad6c08",
69
+ "gitHead": "de91f21bd8a8578a5cb119624fad7cc9b3726fee",
70
70
  "dependencies": {
71
- "@aa-sdk/core": "^4.0.0-beta.6",
72
- "@account-kit/infra": "^4.0.0-beta.6"
71
+ "@aa-sdk/core": "^4.0.0-beta.8",
72
+ "@account-kit/infra": "^4.0.0-beta.8"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "viem": "^2.20.0"
@@ -1,8 +1,6 @@
1
1
  import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
2
2
  import {
3
- AlchemyProviderConfigSchema,
4
- createAlchemyPublicRpcClient,
5
- createAlchemySmartAccountClientFromExisting,
3
+ createAlchemySmartAccountClient,
6
4
  type AlchemySmartAccountClient,
7
5
  type AlchemySmartAccountClientConfig,
8
6
  } from "@account-kit/infra";
@@ -13,16 +11,13 @@ import {
13
11
  type LightAccount,
14
12
  type LightAccountClientActions,
15
13
  } from "@account-kit/smart-contracts";
16
- import { custom, type Chain, type CustomTransport, type Transport } from "viem";
14
+ import { type Chain } from "viem";
17
15
 
18
16
  export type AlchemyLightAccountClientConfig<
19
17
  TSigner extends SmartAccountSigner = SmartAccountSigner
20
- > = Omit<
21
- CreateLightAccountParams<HttpTransport, TSigner>,
22
- "transport" | "chain"
23
- > &
18
+ > = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport"> &
24
19
  Omit<
25
- AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>,
20
+ AlchemySmartAccountClientConfig<Chain, LightAccount<TSigner>>,
26
21
  "account"
27
22
  >;
28
23
 
@@ -32,7 +27,6 @@ export async function createLightAccountAlchemyClient<
32
27
  params: AlchemyLightAccountClientConfig<TSigner>
33
28
  ): Promise<
34
29
  AlchemySmartAccountClient<
35
- CustomTransport,
36
30
  Chain | undefined,
37
31
  LightAccount<TSigner>,
38
32
  LightAccountClientActions<TSigner>
@@ -45,12 +39,12 @@ export async function createLightAccountAlchemyClient<
45
39
  * @example
46
40
  * ```ts
47
41
  * import { createLightAccountAlchemyClient } from "@account-kit/smart-contracts";
48
- * import { sepolia } from "@account-kit/infra";
42
+ * import { sepolia, alchemy } from "@account-kit/infra";
49
43
  * import { LocalAccountSigner } from "@aa-sdk/core";
50
44
  * import { generatePrivateKey } from "viem"
51
45
  *
52
46
  * const lightAccountClient = await createLightAccountAlchemyClient({
53
- * apiKey: "your-api-key",
47
+ * transport: alchemy({ apiKey: "your-api-key" }),
54
48
  * chain: sepolia,
55
49
  * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
56
50
  * });
@@ -59,25 +53,22 @@ export async function createLightAccountAlchemyClient<
59
53
  * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client
60
54
  * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client
61
55
  */
62
- export async function createLightAccountAlchemyClient(
63
- config: AlchemyLightAccountClientConfig
64
- ): Promise<AlchemySmartAccountClient> {
65
- const { chain, opts, ...connectionConfig } =
66
- AlchemyProviderConfigSchema.parse(config);
67
-
68
- const client = createAlchemyPublicRpcClient({
69
- chain,
70
- connectionConfig,
71
- });
72
-
56
+ export async function createLightAccountAlchemyClient({
57
+ opts,
58
+ transport,
59
+ chain,
60
+ ...config
61
+ }: AlchemyLightAccountClientConfig): Promise<AlchemySmartAccountClient> {
73
62
  const account = await createLightAccount({
74
- transport: custom(client),
75
63
  ...config,
64
+ transport,
65
+ chain,
76
66
  });
77
67
 
78
- return createAlchemySmartAccountClientFromExisting({
68
+ return createAlchemySmartAccountClient({
79
69
  ...config,
80
- client,
70
+ transport,
71
+ chain,
81
72
  account,
82
73
  opts,
83
74
  }).extend(lightAccountClientActions);