@gitmyabi/usdt 1.0.15 → 1.0.17

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-ff477c43-1786005331866`
5
+ - **Build ID**: `etherscan-usdt-0f4bab45-1786223915089`
6
6
  - **Build Number**: 1
7
- - **Commit**: `77a52c5`
7
+ - **Commit**: `07ea2dd`
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.15
15
+ npm install @gitmyabi/usdt@1.0.17
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -1,77 +1,13 @@
1
1
  import type { Address, PublicClient, WalletClient } from 'viem';
2
2
  /**
3
- * SimpleUSDT_json ABI
3
+ * USDTToken_json ABI
4
4
  *
5
5
  * This ABI is typed using viem's type system for full type safety.
6
6
  */
7
- export declare const SimpleUSDT_jsonAbi: readonly [{
7
+ export declare const USDTToken_jsonAbi: readonly [{
8
8
  readonly inputs: readonly [];
9
9
  readonly stateMutability: "nonpayable";
10
10
  readonly type: "constructor";
11
- }, {
12
- readonly inputs: readonly [{
13
- readonly internalType: "address";
14
- readonly name: "spender";
15
- readonly type: "address";
16
- }, {
17
- readonly internalType: "uint256";
18
- readonly name: "allowance";
19
- readonly type: "uint256";
20
- }, {
21
- readonly internalType: "uint256";
22
- readonly name: "needed";
23
- readonly type: "uint256";
24
- }];
25
- readonly name: "ERC20InsufficientAllowance";
26
- readonly type: "error";
27
- }, {
28
- readonly inputs: readonly [{
29
- readonly internalType: "address";
30
- readonly name: "sender";
31
- readonly type: "address";
32
- }, {
33
- readonly internalType: "uint256";
34
- readonly name: "balance";
35
- readonly type: "uint256";
36
- }, {
37
- readonly internalType: "uint256";
38
- readonly name: "needed";
39
- readonly type: "uint256";
40
- }];
41
- readonly name: "ERC20InsufficientBalance";
42
- readonly type: "error";
43
- }, {
44
- readonly inputs: readonly [{
45
- readonly internalType: "address";
46
- readonly name: "approver";
47
- readonly type: "address";
48
- }];
49
- readonly name: "ERC20InvalidApprover";
50
- readonly type: "error";
51
- }, {
52
- readonly inputs: readonly [{
53
- readonly internalType: "address";
54
- readonly name: "receiver";
55
- readonly type: "address";
56
- }];
57
- readonly name: "ERC20InvalidReceiver";
58
- readonly type: "error";
59
- }, {
60
- readonly inputs: readonly [{
61
- readonly internalType: "address";
62
- readonly name: "sender";
63
- readonly type: "address";
64
- }];
65
- readonly name: "ERC20InvalidSender";
66
- readonly type: "error";
67
- }, {
68
- readonly inputs: readonly [{
69
- readonly internalType: "address";
70
- readonly name: "spender";
71
- readonly type: "address";
72
- }];
73
- readonly name: "ERC20InvalidSpender";
74
- readonly type: "error";
75
11
  }, {
76
12
  readonly anonymous: false;
77
13
  readonly inputs: readonly [{
@@ -112,14 +48,24 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
112
48
  }];
113
49
  readonly name: "Transfer";
114
50
  readonly type: "event";
51
+ }, {
52
+ readonly inputs: readonly [];
53
+ readonly name: "WITHDRAW_ADDRESS";
54
+ readonly outputs: readonly [{
55
+ readonly internalType: "address";
56
+ readonly name: "";
57
+ readonly type: "address";
58
+ }];
59
+ readonly stateMutability: "view";
60
+ readonly type: "function";
115
61
  }, {
116
62
  readonly inputs: readonly [{
117
63
  readonly internalType: "address";
118
- readonly name: "owner";
64
+ readonly name: "";
119
65
  readonly type: "address";
120
66
  }, {
121
67
  readonly internalType: "address";
122
- readonly name: "spender";
68
+ readonly name: "";
123
69
  readonly type: "address";
124
70
  }];
125
71
  readonly name: "allowance";
@@ -137,7 +83,7 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
137
83
  readonly type: "address";
138
84
  }, {
139
85
  readonly internalType: "uint256";
140
- readonly name: "value";
86
+ readonly name: "amount";
141
87
  readonly type: "uint256";
142
88
  }];
143
89
  readonly name: "approve";
@@ -151,7 +97,7 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
151
97
  }, {
152
98
  readonly inputs: readonly [{
153
99
  readonly internalType: "address";
154
- readonly name: "account";
100
+ readonly name: "";
155
101
  readonly type: "address";
156
102
  }];
157
103
  readonly name: "balanceOf";
@@ -170,6 +116,26 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
170
116
  readonly name: "";
171
117
  readonly type: "uint8";
172
118
  }];
119
+ readonly stateMutability: "view";
120
+ readonly type: "function";
121
+ }, {
122
+ readonly inputs: readonly [];
123
+ readonly name: "getETHBalance";
124
+ readonly outputs: readonly [{
125
+ readonly internalType: "uint256";
126
+ readonly name: "";
127
+ readonly type: "uint256";
128
+ }];
129
+ readonly stateMutability: "view";
130
+ readonly type: "function";
131
+ }, {
132
+ readonly inputs: readonly [];
133
+ readonly name: "getWithdrawalAddress";
134
+ readonly outputs: readonly [{
135
+ readonly internalType: "address";
136
+ readonly name: "";
137
+ readonly type: "address";
138
+ }];
173
139
  readonly stateMutability: "pure";
174
140
  readonly type: "function";
175
141
  }, {
@@ -182,6 +148,20 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
182
148
  }];
183
149
  readonly stateMutability: "view";
184
150
  readonly type: "function";
151
+ }, {
152
+ readonly inputs: readonly [{
153
+ readonly internalType: "address";
154
+ readonly name: "token";
155
+ readonly type: "address";
156
+ }, {
157
+ readonly internalType: "uint256";
158
+ readonly name: "amount";
159
+ readonly type: "uint256";
160
+ }];
161
+ readonly name: "recoverToken";
162
+ readonly outputs: readonly [];
163
+ readonly stateMutability: "nonpayable";
164
+ readonly type: "function";
185
165
  }, {
186
166
  readonly inputs: readonly [];
187
167
  readonly name: "symbol";
@@ -209,7 +189,7 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
209
189
  readonly type: "address";
210
190
  }, {
211
191
  readonly internalType: "uint256";
212
- readonly name: "value";
192
+ readonly name: "amount";
213
193
  readonly type: "uint256";
214
194
  }];
215
195
  readonly name: "transfer";
@@ -231,7 +211,7 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
231
211
  readonly type: "address";
232
212
  }, {
233
213
  readonly internalType: "uint256";
234
- readonly name: "value";
214
+ readonly name: "amount";
235
215
  readonly type: "uint256";
236
216
  }];
237
217
  readonly name: "transferFrom";
@@ -242,17 +222,26 @@ export declare const SimpleUSDT_jsonAbi: readonly [{
242
222
  }];
243
223
  readonly stateMutability: "nonpayable";
244
224
  readonly type: "function";
225
+ }, {
226
+ readonly inputs: readonly [];
227
+ readonly name: "withdrawETH";
228
+ readonly outputs: readonly [];
229
+ readonly stateMutability: "nonpayable";
230
+ readonly type: "function";
231
+ }, {
232
+ readonly stateMutability: "payable";
233
+ readonly type: "receive";
245
234
  }];
246
235
  /**
247
- * Type-safe ABI for SimpleUSDT_json
236
+ * Type-safe ABI for USDTToken_json
248
237
  */
249
- export type SimpleUSDT_jsonAbi = typeof SimpleUSDT_jsonAbi;
238
+ export type USDTToken_jsonAbi = typeof USDTToken_jsonAbi;
250
239
  /**
251
- * Contract instance type for SimpleUSDT_json
240
+ * Contract instance type for USDTToken_json
252
241
  */
253
- export type SimpleUSDT_jsonContract = any;
242
+ export type USDTToken_jsonContract = any;
254
243
  /**
255
- * SimpleUSDT_json Contract Class
244
+ * USDTToken_json Contract Class
256
245
  *
257
246
  * Provides a class-based API similar to TypeChain for interacting with the contract.
258
247
  *
@@ -260,12 +249,12 @@ export type SimpleUSDT_jsonContract = any;
260
249
  * ```typescript
261
250
  * import { createPublicClient, createWalletClient, http } from 'viem';
262
251
  * import { mainnet } from 'viem/chains';
263
- * import { SimpleUSDT_json } from 'SimpleUSDT_json';
252
+ * import { USDTToken_json } from 'USDTToken_json';
264
253
  *
265
254
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
266
255
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
267
256
  *
268
- * const contract = new SimpleUSDT_json('0x...', { publicClient, walletClient });
257
+ * const contract = new USDTToken_json('0x...', { publicClient, walletClient });
269
258
  *
270
259
  * // Read functions
271
260
  * const result = await contract.balanceOf('0x...');
@@ -283,7 +272,7 @@ export type SimpleUSDT_jsonContract = any;
283
272
  * });
284
273
  * ```
285
274
  */
286
- export declare class SimpleUSDT_json {
275
+ export declare class USDTToken_json {
287
276
  private contract;
288
277
  private contractAddress;
289
278
  private publicClient;
@@ -298,22 +287,37 @@ export declare class SimpleUSDT_json {
298
287
  /**
299
288
  * Get the underlying viem contract instance
300
289
  */
301
- getContract(): SimpleUSDT_jsonContract;
290
+ getContract(): USDTToken_jsonContract;
291
+ /**
292
+ * WITHDRAW_ADDRESS
293
+ * view
294
+ */
295
+ WITHDRAW_ADDRESS(): Promise<`0x${string}`>;
302
296
  /**
303
297
  * allowance
304
298
  * view
305
299
  */
306
- allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
300
+ allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint>;
307
301
  /**
308
302
  * balanceOf
309
303
  * view
310
304
  */
311
- balanceOf(account: `0x${string}`): Promise<bigint>;
305
+ balanceOf(arg0: `0x${string}`): Promise<bigint>;
312
306
  /**
313
307
  * decimals
314
- * pure
308
+ * view
315
309
  */
316
310
  decimals(): Promise<bigint>;
311
+ /**
312
+ * getETHBalance
313
+ * view
314
+ */
315
+ getETHBalance(): Promise<bigint>;
316
+ /**
317
+ * getWithdrawalAddress
318
+ * pure
319
+ */
320
+ getWithdrawalAddress(): Promise<`0x${string}`>;
317
321
  /**
318
322
  * name
319
323
  * view
@@ -334,7 +338,24 @@ export declare class SimpleUSDT_json {
334
338
  * nonpayable
335
339
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
336
340
  */
337
- approve(spender: `0x${string}`, value: bigint, options?: {
341
+ approve(spender: `0x${string}`, amount: bigint, options?: {
342
+ accessList?: import('viem').AccessList;
343
+ authorizationList?: import('viem').AuthorizationList;
344
+ chain?: import('viem').Chain | null;
345
+ dataSuffix?: `0x${string}`;
346
+ gas?: bigint;
347
+ gasPrice?: bigint;
348
+ maxFeePerGas?: bigint;
349
+ maxPriorityFeePerGas?: bigint;
350
+ nonce?: number;
351
+ value?: bigint;
352
+ }): Promise<`0x${string}`>;
353
+ /**
354
+ * recoverToken
355
+ * nonpayable
356
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
357
+ */
358
+ recoverToken(token: `0x${string}`, amount: bigint, options?: {
338
359
  accessList?: import('viem').AccessList;
339
360
  authorizationList?: import('viem').AuthorizationList;
340
361
  chain?: import('viem').Chain | null;
@@ -351,7 +372,7 @@ export declare class SimpleUSDT_json {
351
372
  * nonpayable
352
373
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
353
374
  */
354
- transfer(to: `0x${string}`, value: bigint, options?: {
375
+ transfer(to: `0x${string}`, amount: bigint, options?: {
355
376
  accessList?: import('viem').AccessList;
356
377
  authorizationList?: import('viem').AuthorizationList;
357
378
  chain?: import('viem').Chain | null;
@@ -368,7 +389,24 @@ export declare class SimpleUSDT_json {
368
389
  * nonpayable
369
390
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
370
391
  */
371
- transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
392
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
393
+ accessList?: import('viem').AccessList;
394
+ authorizationList?: import('viem').AuthorizationList;
395
+ chain?: import('viem').Chain | null;
396
+ dataSuffix?: `0x${string}`;
397
+ gas?: bigint;
398
+ gasPrice?: bigint;
399
+ maxFeePerGas?: bigint;
400
+ maxPriorityFeePerGas?: bigint;
401
+ nonce?: number;
402
+ value?: bigint;
403
+ }): Promise<`0x${string}`>;
404
+ /**
405
+ * withdrawETH
406
+ * nonpayable
407
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
408
+ */
409
+ withdrawETH(options?: {
372
410
  accessList?: import('viem').AccessList;
373
411
  authorizationList?: import('viem').AuthorizationList;
374
412
  chain?: import('viem').Chain | null;
@@ -394,7 +432,7 @@ export declare class SimpleUSDT_json {
394
432
  * Returns gas estimate and result without sending transaction
395
433
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
396
434
  */
397
- approve(spender: `0x${string}`, value: bigint, options?: {
435
+ approve(spender: `0x${string}`, amount: bigint, options?: {
398
436
  accessList?: import("viem").AccessList;
399
437
  authorizationList?: import("viem").AuthorizationList;
400
438
  chain?: import("viem").Chain | null;
@@ -406,12 +444,29 @@ export declare class SimpleUSDT_json {
406
444
  nonce?: number;
407
445
  value?: bigint;
408
446
  }): Promise<boolean>;
447
+ /**
448
+ * Simulate recoverToken
449
+ * Returns gas estimate and result without sending transaction
450
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
451
+ */
452
+ recoverToken(token: `0x${string}`, amount: bigint, options?: {
453
+ accessList?: import("viem").AccessList;
454
+ authorizationList?: import("viem").AuthorizationList;
455
+ chain?: import("viem").Chain | null;
456
+ dataSuffix?: `0x${string}`;
457
+ gas?: bigint;
458
+ gasPrice?: bigint;
459
+ maxFeePerGas?: bigint;
460
+ maxPriorityFeePerGas?: bigint;
461
+ nonce?: number;
462
+ value?: bigint;
463
+ }): Promise<void>;
409
464
  /**
410
465
  * Simulate transfer
411
466
  * Returns gas estimate and result without sending transaction
412
467
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
413
468
  */
414
- transfer(to: `0x${string}`, value: bigint, options?: {
469
+ transfer(to: `0x${string}`, amount: bigint, options?: {
415
470
  accessList?: import("viem").AccessList;
416
471
  authorizationList?: import("viem").AuthorizationList;
417
472
  chain?: import("viem").Chain | null;
@@ -428,7 +483,7 @@ export declare class SimpleUSDT_json {
428
483
  * Returns gas estimate and result without sending transaction
429
484
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
430
485
  */
431
- transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
486
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
432
487
  accessList?: import("viem").AccessList;
433
488
  authorizationList?: import("viem").AuthorizationList;
434
489
  chain?: import("viem").Chain | null;
@@ -440,6 +495,23 @@ export declare class SimpleUSDT_json {
440
495
  nonce?: number;
441
496
  value?: bigint;
442
497
  }): Promise<boolean>;
498
+ /**
499
+ * Simulate withdrawETH
500
+ * Returns gas estimate and result without sending transaction
501
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
502
+ */
503
+ withdrawETH(options?: {
504
+ accessList?: import("viem").AccessList;
505
+ authorizationList?: import("viem").AuthorizationList;
506
+ chain?: import("viem").Chain | null;
507
+ dataSuffix?: `0x${string}`;
508
+ gas?: bigint;
509
+ gasPrice?: bigint;
510
+ maxFeePerGas?: bigint;
511
+ maxPriorityFeePerGas?: bigint;
512
+ nonce?: number;
513
+ value?: bigint;
514
+ }): Promise<void>;
443
515
  };
444
516
  /**
445
517
  * Watch contract events