@gitmyabi/teikhosbounty 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 ADDED
@@ -0,0 +1,108 @@
1
+ # @gitmyabi/teikhosbounty
2
+
3
+ Auto-generated TypeScript type bindings for **TeikhosBounty**
4
+
5
+ - **Build ID**: `etherscan-teikhosbounty-d7c6d542-1785207543796`
6
+ - **Build Number**: 1
7
+ - **Commit**: `679a5bb`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/teikhosbounty@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/teikhosbounty';
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/teikhosbounty';
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/teikhosbounty';
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,129 @@
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: "_publicKey";
11
+ readonly type: "bytes";
12
+ }];
13
+ readonly name: "authenticate";
14
+ readonly outputs: readonly [];
15
+ readonly payable: false;
16
+ readonly stateMutability: "nonpayable";
17
+ readonly type: "function";
18
+ }, {
19
+ readonly payable: true;
20
+ readonly stateMutability: "payable";
21
+ readonly type: "fallback";
22
+ }];
23
+ /**
24
+ * Type-safe ABI for TeikhosBounty_json
25
+ */
26
+ export type TeikhosBounty_jsonAbi = typeof TeikhosBounty_jsonAbi;
27
+ /**
28
+ * Contract instance type for TeikhosBounty_json
29
+ */
30
+ export type TeikhosBounty_jsonContract = any;
31
+ /**
32
+ * TeikhosBounty_json Contract Class
33
+ *
34
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * import { createPublicClient, createWalletClient, http } from 'viem';
39
+ * import { mainnet } from 'viem/chains';
40
+ * import { TeikhosBounty_json } from 'TeikhosBounty_json';
41
+ *
42
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
43
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
44
+ *
45
+ * const contract = new TeikhosBounty_json('0x...', { publicClient, walletClient });
46
+ *
47
+ * // Read functions
48
+ * const result = await contract.balanceOf('0x...');
49
+ *
50
+ * // Write functions
51
+ * const hash = await contract.transfer('0x...', 1000n);
52
+ *
53
+ * // Simulate transactions (dry-run)
54
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
55
+ * console.log('Gas estimate:', simulation.request.gas);
56
+ *
57
+ * // Watch events
58
+ * const unwatch = contract.watch.Transfer((event) => {
59
+ * console.log('Transfer event:', event);
60
+ * });
61
+ * ```
62
+ */
63
+ export declare class TeikhosBounty_json {
64
+ private contract;
65
+ private contractAddress;
66
+ private publicClient;
67
+ constructor(address: Address, clients: {
68
+ publicClient: PublicClient;
69
+ walletClient?: WalletClient;
70
+ });
71
+ /**
72
+ * Get the contract address
73
+ */
74
+ get address(): Address;
75
+ /**
76
+ * Get the underlying viem contract instance
77
+ */
78
+ getContract(): TeikhosBounty_jsonContract;
79
+ /**
80
+ * authenticate
81
+ * nonpayable
82
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
83
+ */
84
+ authenticate(_publicKey: `0x${string}`, options?: {
85
+ accessList?: import('viem').AccessList;
86
+ authorizationList?: import('viem').AuthorizationList;
87
+ chain?: import('viem').Chain | null;
88
+ dataSuffix?: `0x${string}`;
89
+ gas?: bigint;
90
+ gasPrice?: bigint;
91
+ maxFeePerGas?: bigint;
92
+ maxPriorityFeePerGas?: bigint;
93
+ nonce?: number;
94
+ value?: bigint;
95
+ }): Promise<`0x${string}`>;
96
+ /**
97
+ * Simulate contract write operations (dry-run without sending transaction)
98
+ *
99
+ * @example
100
+ * const result = await contract.simulate.transfer('0x...', 1000n);
101
+ * console.log('Gas estimate:', result.request.gas);
102
+ * console.log('Would succeed:', result.result);
103
+ */
104
+ get simulate(): {
105
+ /**
106
+ * Simulate authenticate
107
+ * Returns gas estimate and result without sending transaction
108
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
109
+ */
110
+ authenticate(_publicKey: `0x${string}`, options?: {
111
+ accessList?: import("viem").AccessList;
112
+ authorizationList?: import("viem").AuthorizationList;
113
+ chain?: import("viem").Chain | null;
114
+ dataSuffix?: `0x${string}`;
115
+ gas?: bigint;
116
+ gasPrice?: bigint;
117
+ maxFeePerGas?: bigint;
118
+ maxPriorityFeePerGas?: bigint;
119
+ nonce?: number;
120
+ value?: bigint;
121
+ }): Promise<void>;
122
+ };
123
+ /**
124
+ * Watch contract events
125
+ *
126
+ * Note: This contract has no events, so watch returns an empty object.
127
+ */
128
+ get watch(): {};
129
+ }
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeikhosBounty_json = exports.TeikhosBounty_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * TeikhosBounty_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.TeikhosBounty_jsonAbi = [
11
+ {
12
+ "constant": false,
13
+ "inputs": [
14
+ {
15
+ "name": "_publicKey",
16
+ "type": "bytes"
17
+ }
18
+ ],
19
+ "name": "authenticate",
20
+ "outputs": [],
21
+ "payable": false,
22
+ "stateMutability": "nonpayable",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "payable": true,
27
+ "stateMutability": "payable",
28
+ "type": "fallback"
29
+ }
30
+ ];
31
+ /**
32
+ * TeikhosBounty_json Contract Class
33
+ *
34
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * import { createPublicClient, createWalletClient, http } from 'viem';
39
+ * import { mainnet } from 'viem/chains';
40
+ * import { TeikhosBounty_json } from 'TeikhosBounty_json';
41
+ *
42
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
43
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
44
+ *
45
+ * const contract = new TeikhosBounty_json('0x...', { publicClient, walletClient });
46
+ *
47
+ * // Read functions
48
+ * const result = await contract.balanceOf('0x...');
49
+ *
50
+ * // Write functions
51
+ * const hash = await contract.transfer('0x...', 1000n);
52
+ *
53
+ * // Simulate transactions (dry-run)
54
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
55
+ * console.log('Gas estimate:', simulation.request.gas);
56
+ *
57
+ * // Watch events
58
+ * const unwatch = contract.watch.Transfer((event) => {
59
+ * console.log('Transfer event:', event);
60
+ * });
61
+ * ```
62
+ */
63
+ class TeikhosBounty_json {
64
+ constructor(address, clients) {
65
+ this.contractAddress = address;
66
+ this.publicClient = clients.publicClient;
67
+ this.contract = (0, viem_1.getContract)({
68
+ address,
69
+ abi: exports.TeikhosBounty_jsonAbi,
70
+ client: {
71
+ public: clients.publicClient,
72
+ wallet: clients.walletClient,
73
+ },
74
+ });
75
+ }
76
+ /**
77
+ * Get the contract address
78
+ */
79
+ get address() {
80
+ return this.contractAddress;
81
+ }
82
+ /**
83
+ * Get the underlying viem contract instance
84
+ */
85
+ getContract() {
86
+ return this.contract;
87
+ }
88
+ // No read functions
89
+ /**
90
+ * authenticate
91
+ * nonpayable
92
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
93
+ */
94
+ async authenticate(_publicKey, options) {
95
+ if (!this.contract.write) {
96
+ throw new Error('Wallet client is required for write operations');
97
+ }
98
+ return this.contract.write.authenticate([_publicKey], options);
99
+ }
100
+ /**
101
+ * Simulate contract write operations (dry-run without sending transaction)
102
+ *
103
+ * @example
104
+ * const result = await contract.simulate.transfer('0x...', 1000n);
105
+ * console.log('Gas estimate:', result.request.gas);
106
+ * console.log('Would succeed:', result.result);
107
+ */
108
+ get simulate() {
109
+ const contract = this.contract;
110
+ if (!contract.simulate) {
111
+ throw new Error('Public client is required for simulation');
112
+ }
113
+ return {
114
+ /**
115
+ * Simulate authenticate
116
+ * Returns gas estimate and result without sending transaction
117
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
118
+ */
119
+ async authenticate(_publicKey, options) {
120
+ return contract.simulate.authenticate([_publicKey], options);
121
+ }
122
+ };
123
+ }
124
+ /**
125
+ * Watch contract events
126
+ *
127
+ * Note: This contract has no events, so watch returns an empty object.
128
+ */
129
+ get watch() {
130
+ return {};
131
+ }
132
+ }
133
+ exports.TeikhosBounty_json = TeikhosBounty_json;
@@ -0,0 +1,184 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * TeikhosBounty_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const TeikhosBounty_jsonAbi = [
10
+ {
11
+ "constant": false,
12
+ "inputs": [
13
+ {
14
+ "name": "_publicKey",
15
+ "type": "bytes"
16
+ }
17
+ ],
18
+ "name": "authenticate",
19
+ "outputs": [],
20
+ "payable": false,
21
+ "stateMutability": "nonpayable",
22
+ "type": "function"
23
+ },
24
+ {
25
+ "payable": true,
26
+ "stateMutability": "payable",
27
+ "type": "fallback"
28
+ }
29
+ ] as const satisfies Abi;
30
+
31
+ /**
32
+ * Type-safe ABI for TeikhosBounty_json
33
+ */
34
+ export type TeikhosBounty_jsonAbi = typeof TeikhosBounty_jsonAbi;
35
+
36
+ /**
37
+ * Contract instance type for TeikhosBounty_json
38
+ */
39
+ // Use any for contract type to avoid complex viem type issues
40
+ // The runtime behavior is type-safe through viem's ABI typing
41
+ export type TeikhosBounty_jsonContract = any;
42
+
43
+ /**
44
+ * TeikhosBounty_json Contract Class
45
+ *
46
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { createPublicClient, createWalletClient, http } from 'viem';
51
+ * import { mainnet } from 'viem/chains';
52
+ * import { TeikhosBounty_json } from 'TeikhosBounty_json';
53
+ *
54
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
55
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
56
+ *
57
+ * const contract = new TeikhosBounty_json('0x...', { publicClient, walletClient });
58
+ *
59
+ * // Read functions
60
+ * const result = await contract.balanceOf('0x...');
61
+ *
62
+ * // Write functions
63
+ * const hash = await contract.transfer('0x...', 1000n);
64
+ *
65
+ * // Simulate transactions (dry-run)
66
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
67
+ * console.log('Gas estimate:', simulation.request.gas);
68
+ *
69
+ * // Watch events
70
+ * const unwatch = contract.watch.Transfer((event) => {
71
+ * console.log('Transfer event:', event);
72
+ * });
73
+ * ```
74
+ */
75
+ export class TeikhosBounty_json {
76
+ private contract: TeikhosBounty_jsonContract;
77
+ private contractAddress: Address;
78
+ private publicClient: PublicClient;
79
+
80
+ constructor(
81
+ address: Address,
82
+ clients: {
83
+ publicClient: PublicClient;
84
+ walletClient?: WalletClient;
85
+ }
86
+ ) {
87
+ this.contractAddress = address;
88
+ this.publicClient = clients.publicClient;
89
+ this.contract = getContract({
90
+ address,
91
+ abi: TeikhosBounty_jsonAbi,
92
+ client: {
93
+ public: clients.publicClient,
94
+ wallet: clients.walletClient,
95
+ },
96
+ });
97
+ }
98
+
99
+ /**
100
+ * Get the contract address
101
+ */
102
+ get address(): Address {
103
+ return this.contractAddress;
104
+ }
105
+
106
+ /**
107
+ * Get the underlying viem contract instance
108
+ */
109
+ getContract(): TeikhosBounty_jsonContract {
110
+ return this.contract;
111
+ }
112
+
113
+ // No read functions
114
+
115
+ /**
116
+ * authenticate
117
+ * nonpayable
118
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
119
+ */
120
+ async authenticate(_publicKey: `0x${string}`, options?: {
121
+ accessList?: import('viem').AccessList;
122
+ authorizationList?: import('viem').AuthorizationList;
123
+ chain?: import('viem').Chain | null;
124
+ dataSuffix?: `0x${string}`;
125
+ gas?: bigint;
126
+ gasPrice?: bigint;
127
+ maxFeePerGas?: bigint;
128
+ maxPriorityFeePerGas?: bigint;
129
+ nonce?: number;
130
+ value?: bigint;
131
+ }): Promise<`0x${string}`> {
132
+ if (!this.contract.write) {
133
+ throw new Error('Wallet client is required for write operations');
134
+ }
135
+ return this.contract.write.authenticate([_publicKey] as const, options) as Promise<`0x${string}`>;
136
+ }
137
+
138
+
139
+
140
+ /**
141
+ * Simulate contract write operations (dry-run without sending transaction)
142
+ *
143
+ * @example
144
+ * const result = await contract.simulate.transfer('0x...', 1000n);
145
+ * console.log('Gas estimate:', result.request.gas);
146
+ * console.log('Would succeed:', result.result);
147
+ */
148
+ get simulate() {
149
+ const contract = this.contract;
150
+ if (!contract.simulate) {
151
+ throw new Error('Public client is required for simulation');
152
+ }
153
+ return {
154
+ /**
155
+ * Simulate authenticate
156
+ * Returns gas estimate and result without sending transaction
157
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
158
+ */
159
+ async authenticate(_publicKey: `0x${string}`, options?: {
160
+ accessList?: import('viem').AccessList;
161
+ authorizationList?: import('viem').AuthorizationList;
162
+ chain?: import('viem').Chain | null;
163
+ dataSuffix?: `0x${string}`;
164
+ gas?: bigint;
165
+ gasPrice?: bigint;
166
+ maxFeePerGas?: bigint;
167
+ maxPriorityFeePerGas?: bigint;
168
+ nonce?: number;
169
+ value?: bigint;
170
+ }): Promise<void> {
171
+ return contract.simulate.authenticate([_publicKey] as const, options) as Promise<void>;
172
+ }
173
+ };
174
+ }
175
+
176
+ /**
177
+ * Watch contract events
178
+ *
179
+ * Note: This contract has no events, so watch returns an empty object.
180
+ */
181
+ get watch() {
182
+ return {};
183
+ }
184
+ }
@@ -0,0 +1,2 @@
1
+ export { TeikhosBounty_jsonAbi, TeikhosBounty_json } from './TeikhosBounty_json';
2
+ export type { TeikhosBounty_jsonAbi as TeikhosBounty_jsonAbiType, TeikhosBounty_jsonContract } from './TeikhosBounty_json';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeikhosBounty_json = exports.TeikhosBounty_jsonAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var TeikhosBounty_json_1 = require("./TeikhosBounty_json");
6
+ Object.defineProperty(exports, "TeikhosBounty_jsonAbi", { enumerable: true, get: function () { return TeikhosBounty_json_1.TeikhosBounty_jsonAbi; } });
7
+ Object.defineProperty(exports, "TeikhosBounty_json", { enumerable: true, get: function () { return TeikhosBounty_json_1.TeikhosBounty_json; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { TeikhosBounty_jsonAbi, TeikhosBounty_json } from './TeikhosBounty_json';
3
+ export type { TeikhosBounty_jsonAbi as TeikhosBounty_jsonAbiType, TeikhosBounty_jsonContract } from './TeikhosBounty_json';
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './contracts';
package/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // Auto-generated TypeScript type bindings
3
+ // This file exports all generated contract types
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./contracts"), exports);
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@gitmyabi/teikhosbounty",
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for TeikhosBounty (build etherscan-teikhosbounty-d7c6d542-1785207543796, commit 679a5bb, branch etherscan)",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./index.js",
10
+ "require": "./index.js",
11
+ "types": "./index.d.ts"
12
+ },
13
+ "./contracts": {
14
+ "import": "./contracts/index.js",
15
+ "require": "./contracts/index.js",
16
+ "types": "./contracts/index.d.ts"
17
+ }
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "index.d.ts",
22
+ "contracts"
23
+ ],
24
+ "keywords": [
25
+ "ethereum",
26
+ "smart-contracts",
27
+ "viem",
28
+ "wagmi",
29
+ "typescript",
30
+ "abi",
31
+ "ethers-v6"
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "viem": "^2.0.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/etherscan/teikhosbounty"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "679a5bb"
43
+ }