@gitmyabi/mctp 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.
@@ -0,0 +1,653 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * MUMUBITToken_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const MUMUBITToken_jsonAbi: readonly [{
8
+ readonly inputs: readonly [];
9
+ readonly stateMutability: "nonpayable";
10
+ readonly type: "constructor";
11
+ }, {
12
+ readonly anonymous: false;
13
+ readonly inputs: readonly [{
14
+ readonly indexed: true;
15
+ readonly internalType: "address";
16
+ readonly name: "owner";
17
+ readonly type: "address";
18
+ }, {
19
+ readonly indexed: true;
20
+ readonly internalType: "address";
21
+ readonly name: "spender";
22
+ readonly type: "address";
23
+ }, {
24
+ readonly indexed: false;
25
+ readonly internalType: "uint256";
26
+ readonly name: "value";
27
+ readonly type: "uint256";
28
+ }];
29
+ readonly name: "Approval";
30
+ readonly type: "event";
31
+ }, {
32
+ readonly anonymous: false;
33
+ readonly inputs: readonly [{
34
+ readonly indexed: true;
35
+ readonly internalType: "address";
36
+ readonly name: "previousOwner";
37
+ readonly type: "address";
38
+ }, {
39
+ readonly indexed: true;
40
+ readonly internalType: "address";
41
+ readonly name: "newOwner";
42
+ readonly type: "address";
43
+ }];
44
+ readonly name: "OwnershipTransferred";
45
+ readonly type: "event";
46
+ }, {
47
+ readonly anonymous: false;
48
+ readonly inputs: readonly [{
49
+ readonly indexed: true;
50
+ readonly internalType: "address";
51
+ readonly name: "from";
52
+ readonly type: "address";
53
+ }, {
54
+ readonly indexed: true;
55
+ readonly internalType: "address";
56
+ readonly name: "to";
57
+ readonly type: "address";
58
+ }, {
59
+ readonly indexed: false;
60
+ readonly internalType: "uint256";
61
+ readonly name: "value";
62
+ readonly type: "uint256";
63
+ }];
64
+ readonly name: "Transfer";
65
+ readonly type: "event";
66
+ }, {
67
+ readonly inputs: readonly [{
68
+ readonly internalType: "address";
69
+ readonly name: "_tokenOwner";
70
+ readonly type: "address";
71
+ }, {
72
+ readonly internalType: "address";
73
+ readonly name: "_spender";
74
+ readonly type: "address";
75
+ }];
76
+ readonly name: "allowance";
77
+ readonly outputs: readonly [{
78
+ readonly internalType: "uint256";
79
+ readonly name: "";
80
+ readonly type: "uint256";
81
+ }];
82
+ readonly stateMutability: "view";
83
+ readonly type: "function";
84
+ }, {
85
+ readonly inputs: readonly [{
86
+ readonly internalType: "address";
87
+ readonly name: "_spender";
88
+ readonly type: "address";
89
+ }, {
90
+ readonly internalType: "uint256";
91
+ readonly name: "_tokens";
92
+ readonly type: "uint256";
93
+ }];
94
+ readonly name: "approve";
95
+ readonly outputs: readonly [{
96
+ readonly internalType: "bool";
97
+ readonly name: "";
98
+ readonly type: "bool";
99
+ }];
100
+ readonly stateMutability: "nonpayable";
101
+ readonly type: "function";
102
+ }, {
103
+ readonly inputs: readonly [{
104
+ readonly internalType: "address";
105
+ readonly name: "_tokenOwner";
106
+ readonly type: "address";
107
+ }];
108
+ readonly name: "balanceOf";
109
+ readonly outputs: readonly [{
110
+ readonly internalType: "uint256";
111
+ readonly name: "";
112
+ readonly type: "uint256";
113
+ }];
114
+ readonly stateMutability: "view";
115
+ readonly type: "function";
116
+ }, {
117
+ readonly inputs: readonly [];
118
+ readonly name: "decimals";
119
+ readonly outputs: readonly [{
120
+ readonly internalType: "uint8";
121
+ readonly name: "";
122
+ readonly type: "uint8";
123
+ }];
124
+ readonly stateMutability: "pure";
125
+ readonly type: "function";
126
+ }, {
127
+ readonly inputs: readonly [{
128
+ readonly internalType: "address";
129
+ readonly name: "spender";
130
+ readonly type: "address";
131
+ }, {
132
+ readonly internalType: "uint256";
133
+ readonly name: "subtractedValue";
134
+ readonly type: "uint256";
135
+ }];
136
+ readonly name: "decreaseAllowance";
137
+ readonly outputs: readonly [{
138
+ readonly internalType: "bool";
139
+ readonly name: "";
140
+ readonly type: "bool";
141
+ }];
142
+ readonly stateMutability: "nonpayable";
143
+ readonly type: "function";
144
+ }, {
145
+ readonly inputs: readonly [{
146
+ readonly internalType: "address";
147
+ readonly name: "spender";
148
+ readonly type: "address";
149
+ }, {
150
+ readonly internalType: "uint256";
151
+ readonly name: "addedValue";
152
+ readonly type: "uint256";
153
+ }];
154
+ readonly name: "increaseAllowance";
155
+ readonly outputs: readonly [{
156
+ readonly internalType: "bool";
157
+ readonly name: "";
158
+ readonly type: "bool";
159
+ }];
160
+ readonly stateMutability: "nonpayable";
161
+ readonly type: "function";
162
+ }, {
163
+ readonly inputs: readonly [];
164
+ readonly name: "name";
165
+ readonly outputs: readonly [{
166
+ readonly internalType: "string";
167
+ readonly name: "";
168
+ readonly type: "string";
169
+ }];
170
+ readonly stateMutability: "pure";
171
+ readonly type: "function";
172
+ }, {
173
+ readonly inputs: readonly [];
174
+ readonly name: "owner";
175
+ readonly outputs: readonly [{
176
+ readonly internalType: "address";
177
+ readonly name: "";
178
+ readonly type: "address";
179
+ }];
180
+ readonly stateMutability: "view";
181
+ readonly type: "function";
182
+ }, {
183
+ readonly inputs: readonly [];
184
+ readonly name: "renounceOwnership";
185
+ readonly outputs: readonly [];
186
+ readonly stateMutability: "nonpayable";
187
+ readonly type: "function";
188
+ }, {
189
+ readonly inputs: readonly [];
190
+ readonly name: "symbol";
191
+ readonly outputs: readonly [{
192
+ readonly internalType: "string";
193
+ readonly name: "";
194
+ readonly type: "string";
195
+ }];
196
+ readonly stateMutability: "pure";
197
+ readonly type: "function";
198
+ }, {
199
+ readonly inputs: readonly [];
200
+ readonly name: "totalSupply";
201
+ readonly outputs: readonly [{
202
+ readonly internalType: "uint256";
203
+ readonly name: "";
204
+ readonly type: "uint256";
205
+ }];
206
+ readonly stateMutability: "view";
207
+ readonly type: "function";
208
+ }, {
209
+ readonly inputs: readonly [{
210
+ readonly internalType: "address";
211
+ readonly name: "recipient";
212
+ readonly type: "address";
213
+ }, {
214
+ readonly internalType: "uint256";
215
+ readonly name: "amount";
216
+ readonly type: "uint256";
217
+ }];
218
+ readonly name: "transfer";
219
+ readonly outputs: readonly [{
220
+ readonly internalType: "bool";
221
+ readonly name: "";
222
+ readonly type: "bool";
223
+ }];
224
+ readonly stateMutability: "nonpayable";
225
+ readonly type: "function";
226
+ }, {
227
+ readonly inputs: readonly [{
228
+ readonly internalType: "address";
229
+ readonly name: "sender";
230
+ readonly type: "address";
231
+ }, {
232
+ readonly internalType: "address";
233
+ readonly name: "recipient";
234
+ readonly type: "address";
235
+ }, {
236
+ readonly internalType: "uint256";
237
+ readonly name: "amount";
238
+ readonly type: "uint256";
239
+ }];
240
+ readonly name: "transferFrom";
241
+ readonly outputs: readonly [{
242
+ readonly internalType: "bool";
243
+ readonly name: "";
244
+ readonly type: "bool";
245
+ }];
246
+ readonly stateMutability: "nonpayable";
247
+ readonly type: "function";
248
+ }, {
249
+ readonly inputs: readonly [{
250
+ readonly internalType: "address";
251
+ readonly name: "newOwner";
252
+ readonly type: "address";
253
+ }];
254
+ readonly name: "transferOwnership";
255
+ readonly outputs: readonly [];
256
+ readonly stateMutability: "nonpayable";
257
+ readonly type: "function";
258
+ }];
259
+ /**
260
+ * Type-safe ABI for MUMUBITToken_json
261
+ */
262
+ export type MUMUBITToken_jsonAbi = typeof MUMUBITToken_jsonAbi;
263
+ /**
264
+ * Contract instance type for MUMUBITToken_json
265
+ */
266
+ export type MUMUBITToken_jsonContract = any;
267
+ /**
268
+ * MUMUBITToken_json Contract Class
269
+ *
270
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
271
+ *
272
+ * @example
273
+ * ```typescript
274
+ * import { createPublicClient, createWalletClient, http } from 'viem';
275
+ * import { mainnet } from 'viem/chains';
276
+ * import { MUMUBITToken_json } from 'MUMUBITToken_json';
277
+ *
278
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
279
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
280
+ *
281
+ * const contract = new MUMUBITToken_json('0x...', { publicClient, walletClient });
282
+ *
283
+ * // Read functions
284
+ * const result = await contract.balanceOf('0x...');
285
+ *
286
+ * // Write functions
287
+ * const hash = await contract.transfer('0x...', 1000n);
288
+ *
289
+ * // Simulate transactions (dry-run)
290
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
291
+ * console.log('Gas estimate:', simulation.request.gas);
292
+ *
293
+ * // Watch events
294
+ * const unwatch = contract.watch.Transfer((event) => {
295
+ * console.log('Transfer event:', event);
296
+ * });
297
+ * ```
298
+ */
299
+ export declare class MUMUBITToken_json {
300
+ private contract;
301
+ private contractAddress;
302
+ private publicClient;
303
+ constructor(address: Address, clients: {
304
+ publicClient: PublicClient;
305
+ walletClient?: WalletClient;
306
+ });
307
+ /**
308
+ * Get the contract address
309
+ */
310
+ get address(): Address;
311
+ /**
312
+ * Get the underlying viem contract instance
313
+ */
314
+ getContract(): MUMUBITToken_jsonContract;
315
+ /**
316
+ * allowance
317
+ * view
318
+ */
319
+ allowance(_tokenOwner: `0x${string}`, _spender: `0x${string}`): Promise<bigint>;
320
+ /**
321
+ * balanceOf
322
+ * view
323
+ */
324
+ balanceOf(_tokenOwner: `0x${string}`): Promise<bigint>;
325
+ /**
326
+ * decimals
327
+ * pure
328
+ */
329
+ decimals(): Promise<bigint>;
330
+ /**
331
+ * name
332
+ * pure
333
+ */
334
+ name(): Promise<string>;
335
+ /**
336
+ * owner
337
+ * view
338
+ */
339
+ owner(): Promise<`0x${string}`>;
340
+ /**
341
+ * symbol
342
+ * pure
343
+ */
344
+ symbol(): Promise<string>;
345
+ /**
346
+ * totalSupply
347
+ * view
348
+ */
349
+ totalSupply(): Promise<bigint>;
350
+ /**
351
+ * approve
352
+ * nonpayable
353
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
354
+ */
355
+ approve(_spender: `0x${string}`, _tokens: bigint, options?: {
356
+ accessList?: import('viem').AccessList;
357
+ authorizationList?: import('viem').AuthorizationList;
358
+ chain?: import('viem').Chain | null;
359
+ dataSuffix?: `0x${string}`;
360
+ gas?: bigint;
361
+ gasPrice?: bigint;
362
+ maxFeePerGas?: bigint;
363
+ maxPriorityFeePerGas?: bigint;
364
+ nonce?: number;
365
+ value?: bigint;
366
+ }): Promise<`0x${string}`>;
367
+ /**
368
+ * decreaseAllowance
369
+ * nonpayable
370
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
371
+ */
372
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
373
+ accessList?: import('viem').AccessList;
374
+ authorizationList?: import('viem').AuthorizationList;
375
+ chain?: import('viem').Chain | null;
376
+ dataSuffix?: `0x${string}`;
377
+ gas?: bigint;
378
+ gasPrice?: bigint;
379
+ maxFeePerGas?: bigint;
380
+ maxPriorityFeePerGas?: bigint;
381
+ nonce?: number;
382
+ value?: bigint;
383
+ }): Promise<`0x${string}`>;
384
+ /**
385
+ * increaseAllowance
386
+ * nonpayable
387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
388
+ */
389
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
390
+ accessList?: import('viem').AccessList;
391
+ authorizationList?: import('viem').AuthorizationList;
392
+ chain?: import('viem').Chain | null;
393
+ dataSuffix?: `0x${string}`;
394
+ gas?: bigint;
395
+ gasPrice?: bigint;
396
+ maxFeePerGas?: bigint;
397
+ maxPriorityFeePerGas?: bigint;
398
+ nonce?: number;
399
+ value?: bigint;
400
+ }): Promise<`0x${string}`>;
401
+ /**
402
+ * renounceOwnership
403
+ * nonpayable
404
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
405
+ */
406
+ renounceOwnership(options?: {
407
+ accessList?: import('viem').AccessList;
408
+ authorizationList?: import('viem').AuthorizationList;
409
+ chain?: import('viem').Chain | null;
410
+ dataSuffix?: `0x${string}`;
411
+ gas?: bigint;
412
+ gasPrice?: bigint;
413
+ maxFeePerGas?: bigint;
414
+ maxPriorityFeePerGas?: bigint;
415
+ nonce?: number;
416
+ value?: bigint;
417
+ }): Promise<`0x${string}`>;
418
+ /**
419
+ * transfer
420
+ * nonpayable
421
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
422
+ */
423
+ transfer(recipient: `0x${string}`, amount: bigint, options?: {
424
+ accessList?: import('viem').AccessList;
425
+ authorizationList?: import('viem').AuthorizationList;
426
+ chain?: import('viem').Chain | null;
427
+ dataSuffix?: `0x${string}`;
428
+ gas?: bigint;
429
+ gasPrice?: bigint;
430
+ maxFeePerGas?: bigint;
431
+ maxPriorityFeePerGas?: bigint;
432
+ nonce?: number;
433
+ value?: bigint;
434
+ }): Promise<`0x${string}`>;
435
+ /**
436
+ * transferFrom
437
+ * nonpayable
438
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
439
+ */
440
+ transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
441
+ accessList?: import('viem').AccessList;
442
+ authorizationList?: import('viem').AuthorizationList;
443
+ chain?: import('viem').Chain | null;
444
+ dataSuffix?: `0x${string}`;
445
+ gas?: bigint;
446
+ gasPrice?: bigint;
447
+ maxFeePerGas?: bigint;
448
+ maxPriorityFeePerGas?: bigint;
449
+ nonce?: number;
450
+ value?: bigint;
451
+ }): Promise<`0x${string}`>;
452
+ /**
453
+ * transferOwnership
454
+ * nonpayable
455
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
456
+ */
457
+ transferOwnership(newOwner: `0x${string}`, options?: {
458
+ accessList?: import('viem').AccessList;
459
+ authorizationList?: import('viem').AuthorizationList;
460
+ chain?: import('viem').Chain | null;
461
+ dataSuffix?: `0x${string}`;
462
+ gas?: bigint;
463
+ gasPrice?: bigint;
464
+ maxFeePerGas?: bigint;
465
+ maxPriorityFeePerGas?: bigint;
466
+ nonce?: number;
467
+ value?: bigint;
468
+ }): Promise<`0x${string}`>;
469
+ /**
470
+ * Simulate contract write operations (dry-run without sending transaction)
471
+ *
472
+ * @example
473
+ * const result = await contract.simulate.transfer('0x...', 1000n);
474
+ * console.log('Gas estimate:', result.request.gas);
475
+ * console.log('Would succeed:', result.result);
476
+ */
477
+ get simulate(): {
478
+ /**
479
+ * Simulate approve
480
+ * Returns gas estimate and result without sending transaction
481
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
482
+ */
483
+ approve(_spender: `0x${string}`, _tokens: bigint, options?: {
484
+ accessList?: import("viem").AccessList;
485
+ authorizationList?: import("viem").AuthorizationList;
486
+ chain?: import("viem").Chain | null;
487
+ dataSuffix?: `0x${string}`;
488
+ gas?: bigint;
489
+ gasPrice?: bigint;
490
+ maxFeePerGas?: bigint;
491
+ maxPriorityFeePerGas?: bigint;
492
+ nonce?: number;
493
+ value?: bigint;
494
+ }): Promise<boolean>;
495
+ /**
496
+ * Simulate decreaseAllowance
497
+ * Returns gas estimate and result without sending transaction
498
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
499
+ */
500
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
501
+ accessList?: import("viem").AccessList;
502
+ authorizationList?: import("viem").AuthorizationList;
503
+ chain?: import("viem").Chain | null;
504
+ dataSuffix?: `0x${string}`;
505
+ gas?: bigint;
506
+ gasPrice?: bigint;
507
+ maxFeePerGas?: bigint;
508
+ maxPriorityFeePerGas?: bigint;
509
+ nonce?: number;
510
+ value?: bigint;
511
+ }): Promise<boolean>;
512
+ /**
513
+ * Simulate increaseAllowance
514
+ * Returns gas estimate and result without sending transaction
515
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
516
+ */
517
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
518
+ accessList?: import("viem").AccessList;
519
+ authorizationList?: import("viem").AuthorizationList;
520
+ chain?: import("viem").Chain | null;
521
+ dataSuffix?: `0x${string}`;
522
+ gas?: bigint;
523
+ gasPrice?: bigint;
524
+ maxFeePerGas?: bigint;
525
+ maxPriorityFeePerGas?: bigint;
526
+ nonce?: number;
527
+ value?: bigint;
528
+ }): Promise<boolean>;
529
+ /**
530
+ * Simulate renounceOwnership
531
+ * Returns gas estimate and result without sending transaction
532
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
533
+ */
534
+ renounceOwnership(options?: {
535
+ accessList?: import("viem").AccessList;
536
+ authorizationList?: import("viem").AuthorizationList;
537
+ chain?: import("viem").Chain | null;
538
+ dataSuffix?: `0x${string}`;
539
+ gas?: bigint;
540
+ gasPrice?: bigint;
541
+ maxFeePerGas?: bigint;
542
+ maxPriorityFeePerGas?: bigint;
543
+ nonce?: number;
544
+ value?: bigint;
545
+ }): Promise<void>;
546
+ /**
547
+ * Simulate transfer
548
+ * Returns gas estimate and result without sending transaction
549
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
550
+ */
551
+ transfer(recipient: `0x${string}`, amount: bigint, options?: {
552
+ accessList?: import("viem").AccessList;
553
+ authorizationList?: import("viem").AuthorizationList;
554
+ chain?: import("viem").Chain | null;
555
+ dataSuffix?: `0x${string}`;
556
+ gas?: bigint;
557
+ gasPrice?: bigint;
558
+ maxFeePerGas?: bigint;
559
+ maxPriorityFeePerGas?: bigint;
560
+ nonce?: number;
561
+ value?: bigint;
562
+ }): Promise<boolean>;
563
+ /**
564
+ * Simulate transferFrom
565
+ * Returns gas estimate and result without sending transaction
566
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
567
+ */
568
+ transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
569
+ accessList?: import("viem").AccessList;
570
+ authorizationList?: import("viem").AuthorizationList;
571
+ chain?: import("viem").Chain | null;
572
+ dataSuffix?: `0x${string}`;
573
+ gas?: bigint;
574
+ gasPrice?: bigint;
575
+ maxFeePerGas?: bigint;
576
+ maxPriorityFeePerGas?: bigint;
577
+ nonce?: number;
578
+ value?: bigint;
579
+ }): Promise<boolean>;
580
+ /**
581
+ * Simulate transferOwnership
582
+ * Returns gas estimate and result without sending transaction
583
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
584
+ */
585
+ transferOwnership(newOwner: `0x${string}`, options?: {
586
+ accessList?: import("viem").AccessList;
587
+ authorizationList?: import("viem").AuthorizationList;
588
+ chain?: import("viem").Chain | null;
589
+ dataSuffix?: `0x${string}`;
590
+ gas?: bigint;
591
+ gasPrice?: bigint;
592
+ maxFeePerGas?: bigint;
593
+ maxPriorityFeePerGas?: bigint;
594
+ nonce?: number;
595
+ value?: bigint;
596
+ }): Promise<void>;
597
+ };
598
+ /**
599
+ * Watch contract events
600
+ *
601
+ * @example
602
+ * // Watch all Transfer events
603
+ * const unwatch = contract.watch.Transfer((event) => {
604
+ * console.log('Transfer:', event);
605
+ * });
606
+ *
607
+ * // Stop watching
608
+ * unwatch();
609
+ */
610
+ get watch(): {
611
+ /**
612
+ * Watch Approval events
613
+ * @param callback Function to call when event is emitted
614
+ * @param filter Optional filter for indexed parameters
615
+ * @returns Unwatch function to stop listening
616
+ */
617
+ Approval: (callback: (event: {
618
+ owner: `0x${string}`;
619
+ spender: `0x${string}`;
620
+ value: bigint;
621
+ }) => void, filter?: {
622
+ owner: `0x${string}`;
623
+ spender: `0x${string}`;
624
+ }) => () => void;
625
+ /**
626
+ * Watch OwnershipTransferred events
627
+ * @param callback Function to call when event is emitted
628
+ * @param filter Optional filter for indexed parameters
629
+ * @returns Unwatch function to stop listening
630
+ */
631
+ OwnershipTransferred: (callback: (event: {
632
+ previousOwner: `0x${string}`;
633
+ newOwner: `0x${string}`;
634
+ }) => void, filter?: {
635
+ previousOwner: `0x${string}`;
636
+ newOwner: `0x${string}`;
637
+ }) => () => void;
638
+ /**
639
+ * Watch Transfer events
640
+ * @param callback Function to call when event is emitted
641
+ * @param filter Optional filter for indexed parameters
642
+ * @returns Unwatch function to stop listening
643
+ */
644
+ Transfer: (callback: (event: {
645
+ from: `0x${string}`;
646
+ to: `0x${string}`;
647
+ value: bigint;
648
+ }) => void, filter?: {
649
+ from: `0x${string}`;
650
+ to: `0x${string}`;
651
+ }) => () => void;
652
+ };
653
+ }