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