permissionless 0.2.14 → 0.2.16
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 +13 -0
- package/_cjs/accounts/biconomy/toBiconomySmartAccount.js +11 -11
- package/_cjs/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/index.js +16 -16
- package/_cjs/accounts/index.js.map +1 -1
- package/_cjs/accounts/kernel/toEcdsaKernelSmartAccount.js +30 -30
- package/_cjs/accounts/kernel/toEcdsaKernelSmartAccount.js.map +1 -1
- package/_cjs/accounts/kernel/utils/encodeCallData.js +7 -7
- package/_cjs/accounts/kernel/utils/encodeCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/getNonceKey.js +5 -5
- package/_cjs/accounts/kernel/utils/getNonceKey.js.map +1 -1
- package/_cjs/accounts/kernel/utils/signMessage.js +4 -4
- package/_cjs/accounts/kernel/utils/signMessage.js.map +1 -1
- package/_cjs/accounts/kernel/utils/signTypedData.js +4 -4
- package/_cjs/accounts/kernel/utils/signTypedData.js.map +1 -1
- package/_cjs/accounts/light/toLightSmartAccount.js +6 -6
- package/_cjs/accounts/light/toLightSmartAccount.js.map +1 -1
- package/_cjs/accounts/nexus/toNexusSmartAccount.js +6 -6
- package/_cjs/accounts/nexus/toNexusSmartAccount.js.map +1 -1
- package/_cjs/accounts/safe/toSafeSmartAccount.js +9 -8
- package/_cjs/accounts/safe/toSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/simple/toSimpleSmartAccount.js +6 -6
- package/_cjs/accounts/simple/toSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/thirdweb/toThirdwebSmartAccount.js +14 -14
- package/_cjs/accounts/thirdweb/toThirdwebSmartAccount.js.map +1 -1
- package/_cjs/accounts/trust/toTrustSmartAccount.js +10 -10
- package/_cjs/accounts/trust/toTrustSmartAccount.js.map +1 -1
- package/_cjs/actions/erc7579/accountId.js +2 -2
- package/_cjs/actions/erc7579/accountId.js.map +1 -1
- package/_cjs/actions/erc7579/installModule.js +4 -4
- package/_cjs/actions/erc7579/installModule.js.map +1 -1
- package/_cjs/actions/erc7579/installModules.js +4 -4
- package/_cjs/actions/erc7579/installModules.js.map +1 -1
- package/_cjs/actions/erc7579/isModuleInstalled.js +5 -5
- package/_cjs/actions/erc7579/isModuleInstalled.js.map +1 -1
- package/_cjs/actions/erc7579/supportsExecutionMode.js +2 -2
- package/_cjs/actions/erc7579/supportsExecutionMode.js.map +1 -1
- package/_cjs/actions/erc7579/supportsModule.js +2 -2
- package/_cjs/actions/erc7579/supportsModule.js.map +1 -1
- package/_cjs/actions/erc7579/uninstallModule.js +4 -4
- package/_cjs/actions/erc7579/uninstallModule.js.map +1 -1
- package/_cjs/actions/erc7579/uninstallModules.js +4 -4
- package/_cjs/actions/erc7579/uninstallModules.js.map +1 -1
- package/_cjs/actions/erc7579.js +24 -24
- package/_cjs/actions/erc7579.js.map +1 -1
- package/_cjs/actions/index.js +5 -5
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/pimlico/sponsorUserOperation.js +3 -3
- package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +2 -2
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_cjs/actions/pimlico.js +14 -14
- package/_cjs/actions/pimlico.js.map +1 -1
- package/_cjs/actions/public/getSenderAddress.js +30 -137
- package/_cjs/actions/public/getSenderAddress.js.map +1 -1
- package/_cjs/actions/smartAccount/sendTransaction.js +2 -2
- package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_cjs/actions/smartAccount/signMessage.js +2 -2
- package/_cjs/actions/smartAccount/signMessage.js.map +1 -1
- package/_cjs/actions/smartAccount/signTypedData.js +2 -2
- package/_cjs/actions/smartAccount/signTypedData.js.map +1 -1
- package/_cjs/actions/smartAccount/writeContract.js +2 -2
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
- package/_cjs/actions/smartAccount.js +8 -8
- package/_cjs/actions/smartAccount.js.map +1 -1
- package/_cjs/clients/createSmartAccountClient.js +3 -3
- package/_cjs/clients/createSmartAccountClient.js.map +1 -1
- package/_cjs/clients/decorators/pimlico.js +10 -10
- package/_cjs/clients/decorators/pimlico.js.map +1 -1
- package/_cjs/clients/decorators/smartAccount.js +11 -11
- package/_cjs/clients/decorators/smartAccount.js.map +1 -1
- package/_cjs/clients/index.js.map +1 -1
- package/_cjs/clients/pimlico.js +2 -2
- package/_cjs/clients/pimlico.js.map +1 -1
- package/_cjs/experimental/pimlico/index.js +2 -2
- package/_cjs/experimental/pimlico/index.js.map +1 -1
- package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +6 -5
- package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/encode7579Calls.js +3 -3
- package/_cjs/utils/encode7579Calls.js.map +1 -1
- package/_cjs/utils/encodeInstallModule.js +4 -4
- package/_cjs/utils/encodeInstallModule.js.map +1 -1
- package/_cjs/utils/encodeUninstallModule.js +4 -4
- package/_cjs/utils/encodeUninstallModule.js.map +1 -1
- package/_cjs/utils/index.js +25 -25
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/toOwner.js.map +1 -1
- package/_esm/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/index.js.map +1 -1
- package/_esm/accounts/kernel/toEcdsaKernelSmartAccount.js.map +1 -1
- package/_esm/accounts/kernel/utils/encodeCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/getNonceKey.js.map +1 -1
- package/_esm/accounts/kernel/utils/signMessage.js.map +1 -1
- package/_esm/accounts/kernel/utils/signTypedData.js.map +1 -1
- package/_esm/accounts/light/toLightSmartAccount.js.map +1 -1
- package/_esm/accounts/nexus/toNexusSmartAccount.js +1 -1
- package/_esm/accounts/nexus/toNexusSmartAccount.js.map +1 -1
- package/_esm/accounts/safe/toSafeSmartAccount.js +2 -1
- package/_esm/accounts/safe/toSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/simple/toSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/thirdweb/toThirdwebSmartAccount.js.map +1 -1
- package/_esm/accounts/trust/toTrustSmartAccount.js.map +1 -1
- package/_esm/actions/erc7579/accountId.js.map +1 -1
- package/_esm/actions/erc7579/installModule.js +1 -1
- package/_esm/actions/erc7579/installModule.js.map +1 -1
- package/_esm/actions/erc7579/installModules.js.map +1 -1
- package/_esm/actions/erc7579/isModuleInstalled.js.map +1 -1
- package/_esm/actions/erc7579/supportsExecutionMode.js.map +1 -1
- package/_esm/actions/erc7579/supportsModule.js.map +1 -1
- package/_esm/actions/erc7579/uninstallModule.js.map +1 -1
- package/_esm/actions/erc7579/uninstallModules.js.map +1 -1
- package/_esm/actions/erc7579.js.map +1 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_esm/actions/pimlico.js.map +1 -1
- package/_esm/actions/public/getSenderAddress.js +33 -142
- package/_esm/actions/public/getSenderAddress.js.map +1 -1
- package/_esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_esm/actions/smartAccount/signMessage.js.map +1 -1
- package/_esm/actions/smartAccount/signTypedData.js.map +1 -1
- package/_esm/actions/smartAccount/writeContract.js.map +1 -1
- package/_esm/actions/smartAccount.js.map +1 -1
- package/_esm/clients/createSmartAccountClient.js +2 -2
- package/_esm/clients/createSmartAccountClient.js.map +1 -1
- package/_esm/clients/decorators/pimlico.js.map +1 -1
- package/_esm/clients/decorators/smartAccount.js +3 -3
- package/_esm/clients/decorators/smartAccount.js.map +1 -1
- package/_esm/clients/index.js.map +1 -1
- package/_esm/clients/pimlico.js.map +1 -1
- package/_esm/experimental/pimlico/index.js.map +1 -1
- package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +2 -1
- package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/utils/encode7579Calls.js.map +1 -1
- package/_esm/utils/encodeInstallModule.js.map +1 -1
- package/_esm/utils/encodeUninstallModule.js.map +1 -1
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/toOwner.js.map +1 -1
- package/_types/accounts/biconomy/toBiconomySmartAccount.d.ts +3 -2
- package/_types/accounts/biconomy/toBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/index.d.ts +8 -8
- package/_types/accounts/index.d.ts.map +1 -1
- package/_types/accounts/kernel/toEcdsaKernelSmartAccount.d.ts +3 -2
- package/_types/accounts/kernel/toEcdsaKernelSmartAccount.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/encodeCallData.d.ts +1 -1
- package/_types/accounts/kernel/utils/encodeCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/getNonceKey.d.ts +1 -1
- package/_types/accounts/kernel/utils/getNonceKey.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/isKernelV2.d.ts +1 -1
- package/_types/accounts/kernel/utils/isKernelV2.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/signMessage.d.ts +1 -1
- package/_types/accounts/kernel/utils/signMessage.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/signTypedData.d.ts +1 -1
- package/_types/accounts/kernel/utils/signTypedData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/wrapMessageHash.d.ts +1 -1
- package/_types/accounts/kernel/utils/wrapMessageHash.d.ts.map +1 -1
- package/_types/accounts/light/toLightSmartAccount.d.ts +3 -2
- package/_types/accounts/light/toLightSmartAccount.d.ts.map +1 -1
- package/_types/accounts/nexus/toNexusSmartAccount.d.ts +3 -2
- package/_types/accounts/nexus/toNexusSmartAccount.d.ts.map +1 -1
- package/_types/accounts/safe/toSafeSmartAccount.d.ts +3 -2
- package/_types/accounts/safe/toSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/simple/toSimpleSmartAccount.d.ts +3 -2
- package/_types/accounts/simple/toSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/thirdweb/toThirdwebSmartAccount.d.ts +3 -2
- package/_types/accounts/thirdweb/toThirdwebSmartAccount.d.ts.map +1 -1
- package/_types/accounts/trust/toTrustSmartAccount.d.ts +3 -2
- package/_types/accounts/trust/toTrustSmartAccount.d.ts.map +1 -1
- package/_types/actions/erc7579/installModule.d.ts +1 -1
- package/_types/actions/erc7579/installModule.d.ts.map +1 -1
- package/_types/actions/erc7579/installModules.d.ts +1 -1
- package/_types/actions/erc7579/installModules.d.ts.map +1 -1
- package/_types/actions/erc7579/isModuleInstalled.d.ts +1 -1
- package/_types/actions/erc7579/isModuleInstalled.d.ts.map +1 -1
- package/_types/actions/erc7579/uninstallModule.d.ts +1 -1
- package/_types/actions/erc7579/uninstallModule.d.ts.map +1 -1
- package/_types/actions/erc7579/uninstallModules.d.ts +1 -1
- package/_types/actions/erc7579/uninstallModules.d.ts.map +1 -1
- package/_types/actions/erc7579.d.ts +10 -10
- package/_types/actions/erc7579.d.ts.map +1 -1
- package/_types/actions/index.d.ts +4 -4
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/pimlico/getTokenQuotes.d.ts +1 -1
- package/_types/actions/pimlico/getTokenQuotes.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +1 -1
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationStatus.d.ts +1 -1
- package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -1
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +1 -1
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -1
- package/_types/actions/pimlico/sponsorUserOperation.d.ts +1 -1
- package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +1 -1
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -1
- package/_types/actions/pimlico.d.ts +8 -8
- package/_types/actions/pimlico.d.ts.map +1 -1
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
- package/_types/actions/smartAccount.d.ts +4 -4
- package/_types/actions/smartAccount.d.ts.map +1 -1
- package/_types/clients/createSmartAccountClient.d.ts +1 -1
- package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
- package/_types/clients/decorators/pimlico.d.ts +4 -4
- package/_types/clients/decorators/pimlico.d.ts.map +1 -1
- package/_types/clients/decorators/smartAccount.d.ts +5 -51
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
- package/_types/clients/index.d.ts +2 -2
- package/_types/clients/index.d.ts.map +1 -1
- package/_types/clients/pimlico.d.ts +2 -2
- package/_types/clients/pimlico.d.ts.map +1 -1
- package/_types/experimental/pimlico/index.d.ts +1 -1
- package/_types/experimental/pimlico/index.d.ts.map +1 -1
- package/_types/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.d.ts.map +1 -1
- package/_types/index.d.ts +3 -3
- package/_types/index.d.ts.map +1 -1
- package/_types/utils/encode7579Calls.d.ts +1 -1
- package/_types/utils/encode7579Calls.d.ts.map +1 -1
- package/_types/utils/encodeInstallModule.d.ts +1 -1
- package/_types/utils/encodeInstallModule.d.ts.map +1 -1
- package/_types/utils/encodeUninstallModule.d.ts +1 -1
- package/_types/utils/encodeUninstallModule.d.ts.map +1 -1
- package/_types/utils/index.d.ts +12 -12
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/toOwner.d.ts +6 -3
- package/_types/utils/toOwner.d.ts.map +1 -1
- package/accounts/biconomy/toBiconomySmartAccount.ts +4 -5
- package/accounts/index.ts +8 -8
- package/accounts/kernel/toEcdsaKernelSmartAccount.ts +16 -14
- package/accounts/kernel/utils/encodeCallData.ts +4 -4
- package/accounts/kernel/utils/getNonceKey.ts +3 -3
- package/accounts/kernel/utils/isKernelV2.ts +1 -1
- package/accounts/kernel/utils/signMessage.ts +5 -2
- package/accounts/kernel/utils/signTypedData.ts +5 -2
- package/accounts/kernel/utils/wrapMessageHash.ts +1 -1
- package/accounts/light/toLightSmartAccount.ts +4 -5
- package/accounts/nexus/toNexusSmartAccount.ts +4 -5
- package/accounts/safe/toSafeSmartAccount.ts +5 -5
- package/accounts/simple/toSimpleSmartAccount.ts +4 -5
- package/accounts/thirdweb/toThirdwebSmartAccount.ts +8 -9
- package/accounts/trust/toTrustSmartAccount.ts +6 -7
- package/actions/erc7579/accountId.ts +1 -1
- package/actions/erc7579/installModule.ts +3 -3
- package/actions/erc7579/installModules.ts +2 -2
- package/actions/erc7579/isModuleInstalled.ts +2 -2
- package/actions/erc7579/supportsExecutionMode.ts +1 -1
- package/actions/erc7579/supportsModule.ts +1 -1
- package/actions/erc7579/uninstallModule.ts +3 -3
- package/actions/erc7579/uninstallModules.ts +2 -2
- package/actions/erc7579.ts +13 -10
- package/actions/index.ts +4 -4
- package/actions/pimlico/getTokenQuotes.ts +1 -1
- package/actions/pimlico/getUserOperationGasPrice.ts +1 -1
- package/actions/pimlico/getUserOperationStatus.ts +1 -1
- package/actions/pimlico/sendCompressedUserOperation.ts +1 -1
- package/actions/pimlico/sponsorUserOperation.ts +2 -2
- package/actions/pimlico/validateSponsorshipPolicies.ts +2 -2
- package/actions/pimlico.ts +8 -8
- package/actions/public/getSenderAddress.test.ts +1 -1
- package/actions/public/getSenderAddress.ts +42 -186
- package/actions/smartAccount/sendTransaction.ts +1 -1
- package/actions/smartAccount/signMessage.ts +1 -1
- package/actions/smartAccount/signTypedData.ts +1 -1
- package/actions/smartAccount/writeContract.ts +1 -1
- package/actions/smartAccount.ts +4 -4
- package/clients/createSmartAccountClient.ts +3 -3
- package/clients/decorators/pimlico.ts +4 -4
- package/clients/decorators/smartAccount.ts +12 -14
- package/clients/index.ts +2 -2
- package/clients/pimlico.ts +2 -2
- package/experimental/pimlico/index.ts +1 -1
- package/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts +3 -2
- package/index.ts +3 -3
- package/package.json +1 -1
- package/utils/encode7579Calls.ts +1 -1
- package/utils/encodeInstallModule.ts +2 -2
- package/utils/encodeUninstallModule.ts +2 -2
- package/utils/index.ts +15 -12
- package/utils/toOwner.ts +7 -12
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Abi, Chain, Client, ContractFunctionArgs, ContractFunctionName, Hash, Transport, TypedData, WriteContractParameters } from "viem";
|
|
2
2
|
import type { SmartAccount } from "viem/account-abstraction";
|
|
3
|
-
import { sendTransaction } from "../../actions/smartAccount/sendTransaction";
|
|
4
|
-
import { signMessage } from "../../actions/smartAccount/signMessage";
|
|
5
|
-
import { signTypedData } from "../../actions/smartAccount/signTypedData";
|
|
6
|
-
import { writeContract } from "../../actions/smartAccount/writeContract";
|
|
3
|
+
import { sendTransaction } from "../../actions/smartAccount/sendTransaction.js";
|
|
4
|
+
import { signMessage } from "../../actions/smartAccount/signMessage.js";
|
|
5
|
+
import { signTypedData } from "../../actions/smartAccount/signTypedData.js";
|
|
6
|
+
import { writeContract } from "../../actions/smartAccount/writeContract.js";
|
|
7
7
|
export type SmartAccountActions<TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined> = {
|
|
8
8
|
/**
|
|
9
9
|
* Creates, signs, and sends a new transaction to the network.
|
|
@@ -242,51 +242,5 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
242
242
|
*/
|
|
243
243
|
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>>;
|
|
244
244
|
};
|
|
245
|
-
export declare function smartAccountActions
|
|
246
|
-
client: Client;
|
|
247
|
-
entryPoint: {
|
|
248
|
-
abi: Abi;
|
|
249
|
-
address: import("viem").Address;
|
|
250
|
-
version: import("viem/account-abstraction").EntryPointVersion;
|
|
251
|
-
};
|
|
252
|
-
extend?: object | undefined;
|
|
253
|
-
getAddress: () => Promise<import("viem").Address>;
|
|
254
|
-
decodeCalls?: ((data: import("viem").Hex) => Promise<readonly {
|
|
255
|
-
to: import("viem").Hex;
|
|
256
|
-
data?: import("viem").Hex | undefined;
|
|
257
|
-
value?: bigint | undefined;
|
|
258
|
-
}[]>) | undefined;
|
|
259
|
-
encodeCalls: (calls: readonly {
|
|
260
|
-
to: import("viem").Hex;
|
|
261
|
-
data?: import("viem").Hex | undefined;
|
|
262
|
-
value?: bigint | undefined;
|
|
263
|
-
}[]) => Promise<import("viem").Hex>;
|
|
264
|
-
getFactoryArgs: () => Promise<{
|
|
265
|
-
factory?: import("viem").Address | undefined;
|
|
266
|
-
factoryData?: import("viem").Hex | undefined;
|
|
267
|
-
}>;
|
|
268
|
-
getNonce?: ((parameters?: {
|
|
269
|
-
key?: bigint | undefined;
|
|
270
|
-
} | undefined) => Promise<bigint>) | undefined;
|
|
271
|
-
getStubSignature: () => Promise<import("viem").Hex>;
|
|
272
|
-
nonceKeyManager?: import("viem").NonceManager | undefined;
|
|
273
|
-
sign?: ((parameters: {
|
|
274
|
-
hash: Hash;
|
|
275
|
-
}) => Promise<import("viem").Hex>) | undefined;
|
|
276
|
-
signMessage: (parameters: {
|
|
277
|
-
message: import("viem").SignableMessage;
|
|
278
|
-
}) => Promise<import("viem").Hex>;
|
|
279
|
-
signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
|
|
280
|
-
signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem/account-abstraction").UserOperation, "sender"> & {
|
|
281
|
-
chainId?: number | undefined;
|
|
282
|
-
}) => Promise<import("viem").Hex>;
|
|
283
|
-
userOperation?: {
|
|
284
|
-
estimateGas?: ((userOperation: import("viem/account-abstraction").UserOperationRequest) => Promise<import("viem").ExactPartial<import("viem/_types/account-abstraction/types/userOperation").EstimateUserOperationGasReturnType> | undefined>) | undefined;
|
|
285
|
-
} | undefined;
|
|
286
|
-
} & {
|
|
287
|
-
address: import("viem").Address;
|
|
288
|
-
getNonce: NonNullable<import("viem/account-abstraction").SmartAccountImplementation["getNonce"]>;
|
|
289
|
-
isDeployed: () => Promise<boolean>;
|
|
290
|
-
type: "smart";
|
|
291
|
-
}) | undefined>(client: Client<Transport, TChain, TSmartAccount>) => SmartAccountActions<TChain, TSmartAccount>;
|
|
245
|
+
export declare function smartAccountActions<TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined>(client: Client<Transport, TChain, TSmartAccount>): SmartAccountActions<TChain, TSmartAccount>;
|
|
292
246
|
//# sourceMappingURL=smartAccount.d.ts.map
|
|
@@ -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,oBAAoB,EACpB,oBAAoB,EACpB,IAAI,EAEJ,SAAS,EACT,SAAS,EACT,uBAAuB,EAC1B,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
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,IAAI,EAEJ,SAAS,EACT,SAAS,EACT,uBAAuB,EAC1B,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAA;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAE3E,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,eAAe,EAAE,CACb,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EACpD,eAAe,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5D,KAAK,SAAS,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAErD,IAAI,EAAE,UAAU,CACZ,OAAO,eAAe,CAClB,aAAa,EACb,MAAM,EACN,eAAe,EACf,cAAc,EACd,KAAK,CACR,CACJ,CAAC,CAAC,CAAC,KACH,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,WAAW,EAAE,CACT,IAAI,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,KACrD,UAAU,CAAC,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+FG;IACH,aAAa,EAAE,CACX,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,EAC/D,YAAY,SAAS,MAAM,EAE3B,IAAI,EAAE,UAAU,CACZ,OAAO,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAChE,CAAC,CAAC,CAAC,KACH,UAAU,CACX,OAAO,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAChE,CAAA;IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,aAAa,EAAE,CACX,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,oBAAoB,CACtC,IAAI,EACJ,YAAY,GAAG,SAAS,CAC3B,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC,EACxD,KAAK,SAAS,oBAAoB,CAC9B,IAAI,EACJ,YAAY,GAAG,SAAS,EACxB,aAAa,CAChB,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,EACvE,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAEpD,IAAI,EAAE,uBAAuB,CACzB,IAAI,EACJ,aAAa,EACb,KAAK,EACL,MAAM,EACN,aAAa,EACb,cAAc,CACjB,KACA,UAAU,CACX,OAAO,aAAa,CAChB,MAAM,EACN,aAAa,EACb,IAAI,EACJ,aAAa,EACb,KAAK,EACL,cAAc,CACjB,CACJ,CAAA;CACJ,CAAA;AAED,wBAAgB,mBAAmB,CAC/B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAEzE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,GACjD,mBAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAO5C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./createSmartAccountClient";
|
|
2
|
-
export * from "./decorators/smartAccount";
|
|
1
|
+
export * from "./createSmartAccountClient.js";
|
|
2
|
+
export * from "./decorators/smartAccount.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8BAA8B,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, BundlerRpcSchema, Chain, Client, ClientConfig, Prettify, RpcSchema, Transport } from "viem";
|
|
2
2
|
import { type BundlerActions, type PaymasterActions, type SmartAccount } from "viem/account-abstraction";
|
|
3
|
-
import type { PimlicoRpcSchema } from "../types/pimlico";
|
|
4
|
-
import { type PimlicoActions } from "./decorators/pimlico";
|
|
3
|
+
import type { PimlicoRpcSchema } from "../types/pimlico.js";
|
|
4
|
+
import { type PimlicoActions } from "./decorators/pimlico.js";
|
|
5
5
|
export type PimlicoClient<entryPointVersion extends "0.6" | "0.7" = "0.7" | "0.6", transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount | undefined = SmartAccount | undefined, client extends Client | undefined = Client | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain extends Chain ? chain : client extends Client<any, infer chain> ? chain : undefined, account, rpcSchema extends RpcSchema ? [...BundlerRpcSchema, ...PimlicoRpcSchema, ...rpcSchema] : [...BundlerRpcSchema, ...PimlicoRpcSchema], BundlerActions<account> & PaymasterActions & PimlicoActions<chain, entryPointVersion>>>;
|
|
6
6
|
export type PimlicoClientConfig<entryPointVersion extends "0.6" | "0.7" = "0.7" | "0.6", transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount | undefined = SmartAccount | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, account, rpcSchema>, "account" | "cacheTime" | "chain" | "key" | "name" | "pollingInterval" | "rpcSchema" | "transport">> & {
|
|
7
7
|
entryPoint?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAIpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAIpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,yBAAyB,CAAA;AAE7E,MAAM,MAAM,aAAa,CACrB,iBAAiB,SAAS,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EACvD,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EACnE,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EACtD,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IACnD,QAAQ,CACR,MAAM,CACF,SAAS,EACT,KAAK,SAAS,KAAK,GACb,KAAK,GAEL,MAAM,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GACrC,KAAK,GACL,SAAS,EACjB,OAAO,EACP,SAAS,SAAS,SAAS,GACrB,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,GAAG,SAAS,CAAC,GACxD,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,EAChD,cAAc,CAAC,OAAO,CAAC,GACnB,gBAAgB,GAChB,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAC/C,CACJ,CAAA;AAED,MAAM,MAAM,mBAAmB,CAC3B,iBAAiB,SAAS,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EACvD,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EACnE,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IACnD,QAAQ,CACR,IAAI,CACA,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAChD,SAAS,GACT,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,iBAAiB,GACjB,WAAW,GACX,WAAW,CAChB,CACJ,GAAG;IACA,UAAU,CAAC,EAAE;QACT,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,iBAAiB,CAAA;KAC7B,CAAA;CACJ,CAAA;AAED,wBAAgB,mBAAmB,CAC/B,iBAAiB,SAAS,KAAK,GAAG,KAAK,GAAG,KAAK,EAC/C,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAC3C,OAAO,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EACnE,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EAC7C,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,EAEnD,UAAU,EAAE,mBAAmB,CAC3B,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,OAAO,EACP,SAAS,CACZ,GACF,aAAa,CACZ,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,CACZ,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { prepareUserOperationForErc20Paymaster } from "./utils/prepareUserOperationForErc20Paymaster";
|
|
1
|
+
import { prepareUserOperationForErc20Paymaster } from "./utils/prepareUserOperationForErc20Paymaster.js";
|
|
2
2
|
export { prepareUserOperationForErc20Paymaster };
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../experimental/pimlico/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../experimental/pimlico/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,kDAAkD,CAAA;AACxG,OAAO,EAAE,qCAAqC,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareUserOperationForErc20Paymaster.d.ts","sourceRoot":"","sources":["../../../../experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AACb,OAAO,EAEH,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,YAAY,EAKpB,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"prepareUserOperationForErc20Paymaster.d.ts","sourceRoot":"","sources":["../../../../experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AACb,OAAO,EAEH,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,YAAY,EAKpB,MAAM,0BAA0B,CAAA;AAQjC,eAAO,MAAM,qCAAqC,kBAE3B,MAAM,kFAKlB;IACC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB,MAGD,OAAO,SAAS,YAAY,GAAG,SAAS,QAClC,KAAK,SAAS,SAAS,OAAO,EAAE,QAChC,OAAO,SAAS,2BAA2B,CAC7C,OAAO,EACP,eAAe,EACf,KAAK,CACR,EACD,eAAe,SAAS,YAAY,GAAG,SAAS,sBAExC,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,CAAC,eACxC,8BAA8B,CACvC,OAAO,EACP,eAAe,EACf,KAAK,EACL,OAAO,CACV,KACF,OAAO,CACN,8BAA8B,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAqR3E,CAAA"}
|
package/_types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./utils";
|
|
2
|
-
export * from "./errors";
|
|
3
|
-
export * from "./clients";
|
|
1
|
+
export * from "./utils/index.js";
|
|
2
|
+
export * from "./errors/index.js";
|
|
3
|
+
export * from "./clients/index.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/_types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex } from "viem";
|
|
2
|
-
import { type CallType, type ExecutionMode } from "../actions/erc7579/supportsExecutionMode";
|
|
2
|
+
import { type CallType, type ExecutionMode } from "../actions/erc7579/supportsExecutionMode.js";
|
|
3
3
|
export type EncodeCallDataParams<callType extends CallType> = {
|
|
4
4
|
mode: ExecutionMode<callType>;
|
|
5
5
|
callData: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode7579Calls.d.ts","sourceRoot":"","sources":["../../utils/encode7579Calls.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EAKX,MAAM,MAAM,CAAA;AACb,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,aAAa,EAErB,MAAM,
|
|
1
|
+
{"version":3,"file":"encode7579Calls.d.ts","sourceRoot":"","sources":["../../utils/encode7579Calls.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EAKX,MAAM,MAAM,CAAA;AACb,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,aAAa,EAErB,MAAM,6CAA6C,CAAA;AAEpD,MAAM,MAAM,oBAAoB,CAAC,QAAQ,SAAS,QAAQ,IAAI;IAC1D,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC7B,QAAQ,EAAE,SAAS;QACf,EAAE,EAAE,OAAO,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,EAAE,GAAG,GAAG,SAAS,CAAA;KACzB,EAAE,CAAA;CACN,CAAA;AAED,wBAAgB,eAAe,CAAC,QAAQ,SAAS,QAAQ,EAAE,EACvD,IAAI,EACJ,QAAQ,EACX,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAuFtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Address, type Hex, type OneOf } from "viem";
|
|
2
2
|
import type { GetSmartAccountParameter, SmartAccount } from "viem/account-abstraction";
|
|
3
|
-
import { type ModuleType } from "../actions/erc7579/supportsModule";
|
|
3
|
+
import { type ModuleType } from "../actions/erc7579/supportsModule.js";
|
|
4
4
|
export type EncodeInstallModuleParameter = {
|
|
5
5
|
type: ModuleType;
|
|
6
6
|
address: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeInstallModule.d.ts","sourceRoot":"","sources":["../../utils/encodeInstallModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,KAAK,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,YAAY,EACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,
|
|
1
|
+
{"version":3,"file":"encodeInstallModule.d.ts","sourceRoot":"","sources":["../../utils/encodeInstallModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,KAAK,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,YAAY,EACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,sCAAsC,CAAA;AAG7C,MAAM,MAAM,4BAA4B,GAAG;IACvC,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACnB,GAAG,KAAK,CACH;IACI,OAAO,EAAE,GAAG,CAAA;CACf,GACD;IACI,QAAQ,EAAE,GAAG,CAAA;CAChB,CACN,CAAA;AAED,MAAM,MAAM,6BAA6B,CACrC,aAAa,SAAS,YAAY,GAAG,SAAS,IAC9C,wBAAwB,CAAC,aAAa,CAAC,GAAG;IAC1C,OAAO,EAAE,4BAA4B,EAAE,GAAG,4BAA4B,CAAA;CACzE,CAAA;AAED,wBAAgB,mBAAmB,CAC/B,aAAa,SAAS,YAAY,GAAG,SAAS,EAChD,UAAU,EAAE,6BAA6B,CAAC,aAAa,CAAC;;;;IAkDzD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Address, type Hex, type OneOf } from "viem";
|
|
2
2
|
import type { GetSmartAccountParameter, SmartAccount } from "viem/account-abstraction";
|
|
3
|
-
import { type ModuleType } from "../actions/erc7579/supportsModule";
|
|
3
|
+
import { type ModuleType } from "../actions/erc7579/supportsModule.js";
|
|
4
4
|
export type EncodeUninstallModuleParameter = {
|
|
5
5
|
type: ModuleType;
|
|
6
6
|
address: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeUninstallModule.d.ts","sourceRoot":"","sources":["../../utils/encodeUninstallModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,KAAK,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,YAAY,EACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,
|
|
1
|
+
{"version":3,"file":"encodeUninstallModule.d.ts","sourceRoot":"","sources":["../../utils/encodeUninstallModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,KAAK,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,YAAY,EACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,sCAAsC,CAAA;AAG7C,MAAM,MAAM,8BAA8B,GAAG;IACzC,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACnB,GAAG,KAAK,CACH;IACI,OAAO,EAAE,GAAG,CAAA;CACf,GACD;IACI,UAAU,EAAE,GAAG,CAAA;CAClB,CACN,CAAA;AAED,MAAM,MAAM,+BAA+B,CACvC,aAAa,SAAS,YAAY,GAAG,SAAS,IAC9C,wBAAwB,CAAC,aAAa,CAAC,GAAG;IAC1C,OAAO,EAAE,8BAA8B,EAAE,GAAG,8BAA8B,CAAA;CAC7E,CAAA;AAED,wBAAgB,qBAAqB,CACjC,aAAa,SAAS,YAAY,GAAG,SAAS,EAChD,UAAU,EAAE,+BAA+B,CAAC,aAAa,CAAC;;;;IAkD3D"}
|
package/_types/utils/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { deepHexlify, transactionReceiptStatus } from "./deepHexlify";
|
|
2
|
-
import { getAddressFromInitCodeOrPaymasterAndData } from "./getAddressFromInitCodeOrPaymasterAndData";
|
|
3
|
-
import { type GetRequiredPrefundReturnType, getRequiredPrefund } from "./getRequiredPrefund";
|
|
4
|
-
import { isSmartAccountDeployed } from "./isSmartAccountDeployed";
|
|
5
|
-
import { toOwner } from "./toOwner";
|
|
6
|
-
import { decodeNonce } from "./decodeNonce";
|
|
7
|
-
import { encodeNonce } from "./encodeNonce";
|
|
8
|
-
import { type EncodeInstallModuleParameters, encodeInstallModule } from "./encodeInstallModule";
|
|
9
|
-
import { getPackedUserOperation } from "./getPackedUserOperation";
|
|
10
|
-
import { type EncodeCallDataParams, encode7579Calls } from "./encode7579Calls";
|
|
11
|
-
import { type Erc20AllowanceOverrideParameters, erc20AllowanceOverride } from "./erc20AllowanceOverride";
|
|
12
|
-
import { type Erc20BalanceOverrideParameters, erc20BalanceOverride } from "./erc20BalanceOverride";
|
|
1
|
+
import { deepHexlify, transactionReceiptStatus } from "./deepHexlify.js";
|
|
2
|
+
import { getAddressFromInitCodeOrPaymasterAndData } from "./getAddressFromInitCodeOrPaymasterAndData.js";
|
|
3
|
+
import { type GetRequiredPrefundReturnType, getRequiredPrefund } from "./getRequiredPrefund.js";
|
|
4
|
+
import { isSmartAccountDeployed } from "./isSmartAccountDeployed.js";
|
|
5
|
+
import { toOwner } from "./toOwner.js";
|
|
6
|
+
import { decodeNonce } from "./decodeNonce.js";
|
|
7
|
+
import { encodeNonce } from "./encodeNonce.js";
|
|
8
|
+
import { type EncodeInstallModuleParameters, encodeInstallModule } from "./encodeInstallModule.js";
|
|
9
|
+
import { getPackedUserOperation } from "./getPackedUserOperation.js";
|
|
10
|
+
import { type EncodeCallDataParams, encode7579Calls } from "./encode7579Calls.js";
|
|
11
|
+
import { type Erc20AllowanceOverrideParameters, erc20AllowanceOverride } from "./erc20AllowanceOverride.js";
|
|
12
|
+
import { type Erc20BalanceOverrideParameters, erc20BalanceOverride } from "./erc20BalanceOverride.js";
|
|
13
13
|
export { transactionReceiptStatus, deepHexlify, getRequiredPrefund, toOwner, type GetRequiredPrefundReturnType, isSmartAccountDeployed, getAddressFromInitCodeOrPaymasterAndData, getPackedUserOperation, encodeNonce, decodeNonce, type EncodeInstallModuleParameters, encodeInstallModule, type EncodeCallDataParams, encode7579Calls, erc20AllowanceOverride, erc20BalanceOverride, type Erc20AllowanceOverrideParameters, type Erc20BalanceOverrideParameters };
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,wCAAwC,EAAE,MAAM,+CAA+C,CAAA;AACxG,OAAO,EACH,KAAK,4BAA4B,EACjC,kBAAkB,EACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EACH,KAAK,6BAA6B,EAClC,mBAAmB,EACtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EACH,KAAK,oBAAoB,EACzB,eAAe,EAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,KAAK,gCAAgC,EACrC,sBAAsB,EACzB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACH,KAAK,8BAA8B,EACnC,oBAAoB,EACvB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACH,wBAAwB,EACxB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,KAAK,4BAA4B,EACjC,sBAAsB,EACtB,wCAAwC,EACxC,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,KAAK,6BAA6B,EAClC,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACtC,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { type Account, type Address, type Chain, type
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { type Account, type Address, type Chain, type LocalAccount, type OneOf, type Transport, type WalletClient } from "viem";
|
|
2
|
+
export type EthereumProvider = {
|
|
3
|
+
request(...args: any): Promise<any>;
|
|
4
|
+
};
|
|
5
|
+
export declare function toOwner<provider extends EthereumProvider>({ owner, address }: {
|
|
6
|
+
owner: OneOf<provider | WalletClient<Transport, Chain | undefined, Account> | LocalAccount>;
|
|
4
7
|
address?: Address;
|
|
5
8
|
}): Promise<LocalAccount>;
|
|
6
9
|
//# sourceMappingURL=toOwner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOwner.d.ts","sourceRoot":"","sources":["../../utils/toOwner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,
|
|
1
|
+
{"version":3,"file":"toOwner.d.ts","sourceRoot":"","sources":["../../utils/toOwner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EAGpB,MAAM,MAAM,CAAA;AAMb,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,CAAA;AAEtE,wBAAsB,OAAO,CAAC,QAAQ,SAAS,gBAAgB,EAAE,EAC7D,KAAK,EACL,OAAO,EACV,EAAE;IACC,KAAK,EAAE,KAAK,CACN,QAAQ,GACR,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,CAAC,GACnD,YAAY,CACjB,CAAA;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,OAAO,CAAC,YAAY,CAAC,CAyDxB"}
|
|
@@ -2,7 +2,6 @@ import type {
|
|
|
2
2
|
Account,
|
|
3
3
|
Assign,
|
|
4
4
|
Chain,
|
|
5
|
-
EIP1193Provider,
|
|
6
5
|
OneOf,
|
|
7
6
|
Prettify,
|
|
8
7
|
Transport,
|
|
@@ -30,9 +29,9 @@ import {
|
|
|
30
29
|
toSmartAccount
|
|
31
30
|
} from "viem/account-abstraction"
|
|
32
31
|
import { signMessage } from "viem/actions"
|
|
33
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
34
|
-
import { toOwner } from "../../utils/toOwner"
|
|
35
|
-
import { BiconomyAbi, FactoryAbi } from "./abi/BiconomySmartAccountAbi"
|
|
32
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
33
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
34
|
+
import { BiconomyAbi, FactoryAbi } from "./abi/BiconomySmartAccountAbi.js"
|
|
36
35
|
|
|
37
36
|
const BICONOMY_PROXY_CREATION_CODE =
|
|
38
37
|
"0x6080346100aa57601f61012038819003918201601f19168301916001600160401b038311848410176100af578084926020946040528339810103126100aa57516001600160a01b0381168082036100aa5715610065573055604051605a90816100c68239f35b60405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420696d706c656d656e746174696f6e206164647265737300006044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405230546000808092368280378136915af43d82803e156020573d90f35b3d90fdfea2646970667358221220a03b18dce0be0b4c9afe58a9eb85c35205e2cf087da098bbf1d23945bf89496064736f6c63430008110033"
|
|
@@ -95,7 +94,7 @@ export type ToBiconomySmartAccountParameters = Prettify<{
|
|
|
95
94
|
client: Client
|
|
96
95
|
owners: [
|
|
97
96
|
OneOf<
|
|
98
|
-
|
|
|
97
|
+
| EthereumProvider
|
|
99
98
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
100
99
|
| LocalAccount
|
|
101
100
|
>
|
package/accounts/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
type ToSimpleSmartAccountParameters,
|
|
4
4
|
type ToSimpleSmartAccountReturnType,
|
|
5
5
|
toSimpleSmartAccount
|
|
6
|
-
} from "./simple/toSimpleSmartAccount"
|
|
6
|
+
} from "./simple/toSimpleSmartAccount.js"
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
type LightAccountVersion,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
type ToLightSmartAccountParameters,
|
|
12
12
|
type ToLightSmartAccountReturnType,
|
|
13
13
|
toLightSmartAccount
|
|
14
|
-
} from "./light/toLightSmartAccount"
|
|
14
|
+
} from "./light/toLightSmartAccount.js"
|
|
15
15
|
|
|
16
16
|
import {
|
|
17
17
|
type ToTrustSmartAccountParameters,
|
|
18
18
|
type ToTrustSmartAccountReturnType,
|
|
19
19
|
type TrustSmartAccountImplementation,
|
|
20
20
|
toTrustSmartAccount
|
|
21
|
-
} from "./trust/toTrustSmartAccount"
|
|
21
|
+
} from "./trust/toTrustSmartAccount.js"
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
24
|
type SafeSmartAccountImplementation,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
type ToSafeSmartAccountParameters,
|
|
27
27
|
type ToSafeSmartAccountReturnType,
|
|
28
28
|
toSafeSmartAccount
|
|
29
|
-
} from "./safe/toSafeSmartAccount"
|
|
29
|
+
} from "./safe/toSafeSmartAccount.js"
|
|
30
30
|
|
|
31
31
|
import {
|
|
32
32
|
type EcdsaKernelSmartAccountImplementation,
|
|
@@ -34,28 +34,28 @@ import {
|
|
|
34
34
|
type ToEcdsaKernelSmartAccountParameters,
|
|
35
35
|
type ToEcdsaKernelSmartAccountReturnType,
|
|
36
36
|
toEcdsaKernelSmartAccount
|
|
37
|
-
} from "./kernel/toEcdsaKernelSmartAccount"
|
|
37
|
+
} from "./kernel/toEcdsaKernelSmartAccount.js"
|
|
38
38
|
|
|
39
39
|
import {
|
|
40
40
|
type BiconomySmartAccountImplementation,
|
|
41
41
|
type ToBiconomySmartAccountParameters,
|
|
42
42
|
type ToBiconomySmartAccountReturnType,
|
|
43
43
|
toBiconomySmartAccount
|
|
44
|
-
} from "./biconomy/toBiconomySmartAccount"
|
|
44
|
+
} from "./biconomy/toBiconomySmartAccount.js"
|
|
45
45
|
|
|
46
46
|
import {
|
|
47
47
|
type NexusSmartAccountImplementation,
|
|
48
48
|
type ToNexusSmartAccountParameters,
|
|
49
49
|
type ToNexusSmartAccountReturnType,
|
|
50
50
|
toNexusSmartAccount
|
|
51
|
-
} from "./nexus/toNexusSmartAccount"
|
|
51
|
+
} from "./nexus/toNexusSmartAccount.js"
|
|
52
52
|
|
|
53
53
|
import {
|
|
54
54
|
type ThirdwebSmartAccountImplementation,
|
|
55
55
|
type ToThirdwebSmartAccountParameters,
|
|
56
56
|
type ToThirdwebSmartAccountReturnType,
|
|
57
57
|
toThirdwebSmartAccount
|
|
58
|
-
} from "./thirdweb/toThirdwebSmartAccount"
|
|
58
|
+
} from "./thirdweb/toThirdwebSmartAccount.js"
|
|
59
59
|
|
|
60
60
|
export {
|
|
61
61
|
type ToSimpleSmartAccountParameters,
|
|
@@ -2,7 +2,6 @@ import type {
|
|
|
2
2
|
Account,
|
|
3
3
|
Assign,
|
|
4
4
|
Chain,
|
|
5
|
-
EIP1193Provider,
|
|
6
5
|
OneOf,
|
|
7
6
|
Transport,
|
|
8
7
|
WalletClient
|
|
@@ -30,22 +29,25 @@ import {
|
|
|
30
29
|
} from "viem/account-abstraction"
|
|
31
30
|
import { signMessage as _signMessage, getChainId } from "viem/actions"
|
|
32
31
|
import { getAction } from "viem/utils"
|
|
33
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
34
|
-
import { getSenderAddress } from "../../actions/public/getSenderAddress"
|
|
35
|
-
import { toOwner } from "../../utils/toOwner"
|
|
36
|
-
import { KernelInitAbi } from "./abi/KernelAccountAbi"
|
|
37
|
-
import {
|
|
38
|
-
|
|
32
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
33
|
+
import { getSenderAddress } from "../../actions/public/getSenderAddress.js"
|
|
34
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
35
|
+
import { KernelInitAbi } from "./abi/KernelAccountAbi.js"
|
|
36
|
+
import {
|
|
37
|
+
KernelV3InitAbi,
|
|
38
|
+
KernelV3_1AccountAbi
|
|
39
|
+
} from "./abi/KernelV3AccountAbi.js"
|
|
40
|
+
import { KernelV3MetaFactoryDeployWithFactoryAbi } from "./abi/KernelV3MetaFactoryAbi.js"
|
|
39
41
|
import {
|
|
40
42
|
DUMMY_ECDSA_SIGNATURE,
|
|
41
43
|
ROOT_MODE_KERNEL_V2,
|
|
42
44
|
VALIDATOR_TYPE
|
|
43
|
-
} from "./constants"
|
|
44
|
-
import { encodeCallData } from "./utils/encodeCallData"
|
|
45
|
-
import { getNonceKeyWithEncoding } from "./utils/getNonceKey"
|
|
46
|
-
import { isKernelV2 } from "./utils/isKernelV2"
|
|
47
|
-
import { signMessage } from "./utils/signMessage"
|
|
48
|
-
import { signTypedData } from "./utils/signTypedData"
|
|
45
|
+
} from "./constants.js"
|
|
46
|
+
import { encodeCallData } from "./utils/encodeCallData.js"
|
|
47
|
+
import { getNonceKeyWithEncoding } from "./utils/getNonceKey.js"
|
|
48
|
+
import { isKernelV2 } from "./utils/isKernelV2.js"
|
|
49
|
+
import { signMessage } from "./utils/signMessage.js"
|
|
50
|
+
import { signTypedData } from "./utils/signTypedData.js"
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* The account creation ABI for a kernel smart account (from the KernelFactory)
|
|
@@ -305,7 +307,7 @@ export type ToEcdsaKernelSmartAccountParameters<
|
|
|
305
307
|
client: Client
|
|
306
308
|
owners: [
|
|
307
309
|
OneOf<
|
|
308
|
-
|
|
|
310
|
+
| EthereumProvider
|
|
309
311
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
310
312
|
| LocalAccount
|
|
311
313
|
>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Address, type Hex, encodeFunctionData } from "viem"
|
|
2
|
-
import { encode7579Calls } from "../../../utils/encode7579Calls"
|
|
3
|
-
import { KernelExecuteAbi } from "../abi/KernelAccountAbi"
|
|
4
|
-
import type { KernelVersion } from "../toEcdsaKernelSmartAccount"
|
|
5
|
-
import { isKernelV2 } from "./isKernelV2"
|
|
2
|
+
import { encode7579Calls } from "../../../utils/encode7579Calls.js"
|
|
3
|
+
import { KernelExecuteAbi } from "../abi/KernelAccountAbi.js"
|
|
4
|
+
import type { KernelVersion } from "../toEcdsaKernelSmartAccount.js"
|
|
5
|
+
import { isKernelV2 } from "./isKernelV2.js"
|
|
6
6
|
|
|
7
7
|
export const encodeCallData = ({
|
|
8
8
|
kernelVersion,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Address, concatHex, maxUint16, pad, toHex } from "viem"
|
|
2
|
-
import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../constants"
|
|
3
|
-
import type { KernelVersion } from "../toEcdsaKernelSmartAccount"
|
|
4
|
-
import { isKernelV2 } from "./isKernelV2"
|
|
2
|
+
import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../constants.js"
|
|
3
|
+
import type { KernelVersion } from "../toEcdsaKernelSmartAccount.js"
|
|
4
|
+
import { isKernelV2 } from "./isKernelV2.js"
|
|
5
5
|
|
|
6
6
|
export const getNonceKeyWithEncoding = (
|
|
7
7
|
kernelVersion: KernelVersion<"0.6" | "0.7">,
|
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
hashMessage
|
|
6
6
|
} from "viem"
|
|
7
7
|
import { signMessage as _signMessage } from "viem/actions"
|
|
8
|
-
import { isKernelV2 } from "./isKernelV2"
|
|
9
|
-
import {
|
|
8
|
+
import { isKernelV2 } from "./isKernelV2.js"
|
|
9
|
+
import {
|
|
10
|
+
type WrapMessageHashParams,
|
|
11
|
+
wrapMessageHash
|
|
12
|
+
} from "./wrapMessageHash.js"
|
|
10
13
|
|
|
11
14
|
export async function signMessage({
|
|
12
15
|
message,
|
|
@@ -6,8 +6,11 @@ import {
|
|
|
6
6
|
hashTypedData,
|
|
7
7
|
validateTypedData
|
|
8
8
|
} from "viem"
|
|
9
|
-
import { isKernelV2 } from "./isKernelV2"
|
|
10
|
-
import {
|
|
9
|
+
import { isKernelV2 } from "./isKernelV2.js"
|
|
10
|
+
import {
|
|
11
|
+
type WrapMessageHashParams,
|
|
12
|
+
wrapMessageHash
|
|
13
|
+
} from "./wrapMessageHash.js"
|
|
11
14
|
|
|
12
15
|
export async function signTypedData(
|
|
13
16
|
parameters: TypedDataDefinition &
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
stringToHex
|
|
7
7
|
} from "viem"
|
|
8
8
|
import { type Address, domainSeparator } from "viem"
|
|
9
|
-
import type { KernelVersion } from "../toEcdsaKernelSmartAccount"
|
|
9
|
+
import type { KernelVersion } from "../toEcdsaKernelSmartAccount.js"
|
|
10
10
|
|
|
11
11
|
export type WrapMessageHashParams = {
|
|
12
12
|
kernelVersion: KernelVersion<"0.6" | "0.7">
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type Assign,
|
|
5
5
|
type Chain,
|
|
6
6
|
type Client,
|
|
7
|
-
type EIP1193Provider,
|
|
8
7
|
type Hex,
|
|
9
8
|
type LocalAccount,
|
|
10
9
|
type OneOf,
|
|
@@ -27,9 +26,9 @@ import {
|
|
|
27
26
|
} from "viem/account-abstraction"
|
|
28
27
|
import { getChainId, signMessage } from "viem/actions"
|
|
29
28
|
import { getAction } from "viem/utils"
|
|
30
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
31
|
-
import { getSenderAddress } from "../../actions/public/getSenderAddress"
|
|
32
|
-
import { toOwner } from "../../utils/toOwner"
|
|
29
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
30
|
+
import { getSenderAddress } from "../../actions/public/getSenderAddress.js"
|
|
31
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
33
32
|
|
|
34
33
|
const getAccountInitCode = async (
|
|
35
34
|
owner: Address,
|
|
@@ -81,7 +80,7 @@ export type ToLightSmartAccountParameters<
|
|
|
81
80
|
version: entryPointVersion
|
|
82
81
|
}
|
|
83
82
|
owner: OneOf<
|
|
84
|
-
|
|
|
83
|
+
| EthereumProvider
|
|
85
84
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
86
85
|
| LocalAccount
|
|
87
86
|
>
|
|
@@ -2,7 +2,6 @@ import type {
|
|
|
2
2
|
Account,
|
|
3
3
|
Assign,
|
|
4
4
|
Chain,
|
|
5
|
-
EIP1193Provider,
|
|
6
5
|
OneOf,
|
|
7
6
|
Prettify,
|
|
8
7
|
Transport,
|
|
@@ -38,9 +37,9 @@ import {
|
|
|
38
37
|
} from "viem/account-abstraction"
|
|
39
38
|
import { getChainId, readContract } from "viem/actions"
|
|
40
39
|
import { getAction } from "viem/utils"
|
|
41
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
42
|
-
import { encode7579Calls } from "../../utils"
|
|
43
|
-
import { toOwner } from "../../utils/toOwner"
|
|
40
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
41
|
+
import { encode7579Calls } from "../../utils/encode7579Calls.js"
|
|
42
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
44
43
|
|
|
45
44
|
const wrapMessageHash = (
|
|
46
45
|
messageHash: Hex,
|
|
@@ -93,7 +92,7 @@ export type ToNexusSmartAccountParameters = Prettify<{
|
|
|
93
92
|
client: Client
|
|
94
93
|
owners: [
|
|
95
94
|
OneOf<
|
|
96
|
-
|
|
|
95
|
+
| EthereumProvider
|
|
97
96
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
98
97
|
| LocalAccount
|
|
99
98
|
>
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type Assign,
|
|
5
5
|
type Chain,
|
|
6
6
|
type Client,
|
|
7
|
-
type EIP1193Provider,
|
|
8
7
|
type Hex,
|
|
9
8
|
type LocalAccount,
|
|
10
9
|
type OneOf,
|
|
@@ -39,9 +38,10 @@ import {
|
|
|
39
38
|
} from "viem/account-abstraction"
|
|
40
39
|
import { getChainId, readContract, signTypedData } from "viem/actions"
|
|
41
40
|
import { getAction } from "viem/utils"
|
|
42
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
41
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
42
|
+
import { encode7579Calls } from "../../utils/encode7579Calls.js"
|
|
43
|
+
import { isSmartAccountDeployed } from "../../utils/isSmartAccountDeployed.js"
|
|
44
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
45
45
|
|
|
46
46
|
export type SafeVersion = "1.4.1"
|
|
47
47
|
|
|
@@ -940,7 +940,7 @@ export type ToSafeSmartAccountParameters<
|
|
|
940
940
|
client: Client
|
|
941
941
|
owners: [
|
|
942
942
|
OneOf<
|
|
943
|
-
|
|
|
943
|
+
| EthereumProvider
|
|
944
944
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
945
945
|
| LocalAccount
|
|
946
946
|
>
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type Assign,
|
|
5
5
|
type Chain,
|
|
6
6
|
type Client,
|
|
7
|
-
type EIP1193Provider,
|
|
8
7
|
type Hex,
|
|
9
8
|
type LocalAccount,
|
|
10
9
|
type OneOf,
|
|
@@ -24,9 +23,9 @@ import {
|
|
|
24
23
|
} from "viem/account-abstraction"
|
|
25
24
|
import { getChainId, signMessage } from "viem/actions"
|
|
26
25
|
import { getAction } from "viem/utils"
|
|
27
|
-
import { getAccountNonce } from "../../actions/public/getAccountNonce"
|
|
28
|
-
import { getSenderAddress } from "../../actions/public/getSenderAddress"
|
|
29
|
-
import { toOwner } from "../../utils/toOwner"
|
|
26
|
+
import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
|
|
27
|
+
import { getSenderAddress } from "../../actions/public/getSenderAddress.js"
|
|
28
|
+
import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
|
|
30
29
|
|
|
31
30
|
const getAccountInitCode = async (
|
|
32
31
|
owner: Address,
|
|
@@ -71,7 +70,7 @@ export type ToSimpleSmartAccountParameters<
|
|
|
71
70
|
> = {
|
|
72
71
|
client: Client
|
|
73
72
|
owner: OneOf<
|
|
74
|
-
|
|
|
73
|
+
| EthereumProvider
|
|
75
74
|
| WalletClient<Transport, Chain | undefined, Account>
|
|
76
75
|
| LocalAccount
|
|
77
76
|
>
|