@gitmyabi/usdt 1.0.18 → 1.0.20

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/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Auto-generated TypeScript type bindings for **USDT**
4
4
 
5
- - **Build ID**: `etherscan-usdt-6e9b0506-1786286399880`
5
+ - **Build ID**: `etherscan-usdt-680fdf1e-1787033882968`
6
6
  - **Build Number**: 1
7
- - **Commit**: `4864253`
7
+ - **Commit**: `e2ee137`
8
8
  - **Branch**: `etherscan`
9
9
  - **Target**: `ethers-v6`
10
10
  - **Contracts**: 1
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **USDT**
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- npm install @gitmyabi/usdt@1.0.18
15
+ npm install @gitmyabi/usdt@1.0.20
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -0,0 +1,489 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * SimpleUSDTToken_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const SimpleUSDTToken_jsonAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "initialSupply";
11
+ readonly type: "uint256";
12
+ }];
13
+ readonly stateMutability: "nonpayable";
14
+ readonly type: "constructor";
15
+ }, {
16
+ readonly anonymous: false;
17
+ readonly inputs: readonly [{
18
+ readonly indexed: true;
19
+ readonly internalType: "address";
20
+ readonly name: "owner";
21
+ readonly type: "address";
22
+ }, {
23
+ readonly indexed: true;
24
+ readonly internalType: "address";
25
+ readonly name: "spender";
26
+ readonly type: "address";
27
+ }, {
28
+ readonly indexed: false;
29
+ readonly internalType: "uint256";
30
+ readonly name: "value";
31
+ readonly type: "uint256";
32
+ }];
33
+ readonly name: "Approval";
34
+ readonly type: "event";
35
+ }, {
36
+ readonly anonymous: false;
37
+ readonly inputs: readonly [{
38
+ readonly indexed: true;
39
+ readonly internalType: "address";
40
+ readonly name: "from";
41
+ readonly type: "address";
42
+ }, {
43
+ readonly indexed: true;
44
+ readonly internalType: "address";
45
+ readonly name: "to";
46
+ readonly type: "address";
47
+ }, {
48
+ readonly indexed: false;
49
+ readonly internalType: "uint256";
50
+ readonly name: "value";
51
+ readonly type: "uint256";
52
+ }];
53
+ readonly name: "Transfer";
54
+ readonly type: "event";
55
+ }, {
56
+ readonly inputs: readonly [{
57
+ readonly internalType: "address";
58
+ readonly name: "";
59
+ readonly type: "address";
60
+ }, {
61
+ readonly internalType: "address";
62
+ readonly name: "";
63
+ readonly type: "address";
64
+ }];
65
+ readonly name: "allowance";
66
+ readonly outputs: readonly [{
67
+ readonly internalType: "uint256";
68
+ readonly name: "";
69
+ readonly type: "uint256";
70
+ }];
71
+ readonly stateMutability: "view";
72
+ readonly type: "function";
73
+ }, {
74
+ readonly inputs: readonly [{
75
+ readonly internalType: "address";
76
+ readonly name: "spender";
77
+ readonly type: "address";
78
+ }, {
79
+ readonly internalType: "uint256";
80
+ readonly name: "value";
81
+ readonly type: "uint256";
82
+ }];
83
+ readonly name: "approve";
84
+ readonly outputs: readonly [{
85
+ readonly internalType: "bool";
86
+ readonly name: "success";
87
+ readonly type: "bool";
88
+ }];
89
+ readonly stateMutability: "nonpayable";
90
+ readonly type: "function";
91
+ }, {
92
+ readonly inputs: readonly [{
93
+ readonly internalType: "address";
94
+ readonly name: "";
95
+ readonly type: "address";
96
+ }];
97
+ readonly name: "balanceOf";
98
+ readonly outputs: readonly [{
99
+ readonly internalType: "uint256";
100
+ readonly name: "";
101
+ readonly type: "uint256";
102
+ }];
103
+ readonly stateMutability: "view";
104
+ readonly type: "function";
105
+ }, {
106
+ readonly inputs: readonly [];
107
+ readonly name: "decimals";
108
+ readonly outputs: readonly [{
109
+ readonly internalType: "uint8";
110
+ readonly name: "";
111
+ readonly type: "uint8";
112
+ }];
113
+ readonly stateMutability: "view";
114
+ readonly type: "function";
115
+ }, {
116
+ readonly inputs: readonly [{
117
+ readonly internalType: "address";
118
+ readonly name: "to";
119
+ readonly type: "address";
120
+ }, {
121
+ readonly internalType: "uint256";
122
+ readonly name: "amount";
123
+ readonly type: "uint256";
124
+ }];
125
+ readonly name: "mint";
126
+ readonly outputs: readonly [];
127
+ readonly stateMutability: "nonpayable";
128
+ readonly type: "function";
129
+ }, {
130
+ readonly inputs: readonly [];
131
+ readonly name: "name";
132
+ readonly outputs: readonly [{
133
+ readonly internalType: "string";
134
+ readonly name: "";
135
+ readonly type: "string";
136
+ }];
137
+ readonly stateMutability: "view";
138
+ readonly type: "function";
139
+ }, {
140
+ readonly inputs: readonly [];
141
+ readonly name: "owner";
142
+ readonly outputs: readonly [{
143
+ readonly internalType: "address";
144
+ readonly name: "";
145
+ readonly type: "address";
146
+ }];
147
+ readonly stateMutability: "view";
148
+ readonly type: "function";
149
+ }, {
150
+ readonly inputs: readonly [];
151
+ readonly name: "symbol";
152
+ readonly outputs: readonly [{
153
+ readonly internalType: "string";
154
+ readonly name: "";
155
+ readonly type: "string";
156
+ }];
157
+ readonly stateMutability: "view";
158
+ readonly type: "function";
159
+ }, {
160
+ readonly inputs: readonly [];
161
+ readonly name: "totalSupply";
162
+ readonly outputs: readonly [{
163
+ readonly internalType: "uint256";
164
+ readonly name: "";
165
+ readonly type: "uint256";
166
+ }];
167
+ readonly stateMutability: "view";
168
+ readonly type: "function";
169
+ }, {
170
+ readonly inputs: readonly [{
171
+ readonly internalType: "address";
172
+ readonly name: "to";
173
+ readonly type: "address";
174
+ }, {
175
+ readonly internalType: "uint256";
176
+ readonly name: "value";
177
+ readonly type: "uint256";
178
+ }];
179
+ readonly name: "transfer";
180
+ readonly outputs: readonly [{
181
+ readonly internalType: "bool";
182
+ readonly name: "success";
183
+ readonly type: "bool";
184
+ }];
185
+ readonly stateMutability: "nonpayable";
186
+ readonly type: "function";
187
+ }, {
188
+ readonly inputs: readonly [{
189
+ readonly internalType: "address";
190
+ readonly name: "from";
191
+ readonly type: "address";
192
+ }, {
193
+ readonly internalType: "address";
194
+ readonly name: "to";
195
+ readonly type: "address";
196
+ }, {
197
+ readonly internalType: "uint256";
198
+ readonly name: "value";
199
+ readonly type: "uint256";
200
+ }];
201
+ readonly name: "transferFrom";
202
+ readonly outputs: readonly [{
203
+ readonly internalType: "bool";
204
+ readonly name: "success";
205
+ readonly type: "bool";
206
+ }];
207
+ readonly stateMutability: "nonpayable";
208
+ readonly type: "function";
209
+ }];
210
+ /**
211
+ * Type-safe ABI for SimpleUSDTToken_json
212
+ */
213
+ export type SimpleUSDTToken_jsonAbi = typeof SimpleUSDTToken_jsonAbi;
214
+ /**
215
+ * Contract instance type for SimpleUSDTToken_json
216
+ */
217
+ export type SimpleUSDTToken_jsonContract = any;
218
+ /**
219
+ * SimpleUSDTToken_json Contract Class
220
+ *
221
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
222
+ *
223
+ * @example
224
+ * ```typescript
225
+ * import { createPublicClient, createWalletClient, http } from 'viem';
226
+ * import { mainnet } from 'viem/chains';
227
+ * import { SimpleUSDTToken_json } from 'SimpleUSDTToken_json';
228
+ *
229
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
230
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
231
+ *
232
+ * const contract = new SimpleUSDTToken_json('0x...', { publicClient, walletClient });
233
+ *
234
+ * // Read functions
235
+ * const result = await contract.balanceOf('0x...');
236
+ *
237
+ * // Write functions
238
+ * const hash = await contract.transfer('0x...', 1000n);
239
+ *
240
+ * // Simulate transactions (dry-run)
241
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
242
+ * console.log('Gas estimate:', simulation.request.gas);
243
+ *
244
+ * // Watch events
245
+ * const unwatch = contract.watch.Transfer((event) => {
246
+ * console.log('Transfer event:', event);
247
+ * });
248
+ * ```
249
+ */
250
+ export declare class SimpleUSDTToken_json {
251
+ private contract;
252
+ private contractAddress;
253
+ private publicClient;
254
+ constructor(address: Address, clients: {
255
+ publicClient: PublicClient;
256
+ walletClient?: WalletClient;
257
+ });
258
+ /**
259
+ * Get the contract address
260
+ */
261
+ get address(): Address;
262
+ /**
263
+ * Get the underlying viem contract instance
264
+ */
265
+ getContract(): SimpleUSDTToken_jsonContract;
266
+ /**
267
+ * allowance
268
+ * view
269
+ */
270
+ allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint>;
271
+ /**
272
+ * balanceOf
273
+ * view
274
+ */
275
+ balanceOf(arg0: `0x${string}`): Promise<bigint>;
276
+ /**
277
+ * decimals
278
+ * view
279
+ */
280
+ decimals(): Promise<bigint>;
281
+ /**
282
+ * name
283
+ * view
284
+ */
285
+ name(): Promise<string>;
286
+ /**
287
+ * owner
288
+ * view
289
+ */
290
+ owner(): Promise<`0x${string}`>;
291
+ /**
292
+ * symbol
293
+ * view
294
+ */
295
+ symbol(): Promise<string>;
296
+ /**
297
+ * totalSupply
298
+ * view
299
+ */
300
+ totalSupply(): Promise<bigint>;
301
+ /**
302
+ * approve
303
+ * nonpayable
304
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
305
+ */
306
+ approve(spender: `0x${string}`, value: bigint, options?: {
307
+ accessList?: import('viem').AccessList;
308
+ authorizationList?: import('viem').AuthorizationList;
309
+ chain?: import('viem').Chain | null;
310
+ dataSuffix?: `0x${string}`;
311
+ gas?: bigint;
312
+ gasPrice?: bigint;
313
+ maxFeePerGas?: bigint;
314
+ maxPriorityFeePerGas?: bigint;
315
+ nonce?: number;
316
+ value?: bigint;
317
+ }): Promise<`0x${string}`>;
318
+ /**
319
+ * mint
320
+ * nonpayable
321
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
322
+ */
323
+ mint(to: `0x${string}`, amount: bigint, options?: {
324
+ accessList?: import('viem').AccessList;
325
+ authorizationList?: import('viem').AuthorizationList;
326
+ chain?: import('viem').Chain | null;
327
+ dataSuffix?: `0x${string}`;
328
+ gas?: bigint;
329
+ gasPrice?: bigint;
330
+ maxFeePerGas?: bigint;
331
+ maxPriorityFeePerGas?: bigint;
332
+ nonce?: number;
333
+ value?: bigint;
334
+ }): Promise<`0x${string}`>;
335
+ /**
336
+ * transfer
337
+ * nonpayable
338
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
339
+ */
340
+ transfer(to: `0x${string}`, value: bigint, options?: {
341
+ accessList?: import('viem').AccessList;
342
+ authorizationList?: import('viem').AuthorizationList;
343
+ chain?: import('viem').Chain | null;
344
+ dataSuffix?: `0x${string}`;
345
+ gas?: bigint;
346
+ gasPrice?: bigint;
347
+ maxFeePerGas?: bigint;
348
+ maxPriorityFeePerGas?: bigint;
349
+ nonce?: number;
350
+ value?: bigint;
351
+ }): Promise<`0x${string}`>;
352
+ /**
353
+ * transferFrom
354
+ * nonpayable
355
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
356
+ */
357
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
358
+ accessList?: import('viem').AccessList;
359
+ authorizationList?: import('viem').AuthorizationList;
360
+ chain?: import('viem').Chain | null;
361
+ dataSuffix?: `0x${string}`;
362
+ gas?: bigint;
363
+ gasPrice?: bigint;
364
+ maxFeePerGas?: bigint;
365
+ maxPriorityFeePerGas?: bigint;
366
+ nonce?: number;
367
+ value?: bigint;
368
+ }): Promise<`0x${string}`>;
369
+ /**
370
+ * Simulate contract write operations (dry-run without sending transaction)
371
+ *
372
+ * @example
373
+ * const result = await contract.simulate.transfer('0x...', 1000n);
374
+ * console.log('Gas estimate:', result.request.gas);
375
+ * console.log('Would succeed:', result.result);
376
+ */
377
+ get simulate(): {
378
+ /**
379
+ * Simulate approve
380
+ * Returns gas estimate and result without sending transaction
381
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
382
+ */
383
+ approve(spender: `0x${string}`, value: bigint, options?: {
384
+ accessList?: import("viem").AccessList;
385
+ authorizationList?: import("viem").AuthorizationList;
386
+ chain?: import("viem").Chain | null;
387
+ dataSuffix?: `0x${string}`;
388
+ gas?: bigint;
389
+ gasPrice?: bigint;
390
+ maxFeePerGas?: bigint;
391
+ maxPriorityFeePerGas?: bigint;
392
+ nonce?: number;
393
+ value?: bigint;
394
+ }): Promise<boolean>;
395
+ /**
396
+ * Simulate mint
397
+ * Returns gas estimate and result without sending transaction
398
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
399
+ */
400
+ mint(to: `0x${string}`, amount: bigint, options?: {
401
+ accessList?: import("viem").AccessList;
402
+ authorizationList?: import("viem").AuthorizationList;
403
+ chain?: import("viem").Chain | null;
404
+ dataSuffix?: `0x${string}`;
405
+ gas?: bigint;
406
+ gasPrice?: bigint;
407
+ maxFeePerGas?: bigint;
408
+ maxPriorityFeePerGas?: bigint;
409
+ nonce?: number;
410
+ value?: bigint;
411
+ }): Promise<void>;
412
+ /**
413
+ * Simulate transfer
414
+ * Returns gas estimate and result without sending transaction
415
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
416
+ */
417
+ transfer(to: `0x${string}`, value: bigint, options?: {
418
+ accessList?: import("viem").AccessList;
419
+ authorizationList?: import("viem").AuthorizationList;
420
+ chain?: import("viem").Chain | null;
421
+ dataSuffix?: `0x${string}`;
422
+ gas?: bigint;
423
+ gasPrice?: bigint;
424
+ maxFeePerGas?: bigint;
425
+ maxPriorityFeePerGas?: bigint;
426
+ nonce?: number;
427
+ value?: bigint;
428
+ }): Promise<boolean>;
429
+ /**
430
+ * Simulate transferFrom
431
+ * Returns gas estimate and result without sending transaction
432
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
433
+ */
434
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
435
+ accessList?: import("viem").AccessList;
436
+ authorizationList?: import("viem").AuthorizationList;
437
+ chain?: import("viem").Chain | null;
438
+ dataSuffix?: `0x${string}`;
439
+ gas?: bigint;
440
+ gasPrice?: bigint;
441
+ maxFeePerGas?: bigint;
442
+ maxPriorityFeePerGas?: bigint;
443
+ nonce?: number;
444
+ value?: bigint;
445
+ }): Promise<boolean>;
446
+ };
447
+ /**
448
+ * Watch contract events
449
+ *
450
+ * @example
451
+ * // Watch all Transfer events
452
+ * const unwatch = contract.watch.Transfer((event) => {
453
+ * console.log('Transfer:', event);
454
+ * });
455
+ *
456
+ * // Stop watching
457
+ * unwatch();
458
+ */
459
+ get watch(): {
460
+ /**
461
+ * Watch Approval events
462
+ * @param callback Function to call when event is emitted
463
+ * @param filter Optional filter for indexed parameters
464
+ * @returns Unwatch function to stop listening
465
+ */
466
+ Approval: (callback: (event: {
467
+ owner: `0x${string}`;
468
+ spender: `0x${string}`;
469
+ value: bigint;
470
+ }) => void, filter?: {
471
+ owner: `0x${string}`;
472
+ spender: `0x${string}`;
473
+ }) => () => void;
474
+ /**
475
+ * Watch Transfer events
476
+ * @param callback Function to call when event is emitted
477
+ * @param filter Optional filter for indexed parameters
478
+ * @returns Unwatch function to stop listening
479
+ */
480
+ Transfer: (callback: (event: {
481
+ from: `0x${string}`;
482
+ to: `0x${string}`;
483
+ value: bigint;
484
+ }) => void, filter?: {
485
+ from: `0x${string}`;
486
+ to: `0x${string}`;
487
+ }) => () => void;
488
+ };
489
+ }