permissionless 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +76 -0
- package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +4 -1
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +4 -1
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_cjs/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/signerToSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/signerToSimpleSmartAccount.js +4 -1
- package/_cjs/accounts/signerToSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/types.js.map +1 -1
- package/_cjs/actions/smartAccount/deployContract.js.map +1 -1
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
- package/_cjs/clients/decorators/smartAccount.js.map +1 -1
- package/_cjs/utils/walletClientToCustomSigner.js +3 -2
- package/_cjs/utils/walletClientToCustomSigner.js.map +1 -1
- package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js +4 -1
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js +4 -1
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_esm/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/signerToSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/signerToSimpleSmartAccount.js +4 -1
- package/_esm/accounts/signerToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/types.js.map +1 -1
- package/_esm/actions/smartAccount/deployContract.js.map +1 -1
- package/_esm/actions/smartAccount/writeContract.js.map +1 -1
- package/_esm/clients/decorators/smartAccount.js.map +1 -1
- package/_esm/utils/walletClientToCustomSigner.js +3 -2
- package/_esm/utils/walletClientToCustomSigner.js.map +1 -1
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +1 -1
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +1 -1
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +1 -1
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -1
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts +1 -1
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/signerToSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/signerToSimpleSmartAccount.d.ts +1 -1
- package/_types/accounts/signerToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +3 -6
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/actions/smartAccount/deployContract.d.ts +1 -1
- package/_types/actions/smartAccount/deployContract.d.ts.map +1 -1
- package/_types/actions/smartAccount/writeContract.d.ts +3 -3
- package/_types/actions/smartAccount/writeContract.d.ts.map +1 -1
- package/_types/clients/createSmartAccountClient.d.ts +10 -10
- package/_types/clients/decorators/smartAccount.d.ts +3 -3
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
- package/_types/utils/walletClientToCustomSigner.d.ts.map +1 -1
- package/accounts/biconomy/privateKeyToBiconomySmartAccount.ts +1 -1
- package/accounts/biconomy/signerToBiconomySmartAccount.ts +16 -3
- package/accounts/kernel/signerToEcdsaKernelSmartAccount.ts +16 -3
- package/accounts/privateKeyToSimpleSmartAccount.ts +1 -1
- package/accounts/signerToSafeSmartAccount.ts +11 -3
- package/accounts/signerToSimpleSmartAccount.ts +16 -3
- package/accounts/types.ts +2 -3
- package/actions/smartAccount/deployContract.ts +2 -9
- package/actions/smartAccount/writeContract.ts +24 -4
- package/clients/createSmartAccountClient.ts +2 -2
- package/clients/decorators/smartAccount.ts +15 -5
- package/package.json +4 -2
- package/utils/walletClientToCustomSigner.ts +14 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletClientToCustomSigner.js","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"walletClientToCustomSigner.js","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAG5C,MAAM,UAAU,0BAA0B,CAGtC,YAAsD;IAEtD,OAAO;QACH,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACrC,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACvC,WAAW,EAAE,KAAK,EAAE,EAChB,OAAO,EACoB,EAAgB,EAAE;YAC7C,OAAO,YAAY,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAChD,CAAC;QACD,KAAK,CAAC,aAAa,CAKjB,SAAwD;YACtD,OAAO,aAAa,CAChB,YAAY,EACZ;gBACI,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,GAAG,SAAS;aACf,CACJ,CAAA;QACL,CAAC;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { type BiconomySmartAccount } from "./signerToBiconomySmartAccount.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @returns A Private Key Biconomy Smart Account using ECDSA as default validation module.
|
|
7
7
|
*/
|
|
8
|
-
export declare function privateKeyToBiconomySmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { privateKey, entryPoint, index }: {
|
|
8
|
+
export declare function privateKeyToBiconomySmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { privateKey, entryPoint, index }: {
|
|
9
9
|
privateKey: Hex;
|
|
10
10
|
entryPoint: Address;
|
|
11
11
|
index?: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privateKeyToBiconomySmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/biconomy/privateKeyToBiconomySmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,oBAAoB,EAE5B,MAAM,mCAAmC,CAAA;AAE1C;;;;GAIG;AACH,wBAAsB,gCAAgC,CAClD,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"privateKeyToBiconomySmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/biconomy/privateKeyToBiconomySmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,oBAAoB,EAE5B,MAAM,mCAAmC,CAAA;AAE1C;;;;GAIG;AACH,wBAAsB,gCAAgC,CAClD,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,UAAU,EACV,UAAU,EACV,KAAU,EACb,EAAE;IACC,UAAU,EAAE,GAAG,CAAA;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAOnD"}
|
|
@@ -11,7 +11,7 @@ export type BiconomySmartAccount<transport extends Transport = Transport, chain
|
|
|
11
11
|
* @param accountLogicAddress
|
|
12
12
|
* @param ecdsaModuleAddress
|
|
13
13
|
*/
|
|
14
|
-
export declare function signerToBiconomySmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain>, { signer, entryPoint, index, factoryAddress, accountLogicAddress, fallbackHandlerAddress, ecdsaModuleAddress }: {
|
|
14
|
+
export declare function signerToBiconomySmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined>, { signer, entryPoint, index, factoryAddress, accountLogicAddress, fallbackHandlerAddress, ecdsaModuleAddress }: {
|
|
15
15
|
signer: SmartAccountSigner<TSource, TAddress>;
|
|
16
16
|
entryPoint: Address;
|
|
17
17
|
index?: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerToBiconomySmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/biconomy/signerToBiconomySmartAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signerToBiconomySmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/biconomy/signerToBiconomySmartAccount.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAUjB,MAAM,MAAM,CAAA;AAUb,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,aAAa,CAAA;AAOpB,MAAM,MAAM,oBAAoB,CAC5B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,sBAAsB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAqJ1D;;;;;;;;;GASG;AACH,wBAAsB,4BAA4B,CAC9C,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,EAElC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,MAAM,EACN,UAAU,EACV,KAAU,EACV,cAAmD,EACnD,mBAA2D,EAC3D,sBAA4E,EAC5E,kBAAuE,EAC1E,EAAE;IACC,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7C,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC/B,GACF,OAAO,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAwJnD"}
|
|
@@ -13,7 +13,7 @@ export type KernelEcdsaSmartAccount<transport extends Transport = Transport, cha
|
|
|
13
13
|
* @param ecdsaValidatorAddress
|
|
14
14
|
* @param deployedAccountAddress
|
|
15
15
|
*/
|
|
16
|
-
export declare function signerToEcdsaKernelSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain>, { signer, entryPoint, index, factoryAddress, accountLogicAddress, ecdsaValidatorAddress, deployedAccountAddress }: {
|
|
16
|
+
export declare function signerToEcdsaKernelSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined>, { signer, entryPoint, index, factoryAddress, accountLogicAddress, ecdsaValidatorAddress, deployedAccountAddress }: {
|
|
17
17
|
signer: SmartAccountSigner<TSource, TAddress>;
|
|
18
18
|
entryPoint: Address;
|
|
19
19
|
index?: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerToEcdsaKernelSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/kernel/signerToEcdsaKernelSmartAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signerToEcdsaKernelSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/kernel/signerToEcdsaKernelSmartAccount.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AAYb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAEH,KAAK,kBAAkB,EAC1B,MAAM,aAAa,CAAA;AAGpB,MAAM,MAAM,uBAAuB,CAC/B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,yBAAyB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAuK7D;;;;;;;;;;GAUG;AACH,wBAAsB,+BAA+B,CACjD,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,EAElC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,MAAM,EACN,UAAU,EACV,KAAU,EACV,cAAiD,EACjD,mBAAyD,EACzD,qBAAwD,EACxD,sBAAsB,EACzB,EAAE;IACC,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7C,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACnC,GACF,OAAO,CAAC,uBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAyItD"}
|
|
@@ -5,7 +5,7 @@ import { type SimpleSmartAccount } from "./signerToSimpleSmartAccount.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @returns A Private Key Simple Account.
|
|
7
7
|
*/
|
|
8
|
-
export declare function privateKeyToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { privateKey, factoryAddress, entryPoint, index }: {
|
|
8
|
+
export declare function privateKeyToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { privateKey, factoryAddress, entryPoint, index }: {
|
|
9
9
|
privateKey: Hex;
|
|
10
10
|
factoryAddress: Address;
|
|
11
11
|
entryPoint: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privateKeyToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/privateKeyToSimpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,iCAAiC,CAAA;AAExC;;;;GAIG;AACH,wBAAsB,8BAA8B,CAChD,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"privateKeyToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/privateKeyToSimpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,iCAAiC,CAAA;AAExC;;;;GAIG;AACH,wBAAsB,8BAA8B,CAChD,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,UAAU,EACV,cAAc,EACd,UAAU,EACV,KAAU,EACb,EAAE;IACC,UAAU,EAAE,GAAG,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CASjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerToSafeSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/signerToSafeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAIX,KAAK,SAAS,E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AAsB,EAC7C,uBAAuB,EAAE,wBAAwB,EACjD,oBAAoB,EAAE,qBAAqB,EAC3C,gBAAgB,EAAE,iBAAiB,EACnC,wBAAwB,EAAE,yBAAyB,EACnD,SAAc,EACd,UAAc,EACd,UAAc,EACd,WAAgB,EAChB,iBAAsB,EACzB,EAAE;IACC,WAAW,EAAE,WAAW,CAAA;IACxB,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7C,UAAU,EAAE,OAAO,CAAA;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iBAAiB,CAAC,EAAE;QAChB,EAAE,EAAE,OAAO,CAAA;QACX,IAAI,EAAE,OAAO,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;IACH,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CAC1B,GACF,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAyP/C"}
|
|
@@ -6,7 +6,7 @@ export type SimpleSmartAccount<transport extends Transport = Transport, chain ex
|
|
|
6
6
|
*
|
|
7
7
|
* @returns A Private Key Simple Account.
|
|
8
8
|
*/
|
|
9
|
-
export declare function signerToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain>, { signer, factoryAddress, entryPoint, index }: {
|
|
9
|
+
export declare function signerToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = "custom", TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined>, { signer, factoryAddress, entryPoint, index }: {
|
|
10
10
|
signer: SmartAccountSigner<TSource, TAddress>;
|
|
11
11
|
factoryAddress: Address;
|
|
12
12
|
entryPoint: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signerToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/signerToSimpleSmartAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signerToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/signerToSimpleSmartAccount.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAIjB,MAAM,MAAM,CAAA;AAWb,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,kBAAkB,CAC1B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,oBAAoB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAoExD;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC5C,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,EAElC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,MAAM,EACN,cAAc,EACd,UAAU,EACV,KAAU,EACb,EAAE;IACC,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7C,cAAc,EAAE,OAAO,CAAA;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CA4JjD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Abi, type Address, BaseError, type Client, type
|
|
2
|
-
import type { Chain, Transport } from "viem";
|
|
1
|
+
import { type Abi, type Address, BaseError, type Client, type Hex, type LocalAccount } from "viem";
|
|
2
|
+
import type { Chain, EncodeDeployDataParameters, Transport } from "viem";
|
|
3
3
|
import { type UserOperation } from "../types/index.js";
|
|
4
4
|
export declare class SignTransactionNotSupportedBySmartAccount extends BaseError {
|
|
5
5
|
name: string;
|
|
@@ -22,10 +22,7 @@ export type SmartAccount<Name extends string = string, transport extends Transpo
|
|
|
22
22
|
data: Hex;
|
|
23
23
|
}[]) => Promise<Hex>;
|
|
24
24
|
getDummySignature(userOperation: UserOperation): Promise<Hex>;
|
|
25
|
-
encodeDeployCallData: <TAbi extends Abi | readonly unknown[] = Abi>({ abi, args, bytecode }:
|
|
26
|
-
abi: TAbi;
|
|
27
|
-
bytecode: Hex;
|
|
28
|
-
} & GetConstructorArgs<TAbi>) => Promise<Hex>;
|
|
25
|
+
encodeDeployCallData: <TAbi extends Abi | readonly unknown[] = Abi>({ abi, args, bytecode }: EncodeDeployDataParameters<TAbi>) => Promise<Hex>;
|
|
29
26
|
signUserOperation: (userOperation: UserOperation) => Promise<Hex>;
|
|
30
27
|
};
|
|
31
28
|
export type SmartAccountSigner<TSource extends string, TAddress extends Address = Address> = Omit<LocalAccount<TSource, TAddress>, "signTransaction">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,SAAS,EACT,KAAK,MAAM,EACX,KAAK,
|
|
1
|
+
{"version":3,"file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SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAAE,EAChE,GAAG,EACH,IAAI,EACJ,QAAQ,EACX,EAAE,0BAA0B,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACpD,iBAAiB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACpE,CAAA;AAED,MAAM,MAAM,kBAAkB,CAC1B,OAAO,SAAS,MAAM,EACtB,QAAQ,SAAS,OAAO,GAAG,OAAO,IAClC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -30,5 +30,5 @@ export type DeployContractParametersWithPaymaster<TAbi extends Abi | readonly un
|
|
|
30
30
|
* bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
export declare function deployContract<
|
|
33
|
+
export declare function deployContract<TChain extends Chain | undefined, TAccount extends SmartAccount | undefined>(client: Client<Transport, TChain, TAccount>, { abi, args, bytecode, sponsorUserOperation, ...request }: DeployContractParametersWithPaymaster): Promise<DeployContractReturnType>;
|
|
34
34
|
//# sourceMappingURL=deployContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployContract.d.ts","sourceRoot":"","sources":["../../../actions/smartAccount/deployContract.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAK3D,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AAGtF,MAAM,MAAM,qCAAqC,CAC7C,IAAI,SAAS,GAAG,GAAG,SAAS,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AChC,QAAQ,SAAS,YAAY,GAAG,SAAS,EAEzC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACI,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,oBAAoB,EACpB,GAAG,OAAO,EACb,EAAE,qCAAqC,GACzC,OAAO,CAAC,wBAAwB,CAAC,CAsCnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Abi, type Chain, type Client, type Transport, type WriteContractParameters, type WriteContractReturnType } from "viem";
|
|
1
|
+
import { type Abi, type Chain, type Client, type ContractFunctionArgs, type ContractFunctionName, type Transport, type WriteContractParameters, type WriteContractReturnType } from "viem";
|
|
2
2
|
import { type SmartAccount } from "../../accounts/types.js";
|
|
3
3
|
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest.js";
|
|
4
4
|
/**
|
|
@@ -52,6 +52,6 @@ import { type SponsorUserOperationMiddleware } from "./prepareUserOperationReque
|
|
|
52
52
|
* }
|
|
53
53
|
* const hash = await writeContract(client, request)
|
|
54
54
|
*/
|
|
55
|
-
export type WriteContractWithPaymasterParameters<TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartAccount | undefined = SmartAccount | undefined, TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends
|
|
56
|
-
export declare function writeContract<TChain extends Chain | undefined, TAccount extends SmartAccount | undefined, const TAbi extends Abi | readonly unknown[], TFunctionName extends
|
|
55
|
+
export type WriteContractWithPaymasterParameters<TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartAccount | undefined = SmartAccount | undefined, TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined> = WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TAccount, TChainOverride> & SponsorUserOperationMiddleware;
|
|
56
|
+
export declare function writeContract<TChain extends Chain | undefined, TAccount extends SmartAccount | undefined, const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(client: Client<Transport, TChain, TAccount>, { abi, address, args, dataSuffix, functionName, ...request }: WriteContractWithPaymasterParameters<TChain, TAccount, TAbi, TFunctionName, TArgs, TChainOverride>): Promise<WriteContractReturnType>;
|
|
57
57
|
//# sourceMappingURL=writeContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeContract.d.ts","sourceRoot":"","sources":["../../../actions/smartAccount/writeContract.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"writeContract.d.ts","sourceRoot":"","sources":["../../../actions/smartAccount/writeContract.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAEzB,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAE/B,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AAMtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,MAAM,oCAAoC,CAC5C,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK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,oCAAoC,CACnC,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,KAAK,EACL,cAAc,CACjB,GACF,OAAO,CAAC,uBAAuB,CAAC,CAmBlC"}
|
|
@@ -30,7 +30,7 @@ export type SmartAccountClientConfig<transport extends Transport = Transport, ch
|
|
|
30
30
|
* transport: http(BUNDLER_URL),
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
export declare const createSmartAccountClient: <TTransport extends Transport, TChain extends Chain | undefined = undefined, TSmartAccount extends SmartAccount | undefined = undefined>(parameters: {
|
|
33
|
+
export declare const createSmartAccountClient: <TTransport extends Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined>(parameters: {
|
|
34
34
|
account?: `0x${string}` | import("viem").Account | TSmartAccount | undefined;
|
|
35
35
|
cacheTime?: number | undefined;
|
|
36
36
|
chain?: Chain | TChain | undefined;
|
|
@@ -97,13 +97,13 @@ export declare const createSmartAccountClient: <TTransport extends Transport, TC
|
|
|
97
97
|
[x: `bytes31[${string}]`]: undefined;
|
|
98
98
|
[x: `bytes32[${string}]`]: undefined;
|
|
99
99
|
[x: `int[${string}]`]: undefined;
|
|
100
|
+
[x: `int40[${string}]`]: undefined;
|
|
100
101
|
[x: `int16[${string}]`]: undefined;
|
|
102
|
+
[x: `int56[${string}]`]: undefined;
|
|
101
103
|
[x: `int8[${string}]`]: undefined;
|
|
102
104
|
[x: `int24[${string}]`]: undefined;
|
|
103
105
|
[x: `int32[${string}]`]: undefined;
|
|
104
|
-
[x: `int40[${string}]`]: undefined;
|
|
105
106
|
[x: `int48[${string}]`]: undefined;
|
|
106
|
-
[x: `int56[${string}]`]: undefined;
|
|
107
107
|
[x: `int64[${string}]`]: undefined;
|
|
108
108
|
[x: `int72[${string}]`]: undefined;
|
|
109
109
|
[x: `int80[${string}]`]: undefined;
|
|
@@ -130,13 +130,13 @@ export declare const createSmartAccountClient: <TTransport extends Transport, TC
|
|
|
130
130
|
[x: `int248[${string}]`]: undefined;
|
|
131
131
|
[x: `int256[${string}]`]: undefined;
|
|
132
132
|
[x: `uint[${string}]`]: undefined;
|
|
133
|
+
[x: `uint40[${string}]`]: undefined;
|
|
133
134
|
[x: `uint16[${string}]`]: undefined;
|
|
135
|
+
[x: `uint56[${string}]`]: undefined;
|
|
134
136
|
[x: `uint8[${string}]`]: undefined;
|
|
135
137
|
[x: `uint24[${string}]`]: undefined;
|
|
136
138
|
[x: `uint32[${string}]`]: undefined;
|
|
137
|
-
[x: `uint40[${string}]`]: undefined;
|
|
138
139
|
[x: `uint48[${string}]`]: undefined;
|
|
139
|
-
[x: `uint56[${string}]`]: undefined;
|
|
140
140
|
[x: `uint64[${string}]`]: undefined;
|
|
141
141
|
[x: `uint72[${string}]`]: undefined;
|
|
142
142
|
[x: `uint80[${string}]`]: undefined;
|
|
@@ -198,13 +198,13 @@ export declare const createSmartAccountClient: <TTransport extends Transport, TC
|
|
|
198
198
|
bytes30?: undefined;
|
|
199
199
|
bytes31?: undefined;
|
|
200
200
|
bytes32?: undefined;
|
|
201
|
+
int40?: undefined;
|
|
201
202
|
int16?: undefined;
|
|
203
|
+
int56?: undefined;
|
|
202
204
|
int8?: undefined;
|
|
203
205
|
int24?: undefined;
|
|
204
206
|
int32?: undefined;
|
|
205
|
-
int40?: undefined;
|
|
206
207
|
int48?: undefined;
|
|
207
|
-
int56?: undefined;
|
|
208
208
|
int64?: undefined;
|
|
209
209
|
int72?: undefined;
|
|
210
210
|
int80?: undefined;
|
|
@@ -230,13 +230,13 @@ export declare const createSmartAccountClient: <TTransport extends Transport, TC
|
|
|
230
230
|
int240?: undefined;
|
|
231
231
|
int248?: undefined;
|
|
232
232
|
int256?: undefined;
|
|
233
|
+
uint40?: undefined;
|
|
233
234
|
uint16?: undefined;
|
|
235
|
+
uint56?: undefined;
|
|
234
236
|
uint8?: undefined;
|
|
235
237
|
uint24?: undefined;
|
|
236
238
|
uint32?: undefined;
|
|
237
|
-
uint40?: undefined;
|
|
238
239
|
uint48?: undefined;
|
|
239
|
-
uint56?: undefined;
|
|
240
240
|
uint64?: undefined;
|
|
241
241
|
uint72?: undefined;
|
|
242
242
|
uint80?: undefined;
|
|
@@ -266,7 +266,7 @@ export declare const createSmartAccountClient: <TTransport extends Transport, TC
|
|
|
266
266
|
[key: string]: unknown;
|
|
267
267
|
}, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, ParseAccount<TSmartAccount>>) => Promise<`0x${string}`>;
|
|
268
268
|
deployContract: <const TAbi extends readonly unknown[] | import("viem").Abi, TChainOverride_1 extends Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi, TChain, ParseAccount<TSmartAccount>, TChainOverride_1>) => Promise<`0x${string}`>;
|
|
269
|
-
writeContract: <const TAbi_1 extends readonly unknown[] | import("viem").Abi, TFunctionName extends
|
|
269
|
+
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, TChain, ParseAccount<TSmartAccount>, TChainOverride_2>) => Promise<`0x${string}`>;
|
|
270
270
|
prepareUserOperationRequest: <TTransport_1 extends Transport>(args: import("../actions/smartAccount/prepareUserOperationRequest.js").PrepareUserOperationRequestParameters<ParseAccount<TSmartAccount>>) => Promise<import("../types/userOperation.js").UserOperation>;
|
|
271
271
|
sendUserOperation: <TTransport_2 extends Transport>(args: import("../actions/smartAccount.js").SendUserOperationParameters<ParseAccount<TSmartAccount>>) => Promise<`0x${string}`>;
|
|
272
272
|
sendTransactions: (args: import("../actions/smartAccount.js").SendTransactionsWithPaymasterParameters<ParseAccount<TSmartAccount>>) => Promise<`0x${string}`>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Abi, Chain, Client, DeployContractParameters, SendTransactionParameters, Transport, TypedData, WriteContractParameters } from "viem";
|
|
1
|
+
import type { Abi, Chain, Client, ContractFunctionArgs, ContractFunctionName, DeployContractParameters, SendTransactionParameters, Transport, TypedData, WriteContractParameters } from "viem";
|
|
2
2
|
import type { SmartAccount } from "../../accounts/types.js";
|
|
3
3
|
import { type SendTransactionsWithPaymasterParameters, sendTransactions } from "../../actions/smartAccount.js";
|
|
4
4
|
import { deployContract } from "../../actions/smartAccount/deployContract.js";
|
|
@@ -222,7 +222,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
222
222
|
* bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
|
|
223
223
|
* })
|
|
224
224
|
*/
|
|
225
|
-
deployContract: <const TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined = undefined>(args: DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof deployContract<
|
|
225
|
+
deployContract: <const TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined = undefined>(args: DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof deployContract<TChain, TSmartAccount>>;
|
|
226
226
|
/**
|
|
227
227
|
* Executes a write function on a contract.
|
|
228
228
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -271,7 +271,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
271
271
|
* }
|
|
272
272
|
* const hash = await client.writeContract(request)
|
|
273
273
|
*/
|
|
274
|
-
writeContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends
|
|
274
|
+
writeContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof writeContract<TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
|
|
275
275
|
prepareUserOperationRequest: <TTransport extends Transport>(args: Parameters<typeof prepareUserOperationRequest<TTransport, TChain, TSmartAccount>>[1]) => Promise<PrepareUserOperationRequestReturnType>;
|
|
276
276
|
sendUserOperation: <TTransport extends Transport>(args: Parameters<typeof sendUserOperation<TTransport, TChain, TSmartAccount>>[1]) => Promise<SendUserOperationReturnType>;
|
|
277
277
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,wBAAwB,EACxB,yBAAyB,EACzB,SAAS,EACT,SAAS,EACT,uBAAuB,EAC1B,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACH,KAAK,uCAAuC,EAC5C,gBAAgB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAEH,cAAc,EACjB,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EACnC,2BAA2B,EAC9B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAEH,eAAe,EAClB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAEH,KAAK,2BAA2B,EAChC,iBAAiB,EACpB,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,O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H,cAAc,EAAE,CACZ,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAEpD,IAAI,EAAE,wBAAwB,CAC1B,IAAI,EACJ,MAAM,EACN,aAAa,EACb,cAAc,CACjB,KACA,UAAU,
|
|
1
|
+
{"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,SAAS,EACT,SAAS,EACT,uBAAuB,EAC1B,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACH,KAAK,uCAAuC,EAC5C,gBAAgB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAEH,cAAc,EACjB,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EACnC,2BAA2B,EAC9B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAEH,eAAe,EAClB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAEH,KAAK,2BAA2B,EAChC,iBAAiB,EACpB,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAA;AAEpD,MAAM,MAAM,mBAAmB,CAC3B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,IACzE;IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC3D,UAAU,CAAC,OAAO,gBAAgB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;CAClE,CAAA;AAED,eAAO,MAAM,mBAAmB,6BACD,8BAA8B,qQAuCvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletClientToCustomSigner.d.ts","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,KAAK,EAGL,SAAS,EAGT,YAAY,EACf,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"walletClientToCustomSigner.d.ts","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,KAAK,EAGL,SAAS,EAGT,YAAY,EACf,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,wBAAgB,0BAA0B,CACtC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,GACvD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CA0BvC"}
|
|
@@ -20,7 +20,7 @@ export async function privateKeyToBiconomySmartAccount<
|
|
|
20
20
|
TTransport extends Transport = Transport,
|
|
21
21
|
TChain extends Chain | undefined = Chain | undefined
|
|
22
22
|
>(
|
|
23
|
-
client: Client<TTransport, TChain>,
|
|
23
|
+
client: Client<TTransport, TChain, undefined>,
|
|
24
24
|
{
|
|
25
25
|
privateKey,
|
|
26
26
|
entryPoint,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TypedData } from "abitype"
|
|
1
2
|
import {
|
|
2
3
|
type Address,
|
|
3
4
|
type Chain,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
type Hex,
|
|
6
7
|
type LocalAccount,
|
|
7
8
|
type Transport,
|
|
9
|
+
type TypedDataDefinition,
|
|
8
10
|
concatHex,
|
|
9
11
|
encodeAbiParameters,
|
|
10
12
|
encodeFunctionData,
|
|
@@ -202,7 +204,7 @@ export async function signerToBiconomySmartAccount<
|
|
|
202
204
|
TSource extends string = "custom",
|
|
203
205
|
TAddress extends Address = Address
|
|
204
206
|
>(
|
|
205
|
-
client: Client<TTransport, TChain>,
|
|
207
|
+
client: Client<TTransport, TChain, undefined>,
|
|
206
208
|
{
|
|
207
209
|
signer,
|
|
208
210
|
entryPoint,
|
|
@@ -262,8 +264,19 @@ export async function signerToBiconomySmartAccount<
|
|
|
262
264
|
async signTransaction(_, __) {
|
|
263
265
|
throw new SignTransactionNotSupportedBySmartAccount()
|
|
264
266
|
},
|
|
265
|
-
async signTypedData
|
|
266
|
-
|
|
267
|
+
async signTypedData<
|
|
268
|
+
const TTypedData extends TypedData | Record<string, unknown>,
|
|
269
|
+
TPrimaryType extends
|
|
270
|
+
| keyof TTypedData
|
|
271
|
+
| "EIP712Domain" = keyof TTypedData
|
|
272
|
+
>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) {
|
|
273
|
+
return signTypedData<TTypedData, TPrimaryType, TChain, undefined>(
|
|
274
|
+
client,
|
|
275
|
+
{
|
|
276
|
+
account: viemSigner,
|
|
277
|
+
...typedData
|
|
278
|
+
}
|
|
279
|
+
)
|
|
267
280
|
}
|
|
268
281
|
})
|
|
269
282
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TypedData } from "abitype"
|
|
1
2
|
import {
|
|
2
3
|
type Address,
|
|
3
4
|
type Chain,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
type Hex,
|
|
6
7
|
type LocalAccount,
|
|
7
8
|
type Transport,
|
|
9
|
+
type TypedDataDefinition,
|
|
8
10
|
concatHex,
|
|
9
11
|
encodeFunctionData,
|
|
10
12
|
isAddressEqual
|
|
@@ -214,7 +216,7 @@ export async function signerToEcdsaKernelSmartAccount<
|
|
|
214
216
|
TSource extends string = "custom",
|
|
215
217
|
TAddress extends Address = Address
|
|
216
218
|
>(
|
|
217
|
-
client: Client<TTransport, TChain>,
|
|
219
|
+
client: Client<TTransport, TChain, undefined>,
|
|
218
220
|
{
|
|
219
221
|
signer,
|
|
220
222
|
entryPoint,
|
|
@@ -275,8 +277,19 @@ export async function signerToEcdsaKernelSmartAccount<
|
|
|
275
277
|
async signTransaction(_, __) {
|
|
276
278
|
throw new SignTransactionNotSupportedBySmartAccount()
|
|
277
279
|
},
|
|
278
|
-
async signTypedData
|
|
279
|
-
|
|
280
|
+
async signTypedData<
|
|
281
|
+
const TTypedData extends TypedData | Record<string, unknown>,
|
|
282
|
+
TPrimaryType extends
|
|
283
|
+
| keyof TTypedData
|
|
284
|
+
| "EIP712Domain" = keyof TTypedData
|
|
285
|
+
>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) {
|
|
286
|
+
return signTypedData<TTypedData, TPrimaryType, TChain, undefined>(
|
|
287
|
+
client,
|
|
288
|
+
{
|
|
289
|
+
account: viemSigner,
|
|
290
|
+
...typedData
|
|
291
|
+
}
|
|
292
|
+
)
|
|
280
293
|
}
|
|
281
294
|
})
|
|
282
295
|
|
|
@@ -20,7 +20,7 @@ export async function privateKeyToSimpleSmartAccount<
|
|
|
20
20
|
TTransport extends Transport = Transport,
|
|
21
21
|
TChain extends Chain | undefined = Chain | undefined
|
|
22
22
|
>(
|
|
23
|
-
client: Client<TTransport, TChain>,
|
|
23
|
+
client: Client<TTransport, TChain, undefined>,
|
|
24
24
|
{
|
|
25
25
|
privateKey,
|
|
26
26
|
factoryAddress,
|
|
@@ -103,7 +103,7 @@ const adjustVInSignature = (
|
|
|
103
103
|
|
|
104
104
|
const generateSafeMessageMessage = <
|
|
105
105
|
const TTypedData extends TypedData | { [key: string]: unknown },
|
|
106
|
-
TPrimaryType extends
|
|
106
|
+
TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData
|
|
107
107
|
>(
|
|
108
108
|
message: SignableMessage | TypedDataDefinition<TTypedData, TPrimaryType>
|
|
109
109
|
): Hex => {
|
|
@@ -606,7 +606,12 @@ export async function signerToSafeSmartAccount<
|
|
|
606
606
|
async signTransaction(_, __) {
|
|
607
607
|
throw new SignTransactionNotSupportedBySmartAccount()
|
|
608
608
|
},
|
|
609
|
-
async signTypedData
|
|
609
|
+
async signTypedData<
|
|
610
|
+
const TTypedData extends TypedData | Record<string, unknown>,
|
|
611
|
+
TPrimaryType extends
|
|
612
|
+
| keyof TTypedData
|
|
613
|
+
| "EIP712Domain" = keyof TTypedData
|
|
614
|
+
>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) {
|
|
610
615
|
return adjustVInSignature(
|
|
611
616
|
"eth_signTypedData",
|
|
612
617
|
await signTypedData(client, {
|
|
@@ -620,7 +625,10 @@ export async function signerToSafeSmartAccount<
|
|
|
620
625
|
},
|
|
621
626
|
primaryType: "SafeMessage",
|
|
622
627
|
message: {
|
|
623
|
-
message: generateSafeMessageMessage
|
|
628
|
+
message: generateSafeMessageMessage<
|
|
629
|
+
TTypedData,
|
|
630
|
+
TPrimaryType
|
|
631
|
+
>(typedData)
|
|
624
632
|
}
|
|
625
633
|
})
|
|
626
634
|
)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TypedData } from "abitype"
|
|
1
2
|
import {
|
|
2
3
|
type Address,
|
|
3
4
|
type Chain,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
type Hex,
|
|
6
7
|
type LocalAccount,
|
|
7
8
|
type Transport,
|
|
9
|
+
type TypedDataDefinition,
|
|
8
10
|
concatHex,
|
|
9
11
|
encodeFunctionData
|
|
10
12
|
} from "viem"
|
|
@@ -106,7 +108,7 @@ export async function signerToSimpleSmartAccount<
|
|
|
106
108
|
TSource extends string = "custom",
|
|
107
109
|
TAddress extends Address = Address
|
|
108
110
|
>(
|
|
109
|
-
client: Client<TTransport, TChain>,
|
|
111
|
+
client: Client<TTransport, TChain, undefined>,
|
|
110
112
|
{
|
|
111
113
|
signer,
|
|
112
114
|
factoryAddress,
|
|
@@ -147,8 +149,19 @@ export async function signerToSimpleSmartAccount<
|
|
|
147
149
|
async signTransaction(_, __) {
|
|
148
150
|
throw new SignTransactionNotSupportedBySmartAccount()
|
|
149
151
|
},
|
|
150
|
-
async signTypedData
|
|
151
|
-
|
|
152
|
+
async signTypedData<
|
|
153
|
+
const TTypedData extends TypedData | Record<string, unknown>,
|
|
154
|
+
TPrimaryType extends
|
|
155
|
+
| keyof TTypedData
|
|
156
|
+
| "EIP712Domain" = keyof TTypedData
|
|
157
|
+
>(typedData: TypedDataDefinition<TTypedData, TPrimaryType>) {
|
|
158
|
+
return signTypedData<TTypedData, TPrimaryType, TChain, undefined>(
|
|
159
|
+
client,
|
|
160
|
+
{
|
|
161
|
+
account: viemSigner,
|
|
162
|
+
...typedData
|
|
163
|
+
}
|
|
164
|
+
)
|
|
152
165
|
}
|
|
153
166
|
})
|
|
154
167
|
|
package/accounts/types.ts
CHANGED
|
@@ -3,11 +3,10 @@ import {
|
|
|
3
3
|
type Address,
|
|
4
4
|
BaseError,
|
|
5
5
|
type Client,
|
|
6
|
-
type GetConstructorArgs,
|
|
7
6
|
type Hex,
|
|
8
7
|
type LocalAccount
|
|
9
8
|
} from "viem"
|
|
10
|
-
import type { Chain, Transport } from "viem"
|
|
9
|
+
import type { Chain, EncodeDeployDataParameters, Transport } from "viem"
|
|
11
10
|
import { type UserOperation } from "../types/index.js"
|
|
12
11
|
|
|
13
12
|
export class SignTransactionNotSupportedBySmartAccount extends BaseError {
|
|
@@ -53,7 +52,7 @@ export type SmartAccount<
|
|
|
53
52
|
abi,
|
|
54
53
|
args,
|
|
55
54
|
bytecode
|
|
56
|
-
}:
|
|
55
|
+
}: EncodeDeployDataParameters<TAbi>) => Promise<Hex>
|
|
57
56
|
signUserOperation: (userOperation: UserOperation) => Promise<Hex>
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -51,10 +51,8 @@ export type DeployContractParametersWithPaymaster<
|
|
|
51
51
|
* })
|
|
52
52
|
*/
|
|
53
53
|
export async function deployContract<
|
|
54
|
-
const TAbi extends Abi | readonly unknown[],
|
|
55
54
|
TChain extends Chain | undefined,
|
|
56
|
-
TAccount extends SmartAccount | undefined
|
|
57
|
-
TChainOverride extends Chain | undefined
|
|
55
|
+
TAccount extends SmartAccount | undefined
|
|
58
56
|
>(
|
|
59
57
|
client: Client<Transport, TChain, TAccount>,
|
|
60
58
|
{
|
|
@@ -88,12 +86,7 @@ export async function deployContract<
|
|
|
88
86
|
abi,
|
|
89
87
|
args,
|
|
90
88
|
bytecode
|
|
91
|
-
}
|
|
92
|
-
TAbi,
|
|
93
|
-
TChain,
|
|
94
|
-
TAccount,
|
|
95
|
-
TChainOverride
|
|
96
|
-
>)
|
|
89
|
+
})
|
|
97
90
|
},
|
|
98
91
|
account: account,
|
|
99
92
|
sponsorUserOperation
|