@metamask/smart-accounts-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE.APACHE2 +201 -0
  3. package/LICENSE.MIT0 +16 -0
  4. package/README.md +77 -0
  5. package/dist/actions/index.cjs +39 -0
  6. package/dist/actions/index.cjs.map +1 -0
  7. package/dist/actions/index.d.cts +8 -0
  8. package/dist/actions/index.d.ts +8 -0
  9. package/dist/actions/index.mjs +39 -0
  10. package/dist/actions/index.mjs.map +1 -0
  11. package/dist/chunk-2EIX7ZYT.cjs +1325 -0
  12. package/dist/chunk-2EIX7ZYT.cjs.map +1 -0
  13. package/dist/chunk-662KDAAG.cjs +831 -0
  14. package/dist/chunk-662KDAAG.cjs.map +1 -0
  15. package/dist/chunk-6RN5RBOR.mjs +1325 -0
  16. package/dist/chunk-6RN5RBOR.mjs.map +1 -0
  17. package/dist/chunk-7MRTROLV.mjs +274 -0
  18. package/dist/chunk-7MRTROLV.mjs.map +1 -0
  19. package/dist/chunk-BFDBNFIP.cjs +336 -0
  20. package/dist/chunk-BFDBNFIP.cjs.map +1 -0
  21. package/dist/chunk-CPLIK3VF.mjs +77 -0
  22. package/dist/chunk-CPLIK3VF.mjs.map +1 -0
  23. package/dist/chunk-D4ILRL6Z.cjs +299 -0
  24. package/dist/chunk-D4ILRL6Z.cjs.map +1 -0
  25. package/dist/chunk-HD4O6IVC.cjs +274 -0
  26. package/dist/chunk-HD4O6IVC.cjs.map +1 -0
  27. package/dist/chunk-HLCOMYYU.cjs +1472 -0
  28. package/dist/chunk-HLCOMYYU.cjs.map +1 -0
  29. package/dist/chunk-KUEXI4ME.mjs +299 -0
  30. package/dist/chunk-KUEXI4ME.mjs.map +1 -0
  31. package/dist/chunk-MVKT5CLQ.mjs +336 -0
  32. package/dist/chunk-MVKT5CLQ.mjs.map +1 -0
  33. package/dist/chunk-RB4SOJM3.mjs +729 -0
  34. package/dist/chunk-RB4SOJM3.mjs.map +1 -0
  35. package/dist/chunk-T6PSFUOZ.cjs +77 -0
  36. package/dist/chunk-T6PSFUOZ.cjs.map +1 -0
  37. package/dist/chunk-TEI2NRPU.mjs +831 -0
  38. package/dist/chunk-TEI2NRPU.mjs.map +1 -0
  39. package/dist/chunk-UUDQWENY.mjs +1472 -0
  40. package/dist/chunk-UUDQWENY.mjs.map +1 -0
  41. package/dist/chunk-WA2O2K3K.cjs +729 -0
  42. package/dist/chunk-WA2O2K3K.cjs.map +1 -0
  43. package/dist/contracts/index.cjs +57 -0
  44. package/dist/contracts/index.cjs.map +1 -0
  45. package/dist/contracts/index.d.cts +8 -0
  46. package/dist/contracts/index.d.ts +8 -0
  47. package/dist/contracts/index.mjs +57 -0
  48. package/dist/contracts/index.mjs.map +1 -0
  49. package/dist/delegation-7PtFix8Y.d.ts +376 -0
  50. package/dist/delegation-d52Owevd.d.cts +376 -0
  51. package/dist/experimental/index.cjs +143 -0
  52. package/dist/experimental/index.cjs.map +1 -0
  53. package/dist/experimental/index.d.cts +29 -0
  54. package/dist/experimental/index.d.ts +29 -0
  55. package/dist/experimental/index.mjs +143 -0
  56. package/dist/experimental/index.mjs.map +1 -0
  57. package/dist/index-0-B0YlEP.d.cts +21935 -0
  58. package/dist/index-18Alar1P.d.ts +1174 -0
  59. package/dist/index-CLkk7zr4.d.cts +1174 -0
  60. package/dist/index-D1WbhKCc.d.ts +21935 -0
  61. package/dist/index.cjs +424 -0
  62. package/dist/index.cjs.map +1 -0
  63. package/dist/index.d.cts +56 -0
  64. package/dist/index.d.ts +56 -0
  65. package/dist/index.mjs +424 -0
  66. package/dist/index.mjs.map +1 -0
  67. package/dist/smartAccountsEnvironment-BOhrxEnt.d.ts +12 -0
  68. package/dist/smartAccountsEnvironment-SVknZ_3f.d.cts +12 -0
  69. package/dist/types-Bwksz_U6.d.cts +136 -0
  70. package/dist/types-Bwksz_U6.d.ts +136 -0
  71. package/dist/userOp-CFv4wNkl.d.cts +33 -0
  72. package/dist/userOp-CFv4wNkl.d.ts +33 -0
  73. package/dist/utils/index.cjs +60 -0
  74. package/dist/utils/index.cjs.map +1 -0
  75. package/dist/utils/index.d.cts +47 -0
  76. package/dist/utils/index.d.ts +47 -0
  77. package/dist/utils/index.mjs +60 -0
  78. package/dist/utils/index.mjs.map +1 -0
  79. package/package.json +151 -0
@@ -0,0 +1,1174 @@
1
+ import { AccountSigner, PermissionResponse, PermissionTypes, PermissionRequest } from '@metamask/7715-permission-types';
2
+ import * as viem from 'viem';
3
+ import { Address, Client, Transport, Chain, Account, RpcSchema, SendTransactionRequest, SendTransactionParameters, Hex, OneOf, PublicClient, WalletClient } from 'viem';
4
+ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
5
+ import { m as Call, S as SmartAccountsEnvironment, D as Delegation } from './types-Bwksz_U6.cjs';
6
+ import { U as UserOperationV07 } from './userOp-CFv4wNkl.cjs';
7
+
8
+ type MetaMaskExtensionSchema = RpcSchema & [
9
+ {
10
+ Method: 'wallet_requestExecutionPermissions';
11
+ Params: PermissionRequest<AccountSigner, PermissionTypes>[];
12
+ ReturnType: PermissionResponse<AccountSigner, PermissionTypes>[];
13
+ }
14
+ ];
15
+ type MetaMaskExtensionClient = Client<Transport, Chain | undefined, Account | undefined, MetaMaskExtensionSchema>;
16
+ type PermissionParameter = {
17
+ type: string;
18
+ data: Record<string, unknown>;
19
+ };
20
+ type NativeTokenStreamPermissionParameter = PermissionParameter & {
21
+ type: 'native-token-stream';
22
+ data: {
23
+ amountPerSecond: bigint;
24
+ initialAmount?: bigint;
25
+ maxAmount?: bigint;
26
+ startTime?: number;
27
+ justification?: string;
28
+ };
29
+ };
30
+ type Erc20TokenStreamPermissionParameter = PermissionParameter & {
31
+ type: 'erc20-token-stream';
32
+ data: {
33
+ tokenAddress: Address;
34
+ amountPerSecond: bigint;
35
+ initialAmount?: bigint;
36
+ maxAmount?: bigint;
37
+ startTime?: number;
38
+ justification?: string;
39
+ };
40
+ };
41
+ type NativeTokenPeriodicPermissionParameter = PermissionParameter & {
42
+ type: 'native-token-periodic';
43
+ data: {
44
+ periodAmount: bigint;
45
+ periodDuration: number;
46
+ startTime?: number;
47
+ justification?: string;
48
+ };
49
+ };
50
+ type Erc20TokenPeriodicPermissionParameter = PermissionParameter & {
51
+ type: 'erc20-token-periodic';
52
+ data: {
53
+ tokenAddress: Address;
54
+ periodAmount: bigint;
55
+ periodDuration: number;
56
+ startTime?: number;
57
+ justification?: string;
58
+ };
59
+ };
60
+ type SupportedPermissionParams = NativeTokenStreamPermissionParameter | Erc20TokenStreamPermissionParameter | NativeTokenPeriodicPermissionParameter | Erc20TokenPeriodicPermissionParameter;
61
+ type SignerParam = Address | AccountSigner;
62
+ type PermissionRequestParameter = {
63
+ chainId: number;
64
+ permission: SupportedPermissionParams;
65
+ isAdjustmentAllowed: boolean;
66
+ signer: SignerParam;
67
+ address?: Address;
68
+ expiry: number;
69
+ };
70
+ type RequestExecutionPermissionsParameters = PermissionRequestParameter[];
71
+ type RequestExecutionPermissionsReturnType = PermissionResponse<AccountSigner, PermissionTypes>[];
72
+ declare function erc7715RequestExecutionPermissionsAction(client: MetaMaskExtensionClient, parameters: RequestExecutionPermissionsParameters): Promise<RequestExecutionPermissionsReturnType>;
73
+
74
+ type DelegatedCall = Call & OneOf<{
75
+ permissionsContext: Hex;
76
+ delegationManager: Hex;
77
+ } | object>;
78
+ type SendTransactionWithDelegationParameters<TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined, TChainOverride extends Chain | undefined = Chain | undefined, TRequest extends SendTransactionRequest<TChain, TChainOverride> = SendTransactionRequest<TChain, TChainOverride>> = SendTransactionParameters<TChain, TAccount, TChainOverride, TRequest> & {
79
+ permissionsContext: Hex;
80
+ delegationManager: Hex;
81
+ };
82
+ type SendUserOperationWithDelegationParameters<TAccount extends SmartAccount | undefined = SmartAccount | undefined, TAccountOverride extends SmartAccount | undefined = SmartAccount | undefined> = SendUserOperationParameters<TAccount, TAccountOverride, DelegatedCall[]> & {
83
+ accountMetadata?: {
84
+ factory: Hex;
85
+ factoryData: Hex;
86
+ }[];
87
+ calls: DelegatedCall[];
88
+ publicClient: PublicClient<Transport, Chain>;
89
+ };
90
+
91
+ type CaveatEnforcerParams = {
92
+ delegation: Delegation;
93
+ };
94
+ type PeriodTransferResult = {
95
+ availableAmount: bigint;
96
+ isNewPeriod: boolean;
97
+ currentPeriod: bigint;
98
+ };
99
+ type StreamingResult = {
100
+ availableAmount: bigint;
101
+ };
102
+ declare function getErc20PeriodTransferEnforcerAvailableAmount(client: Client, environment: SmartAccountsEnvironment, params: CaveatEnforcerParams): Promise<PeriodTransferResult>;
103
+ declare function getErc20StreamingEnforcerAvailableAmount(client: Client, environment: SmartAccountsEnvironment, params: CaveatEnforcerParams): Promise<StreamingResult>;
104
+ declare function getMultiTokenPeriodEnforcerAvailableAmount(client: Client, environment: SmartAccountsEnvironment, params: CaveatEnforcerParams): Promise<PeriodTransferResult>;
105
+ declare function getNativeTokenPeriodTransferEnforcerAvailableAmount(client: Client, environment: SmartAccountsEnvironment, params: CaveatEnforcerParams): Promise<PeriodTransferResult>;
106
+ declare function getNativeTokenStreamingEnforcerAvailableAmount(client: Client, environment: SmartAccountsEnvironment, params: CaveatEnforcerParams): Promise<StreamingResult>;
107
+ declare const caveatEnforcerActions: ({ environment }: {
108
+ environment: SmartAccountsEnvironment;
109
+ }) => (client: Client) => {
110
+ getErc20PeriodTransferEnforcerAvailableAmount: (params: CaveatEnforcerParams) => Promise<PeriodTransferResult>;
111
+ getErc20StreamingEnforcerAvailableAmount: (params: CaveatEnforcerParams) => Promise<StreamingResult>;
112
+ getMultiTokenPeriodEnforcerAvailableAmount: (params: CaveatEnforcerParams) => Promise<PeriodTransferResult>;
113
+ getNativeTokenPeriodTransferEnforcerAvailableAmount: (params: CaveatEnforcerParams) => Promise<PeriodTransferResult>;
114
+ getNativeTokenStreamingEnforcerAvailableAmount: (params: CaveatEnforcerParams) => Promise<StreamingResult>;
115
+ };
116
+
117
+ type IsValid7702ImplementationParameters = {
118
+ client: Client;
119
+ accountAddress: Address;
120
+ environment: SmartAccountsEnvironment;
121
+ };
122
+ declare function isValid7702Implementation({ client, accountAddress, environment, }: IsValid7702ImplementationParameters): Promise<boolean>;
123
+
124
+ type SignDelegationParameters = {
125
+ account?: Account | Address;
126
+ delegation: Omit<Delegation, 'signature'>;
127
+ delegationManager: Address;
128
+ chainId: number;
129
+ name?: string;
130
+ version?: string;
131
+ allowInsecureUnrestrictedDelegation?: boolean;
132
+ };
133
+ type SignDelegationReturnType = Hex;
134
+ declare function signDelegation<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: Client<Transport, TChain, TAccount> & {
135
+ signTypedData: WalletClient['signTypedData'];
136
+ }, parameters: SignDelegationParameters): Promise<SignDelegationReturnType>;
137
+ declare function signDelegationActions(): <TChain extends Chain | undefined, TAccount extends Account | undefined>(client: {
138
+ account: TAccount;
139
+ batch?: {
140
+ multicall?: boolean | {
141
+ batchSize?: number | undefined;
142
+ wait?: number | undefined;
143
+ } | undefined;
144
+ } | undefined;
145
+ cacheTime: number;
146
+ ccipRead?: false | {
147
+ request?: ((parameters: viem.CcipRequestParameters) => Promise<`0x${string}`>) | undefined;
148
+ } | undefined;
149
+ chain: TChain;
150
+ key: string;
151
+ name: string;
152
+ pollingInterval: number;
153
+ request: viem.EIP1193RequestFn<[{
154
+ Method: "web3_clientVersion";
155
+ Parameters?: undefined;
156
+ ReturnType: string;
157
+ }, {
158
+ Method: "web3_sha3";
159
+ Parameters: [data: `0x${string}`];
160
+ ReturnType: string;
161
+ }, {
162
+ Method: "net_listening";
163
+ Parameters?: undefined;
164
+ ReturnType: boolean;
165
+ }, {
166
+ Method: "net_peerCount";
167
+ Parameters?: undefined;
168
+ ReturnType: `0x${string}`;
169
+ }, {
170
+ Method: "net_version";
171
+ Parameters?: undefined;
172
+ ReturnType: `0x${string}`;
173
+ }, {
174
+ Method: "eth_blobBaseFee";
175
+ Parameters?: undefined;
176
+ ReturnType: `0x${string}`;
177
+ }, {
178
+ Method: "eth_blockNumber";
179
+ Parameters?: undefined;
180
+ ReturnType: `0x${string}`;
181
+ }, {
182
+ Method: "eth_call";
183
+ Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
184
+ ReturnType: `0x${string}`;
185
+ }, {
186
+ Method: "eth_createAccessList";
187
+ Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
188
+ ReturnType: {
189
+ accessList: viem.AccessList;
190
+ gasUsed: `0x${string}`;
191
+ };
192
+ }, {
193
+ Method: "eth_chainId";
194
+ Parameters?: undefined;
195
+ ReturnType: `0x${string}`;
196
+ }, {
197
+ Method: "eth_coinbase";
198
+ Parameters?: undefined;
199
+ ReturnType: `0x${string}`;
200
+ }, {
201
+ Method: "eth_estimateGas";
202
+ Parameters: [transaction: viem.RpcTransactionRequest] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag, stateOverride: viem.RpcStateOverride];
203
+ ReturnType: `0x${string}`;
204
+ }, {
205
+ Method: "eth_feeHistory";
206
+ Parameters: [blockCount: `0x${string}`, newestBlock: `0x${string}` | viem.BlockTag, rewardPercentiles: number[] | undefined];
207
+ ReturnType: viem.RpcFeeHistory;
208
+ }, {
209
+ Method: "eth_gasPrice";
210
+ Parameters?: undefined;
211
+ ReturnType: `0x${string}`;
212
+ }, {
213
+ Method: "eth_getBalance";
214
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
215
+ ReturnType: `0x${string}`;
216
+ }, {
217
+ Method: "eth_getBlockByHash";
218
+ Parameters: [hash: `0x${string}`, includeTransactionObjects: boolean];
219
+ ReturnType: viem.RpcBlock | null;
220
+ }, {
221
+ Method: "eth_getBlockByNumber";
222
+ Parameters: [block: `0x${string}` | viem.BlockTag, includeTransactionObjects: boolean];
223
+ ReturnType: viem.RpcBlock | null;
224
+ }, {
225
+ Method: "eth_getBlockTransactionCountByHash";
226
+ Parameters: [hash: `0x${string}`];
227
+ ReturnType: `0x${string}`;
228
+ }, {
229
+ Method: "eth_getBlockTransactionCountByNumber";
230
+ Parameters: [block: `0x${string}` | viem.BlockTag];
231
+ ReturnType: `0x${string}`;
232
+ }, {
233
+ Method: "eth_getCode";
234
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
235
+ ReturnType: `0x${string}`;
236
+ }, {
237
+ Method: "eth_getFilterChanges";
238
+ Parameters: [filterId: `0x${string}`];
239
+ ReturnType: `0x${string}`[] | viem.RpcLog[];
240
+ }, {
241
+ Method: "eth_getFilterLogs";
242
+ Parameters: [filterId: `0x${string}`];
243
+ ReturnType: viem.RpcLog[];
244
+ }, {
245
+ Method: "eth_getLogs";
246
+ Parameters: [{
247
+ address?: `0x${string}` | `0x${string}`[] | undefined;
248
+ topics?: viem.LogTopic[] | undefined;
249
+ } & ({
250
+ fromBlock?: `0x${string}` | viem.BlockTag | undefined;
251
+ toBlock?: `0x${string}` | viem.BlockTag | undefined;
252
+ blockHash?: undefined;
253
+ } | {
254
+ fromBlock?: undefined;
255
+ toBlock?: undefined;
256
+ blockHash?: `0x${string}` | undefined;
257
+ })];
258
+ ReturnType: viem.RpcLog[];
259
+ }, {
260
+ Method: "eth_getProof";
261
+ Parameters: [address: `0x${string}`, storageKeys: `0x${string}`[], block: `0x${string}` | viem.BlockTag];
262
+ ReturnType: viem.RpcProof;
263
+ }, {
264
+ Method: "eth_getStorageAt";
265
+ Parameters: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
266
+ ReturnType: `0x${string}`;
267
+ }, {
268
+ Method: "eth_getTransactionByBlockHashAndIndex";
269
+ Parameters: [hash: `0x${string}`, index: `0x${string}`];
270
+ ReturnType: viem.RpcTransaction | null;
271
+ }, {
272
+ Method: "eth_getTransactionByBlockNumberAndIndex";
273
+ Parameters: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
274
+ ReturnType: viem.RpcTransaction | null;
275
+ }, {
276
+ Method: "eth_getTransactionByHash";
277
+ Parameters: [hash: `0x${string}`];
278
+ ReturnType: viem.RpcTransaction | null;
279
+ }, {
280
+ Method: "eth_getTransactionCount";
281
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
282
+ ReturnType: `0x${string}`;
283
+ }, {
284
+ Method: "eth_getTransactionReceipt";
285
+ Parameters: [hash: `0x${string}`];
286
+ ReturnType: viem.RpcTransactionReceipt | null;
287
+ }, {
288
+ Method: "eth_getUncleByBlockHashAndIndex";
289
+ Parameters: [hash: `0x${string}`, index: `0x${string}`];
290
+ ReturnType: viem.RpcUncle | null;
291
+ }, {
292
+ Method: "eth_getUncleByBlockNumberAndIndex";
293
+ Parameters: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
294
+ ReturnType: viem.RpcUncle | null;
295
+ }, {
296
+ Method: "eth_getUncleCountByBlockHash";
297
+ Parameters: [hash: `0x${string}`];
298
+ ReturnType: `0x${string}`;
299
+ }, {
300
+ Method: "eth_getUncleCountByBlockNumber";
301
+ Parameters: [block: `0x${string}` | viem.BlockTag];
302
+ ReturnType: `0x${string}`;
303
+ }, {
304
+ Method: "eth_maxPriorityFeePerGas";
305
+ Parameters?: undefined;
306
+ ReturnType: `0x${string}`;
307
+ }, {
308
+ Method: "eth_newBlockFilter";
309
+ Parameters?: undefined;
310
+ ReturnType: `0x${string}`;
311
+ }, {
312
+ Method: "eth_newFilter";
313
+ Parameters: [filter: {
314
+ fromBlock?: `0x${string}` | viem.BlockTag | undefined;
315
+ toBlock?: `0x${string}` | viem.BlockTag | undefined;
316
+ address?: `0x${string}` | `0x${string}`[] | undefined;
317
+ topics?: viem.LogTopic[] | undefined;
318
+ }];
319
+ ReturnType: `0x${string}`;
320
+ }, {
321
+ Method: "eth_newPendingTransactionFilter";
322
+ Parameters?: undefined;
323
+ ReturnType: `0x${string}`;
324
+ }, {
325
+ Method: "eth_protocolVersion";
326
+ Parameters?: undefined;
327
+ ReturnType: string;
328
+ }, {
329
+ Method: "eth_sendRawTransaction";
330
+ Parameters: [signedTransaction: `0x${string}`];
331
+ ReturnType: `0x${string}`;
332
+ }, {
333
+ Method: "eth_simulateV1";
334
+ Parameters: [{
335
+ blockStateCalls: readonly {
336
+ blockOverrides?: viem.RpcBlockOverrides | undefined;
337
+ calls?: readonly viem.ExactPartial<viem.RpcTransactionRequest>[] | undefined;
338
+ stateOverrides?: viem.RpcStateOverride | undefined;
339
+ }[];
340
+ returnFullTransactions?: boolean | undefined;
341
+ traceTransfers?: boolean | undefined;
342
+ validation?: boolean | undefined;
343
+ }, `0x${string}` | viem.BlockTag];
344
+ ReturnType: readonly (viem.RpcBlock & {
345
+ calls: readonly {
346
+ error?: {
347
+ data?: `0x${string}` | undefined;
348
+ code: number;
349
+ message: string;
350
+ } | undefined;
351
+ logs?: readonly viem.RpcLog[] | undefined;
352
+ gasUsed: `0x${string}`;
353
+ returnData: `0x${string}`;
354
+ status: `0x${string}`;
355
+ }[];
356
+ })[];
357
+ }, {
358
+ Method: "eth_uninstallFilter";
359
+ Parameters: [filterId: `0x${string}`];
360
+ ReturnType: boolean;
361
+ }, {
362
+ Method: "eth_accounts";
363
+ Parameters?: undefined;
364
+ ReturnType: `0x${string}`[];
365
+ }, {
366
+ Method: "eth_chainId";
367
+ Parameters?: undefined;
368
+ ReturnType: `0x${string}`;
369
+ }, {
370
+ Method: "eth_estimateGas";
371
+ Parameters: [transaction: viem.RpcTransactionRequest] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag, stateOverride: viem.RpcStateOverride];
372
+ ReturnType: `0x${string}`;
373
+ }, {
374
+ Method: "eth_requestAccounts";
375
+ Parameters?: undefined;
376
+ ReturnType: `0x${string}`[];
377
+ }, {
378
+ Method: "eth_sendTransaction";
379
+ Parameters: [transaction: viem.RpcTransactionRequest];
380
+ ReturnType: `0x${string}`;
381
+ }, {
382
+ Method: "eth_sendRawTransaction";
383
+ Parameters: [signedTransaction: `0x${string}`];
384
+ ReturnType: `0x${string}`;
385
+ }, {
386
+ Method: "eth_sign";
387
+ Parameters: [address: `0x${string}`, data: `0x${string}`];
388
+ ReturnType: `0x${string}`;
389
+ }, {
390
+ Method: "eth_signTransaction";
391
+ Parameters: [request: viem.RpcTransactionRequest];
392
+ ReturnType: `0x${string}`;
393
+ }, {
394
+ Method: "eth_signTypedData_v4";
395
+ Parameters: [address: `0x${string}`, message: string];
396
+ ReturnType: `0x${string}`;
397
+ }, {
398
+ Method: "eth_syncing";
399
+ Parameters?: undefined;
400
+ ReturnType: false | viem.NetworkSync;
401
+ }, {
402
+ Method: "personal_sign";
403
+ Parameters: [data: `0x${string}`, address: `0x${string}`];
404
+ ReturnType: `0x${string}`;
405
+ }, {
406
+ Method: "wallet_addEthereumChain";
407
+ Parameters: [chain: viem.AddEthereumChainParameter];
408
+ ReturnType: null;
409
+ }, {
410
+ Method: "wallet_addSubAccount";
411
+ Parameters: [{
412
+ account: viem.OneOf<{
413
+ keys: readonly {
414
+ publicKey: `0x${string}`;
415
+ type: "address" | "p256" | "webcrypto-p256" | "webauthn-p256";
416
+ }[];
417
+ type: "create";
418
+ } | {
419
+ address: `0x${string}`;
420
+ chainId?: number | undefined;
421
+ type: "deployed";
422
+ } | {
423
+ address: `0x${string}`;
424
+ chainId?: number | undefined;
425
+ factory: `0x${string}`;
426
+ factoryData: `0x${string}`;
427
+ type: "undeployed";
428
+ }>;
429
+ version: string;
430
+ }];
431
+ ReturnType: {
432
+ address: `0x${string}`;
433
+ factory?: `0x${string}` | undefined;
434
+ factoryData?: `0x${string}` | undefined;
435
+ };
436
+ }, {
437
+ Method: "wallet_connect";
438
+ Parameters: [{
439
+ capabilities?: {
440
+ [key: string]: any;
441
+ } | undefined;
442
+ version: string;
443
+ }];
444
+ ReturnType: {
445
+ accounts: readonly {
446
+ address: `0x${string}`;
447
+ capabilities?: {
448
+ [key: string]: any;
449
+ } | undefined;
450
+ }[];
451
+ };
452
+ }, {
453
+ Method: "wallet_disconnect";
454
+ Parameters?: undefined;
455
+ ReturnType: void;
456
+ }, {
457
+ Method: "wallet_getCallsStatus";
458
+ Parameters?: [string] | undefined;
459
+ ReturnType: viem.WalletGetCallsStatusReturnType<{
460
+ [key: string]: any;
461
+ }, `0x${string}`, `0x${string}`, `0x${string}`>;
462
+ }, {
463
+ Method: "wallet_getCapabilities";
464
+ Parameters?: readonly [] | readonly [`0x${string}` | undefined] | readonly [`0x${string}` | undefined, readonly `0x${string}`[] | undefined] | undefined;
465
+ ReturnType: {
466
+ [x: `0x${string}`]: {
467
+ [key: string]: any;
468
+ };
469
+ };
470
+ }, {
471
+ Method: "wallet_getPermissions";
472
+ Parameters?: undefined;
473
+ ReturnType: viem.WalletPermission[];
474
+ }, {
475
+ Method: "wallet_grantPermissions";
476
+ Parameters?: [viem.WalletGrantPermissionsParameters] | undefined;
477
+ ReturnType: {
478
+ expiry: number;
479
+ factory?: `0x${string}` | undefined;
480
+ factoryData?: string | undefined;
481
+ grantedPermissions: readonly {
482
+ data: unknown;
483
+ policies: readonly {
484
+ data: unknown;
485
+ type: string;
486
+ }[];
487
+ required?: boolean | undefined;
488
+ type: string;
489
+ }[];
490
+ permissionsContext: string;
491
+ signerData?: {
492
+ userOpBuilder?: `0x${string}` | undefined;
493
+ submitToAddress?: `0x${string}` | undefined;
494
+ } | undefined;
495
+ };
496
+ }, {
497
+ Method: "wallet_requestPermissions";
498
+ Parameters: [permissions: {
499
+ eth_accounts: Record<string, any>;
500
+ }];
501
+ ReturnType: viem.WalletPermission[];
502
+ }, {
503
+ Method: "wallet_revokePermissions";
504
+ Parameters: [permissions: {
505
+ eth_accounts: Record<string, any>;
506
+ }];
507
+ ReturnType: null;
508
+ }, {
509
+ Method: "wallet_sendCalls";
510
+ Parameters?: viem.WalletSendCallsParameters<{
511
+ [key: string]: any;
512
+ }, `0x${string}`, `0x${string}`> | undefined;
513
+ ReturnType: viem.WalletSendCallsReturnType<{
514
+ [key: string]: any;
515
+ }>;
516
+ }, {
517
+ Method: "wallet_sendTransaction";
518
+ Parameters: [transaction: viem.RpcTransactionRequest];
519
+ ReturnType: `0x${string}`;
520
+ }, {
521
+ Method: "wallet_showCallsStatus";
522
+ Parameters?: [string] | undefined;
523
+ ReturnType: void;
524
+ }, {
525
+ Method: "wallet_switchEthereumChain";
526
+ Parameters: [chain: {
527
+ chainId: string;
528
+ }];
529
+ ReturnType: null;
530
+ }, {
531
+ Method: "wallet_watchAsset";
532
+ Parameters: viem.WatchAssetParams;
533
+ ReturnType: boolean;
534
+ }, {
535
+ Method: "eth_chainId";
536
+ Parameters?: undefined;
537
+ ReturnType: `0x${string}`;
538
+ }, {
539
+ Method: "eth_estimateUserOperationGas";
540
+ Parameters: [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`] | [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`, stateOverrideSet: viem.RpcStateOverride];
541
+ ReturnType: viem.RpcEstimateUserOperationGasReturnType;
542
+ }, {
543
+ Method: "eth_getUserOperationByHash";
544
+ Parameters: [hash: `0x${string}`];
545
+ ReturnType: viem.RpcGetUserOperationByHashReturnType | null;
546
+ }, {
547
+ Method: "eth_getUserOperationReceipt";
548
+ Parameters: [hash: `0x${string}`];
549
+ ReturnType: viem.RpcUserOperationReceipt | null;
550
+ }, {
551
+ Method: "eth_sendUserOperation";
552
+ Parameters: [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`];
553
+ ReturnType: `0x${string}`;
554
+ }, {
555
+ Method: "eth_supportedEntryPoints";
556
+ Parameters?: undefined;
557
+ ReturnType: readonly `0x${string}`[];
558
+ }, {
559
+ Method: "pm_getPaymasterStubData";
560
+ Parameters?: [userOperation: viem.OneOf<viem.PartialBy<Pick<viem.RpcUserOperation<"0.6">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit" | "initCode">, "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "initCode"> | viem.PartialBy<Pick<viem.RpcUserOperation<"0.7">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit">, "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "verificationGasLimit">>, entrypoint: `0x${string}`, chainId: `0x${string}`, context: unknown] | undefined;
561
+ ReturnType: viem.OneOf<{
562
+ paymasterAndData: `0x${string}`;
563
+ } | {
564
+ paymaster: `0x${string}`;
565
+ paymasterData: `0x${string}`;
566
+ paymasterVerificationGasLimit: `0x${string}`;
567
+ paymasterPostOpGasLimit: `0x${string}`;
568
+ }> & {
569
+ sponsor?: {
570
+ name: string;
571
+ icon?: string | undefined;
572
+ } | undefined;
573
+ isFinal?: boolean | undefined;
574
+ };
575
+ }, {
576
+ Method: "pm_getPaymasterData";
577
+ Parameters?: [userOperation: Pick<viem.RpcUserOperation<"0.6">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit" | "initCode"> | Pick<viem.RpcUserOperation<"0.7">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit">, entrypoint: `0x${string}`, chainId: `0x${string}`, context: unknown] | undefined;
578
+ ReturnType: viem.OneOf<{
579
+ paymasterAndData: `0x${string}`;
580
+ } | {
581
+ paymaster: `0x${string}`;
582
+ paymasterData: `0x${string}`;
583
+ paymasterVerificationGasLimit: `0x${string}`;
584
+ paymasterPostOpGasLimit: `0x${string}`;
585
+ }>;
586
+ }]>;
587
+ transport: viem.TransportConfig<string, viem.EIP1193RequestFn> & Record<string, any>;
588
+ type: string;
589
+ uid: string;
590
+ } & {
591
+ extend: <const client extends {
592
+ [x: string]: unknown;
593
+ account?: undefined;
594
+ batch?: undefined;
595
+ cacheTime?: undefined;
596
+ ccipRead?: undefined;
597
+ chain?: undefined;
598
+ key?: undefined;
599
+ name?: undefined;
600
+ pollingInterval?: undefined;
601
+ request?: undefined;
602
+ transport?: undefined;
603
+ type?: undefined;
604
+ uid?: undefined;
605
+ } & viem.ExactPartial<Pick<viem.PublicActions<Transport, TChain, TAccount>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<TChain, TAccount>, "sendTransaction" | "writeContract">>>(fn: (client: Client<Transport, TChain, TAccount, undefined, {
606
+ [x: string]: unknown;
607
+ account?: undefined;
608
+ batch?: undefined;
609
+ cacheTime?: undefined;
610
+ ccipRead?: undefined;
611
+ chain?: undefined;
612
+ key?: undefined;
613
+ name?: undefined;
614
+ pollingInterval?: undefined;
615
+ request?: undefined;
616
+ transport?: undefined;
617
+ type?: undefined;
618
+ uid?: undefined;
619
+ } | undefined>) => client) => Client<Transport, TChain, TAccount, undefined, { [K in keyof client]: client[K]; }>;
620
+ } & {
621
+ signTypedData: WalletClient['signTypedData'];
622
+ }) => {
623
+ signDelegation: (parameters: Omit<SignDelegationParameters, 'chainId'> & {
624
+ chainId?: number;
625
+ }) => Promise<`0x${string}`>;
626
+ };
627
+
628
+ type SignUserOperationParameters = {
629
+ account?: Account | Address;
630
+ userOperation: Omit<UserOperationV07, 'signature'>;
631
+ entryPoint: {
632
+ address: Address;
633
+ };
634
+ chainId: number;
635
+ address: Address;
636
+ name: 'HybridDeleGator' | 'MultiSigDeleGator';
637
+ version?: string;
638
+ };
639
+ type SignUserOperationReturnType = Hex;
640
+ declare function signUserOperation<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: Client<Transport, TChain, TAccount> & {
641
+ signTypedData: WalletClient['signTypedData'];
642
+ }, parameters: SignUserOperationParameters): Promise<SignUserOperationReturnType>;
643
+ declare function signUserOperationActions(): <TChain extends Chain | undefined, TAccount extends Account | undefined>(client: {
644
+ account: TAccount;
645
+ batch?: {
646
+ multicall?: boolean | {
647
+ batchSize?: number | undefined;
648
+ wait?: number | undefined;
649
+ } | undefined;
650
+ } | undefined;
651
+ cacheTime: number;
652
+ ccipRead?: false | {
653
+ request?: ((parameters: viem.CcipRequestParameters) => Promise<`0x${string}`>) | undefined;
654
+ } | undefined;
655
+ chain: TChain;
656
+ key: string;
657
+ name: string;
658
+ pollingInterval: number;
659
+ request: viem.EIP1193RequestFn<[{
660
+ Method: "web3_clientVersion";
661
+ Parameters?: undefined;
662
+ ReturnType: string;
663
+ }, {
664
+ Method: "web3_sha3";
665
+ Parameters: [data: `0x${string}`];
666
+ ReturnType: string;
667
+ }, {
668
+ Method: "net_listening";
669
+ Parameters?: undefined;
670
+ ReturnType: boolean;
671
+ }, {
672
+ Method: "net_peerCount";
673
+ Parameters?: undefined;
674
+ ReturnType: `0x${string}`;
675
+ }, {
676
+ Method: "net_version";
677
+ Parameters?: undefined;
678
+ ReturnType: `0x${string}`;
679
+ }, {
680
+ Method: "eth_blobBaseFee";
681
+ Parameters?: undefined;
682
+ ReturnType: `0x${string}`;
683
+ }, {
684
+ Method: "eth_blockNumber";
685
+ Parameters?: undefined;
686
+ ReturnType: `0x${string}`;
687
+ }, {
688
+ Method: "eth_call";
689
+ Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
690
+ ReturnType: `0x${string}`;
691
+ }, {
692
+ Method: "eth_createAccessList";
693
+ Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
694
+ ReturnType: {
695
+ accessList: viem.AccessList;
696
+ gasUsed: `0x${string}`;
697
+ };
698
+ }, {
699
+ Method: "eth_chainId";
700
+ Parameters?: undefined;
701
+ ReturnType: `0x${string}`;
702
+ }, {
703
+ Method: "eth_coinbase";
704
+ Parameters?: undefined;
705
+ ReturnType: `0x${string}`;
706
+ }, {
707
+ Method: "eth_estimateGas";
708
+ Parameters: [transaction: viem.RpcTransactionRequest] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag, stateOverride: viem.RpcStateOverride];
709
+ ReturnType: `0x${string}`;
710
+ }, {
711
+ Method: "eth_feeHistory";
712
+ Parameters: [blockCount: `0x${string}`, newestBlock: `0x${string}` | viem.BlockTag, rewardPercentiles: number[] | undefined];
713
+ ReturnType: viem.RpcFeeHistory;
714
+ }, {
715
+ Method: "eth_gasPrice";
716
+ Parameters?: undefined;
717
+ ReturnType: `0x${string}`;
718
+ }, {
719
+ Method: "eth_getBalance";
720
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
721
+ ReturnType: `0x${string}`;
722
+ }, {
723
+ Method: "eth_getBlockByHash";
724
+ Parameters: [hash: `0x${string}`, includeTransactionObjects: boolean];
725
+ ReturnType: viem.RpcBlock | null;
726
+ }, {
727
+ Method: "eth_getBlockByNumber";
728
+ Parameters: [block: `0x${string}` | viem.BlockTag, includeTransactionObjects: boolean];
729
+ ReturnType: viem.RpcBlock | null;
730
+ }, {
731
+ Method: "eth_getBlockTransactionCountByHash";
732
+ Parameters: [hash: `0x${string}`];
733
+ ReturnType: `0x${string}`;
734
+ }, {
735
+ Method: "eth_getBlockTransactionCountByNumber";
736
+ Parameters: [block: `0x${string}` | viem.BlockTag];
737
+ ReturnType: `0x${string}`;
738
+ }, {
739
+ Method: "eth_getCode";
740
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
741
+ ReturnType: `0x${string}`;
742
+ }, {
743
+ Method: "eth_getFilterChanges";
744
+ Parameters: [filterId: `0x${string}`];
745
+ ReturnType: `0x${string}`[] | viem.RpcLog[];
746
+ }, {
747
+ Method: "eth_getFilterLogs";
748
+ Parameters: [filterId: `0x${string}`];
749
+ ReturnType: viem.RpcLog[];
750
+ }, {
751
+ Method: "eth_getLogs";
752
+ Parameters: [{
753
+ address?: `0x${string}` | `0x${string}`[] | undefined;
754
+ topics?: viem.LogTopic[] | undefined;
755
+ } & ({
756
+ fromBlock?: `0x${string}` | viem.BlockTag | undefined;
757
+ toBlock?: `0x${string}` | viem.BlockTag | undefined;
758
+ blockHash?: undefined;
759
+ } | {
760
+ fromBlock?: undefined;
761
+ toBlock?: undefined;
762
+ blockHash?: `0x${string}` | undefined;
763
+ })];
764
+ ReturnType: viem.RpcLog[];
765
+ }, {
766
+ Method: "eth_getProof";
767
+ Parameters: [address: `0x${string}`, storageKeys: `0x${string}`[], block: `0x${string}` | viem.BlockTag];
768
+ ReturnType: viem.RpcProof;
769
+ }, {
770
+ Method: "eth_getStorageAt";
771
+ Parameters: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
772
+ ReturnType: `0x${string}`;
773
+ }, {
774
+ Method: "eth_getTransactionByBlockHashAndIndex";
775
+ Parameters: [hash: `0x${string}`, index: `0x${string}`];
776
+ ReturnType: viem.RpcTransaction | null;
777
+ }, {
778
+ Method: "eth_getTransactionByBlockNumberAndIndex";
779
+ Parameters: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
780
+ ReturnType: viem.RpcTransaction | null;
781
+ }, {
782
+ Method: "eth_getTransactionByHash";
783
+ Parameters: [hash: `0x${string}`];
784
+ ReturnType: viem.RpcTransaction | null;
785
+ }, {
786
+ Method: "eth_getTransactionCount";
787
+ Parameters: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
788
+ ReturnType: `0x${string}`;
789
+ }, {
790
+ Method: "eth_getTransactionReceipt";
791
+ Parameters: [hash: `0x${string}`];
792
+ ReturnType: viem.RpcTransactionReceipt | null;
793
+ }, {
794
+ Method: "eth_getUncleByBlockHashAndIndex";
795
+ Parameters: [hash: `0x${string}`, index: `0x${string}`];
796
+ ReturnType: viem.RpcUncle | null;
797
+ }, {
798
+ Method: "eth_getUncleByBlockNumberAndIndex";
799
+ Parameters: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
800
+ ReturnType: viem.RpcUncle | null;
801
+ }, {
802
+ Method: "eth_getUncleCountByBlockHash";
803
+ Parameters: [hash: `0x${string}`];
804
+ ReturnType: `0x${string}`;
805
+ }, {
806
+ Method: "eth_getUncleCountByBlockNumber";
807
+ Parameters: [block: `0x${string}` | viem.BlockTag];
808
+ ReturnType: `0x${string}`;
809
+ }, {
810
+ Method: "eth_maxPriorityFeePerGas";
811
+ Parameters?: undefined;
812
+ ReturnType: `0x${string}`;
813
+ }, {
814
+ Method: "eth_newBlockFilter";
815
+ Parameters?: undefined;
816
+ ReturnType: `0x${string}`;
817
+ }, {
818
+ Method: "eth_newFilter";
819
+ Parameters: [filter: {
820
+ fromBlock?: `0x${string}` | viem.BlockTag | undefined;
821
+ toBlock?: `0x${string}` | viem.BlockTag | undefined;
822
+ address?: `0x${string}` | `0x${string}`[] | undefined;
823
+ topics?: viem.LogTopic[] | undefined;
824
+ }];
825
+ ReturnType: `0x${string}`;
826
+ }, {
827
+ Method: "eth_newPendingTransactionFilter";
828
+ Parameters?: undefined;
829
+ ReturnType: `0x${string}`;
830
+ }, {
831
+ Method: "eth_protocolVersion";
832
+ Parameters?: undefined;
833
+ ReturnType: string;
834
+ }, {
835
+ Method: "eth_sendRawTransaction";
836
+ Parameters: [signedTransaction: `0x${string}`];
837
+ ReturnType: `0x${string}`;
838
+ }, {
839
+ Method: "eth_simulateV1";
840
+ Parameters: [{
841
+ blockStateCalls: readonly {
842
+ blockOverrides?: viem.RpcBlockOverrides | undefined;
843
+ calls?: readonly viem.ExactPartial<viem.RpcTransactionRequest>[] | undefined;
844
+ stateOverrides?: viem.RpcStateOverride | undefined;
845
+ }[];
846
+ returnFullTransactions?: boolean | undefined;
847
+ traceTransfers?: boolean | undefined;
848
+ validation?: boolean | undefined;
849
+ }, `0x${string}` | viem.BlockTag];
850
+ ReturnType: readonly (viem.RpcBlock & {
851
+ calls: readonly {
852
+ error?: {
853
+ data?: `0x${string}` | undefined;
854
+ code: number;
855
+ message: string;
856
+ } | undefined;
857
+ logs?: readonly viem.RpcLog[] | undefined;
858
+ gasUsed: `0x${string}`;
859
+ returnData: `0x${string}`;
860
+ status: `0x${string}`;
861
+ }[];
862
+ })[];
863
+ }, {
864
+ Method: "eth_uninstallFilter";
865
+ Parameters: [filterId: `0x${string}`];
866
+ ReturnType: boolean;
867
+ }, {
868
+ Method: "eth_accounts";
869
+ Parameters?: undefined;
870
+ ReturnType: `0x${string}`[];
871
+ }, {
872
+ Method: "eth_chainId";
873
+ Parameters?: undefined;
874
+ ReturnType: `0x${string}`;
875
+ }, {
876
+ Method: "eth_estimateGas";
877
+ Parameters: [transaction: viem.RpcTransactionRequest] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag] | [transaction: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag, stateOverride: viem.RpcStateOverride];
878
+ ReturnType: `0x${string}`;
879
+ }, {
880
+ Method: "eth_requestAccounts";
881
+ Parameters?: undefined;
882
+ ReturnType: `0x${string}`[];
883
+ }, {
884
+ Method: "eth_sendTransaction";
885
+ Parameters: [transaction: viem.RpcTransactionRequest];
886
+ ReturnType: `0x${string}`;
887
+ }, {
888
+ Method: "eth_sendRawTransaction";
889
+ Parameters: [signedTransaction: `0x${string}`];
890
+ ReturnType: `0x${string}`;
891
+ }, {
892
+ Method: "eth_sign";
893
+ Parameters: [address: `0x${string}`, data: `0x${string}`];
894
+ ReturnType: `0x${string}`;
895
+ }, {
896
+ Method: "eth_signTransaction";
897
+ Parameters: [request: viem.RpcTransactionRequest];
898
+ ReturnType: `0x${string}`;
899
+ }, {
900
+ Method: "eth_signTypedData_v4";
901
+ Parameters: [address: `0x${string}`, message: string];
902
+ ReturnType: `0x${string}`;
903
+ }, {
904
+ Method: "eth_syncing";
905
+ Parameters?: undefined;
906
+ ReturnType: false | viem.NetworkSync;
907
+ }, {
908
+ Method: "personal_sign";
909
+ Parameters: [data: `0x${string}`, address: `0x${string}`];
910
+ ReturnType: `0x${string}`;
911
+ }, {
912
+ Method: "wallet_addEthereumChain";
913
+ Parameters: [chain: viem.AddEthereumChainParameter];
914
+ ReturnType: null;
915
+ }, {
916
+ Method: "wallet_addSubAccount";
917
+ Parameters: [{
918
+ account: viem.OneOf<{
919
+ keys: readonly {
920
+ publicKey: `0x${string}`;
921
+ type: "address" | "p256" | "webcrypto-p256" | "webauthn-p256";
922
+ }[];
923
+ type: "create";
924
+ } | {
925
+ address: `0x${string}`;
926
+ chainId?: number | undefined;
927
+ type: "deployed";
928
+ } | {
929
+ address: `0x${string}`;
930
+ chainId?: number | undefined;
931
+ factory: `0x${string}`;
932
+ factoryData: `0x${string}`;
933
+ type: "undeployed";
934
+ }>;
935
+ version: string;
936
+ }];
937
+ ReturnType: {
938
+ address: `0x${string}`;
939
+ factory?: `0x${string}` | undefined;
940
+ factoryData?: `0x${string}` | undefined;
941
+ };
942
+ }, {
943
+ Method: "wallet_connect";
944
+ Parameters: [{
945
+ capabilities?: {
946
+ [key: string]: any;
947
+ } | undefined;
948
+ version: string;
949
+ }];
950
+ ReturnType: {
951
+ accounts: readonly {
952
+ address: `0x${string}`;
953
+ capabilities?: {
954
+ [key: string]: any;
955
+ } | undefined;
956
+ }[];
957
+ };
958
+ }, {
959
+ Method: "wallet_disconnect";
960
+ Parameters?: undefined;
961
+ ReturnType: void;
962
+ }, {
963
+ Method: "wallet_getCallsStatus";
964
+ Parameters?: [string] | undefined;
965
+ ReturnType: viem.WalletGetCallsStatusReturnType<{
966
+ [key: string]: any;
967
+ }, `0x${string}`, `0x${string}`, `0x${string}`>;
968
+ }, {
969
+ Method: "wallet_getCapabilities";
970
+ Parameters?: readonly [] | readonly [`0x${string}` | undefined] | readonly [`0x${string}` | undefined, readonly `0x${string}`[] | undefined] | undefined;
971
+ ReturnType: {
972
+ [x: `0x${string}`]: {
973
+ [key: string]: any;
974
+ };
975
+ };
976
+ }, {
977
+ Method: "wallet_getPermissions";
978
+ Parameters?: undefined;
979
+ ReturnType: viem.WalletPermission[];
980
+ }, {
981
+ Method: "wallet_grantPermissions";
982
+ Parameters?: [viem.WalletGrantPermissionsParameters] | undefined;
983
+ ReturnType: {
984
+ expiry: number;
985
+ factory?: `0x${string}` | undefined;
986
+ factoryData?: string | undefined;
987
+ grantedPermissions: readonly {
988
+ data: unknown;
989
+ policies: readonly {
990
+ data: unknown;
991
+ type: string;
992
+ }[];
993
+ required?: boolean | undefined;
994
+ type: string;
995
+ }[];
996
+ permissionsContext: string;
997
+ signerData?: {
998
+ userOpBuilder?: `0x${string}` | undefined;
999
+ submitToAddress?: `0x${string}` | undefined;
1000
+ } | undefined;
1001
+ };
1002
+ }, {
1003
+ Method: "wallet_requestPermissions";
1004
+ Parameters: [permissions: {
1005
+ eth_accounts: Record<string, any>;
1006
+ }];
1007
+ ReturnType: viem.WalletPermission[];
1008
+ }, {
1009
+ Method: "wallet_revokePermissions";
1010
+ Parameters: [permissions: {
1011
+ eth_accounts: Record<string, any>;
1012
+ }];
1013
+ ReturnType: null;
1014
+ }, {
1015
+ Method: "wallet_sendCalls";
1016
+ Parameters?: viem.WalletSendCallsParameters<{
1017
+ [key: string]: any;
1018
+ }, `0x${string}`, `0x${string}`> | undefined;
1019
+ ReturnType: viem.WalletSendCallsReturnType<{
1020
+ [key: string]: any;
1021
+ }>;
1022
+ }, {
1023
+ Method: "wallet_sendTransaction";
1024
+ Parameters: [transaction: viem.RpcTransactionRequest];
1025
+ ReturnType: `0x${string}`;
1026
+ }, {
1027
+ Method: "wallet_showCallsStatus";
1028
+ Parameters?: [string] | undefined;
1029
+ ReturnType: void;
1030
+ }, {
1031
+ Method: "wallet_switchEthereumChain";
1032
+ Parameters: [chain: {
1033
+ chainId: string;
1034
+ }];
1035
+ ReturnType: null;
1036
+ }, {
1037
+ Method: "wallet_watchAsset";
1038
+ Parameters: viem.WatchAssetParams;
1039
+ ReturnType: boolean;
1040
+ }, {
1041
+ Method: "eth_chainId";
1042
+ Parameters?: undefined;
1043
+ ReturnType: `0x${string}`;
1044
+ }, {
1045
+ Method: "eth_estimateUserOperationGas";
1046
+ Parameters: [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`] | [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`, stateOverrideSet: viem.RpcStateOverride];
1047
+ ReturnType: viem.RpcEstimateUserOperationGasReturnType;
1048
+ }, {
1049
+ Method: "eth_getUserOperationByHash";
1050
+ Parameters: [hash: `0x${string}`];
1051
+ ReturnType: viem.RpcGetUserOperationByHashReturnType | null;
1052
+ }, {
1053
+ Method: "eth_getUserOperationReceipt";
1054
+ Parameters: [hash: `0x${string}`];
1055
+ ReturnType: viem.RpcUserOperationReceipt | null;
1056
+ }, {
1057
+ Method: "eth_sendUserOperation";
1058
+ Parameters: [userOperation: viem.RpcUserOperation, entrypoint: `0x${string}`];
1059
+ ReturnType: `0x${string}`;
1060
+ }, {
1061
+ Method: "eth_supportedEntryPoints";
1062
+ Parameters?: undefined;
1063
+ ReturnType: readonly `0x${string}`[];
1064
+ }, {
1065
+ Method: "pm_getPaymasterStubData";
1066
+ Parameters?: [userOperation: viem.OneOf<viem.PartialBy<Pick<viem.RpcUserOperation<"0.6">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit" | "initCode">, "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "initCode"> | viem.PartialBy<Pick<viem.RpcUserOperation<"0.7">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit">, "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "verificationGasLimit">>, entrypoint: `0x${string}`, chainId: `0x${string}`, context: unknown] | undefined;
1067
+ ReturnType: viem.OneOf<{
1068
+ paymasterAndData: `0x${string}`;
1069
+ } | {
1070
+ paymaster: `0x${string}`;
1071
+ paymasterData: `0x${string}`;
1072
+ paymasterVerificationGasLimit: `0x${string}`;
1073
+ paymasterPostOpGasLimit: `0x${string}`;
1074
+ }> & {
1075
+ sponsor?: {
1076
+ name: string;
1077
+ icon?: string | undefined;
1078
+ } | undefined;
1079
+ isFinal?: boolean | undefined;
1080
+ };
1081
+ }, {
1082
+ Method: "pm_getPaymasterData";
1083
+ Parameters?: [userOperation: Pick<viem.RpcUserOperation<"0.6">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit" | "initCode"> | Pick<viem.RpcUserOperation<"0.7">, "callData" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "factory" | "factoryData" | "callGasLimit" | "preVerificationGas" | "sender" | "verificationGasLimit">, entrypoint: `0x${string}`, chainId: `0x${string}`, context: unknown] | undefined;
1084
+ ReturnType: viem.OneOf<{
1085
+ paymasterAndData: `0x${string}`;
1086
+ } | {
1087
+ paymaster: `0x${string}`;
1088
+ paymasterData: `0x${string}`;
1089
+ paymasterVerificationGasLimit: `0x${string}`;
1090
+ paymasterPostOpGasLimit: `0x${string}`;
1091
+ }>;
1092
+ }]>;
1093
+ transport: viem.TransportConfig<string, viem.EIP1193RequestFn> & Record<string, any>;
1094
+ type: string;
1095
+ uid: string;
1096
+ } & {
1097
+ extend: <const client extends {
1098
+ [x: string]: unknown;
1099
+ account?: undefined;
1100
+ batch?: undefined;
1101
+ cacheTime?: undefined;
1102
+ ccipRead?: undefined;
1103
+ chain?: undefined;
1104
+ key?: undefined;
1105
+ name?: undefined;
1106
+ pollingInterval?: undefined;
1107
+ request?: undefined;
1108
+ transport?: undefined;
1109
+ type?: undefined;
1110
+ uid?: undefined;
1111
+ } & viem.ExactPartial<Pick<viem.PublicActions<Transport, TChain, TAccount>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<TChain, TAccount>, "sendTransaction" | "writeContract">>>(fn: (client: Client<Transport, TChain, TAccount, undefined, {
1112
+ [x: string]: unknown;
1113
+ account?: undefined;
1114
+ batch?: undefined;
1115
+ cacheTime?: undefined;
1116
+ ccipRead?: undefined;
1117
+ chain?: undefined;
1118
+ key?: undefined;
1119
+ name?: undefined;
1120
+ pollingInterval?: undefined;
1121
+ request?: undefined;
1122
+ transport?: undefined;
1123
+ type?: undefined;
1124
+ uid?: undefined;
1125
+ } | undefined>) => client) => Client<Transport, TChain, TAccount, undefined, { [K in keyof client]: client[K]; }>;
1126
+ } & {
1127
+ signTypedData: WalletClient['signTypedData'];
1128
+ }) => {
1129
+ signUserOperation: (parameters: Omit<SignUserOperationParameters, 'chainId'> & {
1130
+ chainId?: number;
1131
+ }) => Promise<`0x${string}`>;
1132
+ };
1133
+
1134
+ declare const erc7715ProviderActions: () => (client: Client) => {
1135
+ requestExecutionPermissions: (parameters: RequestExecutionPermissionsParameters) => Promise<RequestExecutionPermissionsReturnType>;
1136
+ };
1137
+ declare const erc7710WalletActions: () => (client: WalletClient) => {
1138
+ sendTransactionWithDelegation: (args: SendTransactionWithDelegationParameters) => Promise<`0x${string}`>;
1139
+ };
1140
+ declare const erc7710BundlerActions: () => (client: Client) => {
1141
+ sendUserOperationWithDelegation: (args: SendUserOperationWithDelegationParameters) => Promise<`0x${string}`>;
1142
+ };
1143
+
1144
+ type index_CaveatEnforcerParams = CaveatEnforcerParams;
1145
+ type index_DelegatedCall = DelegatedCall;
1146
+ type index_MetaMaskExtensionClient = MetaMaskExtensionClient;
1147
+ type index_MetaMaskExtensionSchema = MetaMaskExtensionSchema;
1148
+ type index_PeriodTransferResult = PeriodTransferResult;
1149
+ type index_RequestExecutionPermissionsParameters = RequestExecutionPermissionsParameters;
1150
+ type index_RequestExecutionPermissionsReturnType = RequestExecutionPermissionsReturnType;
1151
+ type index_SignDelegationParameters = SignDelegationParameters;
1152
+ type index_SignDelegationReturnType = SignDelegationReturnType;
1153
+ type index_SignUserOperationParameters = SignUserOperationParameters;
1154
+ type index_SignUserOperationReturnType = SignUserOperationReturnType;
1155
+ type index_StreamingResult = StreamingResult;
1156
+ declare const index_caveatEnforcerActions: typeof caveatEnforcerActions;
1157
+ declare const index_erc7710BundlerActions: typeof erc7710BundlerActions;
1158
+ declare const index_erc7710WalletActions: typeof erc7710WalletActions;
1159
+ declare const index_erc7715ProviderActions: typeof erc7715ProviderActions;
1160
+ declare const index_getErc20PeriodTransferEnforcerAvailableAmount: typeof getErc20PeriodTransferEnforcerAvailableAmount;
1161
+ declare const index_getErc20StreamingEnforcerAvailableAmount: typeof getErc20StreamingEnforcerAvailableAmount;
1162
+ declare const index_getMultiTokenPeriodEnforcerAvailableAmount: typeof getMultiTokenPeriodEnforcerAvailableAmount;
1163
+ declare const index_getNativeTokenPeriodTransferEnforcerAvailableAmount: typeof getNativeTokenPeriodTransferEnforcerAvailableAmount;
1164
+ declare const index_getNativeTokenStreamingEnforcerAvailableAmount: typeof getNativeTokenStreamingEnforcerAvailableAmount;
1165
+ declare const index_isValid7702Implementation: typeof isValid7702Implementation;
1166
+ declare const index_signDelegation: typeof signDelegation;
1167
+ declare const index_signDelegationActions: typeof signDelegationActions;
1168
+ declare const index_signUserOperation: typeof signUserOperation;
1169
+ declare const index_signUserOperationActions: typeof signUserOperationActions;
1170
+ declare namespace index {
1171
+ export { type index_CaveatEnforcerParams as CaveatEnforcerParams, type index_DelegatedCall as DelegatedCall, type index_MetaMaskExtensionClient as MetaMaskExtensionClient, type index_MetaMaskExtensionSchema as MetaMaskExtensionSchema, type index_PeriodTransferResult as PeriodTransferResult, type index_RequestExecutionPermissionsParameters as RequestExecutionPermissionsParameters, type index_RequestExecutionPermissionsReturnType as RequestExecutionPermissionsReturnType, type index_SignDelegationParameters as SignDelegationParameters, type index_SignDelegationReturnType as SignDelegationReturnType, type index_SignUserOperationParameters as SignUserOperationParameters, type index_SignUserOperationReturnType as SignUserOperationReturnType, type index_StreamingResult as StreamingResult, index_caveatEnforcerActions as caveatEnforcerActions, index_erc7710BundlerActions as erc7710BundlerActions, index_erc7710WalletActions as erc7710WalletActions, index_erc7715ProviderActions as erc7715ProviderActions, index_getErc20PeriodTransferEnforcerAvailableAmount as getErc20PeriodTransferEnforcerAvailableAmount, index_getErc20StreamingEnforcerAvailableAmount as getErc20StreamingEnforcerAvailableAmount, index_getMultiTokenPeriodEnforcerAvailableAmount as getMultiTokenPeriodEnforcerAvailableAmount, index_getNativeTokenPeriodTransferEnforcerAvailableAmount as getNativeTokenPeriodTransferEnforcerAvailableAmount, index_getNativeTokenStreamingEnforcerAvailableAmount as getNativeTokenStreamingEnforcerAvailableAmount, index_isValid7702Implementation as isValid7702Implementation, erc7715RequestExecutionPermissionsAction as requestExecutionPermissions, index_signDelegation as signDelegation, index_signDelegationActions as signDelegationActions, index_signUserOperation as signUserOperation, index_signUserOperationActions as signUserOperationActions };
1172
+ }
1173
+
1174
+ export { type CaveatEnforcerParams as C, type DelegatedCall as D, type MetaMaskExtensionClient as M, type PeriodTransferResult as P, type RequestExecutionPermissionsParameters as R, type StreamingResult as S, erc7710WalletActions as a, erc7710BundlerActions as b, caveatEnforcerActions as c, getErc20StreamingEnforcerAvailableAmount as d, erc7715ProviderActions as e, getMultiTokenPeriodEnforcerAvailableAmount as f, getErc20PeriodTransferEnforcerAvailableAmount as g, getNativeTokenPeriodTransferEnforcerAvailableAmount as h, index as i, getNativeTokenStreamingEnforcerAvailableAmount as j, isValid7702Implementation as k, signDelegationActions as l, type SignDelegationParameters as m, type SignDelegationReturnType as n, signUserOperation as o, signUserOperationActions as p, type SignUserOperationParameters as q, type SignUserOperationReturnType as r, signDelegation as s, erc7715RequestExecutionPermissionsAction as t, type MetaMaskExtensionSchema as u, type RequestExecutionPermissionsReturnType as v };