@gitmyabi/usdt 1.0.8 → 1.0.9

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