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