@farcaster/frame-wagmi-connector 0.0.53 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,443 @@
1
- import { farcasterFrame } from './connector.js';
2
- export * from './connector.js';
1
+ export * from '@farcaster/miniapp-wagmi-connector';
2
+ export declare const farcasterFrame: () => import("@wagmi/core").CreateConnectorFn<{
3
+ request: import("ox/Provider").RequestFn<{
4
+ Request: {
5
+ method: "eth_accounts";
6
+ params?: undefined;
7
+ };
8
+ ReturnType: readonly import("ox/Address").Address[];
9
+ } | {
10
+ Request: {
11
+ method: "eth_blobBaseFee";
12
+ params?: undefined;
13
+ };
14
+ ReturnType: import("ox/Hex").Hex;
15
+ } | {
16
+ Request: {
17
+ method: "eth_blockNumber";
18
+ params?: undefined;
19
+ };
20
+ ReturnType: import("ox/Hex").Hex;
21
+ } | {
22
+ Request: {
23
+ method: "eth_call";
24
+ params: [transaction: import("ox/TransactionRequest").Rpc] | [transaction: import("ox/TransactionRequest").Rpc, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier] | [transaction: import("ox/TransactionRequest").Rpc, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier, stateOverride: unknown];
25
+ };
26
+ ReturnType: import("ox/Hex").Hex;
27
+ } | {
28
+ Request: {
29
+ method: "eth_chainId";
30
+ params?: undefined;
31
+ };
32
+ ReturnType: import("ox/Hex").Hex;
33
+ } | {
34
+ Request: {
35
+ method: "eth_coinbase";
36
+ params?: undefined;
37
+ };
38
+ ReturnType: import("ox/Address").Address;
39
+ } | {
40
+ Request: {
41
+ method: "eth_estimateGas";
42
+ params: [transaction: import("ox/TransactionRequest").Rpc] | [transaction: import("ox/TransactionRequest").Rpc, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier] | [transaction: import("ox/TransactionRequest").Rpc, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier, stateOverride: unknown];
43
+ };
44
+ ReturnType: import("ox/Hex").Hex;
45
+ } | {
46
+ Request: {
47
+ method: "eth_feeHistory";
48
+ params: [blockCount: import("ox/Hex").Hex, newestBlock: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag, rewardPercentiles: number[] | undefined];
49
+ };
50
+ ReturnType: import("ox/Fee").FeeHistoryRpc;
51
+ } | {
52
+ Request: {
53
+ method: "eth_gasPrice";
54
+ params?: undefined;
55
+ };
56
+ ReturnType: import("ox/Hex").Hex;
57
+ } | {
58
+ Request: {
59
+ method: "eth_getBalance";
60
+ params: [address: import("ox/Address").Address, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier];
61
+ };
62
+ ReturnType: import("ox/Hex").Hex;
63
+ } | {
64
+ Request: {
65
+ method: "eth_getBlockByHash";
66
+ params: [hash: import("ox/Hex").Hex, includeTransactionObjects: boolean];
67
+ };
68
+ ReturnType: import("ox/Block").Rpc | null;
69
+ } | {
70
+ Request: {
71
+ method: "eth_getBlockByNumber";
72
+ params: [block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag, includeTransactionObjects: boolean];
73
+ };
74
+ ReturnType: import("ox/Block").Rpc | null;
75
+ } | {
76
+ Request: {
77
+ method: "eth_getBlockTransactionCountByHash";
78
+ params: [hash: import("ox/Hex").Hex];
79
+ };
80
+ ReturnType: import("ox/Hex").Hex;
81
+ } | {
82
+ Request: {
83
+ method: "eth_getBlockTransactionCountByNumber";
84
+ params: [block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag];
85
+ };
86
+ ReturnType: import("ox/Hex").Hex;
87
+ } | {
88
+ Request: {
89
+ method: "eth_getCode";
90
+ params: [address: import("ox/Address").Address, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier];
91
+ };
92
+ ReturnType: import("ox/Hex").Hex;
93
+ } | {
94
+ Request: {
95
+ method: "eth_getFilterChanges";
96
+ params: [filterId: import("ox/Hex").Hex];
97
+ };
98
+ ReturnType: readonly import("ox/Log").Rpc[] | readonly import("ox/Hex").Hex[];
99
+ } | {
100
+ Request: {
101
+ method: "eth_getFilterLogs";
102
+ params: [filterId: import("ox/Hex").Hex];
103
+ };
104
+ ReturnType: readonly import("ox/Log").Rpc[];
105
+ } | {
106
+ Request: {
107
+ method: "eth_getLogs";
108
+ params: [filter: import("ox/Filter").Rpc];
109
+ };
110
+ ReturnType: readonly import("ox/Log").Rpc[];
111
+ } | {
112
+ Request: {
113
+ method: "eth_getProof";
114
+ params: [address: import("ox/Address").Address, storageKeys: import("ox/Hex").Hex[], block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier];
115
+ };
116
+ ReturnType: import("ox/AccountProof").Rpc;
117
+ } | {
118
+ Request: {
119
+ method: "eth_getStorageAt";
120
+ params: [address: import("ox/Address").Address, index: import("ox/Hex").Hex, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier];
121
+ };
122
+ ReturnType: import("ox/Hex").Hex;
123
+ } | {
124
+ Request: {
125
+ method: "eth_getTransactionByBlockHashAndIndex";
126
+ params: [hash: import("ox/Hex").Hex, index: import("ox/Hex").Hex];
127
+ };
128
+ ReturnType: import("ox/Transaction").Rpc | null;
129
+ } | {
130
+ Request: {
131
+ method: "eth_getTransactionByBlockNumberAndIndex";
132
+ params: [block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag, index: import("ox/Hex").Hex];
133
+ };
134
+ ReturnType: import("ox/Transaction").Rpc | null;
135
+ } | {
136
+ Request: {
137
+ method: "eth_getTransactionByHash";
138
+ params: [hash: import("ox/Hex").Hex];
139
+ };
140
+ ReturnType: import("ox/Transaction").Rpc | null;
141
+ } | {
142
+ Request: {
143
+ method: "eth_getTransactionCount";
144
+ params: [address: import("ox/Address").Address, block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag | import("ox/Block").Hash | import("ox/Block").Identifier];
145
+ };
146
+ ReturnType: import("ox/Hex").Hex;
147
+ } | {
148
+ Request: {
149
+ method: "eth_getTransactionReceipt";
150
+ params: [hash: import("ox/Hex").Hex];
151
+ };
152
+ ReturnType: import("ox/TransactionReceipt").Rpc | null;
153
+ } | {
154
+ Request: {
155
+ method: "eth_getUncleCountByBlockHash";
156
+ params: [hash: import("ox/Hex").Hex];
157
+ };
158
+ ReturnType: import("ox/Hex").Hex;
159
+ } | {
160
+ Request: {
161
+ method: "eth_getUncleCountByBlockNumber";
162
+ params: [block: import("ox/Block").Number<import("ox/Hex").Hex> | import("ox/Block").Tag];
163
+ };
164
+ ReturnType: import("ox/Hex").Hex;
165
+ } | {
166
+ Request: {
167
+ method: "eth_maxPriorityFeePerGas";
168
+ params?: undefined;
169
+ };
170
+ ReturnType: import("ox/Hex").Hex;
171
+ } | {
172
+ Request: {
173
+ method: "eth_newBlockFilter";
174
+ params?: undefined;
175
+ };
176
+ ReturnType: import("ox/Hex").Hex;
177
+ } | {
178
+ Request: {
179
+ method: "eth_newFilter";
180
+ params: [filter: import("ox/Filter").Rpc];
181
+ };
182
+ ReturnType: import("ox/Hex").Hex;
183
+ } | {
184
+ Request: {
185
+ method: "eth_newPendingTransactionFilter";
186
+ params?: undefined;
187
+ };
188
+ ReturnType: import("ox/Hex").Hex;
189
+ } | {
190
+ Request: {
191
+ method: "eth_protocolVersion";
192
+ params?: undefined;
193
+ };
194
+ ReturnType: string;
195
+ } | {
196
+ Request: {
197
+ method: "eth_requestAccounts";
198
+ params?: undefined;
199
+ };
200
+ ReturnType: readonly import("ox/Address").Address[];
201
+ } | {
202
+ Request: {
203
+ method: "eth_sendRawTransaction";
204
+ params: [serializedTransaction: import("ox/Hex").Hex];
205
+ };
206
+ ReturnType: import("ox/Hex").Hex;
207
+ } | {
208
+ Request: {
209
+ method: "eth_sendTransaction";
210
+ params: [transaction: import("ox/TransactionRequest").Rpc];
211
+ };
212
+ ReturnType: import("ox/Hex").Hex;
213
+ } | {
214
+ Request: {
215
+ method: "eth_signTransaction";
216
+ params: [request: import("ox/TransactionRequest").Rpc];
217
+ };
218
+ ReturnType: import("ox/Hex").Hex;
219
+ } | {
220
+ Request: {
221
+ method: "eth_signTypedData_v4";
222
+ params: [address: import("ox/Address").Address, message: string];
223
+ };
224
+ ReturnType: import("ox/Hex").Hex;
225
+ } | {
226
+ Request: {
227
+ method: "eth_uninstallFilter";
228
+ params: [filterId: import("ox/Hex").Hex];
229
+ };
230
+ ReturnType: boolean;
231
+ } | {
232
+ Request: {
233
+ method: "eth_requestAccounts";
234
+ params?: undefined;
235
+ };
236
+ ReturnType: readonly import("ox/Address").Address[];
237
+ } | {
238
+ Request: {
239
+ method: "eth_sendRawTransaction";
240
+ params: [serializedTransaction: import("ox/Hex").Hex];
241
+ };
242
+ ReturnType: import("ox/Hex").Hex;
243
+ } | {
244
+ Request: {
245
+ method: "eth_sendTransaction";
246
+ params: [transaction: import("ox/TransactionRequest").Rpc];
247
+ };
248
+ ReturnType: import("ox/Hex").Hex;
249
+ } | {
250
+ Request: {
251
+ method: "eth_signTransaction";
252
+ params: [request: import("ox/TransactionRequest").Rpc];
253
+ };
254
+ ReturnType: import("ox/Hex").Hex;
255
+ } | {
256
+ Request: {
257
+ method: "eth_signTypedData_v4";
258
+ params: [address: import("ox/Address").Address, message: string];
259
+ };
260
+ ReturnType: import("ox/Hex").Hex;
261
+ } | {
262
+ Request: {
263
+ method: "personal_sign";
264
+ params: [data: import("ox/Hex").Hex, address: import("ox/Address").Address];
265
+ };
266
+ ReturnType: import("ox/Hex").Hex;
267
+ } | {
268
+ Request: {
269
+ method: "wallet_addEthereumChain";
270
+ params: [chain: {
271
+ chainId: string;
272
+ chainName: string;
273
+ nativeCurrency?: {
274
+ name: string;
275
+ symbol: string;
276
+ decimals: number;
277
+ } | undefined | undefined;
278
+ rpcUrls: readonly string[];
279
+ blockExplorerUrls?: readonly string[] | undefined;
280
+ iconUrls?: readonly string[] | undefined;
281
+ }];
282
+ };
283
+ ReturnType: null;
284
+ } | {
285
+ Request: {
286
+ method: "wallet_getCallsStatus";
287
+ params?: [string];
288
+ };
289
+ ReturnType: {
290
+ status: "PENDING" | "CONFIRMED";
291
+ receipts?: readonly {
292
+ logs: {
293
+ address: import("ox/Hex").Hex;
294
+ data: import("ox/Hex").Hex;
295
+ topics: readonly import("ox/Hex").Hex[];
296
+ }[];
297
+ status: import("ox/Hex").Hex;
298
+ blockHash: import("ox/Hex").Hex;
299
+ blockNumber: import("ox/Hex").Hex;
300
+ gasUsed: import("ox/Hex").Hex;
301
+ transactionHash: import("ox/Hex").Hex;
302
+ }[] | undefined;
303
+ };
304
+ } | {
305
+ Request: {
306
+ method: "wallet_getCapabilities";
307
+ params?: [import("ox/Address").Address];
308
+ };
309
+ ReturnType: {
310
+ [x: `0x${string}`]: {
311
+ [capability: string]: any;
312
+ };
313
+ };
314
+ } | {
315
+ Request: {
316
+ method: "wallet_getPermissions";
317
+ params?: undefined;
318
+ };
319
+ ReturnType: readonly {
320
+ caveats: readonly {
321
+ type: string;
322
+ value: any;
323
+ }[];
324
+ date: number;
325
+ id: string;
326
+ invoker: `http://${string}` | `https://${string}`;
327
+ parentCapability: "eth_accounts" | string;
328
+ }[];
329
+ } | {
330
+ Request: {
331
+ method: "wallet_grantPermissions";
332
+ params?: [{
333
+ signer?: {
334
+ type: string;
335
+ data?: unknown | undefined;
336
+ } | undefined;
337
+ permissions: readonly {
338
+ data: unknown;
339
+ policies: readonly {
340
+ data: unknown;
341
+ type: string;
342
+ }[];
343
+ required?: boolean | undefined;
344
+ type: string;
345
+ }[];
346
+ expiry: number;
347
+ }];
348
+ };
349
+ ReturnType: {
350
+ expiry: number;
351
+ factory?: `0x${string}` | undefined | undefined;
352
+ factoryData?: string | undefined | undefined;
353
+ grantedPermissions: readonly {
354
+ data: unknown;
355
+ policies: readonly {
356
+ data: unknown;
357
+ type: string;
358
+ }[];
359
+ required?: boolean | undefined;
360
+ type: string;
361
+ }[];
362
+ permissionsContext: string;
363
+ signerData?: {
364
+ userOpBuilder?: `0x${string}` | undefined;
365
+ submitToAddress?: `0x${string}` | undefined;
366
+ } | undefined | undefined;
367
+ };
368
+ } | {
369
+ Request: {
370
+ method: "wallet_requestPermissions";
371
+ params: [permissions: {
372
+ eth_accounts: Record<string, any>;
373
+ }];
374
+ };
375
+ ReturnType: readonly {
376
+ caveats: readonly {
377
+ type: string;
378
+ value: any;
379
+ }[];
380
+ date: number;
381
+ id: string;
382
+ invoker: `http://${string}` | `https://${string}`;
383
+ parentCapability: "eth_accounts" | string;
384
+ }[];
385
+ } | {
386
+ Request: {
387
+ method: "wallet_revokePermissions";
388
+ params: [permissions: {
389
+ eth_accounts: Record<string, any>;
390
+ }];
391
+ };
392
+ ReturnType: null;
393
+ } | {
394
+ Request: {
395
+ method: "wallet_sendCalls";
396
+ params: [{
397
+ calls: readonly {
398
+ to?: import("ox/Address").Address | undefined;
399
+ data?: import("ox/Hex").Hex | undefined;
400
+ value?: import("ox/Hex").Hex | undefined;
401
+ }[];
402
+ capabilities?: {
403
+ [capability: string]: any;
404
+ } | undefined;
405
+ chainId?: import("ox/Hex").Hex | undefined;
406
+ from: import("ox/Address").Address;
407
+ version: string;
408
+ }];
409
+ };
410
+ ReturnType: string;
411
+ } | {
412
+ Request: {
413
+ method: "wallet_showCallsStatus";
414
+ params: [string];
415
+ };
416
+ ReturnType: undefined;
417
+ } | {
418
+ Request: {
419
+ method: "wallet_switchEthereumChain";
420
+ params: [chain: {
421
+ chainId: string;
422
+ }];
423
+ };
424
+ ReturnType: null;
425
+ } | {
426
+ Request: {
427
+ method: "wallet_watchAsset";
428
+ params: [{
429
+ type: "ERC20";
430
+ options: {
431
+ address: string;
432
+ symbol: string;
433
+ decimals: number;
434
+ image?: string | undefined;
435
+ };
436
+ }];
437
+ };
438
+ ReturnType: boolean;
439
+ }>;
440
+ on: import("ox/Provider").EventListenerFn;
441
+ removeListener: import("ox/Provider").EventListenerFn;
442
+ }, Record<string, unknown>, Record<string, unknown>>;
3
443
  export default farcasterFrame;
package/dist/index.js CHANGED
@@ -1,3 +1,22 @@
1
- import { farcasterFrame } from './connector.js';
2
- export * from './connector.js';
1
+ // Deprecation warning
2
+ if (typeof console !== 'undefined' && console.warn) {
3
+ console.warn('[DEPRECATION WARNING] @farcaster/frame-wagmi-connector is deprecated. Please migrate to @farcaster/miniapp-wagmi-connector. ' +
4
+ 'See https://github.com/farcasterxyz/frames/blob/main/MIGRATION.md for migration guide.');
5
+ }
6
+ // Re-export everything from miniapp-wagmi-connector
7
+ export * from '@farcaster/miniapp-wagmi-connector';
8
+ // Import and re-export for backward compatibility
9
+ import { farcasterFrame as _farcasterFrame } from '@farcaster/miniapp-wagmi-connector';
10
+ // Add deprecation warning when farcasterFrame is used
11
+ let farcasterFrameWarningShown = false;
12
+ export const farcasterFrame = () => {
13
+ if (!farcasterFrameWarningShown &&
14
+ typeof console !== 'undefined' &&
15
+ console.warn) {
16
+ console.warn('[DEPRECATION WARNING] farcasterFrame() is deprecated. Please use farcasterMiniApp() instead. ' +
17
+ 'Import from @farcaster/miniapp-wagmi-connector.');
18
+ farcasterFrameWarningShown = true;
19
+ }
20
+ return _farcasterFrame();
21
+ };
3
22
  export default farcasterFrame;