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