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