@gitmyabi/skeb 0.0.0-stage → 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/README.md CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # @gitmyabi/skeb
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Auto-generated TypeScript type bindings for **SKEB**
4
+
5
+ - **Build ID**: `etherscan-skeb-6d614686-1795260937157`
6
+ - **Build Number**: 1
7
+ - **Commit**: `71758d6`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/skeb@1.0.0
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### Class-based API (TypeChain-like)
21
+
22
+ ```typescript
23
+ import { createPublicClient, createWalletClient, http } from 'viem';
24
+ import { mainnet } from 'viem/chains';
25
+ import { YourContract } from '@gitmyabi/skeb';
26
+
27
+ const publicClient = createPublicClient({ chain: mainnet, transport: http() });
28
+ const walletClient = createWalletClient({ chain: mainnet, transport: http() });
29
+
30
+ // Create contract instance
31
+ const contract = new YourContract('0x...', { publicClient, walletClient });
32
+
33
+ // Read functions - call directly like TypeChain!
34
+ const result = await contract.yourMethod(param1, param2);
35
+
36
+ // Write functions - also call directly!
37
+ const hash = await contract.transfer('0x...', 1000n);
38
+ ```
39
+
40
+ ### With viem directly
41
+
42
+ ```typescript
43
+ import { createPublicClient, http } from 'viem';
44
+ import { mainnet } from 'viem/chains';
45
+ import { YourContractAbi } from '@gitmyabi/skeb';
46
+
47
+ const client = createPublicClient({
48
+ chain: mainnet,
49
+ transport: http(),
50
+ });
51
+
52
+ // Fully typed contract read
53
+ const result = await client.readContract({
54
+ address: '0x...',
55
+ abi: YourContractAbi,
56
+ functionName: 'yourMethod',
57
+ args: [param1, param2],
58
+ });
59
+
60
+ // Fully typed contract write
61
+ const hash = await client.writeContract({
62
+ address: '0x...',
63
+ abi: YourContractAbi,
64
+ functionName: 'yourMethod',
65
+ args: [param1, param2],
66
+ });
67
+ ```
68
+
69
+ ### With wagmi
70
+
71
+ ```typescript
72
+ import { useReadContract, useWriteContract } from 'wagmi';
73
+ import { YourContractAbi } from '@gitmyabi/skeb';
74
+
75
+ function MyComponent() {
76
+ const { data } = useReadContract({
77
+ address: '0x...',
78
+ abi: YourContractAbi,
79
+ functionName: 'yourMethod',
80
+ args: [param1, param2],
81
+ });
82
+
83
+ const { writeContract } = useWriteContract();
84
+
85
+ const handleWrite = () => {
86
+ writeContract({
87
+ address: '0x...',
88
+ abi: YourContractAbi,
89
+ functionName: 'yourMethod',
90
+ args: [param1, param2],
91
+ });
92
+ };
93
+
94
+ return <button onClick={handleWrite}>Call Contract</button>;
95
+ }
96
+ ```
97
+
98
+ ## Type Safety
99
+
100
+ This package provides full TypeScript type safety for all contract methods, events, and parameters using viem's type system. All ABIs are exported as `const` assertions for maximum type inference.
101
+
102
+ ## Generated Contracts
103
+
104
+ This package includes type bindings for 1 contract(s) generated from ABI artifacts.
105
+
106
+ ## License
107
+
108
+ Apache License 2.0
@@ -0,0 +1,538 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * SkebCoin ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const SkebCoinAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "string";
10
+ readonly name: "name";
11
+ readonly type: "string";
12
+ }, {
13
+ readonly internalType: "string";
14
+ readonly name: "symbol";
15
+ readonly type: "string";
16
+ }, {
17
+ readonly internalType: "uint256";
18
+ readonly name: "initialSupply";
19
+ readonly type: "uint256";
20
+ }];
21
+ readonly stateMutability: "nonpayable";
22
+ readonly type: "constructor";
23
+ }, {
24
+ readonly anonymous: false;
25
+ readonly inputs: readonly [{
26
+ readonly indexed: true;
27
+ readonly internalType: "address";
28
+ readonly name: "owner";
29
+ readonly type: "address";
30
+ }, {
31
+ readonly indexed: true;
32
+ readonly internalType: "address";
33
+ readonly name: "spender";
34
+ readonly type: "address";
35
+ }, {
36
+ readonly indexed: false;
37
+ readonly internalType: "uint256";
38
+ readonly name: "value";
39
+ readonly type: "uint256";
40
+ }];
41
+ readonly name: "Approval";
42
+ readonly type: "event";
43
+ }, {
44
+ readonly anonymous: false;
45
+ readonly inputs: readonly [{
46
+ readonly indexed: true;
47
+ readonly internalType: "address";
48
+ readonly name: "from";
49
+ readonly type: "address";
50
+ }, {
51
+ readonly indexed: true;
52
+ readonly internalType: "address";
53
+ readonly name: "to";
54
+ readonly type: "address";
55
+ }, {
56
+ readonly indexed: false;
57
+ readonly internalType: "uint256";
58
+ readonly name: "value";
59
+ readonly type: "uint256";
60
+ }];
61
+ readonly name: "Transfer";
62
+ readonly type: "event";
63
+ }, {
64
+ readonly inputs: readonly [{
65
+ readonly internalType: "address";
66
+ readonly name: "owner";
67
+ readonly type: "address";
68
+ }, {
69
+ readonly internalType: "address";
70
+ readonly name: "spender";
71
+ readonly type: "address";
72
+ }];
73
+ readonly name: "allowance";
74
+ readonly outputs: readonly [{
75
+ readonly internalType: "uint256";
76
+ readonly name: "";
77
+ readonly type: "uint256";
78
+ }];
79
+ readonly stateMutability: "view";
80
+ readonly type: "function";
81
+ }, {
82
+ readonly inputs: readonly [{
83
+ readonly internalType: "address";
84
+ readonly name: "spender";
85
+ readonly type: "address";
86
+ }, {
87
+ readonly internalType: "uint256";
88
+ readonly name: "amount";
89
+ readonly type: "uint256";
90
+ }];
91
+ readonly name: "approve";
92
+ readonly outputs: readonly [{
93
+ readonly internalType: "bool";
94
+ readonly name: "";
95
+ readonly type: "bool";
96
+ }];
97
+ readonly stateMutability: "nonpayable";
98
+ readonly type: "function";
99
+ }, {
100
+ readonly inputs: readonly [{
101
+ readonly internalType: "address";
102
+ readonly name: "account";
103
+ readonly type: "address";
104
+ }];
105
+ readonly name: "balanceOf";
106
+ readonly outputs: readonly [{
107
+ readonly internalType: "uint256";
108
+ readonly name: "";
109
+ readonly type: "uint256";
110
+ }];
111
+ readonly stateMutability: "view";
112
+ readonly type: "function";
113
+ }, {
114
+ readonly inputs: readonly [];
115
+ readonly name: "decimals";
116
+ readonly outputs: readonly [{
117
+ readonly internalType: "uint8";
118
+ readonly name: "";
119
+ readonly type: "uint8";
120
+ }];
121
+ readonly stateMutability: "view";
122
+ readonly type: "function";
123
+ }, {
124
+ readonly inputs: readonly [{
125
+ readonly internalType: "address";
126
+ readonly name: "spender";
127
+ readonly type: "address";
128
+ }, {
129
+ readonly internalType: "uint256";
130
+ readonly name: "subtractedValue";
131
+ readonly type: "uint256";
132
+ }];
133
+ readonly name: "decreaseAllowance";
134
+ readonly outputs: readonly [{
135
+ readonly internalType: "bool";
136
+ readonly name: "";
137
+ readonly type: "bool";
138
+ }];
139
+ readonly stateMutability: "nonpayable";
140
+ readonly type: "function";
141
+ }, {
142
+ readonly inputs: readonly [{
143
+ readonly internalType: "address";
144
+ readonly name: "spender";
145
+ readonly type: "address";
146
+ }, {
147
+ readonly internalType: "uint256";
148
+ readonly name: "addedValue";
149
+ readonly type: "uint256";
150
+ }];
151
+ readonly name: "increaseAllowance";
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 name: "name";
162
+ readonly outputs: readonly [{
163
+ readonly internalType: "string";
164
+ readonly name: "";
165
+ readonly type: "string";
166
+ }];
167
+ readonly stateMutability: "view";
168
+ readonly type: "function";
169
+ }, {
170
+ readonly inputs: readonly [];
171
+ readonly name: "symbol";
172
+ readonly outputs: readonly [{
173
+ readonly internalType: "string";
174
+ readonly name: "";
175
+ readonly type: "string";
176
+ }];
177
+ readonly stateMutability: "view";
178
+ readonly type: "function";
179
+ }, {
180
+ readonly inputs: readonly [];
181
+ readonly name: "totalSupply";
182
+ readonly outputs: readonly [{
183
+ readonly internalType: "uint256";
184
+ readonly name: "";
185
+ readonly type: "uint256";
186
+ }];
187
+ readonly stateMutability: "view";
188
+ readonly type: "function";
189
+ }, {
190
+ readonly inputs: readonly [{
191
+ readonly internalType: "address";
192
+ readonly name: "to";
193
+ readonly type: "address";
194
+ }, {
195
+ readonly internalType: "uint256";
196
+ readonly name: "amount";
197
+ readonly type: "uint256";
198
+ }];
199
+ readonly name: "transfer";
200
+ readonly outputs: readonly [{
201
+ readonly internalType: "bool";
202
+ readonly name: "";
203
+ readonly type: "bool";
204
+ }];
205
+ readonly stateMutability: "nonpayable";
206
+ readonly type: "function";
207
+ }, {
208
+ readonly inputs: readonly [{
209
+ readonly internalType: "address";
210
+ readonly name: "from";
211
+ readonly type: "address";
212
+ }, {
213
+ readonly internalType: "address";
214
+ readonly name: "to";
215
+ readonly type: "address";
216
+ }, {
217
+ readonly internalType: "uint256";
218
+ readonly name: "amount";
219
+ readonly type: "uint256";
220
+ }];
221
+ readonly name: "transferFrom";
222
+ readonly outputs: readonly [{
223
+ readonly internalType: "bool";
224
+ readonly name: "";
225
+ readonly type: "bool";
226
+ }];
227
+ readonly stateMutability: "nonpayable";
228
+ readonly type: "function";
229
+ }];
230
+ /**
231
+ * Type-safe ABI for SkebCoin
232
+ */
233
+ export type SkebCoinAbi = typeof SkebCoinAbi;
234
+ /**
235
+ * Contract instance type for SkebCoin
236
+ */
237
+ export type SkebCoinContract = any;
238
+ /**
239
+ * SkebCoin Contract Class
240
+ *
241
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
242
+ *
243
+ * @example
244
+ * ```typescript
245
+ * import { createPublicClient, createWalletClient, http } from 'viem';
246
+ * import { mainnet } from 'viem/chains';
247
+ * import { SkebCoin } from 'SkebCoin';
248
+ *
249
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
250
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
251
+ *
252
+ * const contract = new SkebCoin('0x...', { publicClient, walletClient });
253
+ *
254
+ * // Read functions
255
+ * const result = await contract.balanceOf('0x...');
256
+ *
257
+ * // Write functions
258
+ * const hash = await contract.transfer('0x...', 1000n);
259
+ *
260
+ * // Simulate transactions (dry-run)
261
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
262
+ * console.log('Gas estimate:', simulation.request.gas);
263
+ *
264
+ * // Watch events
265
+ * const unwatch = contract.watch.Transfer((event) => {
266
+ * console.log('Transfer event:', event);
267
+ * });
268
+ * ```
269
+ */
270
+ export declare class SkebCoin {
271
+ private contract;
272
+ private contractAddress;
273
+ private publicClient;
274
+ constructor(address: Address, clients: {
275
+ publicClient: PublicClient;
276
+ walletClient?: WalletClient;
277
+ });
278
+ /**
279
+ * Get the contract address
280
+ */
281
+ get address(): Address;
282
+ /**
283
+ * Get the underlying viem contract instance.
284
+ */
285
+ getContract(): SkebCoinContract;
286
+ /**
287
+ * allowance
288
+ * view
289
+ */
290
+ allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
291
+ /**
292
+ * balanceOf
293
+ * view
294
+ */
295
+ balanceOf(account: `0x${string}`): Promise<bigint>;
296
+ /**
297
+ * decimals
298
+ * view
299
+ */
300
+ decimals(): Promise<bigint>;
301
+ /**
302
+ * name
303
+ * view
304
+ */
305
+ name(): Promise<string>;
306
+ /**
307
+ * symbol
308
+ * view
309
+ */
310
+ symbol(): Promise<string>;
311
+ /**
312
+ * totalSupply
313
+ * view
314
+ */
315
+ totalSupply(): Promise<bigint>;
316
+ /**
317
+ * approve
318
+ * nonpayable
319
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
320
+ */
321
+ approve(spender: `0x${string}`, amount: bigint, options?: {
322
+ accessList?: import('viem').AccessList;
323
+ authorizationList?: import('viem').AuthorizationList;
324
+ chain?: import('viem').Chain | null;
325
+ dataSuffix?: `0x${string}`;
326
+ gas?: bigint;
327
+ gasPrice?: bigint;
328
+ maxFeePerGas?: bigint;
329
+ maxPriorityFeePerGas?: bigint;
330
+ nonce?: number;
331
+ value?: bigint;
332
+ }): Promise<`0x${string}`>;
333
+ /**
334
+ * decreaseAllowance
335
+ * nonpayable
336
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
337
+ */
338
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
339
+ accessList?: import('viem').AccessList;
340
+ authorizationList?: import('viem').AuthorizationList;
341
+ chain?: import('viem').Chain | null;
342
+ dataSuffix?: `0x${string}`;
343
+ gas?: bigint;
344
+ gasPrice?: bigint;
345
+ maxFeePerGas?: bigint;
346
+ maxPriorityFeePerGas?: bigint;
347
+ nonce?: number;
348
+ value?: bigint;
349
+ }): Promise<`0x${string}`>;
350
+ /**
351
+ * increaseAllowance
352
+ * nonpayable
353
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
354
+ */
355
+ increaseAllowance(spender: `0x${string}`, addedValue: 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
+ * transfer
369
+ * nonpayable
370
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
371
+ */
372
+ transfer(to: `0x${string}`, amount: 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
+ * transferFrom
386
+ * nonpayable
387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
388
+ */
389
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: 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
+ * Simulate contract write operations (dry-run without sending transaction)
403
+ *
404
+ * @example
405
+ * const result = await contract.simulate.transfer('0x...', 1000n);
406
+ * console.log('Gas estimate:', result.request.gas);
407
+ * console.log('Would succeed:', result.result);
408
+ */
409
+ get simulate(): {
410
+ /**
411
+ * Simulate approve
412
+ * Returns gas estimate and result without sending transaction
413
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
414
+ */
415
+ approve(spender: `0x${string}`, amount: bigint, options?: {
416
+ accessList?: import("viem").AccessList;
417
+ authorizationList?: import("viem").AuthorizationList;
418
+ chain?: import("viem").Chain | null;
419
+ dataSuffix?: `0x${string}`;
420
+ gas?: bigint;
421
+ gasPrice?: bigint;
422
+ maxFeePerGas?: bigint;
423
+ maxPriorityFeePerGas?: bigint;
424
+ nonce?: number;
425
+ value?: bigint;
426
+ }): Promise<boolean>;
427
+ /**
428
+ * Simulate decreaseAllowance
429
+ * Returns gas estimate and result without sending transaction
430
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
431
+ */
432
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
433
+ accessList?: import("viem").AccessList;
434
+ authorizationList?: import("viem").AuthorizationList;
435
+ chain?: import("viem").Chain | null;
436
+ dataSuffix?: `0x${string}`;
437
+ gas?: bigint;
438
+ gasPrice?: bigint;
439
+ maxFeePerGas?: bigint;
440
+ maxPriorityFeePerGas?: bigint;
441
+ nonce?: number;
442
+ value?: bigint;
443
+ }): Promise<boolean>;
444
+ /**
445
+ * Simulate increaseAllowance
446
+ * Returns gas estimate and result without sending transaction
447
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
448
+ */
449
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
450
+ accessList?: import("viem").AccessList;
451
+ authorizationList?: import("viem").AuthorizationList;
452
+ chain?: import("viem").Chain | null;
453
+ dataSuffix?: `0x${string}`;
454
+ gas?: bigint;
455
+ gasPrice?: bigint;
456
+ maxFeePerGas?: bigint;
457
+ maxPriorityFeePerGas?: bigint;
458
+ nonce?: number;
459
+ value?: bigint;
460
+ }): Promise<boolean>;
461
+ /**
462
+ * Simulate transfer
463
+ * Returns gas estimate and result without sending transaction
464
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
465
+ */
466
+ transfer(to: `0x${string}`, amount: bigint, options?: {
467
+ accessList?: import("viem").AccessList;
468
+ authorizationList?: import("viem").AuthorizationList;
469
+ chain?: import("viem").Chain | null;
470
+ dataSuffix?: `0x${string}`;
471
+ gas?: bigint;
472
+ gasPrice?: bigint;
473
+ maxFeePerGas?: bigint;
474
+ maxPriorityFeePerGas?: bigint;
475
+ nonce?: number;
476
+ value?: bigint;
477
+ }): Promise<boolean>;
478
+ /**
479
+ * Simulate transferFrom
480
+ * Returns gas estimate and result without sending transaction
481
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
482
+ */
483
+ transferFrom(from: `0x${string}`, to: `0x${string}`, amount: 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
+ /**
497
+ * Watch contract events
498
+ *
499
+ * @example
500
+ * // Watch all Transfer events
501
+ * const unwatch = contract.watch.Transfer((event) => {
502
+ * console.log('Transfer:', event);
503
+ * });
504
+ *
505
+ * // Stop watching
506
+ * unwatch();
507
+ */
508
+ get watch(): {
509
+ /**
510
+ * Watch Approval events
511
+ * @param callback Function to call when event is emitted
512
+ * @param filter Optional filter for indexed parameters
513
+ * @returns Unwatch function to stop listening
514
+ */
515
+ Approval: (callback: (event: {
516
+ owner: `0x${string}`;
517
+ spender: `0x${string}`;
518
+ value: bigint;
519
+ }) => void, filter?: {
520
+ owner?: `0x${string}` | `0x${string}`[] | null;
521
+ spender?: `0x${string}` | `0x${string}`[] | null;
522
+ }) => () => void;
523
+ /**
524
+ * Watch Transfer events
525
+ * @param callback Function to call when event is emitted
526
+ * @param filter Optional filter for indexed parameters
527
+ * @returns Unwatch function to stop listening
528
+ */
529
+ Transfer: (callback: (event: {
530
+ from: `0x${string}`;
531
+ to: `0x${string}`;
532
+ value: bigint;
533
+ }) => void, filter?: {
534
+ from?: `0x${string}` | `0x${string}`[] | null;
535
+ to?: `0x${string}` | `0x${string}`[] | null;
536
+ }) => () => void;
537
+ };
538
+ }