@permissionless/wagmi 0.0.2 → 0.0.3

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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/_cjs/connectors/biconomySmartAccount.js +18 -0
  3. package/_cjs/connectors/biconomySmartAccount.js.map +1 -0
  4. package/_cjs/connectors/kernelSmartAccount.js +18 -0
  5. package/_cjs/connectors/kernelSmartAccount.js.map +1 -0
  6. package/_cjs/connectors/safeSmartAccount.js +18 -0
  7. package/_cjs/connectors/safeSmartAccount.js.map +1 -0
  8. package/_cjs/connectors/simpleSmartAccount.js +30 -0
  9. package/_cjs/connectors/simpleSmartAccount.js.map +1 -0
  10. package/_cjs/index.js +9 -1
  11. package/_cjs/index.js.map +1 -1
  12. package/_esm/connectors/biconomySmartAccount.js +14 -0
  13. package/_esm/connectors/biconomySmartAccount.js.map +1 -0
  14. package/_esm/connectors/kernelSmartAccount.js +14 -0
  15. package/_esm/connectors/kernelSmartAccount.js.map +1 -0
  16. package/_esm/connectors/safeSmartAccount.js +14 -0
  17. package/_esm/connectors/safeSmartAccount.js.map +1 -0
  18. package/_esm/connectors/simpleSmartAccount.js +26 -0
  19. package/_esm/connectors/simpleSmartAccount.js.map +1 -0
  20. package/_esm/index.js +5 -1
  21. package/_esm/index.js.map +1 -1
  22. package/_types/connectors/biconomySmartAccount.d.ts +317 -0
  23. package/_types/connectors/biconomySmartAccount.d.ts.map +1 -0
  24. package/_types/connectors/kernelSmartAccount.d.ts +317 -0
  25. package/_types/connectors/kernelSmartAccount.d.ts.map +1 -0
  26. package/_types/connectors/safeSmartAccount.d.ts +317 -0
  27. package/_types/connectors/safeSmartAccount.d.ts.map +1 -0
  28. package/_types/connectors/simpleSmartAccount.d.ts +635 -0
  29. package/_types/connectors/simpleSmartAccount.d.ts.map +1 -0
  30. package/_types/index.d.ts +5 -1
  31. package/_types/index.d.ts.map +1 -1
  32. package/connectors/biconomySmartAccount.ts +53 -0
  33. package/connectors/kernelSmartAccount.ts +53 -0
  34. package/connectors/safeSmartAccount.ts +50 -0
  35. package/connectors/simpleSmartAccount.ts +90 -0
  36. package/index.ts +30 -1
  37. package/package.json +10 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @permissionless/wagmi
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 17ba362046c66642e908b7f8af0d0b4b4ef16de1: Added account-specific connectors
8
+ - Updated dependencies [17ba362046c66642e908b7f8af0d0b4b4ef16de1]
9
+ - permissionless@0.0.35
10
+
3
11
  ## 0.0.1
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.biconomySmartAccount = void 0;
4
+ const accounts_1 = require("permissionless/accounts");
5
+ const simpleSmartAccount_1 = require("./simpleSmartAccount.js");
6
+ async function biconomySmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
7
+ return (0, simpleSmartAccount_1.smartAccountConnectorHelper)({
8
+ account: await (0, accounts_1.signerToBiconomySmartAccount)(publicClient, {
9
+ ...rest,
10
+ signer
11
+ }),
12
+ publicClient,
13
+ bundlerTransport,
14
+ sponsorUserOperation
15
+ });
16
+ }
17
+ exports.biconomySmartAccount = biconomySmartAccount;
18
+ //# sourceMappingURL=biconomySmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biconomySmartAccount.js","sourceRoot":"","sources":["../../connectors/biconomySmartAccount.ts"],"names":[],"mappings":";;;AAAA,sDAGgC;AAGhC,6DAG6B;AAoBtB,KAAK,UAAU,oBAAoB,CAKxC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,IAAA,gDAA2B,EAAC;QAC/B,OAAO,EAAE,MAAM,IAAA,uCAA4B,EAAC,YAAY,EAAE;YACtD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC;AAvBD,oDAuBC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.kernelSmartAccount = void 0;
4
+ const accounts_1 = require("permissionless/accounts");
5
+ const simpleSmartAccount_1 = require("./simpleSmartAccount.js");
6
+ async function kernelSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
7
+ return (0, simpleSmartAccount_1.smartAccountConnectorHelper)({
8
+ account: await (0, accounts_1.signerToEcdsaKernelSmartAccount)(publicClient, {
9
+ ...rest,
10
+ signer
11
+ }),
12
+ publicClient,
13
+ bundlerTransport,
14
+ sponsorUserOperation
15
+ });
16
+ }
17
+ exports.kernelSmartAccount = kernelSmartAccount;
18
+ //# sourceMappingURL=kernelSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernelSmartAccount.js","sourceRoot":"","sources":["../../connectors/kernelSmartAccount.ts"],"names":[],"mappings":";;;AAAA,sDAGgC;AAGhC,6DAG6B;AAoBtB,KAAK,UAAU,kBAAkB,CAKtC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,IAAA,gDAA2B,EAAC;QAC/B,OAAO,EAAE,MAAM,IAAA,0CAA+B,EAAC,YAAY,EAAE;YACzD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC;AAvBD,gDAuBC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.safeSmartAccount = void 0;
4
+ const accounts_1 = require("permissionless/accounts");
5
+ const simpleSmartAccount_1 = require("./simpleSmartAccount.js");
6
+ async function safeSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
7
+ return (0, simpleSmartAccount_1.smartAccountConnectorHelper)({
8
+ account: await (0, accounts_1.signerToSafeSmartAccount)(publicClient, {
9
+ ...rest,
10
+ signer
11
+ }),
12
+ publicClient,
13
+ bundlerTransport,
14
+ sponsorUserOperation
15
+ });
16
+ }
17
+ exports.safeSmartAccount = safeSmartAccount;
18
+ //# sourceMappingURL=safeSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safeSmartAccount.js","sourceRoot":"","sources":["../../connectors/safeSmartAccount.ts"],"names":[],"mappings":";;;AAAA,sDAGgC;AAGhC,6DAG6B;AAiBtB,KAAK,UAAU,gBAAgB,CAKpC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,IAAA,gDAA2B,EAAC;QAC/B,OAAO,EAAE,MAAM,IAAA,mCAAwB,EAAC,YAAY,EAAE;YAClD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC;AAvBD,4CAuBC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.simpleSmartAccount = exports.smartAccountConnectorHelper = void 0;
4
+ const permissionless_1 = require("permissionless");
5
+ const accounts_1 = require("permissionless/accounts");
6
+ const smartAccount_1 = require("./smartAccount.js");
7
+ async function smartAccountConnectorHelper({ bundlerTransport, sponsorUserOperation, account }) {
8
+ const smartAccountClient = (0, permissionless_1.createSmartAccountClient)({
9
+ account,
10
+ transport: bundlerTransport,
11
+ sponsorUserOperation: sponsorUserOperation
12
+ });
13
+ return (0, smartAccount_1.smartAccount)({
14
+ smartAccountClient: smartAccountClient
15
+ });
16
+ }
17
+ exports.smartAccountConnectorHelper = smartAccountConnectorHelper;
18
+ async function simpleSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
19
+ return smartAccountConnectorHelper({
20
+ account: await (0, accounts_1.signerToSimpleSmartAccount)(publicClient, {
21
+ ...rest,
22
+ signer
23
+ }),
24
+ publicClient,
25
+ bundlerTransport,
26
+ sponsorUserOperation
27
+ });
28
+ }
29
+ exports.simpleSmartAccount = simpleSmartAccount;
30
+ //# sourceMappingURL=simpleSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleSmartAccount.js","sourceRoot":"","sources":["../../connectors/simpleSmartAccount.ts"],"names":[],"mappings":";;;AAAA,mDAAyD;AACzD,sDAKgC;AAIhC,iDAA6C;AA8BtC,KAAK,UAAU,2BAA2B,CAO/C,EACE,gBAAgB,EAChB,oBAAoB,EACpB,OAAO,EAMV;IACG,MAAM,kBAAkB,GAAG,IAAA,yCAAwB,EAAC;QAChD,OAAO;QACP,SAAS,EAAE,gBAAgB;QAC3B,oBAAoB,EAAE,oBAAoB;KAC7C,CAAC,CAAA;IAEF,OAAO,IAAA,2BAAY,EAAC;QAChB,kBAAkB,EAAE,kBAAkB;KACzC,CAAC,CAAA;AACN,CAAC;AA1BD,kEA0BC;AAEM,KAAK,UAAU,kBAAkB,CAKtC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAC2D;IAClE,OAAO,2BAA2B,CAAC;QAC/B,OAAO,EAAE,MAAM,IAAA,qCAA0B,EAAC,YAAY,EAAE;YACpD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC;AArBD,gDAqBC"}
package/_cjs/index.js CHANGED
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.smartAccount = void 0;
3
+ exports.kernelSmartAccount = exports.biconomySmartAccount = exports.safeSmartAccount = exports.simpleSmartAccount = exports.smartAccount = void 0;
4
+ const simpleSmartAccount_1 = require("./connectors/simpleSmartAccount.js");
5
+ Object.defineProperty(exports, "simpleSmartAccount", { enumerable: true, get: function () { return simpleSmartAccount_1.simpleSmartAccount; } });
4
6
  const smartAccount_1 = require("./connectors/smartAccount.js");
5
7
  Object.defineProperty(exports, "smartAccount", { enumerable: true, get: function () { return smartAccount_1.smartAccount; } });
8
+ const safeSmartAccount_1 = require("./connectors/safeSmartAccount.js");
9
+ Object.defineProperty(exports, "safeSmartAccount", { enumerable: true, get: function () { return safeSmartAccount_1.safeSmartAccount; } });
10
+ const biconomySmartAccount_1 = require("./connectors/biconomySmartAccount.js");
11
+ Object.defineProperty(exports, "biconomySmartAccount", { enumerable: true, get: function () { return biconomySmartAccount_1.biconomySmartAccount; } });
12
+ const kernelSmartAccount_1 = require("./connectors/kernelSmartAccount.js");
13
+ Object.defineProperty(exports, "kernelSmartAccount", { enumerable: true, get: function () { return kernelSmartAccount_1.kernelSmartAccount; } });
6
14
  //# sourceMappingURL=index.js.map
package/_cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AAE/C,6FAFA,2BAAY,OAEA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,wEAGwC;AAoBpC,mGArBA,uCAAkB,OAqBA;AAnBtB,4DAAwD;AAkBpD,6FAlBK,2BAAY,OAkBL;AAhBhB,oEAGsC;AAgBlC,iGAjBA,mCAAgB,OAiBA;AAdpB,4EAG0C;AAatC,qGAdA,2CAAoB,OAcA;AAXxB,wEAGwC;AAUpC,mGAXA,uCAAkB,OAWA"}
@@ -0,0 +1,14 @@
1
+ import { signerToBiconomySmartAccount } from "permissionless/accounts";
2
+ import { smartAccountConnectorHelper } from "./simpleSmartAccount.js";
3
+ export async function biconomySmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
4
+ return smartAccountConnectorHelper({
5
+ account: await signerToBiconomySmartAccount(publicClient, {
6
+ ...rest,
7
+ signer
8
+ }),
9
+ publicClient,
10
+ bundlerTransport,
11
+ sponsorUserOperation
12
+ });
13
+ }
14
+ //# sourceMappingURL=biconomySmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biconomySmartAccount.js","sourceRoot":"","sources":["../../connectors/biconomySmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,4BAA4B,EAC/B,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEH,2BAA2B,EAC9B,MAAM,sBAAsB,CAAA;AAoB7B,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAKxC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,2BAA2B,CAAC;QAC/B,OAAO,EAAE,MAAM,4BAA4B,CAAC,YAAY,EAAE;YACtD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { signerToEcdsaKernelSmartAccount } from "permissionless/accounts";
2
+ import { smartAccountConnectorHelper } from "./simpleSmartAccount.js";
3
+ export async function kernelSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
4
+ return smartAccountConnectorHelper({
5
+ account: await signerToEcdsaKernelSmartAccount(publicClient, {
6
+ ...rest,
7
+ signer
8
+ }),
9
+ publicClient,
10
+ bundlerTransport,
11
+ sponsorUserOperation
12
+ });
13
+ }
14
+ //# sourceMappingURL=kernelSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernelSmartAccount.js","sourceRoot":"","sources":["../../connectors/kernelSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,+BAA+B,EAClC,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEH,2BAA2B,EAC9B,MAAM,sBAAsB,CAAA;AAoB7B,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAKtC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,2BAA2B,CAAC;QAC/B,OAAO,EAAE,MAAM,+BAA+B,CAAC,YAAY,EAAE;YACzD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { signerToSafeSmartAccount } from "permissionless/accounts";
2
+ import { smartAccountConnectorHelper } from "./simpleSmartAccount.js";
3
+ export async function safeSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
4
+ return smartAccountConnectorHelper({
5
+ account: await signerToSafeSmartAccount(publicClient, {
6
+ ...rest,
7
+ signer
8
+ }),
9
+ publicClient,
10
+ bundlerTransport,
11
+ sponsorUserOperation
12
+ });
13
+ }
14
+ //# sourceMappingURL=safeSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safeSmartAccount.js","sourceRoot":"","sources":["../../connectors/safeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,wBAAwB,EAC3B,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEH,2BAA2B,EAC9B,MAAM,sBAAsB,CAAA;AAiB7B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAKpC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAGV;IACG,OAAO,2BAA2B,CAAC;QAC/B,OAAO,EAAE,MAAM,wBAAwB,CAAC,YAAY,EAAE;YAClD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { createSmartAccountClient } from "permissionless";
2
+ import { signerToSimpleSmartAccount } from "permissionless/accounts";
3
+ import {} from "permissionless/actions/smartAccount";
4
+ import { smartAccount } from "./smartAccount.js";
5
+ export async function smartAccountConnectorHelper({ bundlerTransport, sponsorUserOperation, account }) {
6
+ const smartAccountClient = createSmartAccountClient({
7
+ account,
8
+ transport: bundlerTransport,
9
+ sponsorUserOperation: sponsorUserOperation
10
+ });
11
+ return smartAccount({
12
+ smartAccountClient: smartAccountClient
13
+ });
14
+ }
15
+ export async function simpleSmartAccount({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }) {
16
+ return smartAccountConnectorHelper({
17
+ account: await signerToSimpleSmartAccount(publicClient, {
18
+ ...rest,
19
+ signer
20
+ }),
21
+ publicClient,
22
+ bundlerTransport,
23
+ sponsorUserOperation
24
+ });
25
+ }
26
+ //# sourceMappingURL=simpleSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleSmartAccount.js","sourceRoot":"","sources":["../../connectors/simpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAIH,0BAA0B,EAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAuC,MAAM,qCAAqC,CAAA;AAGzF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AA8B7C,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAO/C,EACE,gBAAgB,EAChB,oBAAoB,EACpB,OAAO,EAMV;IACG,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;QAChD,OAAO;QACP,SAAS,EAAE,gBAAgB;QAC3B,oBAAoB,EAAE,oBAAoB;KAC7C,CAAC,CAAA;IAEF,OAAO,YAAY,CAAC;QAChB,kBAAkB,EAAE,kBAAkB;KACzC,CAAC,CAAA;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAKtC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EAC2D;IAClE,OAAO,2BAA2B,CAAC;QAC/B,OAAO,EAAE,MAAM,0BAA0B,CAAC,YAAY,EAAE;YACpD,GAAG,IAAI;YACP,MAAM;SACT,CAAC;QACF,YAAY;QACZ,gBAAgB;QAChB,oBAAoB;KACvB,CAAC,CAAA;AACN,CAAC"}
package/_esm/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import { simpleSmartAccount } from "./connectors/simpleSmartAccount.js";
1
2
  import { smartAccount } from "./connectors/smartAccount.js";
2
- export { smartAccount };
3
+ import { safeSmartAccount } from "./connectors/safeSmartAccount.js";
4
+ import { biconomySmartAccount } from "./connectors/biconomySmartAccount.js";
5
+ import { kernelSmartAccount } from "./connectors/kernelSmartAccount.js";
6
+ export { smartAccount, simpleSmartAccount, safeSmartAccount, biconomySmartAccount, kernelSmartAccount };
3
7
  //# sourceMappingURL=index.js.map
package/_esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,kBAAkB,EACrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAEH,gBAAgB,EACnB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAEH,oBAAoB,EACvB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAEH,kBAAkB,EACrB,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACH,YAAY,EACZ,kBAAkB,EAElB,gBAAgB,EAEhB,oBAAoB,EAEpB,kBAAkB,EAErB,CAAA"}
@@ -0,0 +1,317 @@
1
+ import { type SignerToBiconomySmartAccountParameters } from "permissionless/accounts";
2
+ import type { Prettify } from "permissionless/types";
3
+ import type { Address, Chain, Transport } from "viem";
4
+ import { type SmartAccountParameters } from "./simpleSmartAccount";
5
+ export type BiconomySmartAccountParameters<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address> = Prettify<SmartAccountParameters<Omit<SignerToBiconomySmartAccountParameters<TSource, TAddress>, "signer">, TTransport, TChain, TSource, TAddress>>;
6
+ export declare function biconomySmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>({ publicClient, signer, bundlerTransport, sponsorUserOperation, ...rest }: Prettify<BiconomySmartAccountParameters<TTransport, TChain, TSource, TAddress>>): Promise<import("wagmi").CreateConnectorFn<unknown, {
7
+ id: string;
8
+ name: string;
9
+ type: string;
10
+ connect: ({ chainId }?: {
11
+ chainId?: number | undefined;
12
+ isReconnecting?: boolean | undefined;
13
+ } | undefined) => Promise<{
14
+ accounts: `0x${string}`[];
15
+ chainId: number;
16
+ }>;
17
+ disconnect: () => Promise<void>;
18
+ getAccounts: () => Promise<`0x${string}`[]>;
19
+ getChainId: () => Promise<number>;
20
+ getProvider: () => Promise<void>;
21
+ isAuthorized: () => Promise<true>;
22
+ onAccountsChanged: () => void;
23
+ onChainChanged: () => void;
24
+ onDisconnect: () => void;
25
+ getClient: ({ chainId: requestedChainId }: {
26
+ chainId: number;
27
+ }) => Promise<{
28
+ account: import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>;
29
+ batch?: {
30
+ multicall?: boolean | {
31
+ batchSize?: number | undefined;
32
+ wait?: number | undefined;
33
+ } | undefined;
34
+ } | undefined;
35
+ cacheTime: number;
36
+ chain: undefined;
37
+ key: string;
38
+ name: string;
39
+ pollingInterval: number;
40
+ request: import("viem").EIP1193RequestFn<import("permissionless/_types/types/bundler").BundlerRpcSchema>;
41
+ transport: ReturnType<TTransport>["config"] & ReturnType<TTransport>["value"];
42
+ type: string;
43
+ uid: string;
44
+ sendTransaction: <TChainOverride extends Chain | undefined>(args: import("viem").SendTransactionParameters<undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, TChainOverride>) => Promise<`0x${string}`>;
45
+ signMessage: (args: import("viem").SignMessageParameters<import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>>) => Promise<`0x${string}`>;
46
+ signTypedData: <const TTypedData extends {
47
+ [x: string]: readonly import("viem").TypedDataParameter[];
48
+ [x: `string[${string}]`]: undefined;
49
+ [x: `function[${string}]`]: undefined;
50
+ [x: `address[${string}]`]: undefined;
51
+ [x: `bool[${string}]`]: undefined;
52
+ [x: `bytes[${string}]`]: undefined;
53
+ [x: `bytes1[${string}]`]: undefined;
54
+ [x: `bytes16[${string}]`]: undefined;
55
+ [x: `bytes2[${string}]`]: undefined;
56
+ [x: `bytes3[${string}]`]: undefined;
57
+ [x: `bytes4[${string}]`]: undefined;
58
+ [x: `bytes5[${string}]`]: undefined;
59
+ [x: `bytes6[${string}]`]: undefined;
60
+ [x: `bytes7[${string}]`]: undefined;
61
+ [x: `bytes8[${string}]`]: undefined;
62
+ [x: `bytes9[${string}]`]: undefined;
63
+ [x: `bytes10[${string}]`]: undefined;
64
+ [x: `bytes11[${string}]`]: undefined;
65
+ [x: `bytes12[${string}]`]: undefined;
66
+ [x: `bytes13[${string}]`]: undefined;
67
+ [x: `bytes14[${string}]`]: undefined;
68
+ [x: `bytes15[${string}]`]: undefined;
69
+ [x: `bytes17[${string}]`]: undefined;
70
+ [x: `bytes18[${string}]`]: undefined;
71
+ [x: `bytes19[${string}]`]: undefined;
72
+ [x: `bytes20[${string}]`]: undefined;
73
+ [x: `bytes21[${string}]`]: undefined;
74
+ [x: `bytes22[${string}]`]: undefined;
75
+ [x: `bytes23[${string}]`]: undefined;
76
+ [x: `bytes24[${string}]`]: undefined;
77
+ [x: `bytes25[${string}]`]: undefined;
78
+ [x: `bytes26[${string}]`]: undefined;
79
+ [x: `bytes27[${string}]`]: undefined;
80
+ [x: `bytes28[${string}]`]: undefined;
81
+ [x: `bytes29[${string}]`]: undefined;
82
+ [x: `bytes30[${string}]`]: undefined;
83
+ [x: `bytes31[${string}]`]: undefined;
84
+ [x: `bytes32[${string}]`]: undefined;
85
+ [x: `int[${string}]`]: undefined;
86
+ [x: `int40[${string}]`]: undefined;
87
+ [x: `int16[${string}]`]: undefined;
88
+ [x: `int56[${string}]`]: undefined;
89
+ [x: `int8[${string}]`]: undefined;
90
+ [x: `int24[${string}]`]: undefined;
91
+ [x: `int32[${string}]`]: undefined;
92
+ [x: `int48[${string}]`]: undefined;
93
+ [x: `int64[${string}]`]: undefined;
94
+ [x: `int72[${string}]`]: undefined;
95
+ [x: `int80[${string}]`]: undefined;
96
+ [x: `int88[${string}]`]: undefined;
97
+ [x: `int96[${string}]`]: undefined;
98
+ [x: `int104[${string}]`]: undefined;
99
+ [x: `int112[${string}]`]: undefined;
100
+ [x: `int120[${string}]`]: undefined;
101
+ [x: `int128[${string}]`]: undefined;
102
+ [x: `int136[${string}]`]: undefined;
103
+ [x: `int144[${string}]`]: undefined;
104
+ [x: `int152[${string}]`]: undefined;
105
+ [x: `int160[${string}]`]: undefined;
106
+ [x: `int168[${string}]`]: undefined;
107
+ [x: `int176[${string}]`]: undefined;
108
+ [x: `int184[${string}]`]: undefined;
109
+ [x: `int192[${string}]`]: undefined;
110
+ [x: `int200[${string}]`]: undefined;
111
+ [x: `int208[${string}]`]: undefined;
112
+ [x: `int216[${string}]`]: undefined;
113
+ [x: `int224[${string}]`]: undefined;
114
+ [x: `int232[${string}]`]: undefined;
115
+ [x: `int240[${string}]`]: undefined;
116
+ [x: `int248[${string}]`]: undefined;
117
+ [x: `int256[${string}]`]: undefined;
118
+ [x: `uint[${string}]`]: undefined;
119
+ [x: `uint40[${string}]`]: undefined;
120
+ [x: `uint16[${string}]`]: undefined;
121
+ [x: `uint56[${string}]`]: undefined;
122
+ [x: `uint8[${string}]`]: undefined;
123
+ [x: `uint24[${string}]`]: undefined;
124
+ [x: `uint32[${string}]`]: undefined;
125
+ [x: `uint48[${string}]`]: undefined;
126
+ [x: `uint64[${string}]`]: undefined;
127
+ [x: `uint72[${string}]`]: undefined;
128
+ [x: `uint80[${string}]`]: undefined;
129
+ [x: `uint88[${string}]`]: undefined;
130
+ [x: `uint96[${string}]`]: undefined;
131
+ [x: `uint104[${string}]`]: undefined;
132
+ [x: `uint112[${string}]`]: undefined;
133
+ [x: `uint120[${string}]`]: undefined;
134
+ [x: `uint128[${string}]`]: undefined;
135
+ [x: `uint136[${string}]`]: undefined;
136
+ [x: `uint144[${string}]`]: undefined;
137
+ [x: `uint152[${string}]`]: undefined;
138
+ [x: `uint160[${string}]`]: undefined;
139
+ [x: `uint168[${string}]`]: undefined;
140
+ [x: `uint176[${string}]`]: undefined;
141
+ [x: `uint184[${string}]`]: undefined;
142
+ [x: `uint192[${string}]`]: undefined;
143
+ [x: `uint200[${string}]`]: undefined;
144
+ [x: `uint208[${string}]`]: undefined;
145
+ [x: `uint216[${string}]`]: undefined;
146
+ [x: `uint224[${string}]`]: undefined;
147
+ [x: `uint232[${string}]`]: undefined;
148
+ [x: `uint240[${string}]`]: undefined;
149
+ [x: `uint248[${string}]`]: undefined;
150
+ [x: `uint256[${string}]`]: undefined;
151
+ string?: undefined;
152
+ address?: undefined;
153
+ bool?: undefined;
154
+ bytes?: undefined;
155
+ bytes1?: undefined;
156
+ bytes16?: undefined;
157
+ bytes2?: undefined;
158
+ bytes3?: undefined;
159
+ bytes4?: undefined;
160
+ bytes5?: undefined;
161
+ bytes6?: undefined;
162
+ bytes7?: undefined;
163
+ bytes8?: undefined;
164
+ bytes9?: undefined;
165
+ bytes10?: undefined;
166
+ bytes11?: undefined;
167
+ bytes12?: undefined;
168
+ bytes13?: undefined;
169
+ bytes14?: undefined;
170
+ bytes15?: undefined;
171
+ bytes17?: undefined;
172
+ bytes18?: undefined;
173
+ bytes19?: undefined;
174
+ bytes20?: undefined;
175
+ bytes21?: undefined;
176
+ bytes22?: undefined;
177
+ bytes23?: undefined;
178
+ bytes24?: undefined;
179
+ bytes25?: undefined;
180
+ bytes26?: undefined;
181
+ bytes27?: undefined;
182
+ bytes28?: undefined;
183
+ bytes29?: undefined;
184
+ bytes30?: undefined;
185
+ bytes31?: undefined;
186
+ bytes32?: undefined;
187
+ int40?: undefined;
188
+ int16?: undefined;
189
+ int56?: undefined;
190
+ int8?: undefined;
191
+ int24?: undefined;
192
+ int32?: undefined;
193
+ int48?: undefined;
194
+ int64?: undefined;
195
+ int72?: undefined;
196
+ int80?: undefined;
197
+ int88?: undefined;
198
+ int96?: undefined;
199
+ int104?: undefined;
200
+ int112?: undefined;
201
+ int120?: undefined;
202
+ int128?: undefined;
203
+ int136?: undefined;
204
+ int144?: undefined;
205
+ int152?: undefined;
206
+ int160?: undefined;
207
+ int168?: undefined;
208
+ int176?: undefined;
209
+ int184?: undefined;
210
+ int192?: undefined;
211
+ int200?: undefined;
212
+ int208?: undefined;
213
+ int216?: undefined;
214
+ int224?: undefined;
215
+ int232?: undefined;
216
+ int240?: undefined;
217
+ int248?: undefined;
218
+ int256?: undefined;
219
+ uint40?: undefined;
220
+ uint16?: undefined;
221
+ uint56?: undefined;
222
+ uint8?: undefined;
223
+ uint24?: undefined;
224
+ uint32?: undefined;
225
+ uint48?: undefined;
226
+ uint64?: undefined;
227
+ uint72?: undefined;
228
+ uint80?: undefined;
229
+ uint88?: undefined;
230
+ uint96?: undefined;
231
+ uint104?: undefined;
232
+ uint112?: undefined;
233
+ uint120?: undefined;
234
+ uint128?: undefined;
235
+ uint136?: undefined;
236
+ uint144?: undefined;
237
+ uint152?: undefined;
238
+ uint160?: undefined;
239
+ uint168?: undefined;
240
+ uint176?: undefined;
241
+ uint184?: undefined;
242
+ uint192?: undefined;
243
+ uint200?: undefined;
244
+ uint208?: undefined;
245
+ uint216?: undefined;
246
+ uint224?: undefined;
247
+ uint232?: undefined;
248
+ uint240?: undefined;
249
+ uint248?: undefined;
250
+ uint256?: undefined;
251
+ } | {
252
+ [key: string]: unknown;
253
+ }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>>) => Promise<`0x${string}`>;
254
+ deployContract: <const TAbi extends readonly unknown[] | import("viem").Abi, TChainOverride_1 extends Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi, undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, TChainOverride_1> extends infer T ? { [K in keyof T]: import("viem").DeployContractParameters<TAbi, undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, TChainOverride_1>[K]; } : never) => Promise<`0x${string}`>;
255
+ writeContract: <const TAbi_1 extends readonly unknown[] | import("viem").Abi, TFunctionName extends import("viem").ContractFunctionName<TAbi_1, "nonpayable" | "payable"> = import("viem").ContractFunctionName<TAbi_1, "nonpayable" | "payable">, TArgs extends import("viem").ContractFunctionArgs<TAbi_1, "nonpayable" | "payable", TFunctionName> = import("viem").ContractFunctionArgs<TAbi_1, "nonpayable" | "payable", TFunctionName>, TChainOverride_2 extends Chain | undefined = undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, TArgs, undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, TChainOverride_2>) => Promise<`0x${string}`>;
256
+ prepareUserOperationRequest: <TTransport extends Transport>(args: {
257
+ userOperation: import("permissionless/types").PartialBy<import("permissionless/types").UserOperation, "sender" | "maxFeePerGas" | "maxPriorityFeePerGas" | "nonce" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">;
258
+ account?: import("permissionless/_types/accounts").SmartAccount | undefined;
259
+ sponsorUserOperation?: ((args: {
260
+ userOperation: import("permissionless/types").UserOperation;
261
+ entryPoint: `0x${string}`;
262
+ }) => Promise<import("permissionless/types").UserOperation>) | undefined;
263
+ }, stateOverrides?: import("permissionless/_types/types/bundler").StateOverrides | undefined) => Promise<{
264
+ sender: `0x${string}`;
265
+ nonce: bigint;
266
+ initCode: `0x${string}`;
267
+ callData: `0x${string}`;
268
+ callGasLimit: bigint;
269
+ verificationGasLimit: bigint;
270
+ preVerificationGas: bigint;
271
+ maxFeePerGas: bigint;
272
+ maxPriorityFeePerGas: bigint;
273
+ paymasterAndData: `0x${string}`;
274
+ signature: `0x${string}`;
275
+ }>;
276
+ sendUserOperation: <TTransport_1 extends Transport>(args: {
277
+ userOperation: import("permissionless/types").PartialBy<import("permissionless/types").UserOperation, "sender" | "maxFeePerGas" | "maxPriorityFeePerGas" | "nonce" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">;
278
+ account?: import("permissionless/_types/accounts").SmartAccount | undefined;
279
+ sponsorUserOperation?: ((args: {
280
+ userOperation: import("permissionless/types").UserOperation;
281
+ entryPoint: `0x${string}`;
282
+ }) => Promise<import("permissionless/types").UserOperation>) | undefined;
283
+ }) => Promise<`0x${string}`>;
284
+ sendTransactions: (args: {
285
+ transactions: {
286
+ to: `0x${string}`;
287
+ value: bigint;
288
+ data: `0x${string}`;
289
+ }[];
290
+ account?: import("permissionless/_types/accounts").SmartAccount | undefined;
291
+ sponsorUserOperation?: ((args: {
292
+ userOperation: import("permissionless/types").UserOperation;
293
+ entryPoint: `0x${string}`;
294
+ }) => Promise<import("permissionless/types").UserOperation>) | undefined;
295
+ maxFeePerGas?: bigint | undefined;
296
+ maxPriorityFeePerGas?: bigint | undefined;
297
+ nonce?: bigint | undefined;
298
+ }) => Promise<`0x${string}`>;
299
+ extend: <const client extends {
300
+ [x: string]: unknown;
301
+ account?: undefined;
302
+ batch?: undefined;
303
+ cacheTime?: undefined;
304
+ chain?: undefined;
305
+ key?: undefined;
306
+ name?: undefined;
307
+ pollingInterval?: undefined;
308
+ request?: undefined;
309
+ transport?: undefined;
310
+ type?: undefined;
311
+ uid?: undefined;
312
+ } & Partial<Pick<import("viem").PublicActions, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<TTransport, undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, import("permissionless/_types/types/bundler").BundlerRpcSchema, import("permissionless").SmartAccountActions<undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>>>) => client) => import("viem").Client<TTransport, undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>, import("permissionless/_types/types/bundler").BundlerRpcSchema, { [K_1 in keyof client]: client[K_1]; } & import("permissionless").SmartAccountActions<undefined, import("permissionless/accounts").SmartAccount<"biconomySmartAccount", TTransport, TChain>>>;
313
+ } & {
314
+ estimateGas?: (() => bigint | undefined) | undefined;
315
+ }>;
316
+ }, {}>>;
317
+ //# sourceMappingURL=biconomySmartAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biconomySmartAccount.d.ts","sourceRoot":"","sources":["../../connectors/biconomySmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,sCAAsC,EAE9C,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACrD,OAAO,EACH,KAAK,sBAAsB,EAE9B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,MAAM,8BAA8B,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,OAAO,SAAS,MAAM,GAAG,QAAQ,EACjC,QAAQ,SAAS,OAAO,GAAG,OAAO,IAClC,QAAQ,CACR,sBAAsB,CAClB,IAAI,CACA,sCAAsC,CAAC,OAAO,EAAE,QAAQ,CAAC,EACzD,QAAQ,CACX,EACD,UAAU,EACV,MAAM,EACN,OAAO,EACP,QAAQ,CACX,CACJ,CAAA;AAED,wBAAsB,oBAAoB,CACtC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,OAAO,SAAS,MAAM,GAAG,QAAQ,EACjC,QAAQ,SAAS,OAAO,GAAG,OAAO,EACpC,EACE,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,GAAG,IAAI,EACV,EAAE,QAAQ,CACP,8BAA8B,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUA"}