@gitmyabi/teikhosbounty 1.0.4 → 1.0.5

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.
@@ -1,364 +0,0 @@
1
- import type { Address, PublicClient, WalletClient } from 'viem';
2
- /**
3
- * TeikhosBounty_json ABI
4
- *
5
- * This ABI is typed using viem's type system for full type safety.
6
- */
7
- export declare const TeikhosBounty_jsonAbi: readonly [{
8
- readonly constant: false;
9
- readonly inputs: readonly [];
10
- readonly name: "reward";
11
- readonly outputs: readonly [];
12
- readonly payable: false;
13
- readonly stateMutability: "nonpayable";
14
- readonly type: "function";
15
- }, {
16
- readonly constant: true;
17
- readonly inputs: readonly [];
18
- readonly name: "isSolved";
19
- readonly outputs: readonly [{
20
- readonly name: "timestamp";
21
- readonly type: "uint256";
22
- }, {
23
- readonly name: "publicKey";
24
- readonly type: "bytes";
25
- }, {
26
- readonly name: "msgHash";
27
- readonly type: "bytes32";
28
- }];
29
- readonly payable: false;
30
- readonly stateMutability: "view";
31
- readonly type: "function";
32
- }, {
33
- readonly constant: false;
34
- readonly inputs: readonly [{
35
- readonly name: "_signature";
36
- readonly type: "bytes";
37
- }];
38
- readonly name: "commit";
39
- readonly outputs: readonly [];
40
- readonly payable: false;
41
- readonly stateMutability: "nonpayable";
42
- readonly type: "function";
43
- }, {
44
- readonly constant: true;
45
- readonly inputs: readonly [];
46
- readonly name: "sha3_512";
47
- readonly outputs: readonly [{
48
- readonly name: "";
49
- readonly type: "address";
50
- }];
51
- readonly payable: false;
52
- readonly stateMutability: "view";
53
- readonly type: "function";
54
- }, {
55
- readonly constant: false;
56
- readonly inputs: readonly [];
57
- readonly name: "reveal";
58
- readonly outputs: readonly [{
59
- readonly name: "success";
60
- readonly type: "bool";
61
- }];
62
- readonly payable: false;
63
- readonly stateMutability: "nonpayable";
64
- readonly type: "function";
65
- }, {
66
- readonly constant: true;
67
- readonly inputs: readonly [];
68
- readonly name: "proof_of_public_key";
69
- readonly outputs: readonly [{
70
- readonly name: "half1";
71
- readonly type: "bytes32";
72
- }, {
73
- readonly name: "half2";
74
- readonly type: "bytes32";
75
- }];
76
- readonly payable: false;
77
- readonly stateMutability: "view";
78
- readonly type: "function";
79
- }, {
80
- readonly constant: true;
81
- readonly inputs: readonly [{
82
- readonly name: "";
83
- readonly type: "address";
84
- }];
85
- readonly name: "commitment";
86
- readonly outputs: readonly [{
87
- readonly name: "timestamp";
88
- readonly type: "uint256";
89
- }, {
90
- readonly name: "signature";
91
- readonly type: "bytes";
92
- }];
93
- readonly payable: false;
94
- readonly stateMutability: "view";
95
- readonly type: "function";
96
- }, {
97
- readonly constant: true;
98
- readonly inputs: readonly [];
99
- readonly name: "winner";
100
- readonly outputs: readonly [{
101
- readonly name: "timestamp";
102
- readonly type: "uint256";
103
- }, {
104
- readonly name: "winner";
105
- readonly type: "address";
106
- }];
107
- readonly payable: false;
108
- readonly stateMutability: "view";
109
- readonly type: "function";
110
- }, {
111
- readonly constant: false;
112
- readonly inputs: readonly [{
113
- readonly name: "_publicKey";
114
- readonly type: "bytes";
115
- }];
116
- readonly name: "authenticate";
117
- readonly outputs: readonly [];
118
- readonly payable: false;
119
- readonly stateMutability: "nonpayable";
120
- readonly type: "function";
121
- }, {
122
- readonly inputs: readonly [];
123
- readonly payable: false;
124
- readonly stateMutability: "nonpayable";
125
- readonly type: "constructor";
126
- }, {
127
- readonly payable: true;
128
- readonly stateMutability: "payable";
129
- readonly type: "fallback";
130
- }];
131
- /**
132
- * Type-safe ABI for TeikhosBounty_json
133
- */
134
- export type TeikhosBounty_jsonAbi = typeof TeikhosBounty_jsonAbi;
135
- /**
136
- * Contract instance type for TeikhosBounty_json
137
- */
138
- export type TeikhosBounty_jsonContract = any;
139
- /**
140
- * TeikhosBounty_json Contract Class
141
- *
142
- * Provides a class-based API similar to TypeChain for interacting with the contract.
143
- *
144
- * @example
145
- * ```typescript
146
- * import { createPublicClient, createWalletClient, http } from 'viem';
147
- * import { mainnet } from 'viem/chains';
148
- * import { TeikhosBounty_json } from 'TeikhosBounty_json';
149
- *
150
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
151
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
152
- *
153
- * const contract = new TeikhosBounty_json('0x...', { publicClient, walletClient });
154
- *
155
- * // Read functions
156
- * const result = await contract.balanceOf('0x...');
157
- *
158
- * // Write functions
159
- * const hash = await contract.transfer('0x...', 1000n);
160
- *
161
- * // Simulate transactions (dry-run)
162
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
163
- * console.log('Gas estimate:', simulation.request.gas);
164
- *
165
- * // Watch events
166
- * const unwatch = contract.watch.Transfer((event) => {
167
- * console.log('Transfer event:', event);
168
- * });
169
- * ```
170
- */
171
- export declare class TeikhosBounty_json {
172
- private contract;
173
- private contractAddress;
174
- private publicClient;
175
- constructor(address: Address, clients: {
176
- publicClient: PublicClient;
177
- walletClient?: WalletClient;
178
- });
179
- /**
180
- * Get the contract address
181
- */
182
- get address(): Address;
183
- /**
184
- * Get the underlying viem contract instance
185
- */
186
- getContract(): TeikhosBounty_jsonContract;
187
- /**
188
- * isSolved
189
- * view
190
- */
191
- isSolved(): Promise<[bigint, `0x${string}`, `0x${string}`]>;
192
- /**
193
- * sha3_512
194
- * view
195
- */
196
- sha3_512(): Promise<`0x${string}`>;
197
- /**
198
- * proof_of_public_key
199
- * view
200
- */
201
- proof_of_public_key(): Promise<[`0x${string}`, `0x${string}`]>;
202
- /**
203
- * commitment
204
- * view
205
- */
206
- commitment(arg0: `0x${string}`): Promise<[bigint, `0x${string}`]>;
207
- /**
208
- * winner
209
- * view
210
- */
211
- winner(): Promise<[bigint, `0x${string}`]>;
212
- /**
213
- * reward
214
- * nonpayable
215
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
216
- */
217
- reward(options?: {
218
- accessList?: import('viem').AccessList;
219
- authorizationList?: import('viem').AuthorizationList;
220
- chain?: import('viem').Chain | null;
221
- dataSuffix?: `0x${string}`;
222
- gas?: bigint;
223
- gasPrice?: bigint;
224
- maxFeePerGas?: bigint;
225
- maxPriorityFeePerGas?: bigint;
226
- nonce?: number;
227
- value?: bigint;
228
- }): Promise<`0x${string}`>;
229
- /**
230
- * commit
231
- * nonpayable
232
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
233
- */
234
- commit(_signature: `0x${string}`, options?: {
235
- accessList?: import('viem').AccessList;
236
- authorizationList?: import('viem').AuthorizationList;
237
- chain?: import('viem').Chain | null;
238
- dataSuffix?: `0x${string}`;
239
- gas?: bigint;
240
- gasPrice?: bigint;
241
- maxFeePerGas?: bigint;
242
- maxPriorityFeePerGas?: bigint;
243
- nonce?: number;
244
- value?: bigint;
245
- }): Promise<`0x${string}`>;
246
- /**
247
- * reveal
248
- * nonpayable
249
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
250
- */
251
- reveal(options?: {
252
- accessList?: import('viem').AccessList;
253
- authorizationList?: import('viem').AuthorizationList;
254
- chain?: import('viem').Chain | null;
255
- dataSuffix?: `0x${string}`;
256
- gas?: bigint;
257
- gasPrice?: bigint;
258
- maxFeePerGas?: bigint;
259
- maxPriorityFeePerGas?: bigint;
260
- nonce?: number;
261
- value?: bigint;
262
- }): Promise<`0x${string}`>;
263
- /**
264
- * authenticate
265
- * nonpayable
266
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
267
- */
268
- authenticate(_publicKey: `0x${string}`, options?: {
269
- accessList?: import('viem').AccessList;
270
- authorizationList?: import('viem').AuthorizationList;
271
- chain?: import('viem').Chain | null;
272
- dataSuffix?: `0x${string}`;
273
- gas?: bigint;
274
- gasPrice?: bigint;
275
- maxFeePerGas?: bigint;
276
- maxPriorityFeePerGas?: bigint;
277
- nonce?: number;
278
- value?: bigint;
279
- }): Promise<`0x${string}`>;
280
- /**
281
- * Simulate contract write operations (dry-run without sending transaction)
282
- *
283
- * @example
284
- * const result = await contract.simulate.transfer('0x...', 1000n);
285
- * console.log('Gas estimate:', result.request.gas);
286
- * console.log('Would succeed:', result.result);
287
- */
288
- get simulate(): {
289
- /**
290
- * Simulate reward
291
- * Returns gas estimate and result without sending transaction
292
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
293
- */
294
- reward(options?: {
295
- accessList?: import("viem").AccessList;
296
- authorizationList?: import("viem").AuthorizationList;
297
- chain?: import("viem").Chain | null;
298
- dataSuffix?: `0x${string}`;
299
- gas?: bigint;
300
- gasPrice?: bigint;
301
- maxFeePerGas?: bigint;
302
- maxPriorityFeePerGas?: bigint;
303
- nonce?: number;
304
- value?: bigint;
305
- }): Promise<void>;
306
- /**
307
- * Simulate commit
308
- * Returns gas estimate and result without sending transaction
309
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
310
- */
311
- commit(_signature: `0x${string}`, options?: {
312
- accessList?: import("viem").AccessList;
313
- authorizationList?: import("viem").AuthorizationList;
314
- chain?: import("viem").Chain | null;
315
- dataSuffix?: `0x${string}`;
316
- gas?: bigint;
317
- gasPrice?: bigint;
318
- maxFeePerGas?: bigint;
319
- maxPriorityFeePerGas?: bigint;
320
- nonce?: number;
321
- value?: bigint;
322
- }): Promise<void>;
323
- /**
324
- * Simulate reveal
325
- * Returns gas estimate and result without sending transaction
326
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
327
- */
328
- reveal(options?: {
329
- accessList?: import("viem").AccessList;
330
- authorizationList?: import("viem").AuthorizationList;
331
- chain?: import("viem").Chain | null;
332
- dataSuffix?: `0x${string}`;
333
- gas?: bigint;
334
- gasPrice?: bigint;
335
- maxFeePerGas?: bigint;
336
- maxPriorityFeePerGas?: bigint;
337
- nonce?: number;
338
- value?: bigint;
339
- }): Promise<boolean>;
340
- /**
341
- * Simulate authenticate
342
- * Returns gas estimate and result without sending transaction
343
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
344
- */
345
- authenticate(_publicKey: `0x${string}`, options?: {
346
- accessList?: import("viem").AccessList;
347
- authorizationList?: import("viem").AuthorizationList;
348
- chain?: import("viem").Chain | null;
349
- dataSuffix?: `0x${string}`;
350
- gas?: bigint;
351
- gasPrice?: bigint;
352
- maxFeePerGas?: bigint;
353
- maxPriorityFeePerGas?: bigint;
354
- nonce?: number;
355
- value?: bigint;
356
- }): Promise<void>;
357
- };
358
- /**
359
- * Watch contract events
360
- *
361
- * Note: This contract has no events, so watch returns an empty object.
362
- */
363
- get watch(): {};
364
- }