@cofhe/mock-contracts 0.3.1 → 0.3.2
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/CHANGELOG.md +11 -0
- package/contracts/MockTaskManager.sol +31 -33
- package/dist/index.d.mts +988 -1
- package/dist/index.d.ts +988 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -4
- package/src/MockTaskManager.ts +1 -1
- package/src/MockThresholdNetwork.ts +1 -1
- package/src/MockZkVerifier.ts +1 -1
- package/src/index.ts +1 -0
- package/src/typechain-types/MockACL.ts +382 -0
- package/src/typechain-types/MockTaskManager.ts +565 -0
- package/src/typechain-types/MockThresholdNetwork.ts +247 -0
- package/src/typechain-types/MockZkVerifier.ts +205 -0
- package/src/typechain-types/TestBed.ts +172 -0
- package/src/typechain-types/common.ts +92 -0
- package/src/typechain-types/index.ts +8 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumberish,
|
|
7
|
+
BytesLike,
|
|
8
|
+
FunctionFragment,
|
|
9
|
+
Result,
|
|
10
|
+
Interface,
|
|
11
|
+
AddressLike,
|
|
12
|
+
ContractRunner,
|
|
13
|
+
ContractMethod,
|
|
14
|
+
Listener,
|
|
15
|
+
} from 'ethers';
|
|
16
|
+
import type {
|
|
17
|
+
TypedContractEvent,
|
|
18
|
+
TypedDeferredTopicFilter,
|
|
19
|
+
TypedEventLog,
|
|
20
|
+
TypedListener,
|
|
21
|
+
TypedContractMethod,
|
|
22
|
+
} from './common';
|
|
23
|
+
|
|
24
|
+
export type PermissionStruct = {
|
|
25
|
+
issuer: AddressLike;
|
|
26
|
+
expiration: BigNumberish;
|
|
27
|
+
recipient: AddressLike;
|
|
28
|
+
validatorId: BigNumberish;
|
|
29
|
+
validatorContract: AddressLike;
|
|
30
|
+
sealingKey: BytesLike;
|
|
31
|
+
issuerSignature: BytesLike;
|
|
32
|
+
recipientSignature: BytesLike;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type PermissionStructOutput = [
|
|
36
|
+
issuer: string,
|
|
37
|
+
expiration: bigint,
|
|
38
|
+
recipient: string,
|
|
39
|
+
validatorId: bigint,
|
|
40
|
+
validatorContract: string,
|
|
41
|
+
sealingKey: string,
|
|
42
|
+
issuerSignature: string,
|
|
43
|
+
recipientSignature: string,
|
|
44
|
+
] & {
|
|
45
|
+
issuer: string;
|
|
46
|
+
expiration: bigint;
|
|
47
|
+
recipient: string;
|
|
48
|
+
validatorId: bigint;
|
|
49
|
+
validatorContract: string;
|
|
50
|
+
sealingKey: string;
|
|
51
|
+
issuerSignature: string;
|
|
52
|
+
recipientSignature: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export interface MockThresholdNetworkInterface extends Interface {
|
|
56
|
+
getFunction(
|
|
57
|
+
nameOrSignature:
|
|
58
|
+
| 'decodeLowLevelReversion'
|
|
59
|
+
| 'decryptForTxWithPermit'
|
|
60
|
+
| 'decryptForTxWithoutPermit'
|
|
61
|
+
| 'exists'
|
|
62
|
+
| 'initialize'
|
|
63
|
+
| 'mockAcl'
|
|
64
|
+
| 'mockQueryDecrypt'
|
|
65
|
+
| 'mockTaskManager'
|
|
66
|
+
| 'queryDecrypt'
|
|
67
|
+
| 'querySealOutput'
|
|
68
|
+
| 'seal'
|
|
69
|
+
| 'unseal'
|
|
70
|
+
): FunctionFragment;
|
|
71
|
+
|
|
72
|
+
encodeFunctionData(functionFragment: 'decodeLowLevelReversion', values: [BytesLike]): string;
|
|
73
|
+
encodeFunctionData(functionFragment: 'decryptForTxWithPermit', values: [BigNumberish, PermissionStruct]): string;
|
|
74
|
+
encodeFunctionData(functionFragment: 'decryptForTxWithoutPermit', values: [BigNumberish]): string;
|
|
75
|
+
encodeFunctionData(functionFragment: 'exists', values?: undefined): string;
|
|
76
|
+
encodeFunctionData(functionFragment: 'initialize', values: [AddressLike, AddressLike]): string;
|
|
77
|
+
encodeFunctionData(functionFragment: 'mockAcl', values?: undefined): string;
|
|
78
|
+
encodeFunctionData(functionFragment: 'mockQueryDecrypt', values: [BigNumberish, BigNumberish, AddressLike]): string;
|
|
79
|
+
encodeFunctionData(functionFragment: 'mockTaskManager', values?: undefined): string;
|
|
80
|
+
encodeFunctionData(functionFragment: 'queryDecrypt', values: [BigNumberish, BigNumberish, PermissionStruct]): string;
|
|
81
|
+
encodeFunctionData(
|
|
82
|
+
functionFragment: 'querySealOutput',
|
|
83
|
+
values: [BigNumberish, BigNumberish, PermissionStruct]
|
|
84
|
+
): string;
|
|
85
|
+
encodeFunctionData(functionFragment: 'seal', values: [BigNumberish, BytesLike]): string;
|
|
86
|
+
encodeFunctionData(functionFragment: 'unseal', values: [BytesLike, BytesLike]): string;
|
|
87
|
+
|
|
88
|
+
decodeFunctionResult(functionFragment: 'decodeLowLevelReversion', data: BytesLike): Result;
|
|
89
|
+
decodeFunctionResult(functionFragment: 'decryptForTxWithPermit', data: BytesLike): Result;
|
|
90
|
+
decodeFunctionResult(functionFragment: 'decryptForTxWithoutPermit', data: BytesLike): Result;
|
|
91
|
+
decodeFunctionResult(functionFragment: 'exists', data: BytesLike): Result;
|
|
92
|
+
decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result;
|
|
93
|
+
decodeFunctionResult(functionFragment: 'mockAcl', data: BytesLike): Result;
|
|
94
|
+
decodeFunctionResult(functionFragment: 'mockQueryDecrypt', data: BytesLike): Result;
|
|
95
|
+
decodeFunctionResult(functionFragment: 'mockTaskManager', data: BytesLike): Result;
|
|
96
|
+
decodeFunctionResult(functionFragment: 'queryDecrypt', data: BytesLike): Result;
|
|
97
|
+
decodeFunctionResult(functionFragment: 'querySealOutput', data: BytesLike): Result;
|
|
98
|
+
decodeFunctionResult(functionFragment: 'seal', data: BytesLike): Result;
|
|
99
|
+
decodeFunctionResult(functionFragment: 'unseal', data: BytesLike): Result;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface MockThresholdNetwork extends BaseContract {
|
|
103
|
+
connect(runner?: ContractRunner | null): MockThresholdNetwork;
|
|
104
|
+
waitForDeployment(): Promise<this>;
|
|
105
|
+
|
|
106
|
+
interface: MockThresholdNetworkInterface;
|
|
107
|
+
|
|
108
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
109
|
+
event: TCEvent,
|
|
110
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
111
|
+
toBlock?: string | number | undefined
|
|
112
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
113
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
114
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
115
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
116
|
+
toBlock?: string | number | undefined
|
|
117
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
118
|
+
|
|
119
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
120
|
+
on<TCEvent extends TypedContractEvent>(
|
|
121
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
122
|
+
listener: TypedListener<TCEvent>
|
|
123
|
+
): Promise<this>;
|
|
124
|
+
|
|
125
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
126
|
+
once<TCEvent extends TypedContractEvent>(
|
|
127
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
128
|
+
listener: TypedListener<TCEvent>
|
|
129
|
+
): Promise<this>;
|
|
130
|
+
|
|
131
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
132
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
133
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
134
|
+
|
|
135
|
+
decodeLowLevelReversion: TypedContractMethod<[data: BytesLike], [string], 'view'>;
|
|
136
|
+
|
|
137
|
+
decryptForTxWithPermit: TypedContractMethod<
|
|
138
|
+
[ctHash: BigNumberish, permission: PermissionStruct],
|
|
139
|
+
[
|
|
140
|
+
[boolean, string, bigint] & {
|
|
141
|
+
allowed: boolean;
|
|
142
|
+
error: string;
|
|
143
|
+
decryptedValue: bigint;
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
'view'
|
|
147
|
+
>;
|
|
148
|
+
|
|
149
|
+
decryptForTxWithoutPermit: TypedContractMethod<
|
|
150
|
+
[ctHash: BigNumberish],
|
|
151
|
+
[
|
|
152
|
+
[boolean, string, bigint] & {
|
|
153
|
+
allowed: boolean;
|
|
154
|
+
error: string;
|
|
155
|
+
decryptedValue: bigint;
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
'view'
|
|
159
|
+
>;
|
|
160
|
+
|
|
161
|
+
exists: TypedContractMethod<[], [boolean], 'view'>;
|
|
162
|
+
|
|
163
|
+
initialize: TypedContractMethod<[_taskManager: AddressLike, _acl: AddressLike], [void], 'nonpayable'>;
|
|
164
|
+
|
|
165
|
+
mockAcl: TypedContractMethod<[], [string], 'view'>;
|
|
166
|
+
|
|
167
|
+
mockQueryDecrypt: TypedContractMethod<
|
|
168
|
+
[ctHash: BigNumberish, arg1: BigNumberish, issuer: AddressLike],
|
|
169
|
+
[[boolean, string, bigint] & { allowed: boolean; error: string }],
|
|
170
|
+
'view'
|
|
171
|
+
>;
|
|
172
|
+
|
|
173
|
+
mockTaskManager: TypedContractMethod<[], [string], 'view'>;
|
|
174
|
+
|
|
175
|
+
queryDecrypt: TypedContractMethod<
|
|
176
|
+
[ctHash: BigNumberish, arg1: BigNumberish, permission: PermissionStruct],
|
|
177
|
+
[[boolean, string, bigint] & { allowed: boolean; error: string }],
|
|
178
|
+
'view'
|
|
179
|
+
>;
|
|
180
|
+
|
|
181
|
+
querySealOutput: TypedContractMethod<
|
|
182
|
+
[ctHash: BigNumberish, arg1: BigNumberish, permission: PermissionStruct],
|
|
183
|
+
[[boolean, string, string] & { allowed: boolean; error: string }],
|
|
184
|
+
'view'
|
|
185
|
+
>;
|
|
186
|
+
|
|
187
|
+
seal: TypedContractMethod<[input: BigNumberish, key: BytesLike], [string], 'view'>;
|
|
188
|
+
|
|
189
|
+
unseal: TypedContractMethod<[hashed: BytesLike, key: BytesLike], [bigint], 'view'>;
|
|
190
|
+
|
|
191
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
192
|
+
|
|
193
|
+
getFunction(nameOrSignature: 'decodeLowLevelReversion'): TypedContractMethod<[data: BytesLike], [string], 'view'>;
|
|
194
|
+
getFunction(nameOrSignature: 'decryptForTxWithPermit'): TypedContractMethod<
|
|
195
|
+
[ctHash: BigNumberish, permission: PermissionStruct],
|
|
196
|
+
[
|
|
197
|
+
[boolean, string, bigint] & {
|
|
198
|
+
allowed: boolean;
|
|
199
|
+
error: string;
|
|
200
|
+
decryptedValue: bigint;
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
'view'
|
|
204
|
+
>;
|
|
205
|
+
getFunction(nameOrSignature: 'decryptForTxWithoutPermit'): TypedContractMethod<
|
|
206
|
+
[ctHash: BigNumberish],
|
|
207
|
+
[
|
|
208
|
+
[boolean, string, bigint] & {
|
|
209
|
+
allowed: boolean;
|
|
210
|
+
error: string;
|
|
211
|
+
decryptedValue: bigint;
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
'view'
|
|
215
|
+
>;
|
|
216
|
+
getFunction(nameOrSignature: 'exists'): TypedContractMethod<[], [boolean], 'view'>;
|
|
217
|
+
getFunction(
|
|
218
|
+
nameOrSignature: 'initialize'
|
|
219
|
+
): TypedContractMethod<[_taskManager: AddressLike, _acl: AddressLike], [void], 'nonpayable'>;
|
|
220
|
+
getFunction(nameOrSignature: 'mockAcl'): TypedContractMethod<[], [string], 'view'>;
|
|
221
|
+
getFunction(
|
|
222
|
+
nameOrSignature: 'mockQueryDecrypt'
|
|
223
|
+
): TypedContractMethod<
|
|
224
|
+
[ctHash: BigNumberish, arg1: BigNumberish, issuer: AddressLike],
|
|
225
|
+
[[boolean, string, bigint] & { allowed: boolean; error: string }],
|
|
226
|
+
'view'
|
|
227
|
+
>;
|
|
228
|
+
getFunction(nameOrSignature: 'mockTaskManager'): TypedContractMethod<[], [string], 'view'>;
|
|
229
|
+
getFunction(
|
|
230
|
+
nameOrSignature: 'queryDecrypt'
|
|
231
|
+
): TypedContractMethod<
|
|
232
|
+
[ctHash: BigNumberish, arg1: BigNumberish, permission: PermissionStruct],
|
|
233
|
+
[[boolean, string, bigint] & { allowed: boolean; error: string }],
|
|
234
|
+
'view'
|
|
235
|
+
>;
|
|
236
|
+
getFunction(
|
|
237
|
+
nameOrSignature: 'querySealOutput'
|
|
238
|
+
): TypedContractMethod<
|
|
239
|
+
[ctHash: BigNumberish, arg1: BigNumberish, permission: PermissionStruct],
|
|
240
|
+
[[boolean, string, string] & { allowed: boolean; error: string }],
|
|
241
|
+
'view'
|
|
242
|
+
>;
|
|
243
|
+
getFunction(nameOrSignature: 'seal'): TypedContractMethod<[input: BigNumberish, key: BytesLike], [string], 'view'>;
|
|
244
|
+
getFunction(nameOrSignature: 'unseal'): TypedContractMethod<[hashed: BytesLike, key: BytesLike], [bigint], 'view'>;
|
|
245
|
+
|
|
246
|
+
filters: {};
|
|
247
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumberish,
|
|
7
|
+
BytesLike,
|
|
8
|
+
FunctionFragment,
|
|
9
|
+
Result,
|
|
10
|
+
Interface,
|
|
11
|
+
AddressLike,
|
|
12
|
+
ContractRunner,
|
|
13
|
+
ContractMethod,
|
|
14
|
+
Listener,
|
|
15
|
+
} from 'ethers';
|
|
16
|
+
import type {
|
|
17
|
+
TypedContractEvent,
|
|
18
|
+
TypedDeferredTopicFilter,
|
|
19
|
+
TypedEventLog,
|
|
20
|
+
TypedListener,
|
|
21
|
+
TypedContractMethod,
|
|
22
|
+
} from './common';
|
|
23
|
+
|
|
24
|
+
export type EncryptedInputStruct = {
|
|
25
|
+
ctHash: BigNumberish;
|
|
26
|
+
securityZone: BigNumberish;
|
|
27
|
+
utype: BigNumberish;
|
|
28
|
+
signature: BytesLike;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type EncryptedInputStructOutput = [ctHash: bigint, securityZone: bigint, utype: bigint, signature: string] & {
|
|
32
|
+
ctHash: bigint;
|
|
33
|
+
securityZone: bigint;
|
|
34
|
+
utype: bigint;
|
|
35
|
+
signature: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export interface MockZkVerifierInterface extends Interface {
|
|
39
|
+
getFunction(
|
|
40
|
+
nameOrSignature:
|
|
41
|
+
| 'exists'
|
|
42
|
+
| 'insertCtHash'
|
|
43
|
+
| 'insertPackedCtHashes'
|
|
44
|
+
| 'zkVerify'
|
|
45
|
+
| 'zkVerifyCalcCtHash'
|
|
46
|
+
| 'zkVerifyCalcCtHashesPacked'
|
|
47
|
+
| 'zkVerifyPacked'
|
|
48
|
+
): FunctionFragment;
|
|
49
|
+
|
|
50
|
+
encodeFunctionData(functionFragment: 'exists', values?: undefined): string;
|
|
51
|
+
encodeFunctionData(functionFragment: 'insertCtHash', values: [BigNumberish, BigNumberish]): string;
|
|
52
|
+
encodeFunctionData(functionFragment: 'insertPackedCtHashes', values: [BigNumberish[], BigNumberish[]]): string;
|
|
53
|
+
encodeFunctionData(
|
|
54
|
+
functionFragment: 'zkVerify',
|
|
55
|
+
values: [BigNumberish, BigNumberish, AddressLike, BigNumberish, BigNumberish]
|
|
56
|
+
): string;
|
|
57
|
+
encodeFunctionData(
|
|
58
|
+
functionFragment: 'zkVerifyCalcCtHash',
|
|
59
|
+
values: [BigNumberish, BigNumberish, AddressLike, BigNumberish, BigNumberish]
|
|
60
|
+
): string;
|
|
61
|
+
encodeFunctionData(
|
|
62
|
+
functionFragment: 'zkVerifyCalcCtHashesPacked',
|
|
63
|
+
values: [BigNumberish[], BigNumberish[], AddressLike, BigNumberish, BigNumberish]
|
|
64
|
+
): string;
|
|
65
|
+
encodeFunctionData(
|
|
66
|
+
functionFragment: 'zkVerifyPacked',
|
|
67
|
+
values: [BigNumberish[], BigNumberish[], AddressLike, BigNumberish, BigNumberish]
|
|
68
|
+
): string;
|
|
69
|
+
|
|
70
|
+
decodeFunctionResult(functionFragment: 'exists', data: BytesLike): Result;
|
|
71
|
+
decodeFunctionResult(functionFragment: 'insertCtHash', data: BytesLike): Result;
|
|
72
|
+
decodeFunctionResult(functionFragment: 'insertPackedCtHashes', data: BytesLike): Result;
|
|
73
|
+
decodeFunctionResult(functionFragment: 'zkVerify', data: BytesLike): Result;
|
|
74
|
+
decodeFunctionResult(functionFragment: 'zkVerifyCalcCtHash', data: BytesLike): Result;
|
|
75
|
+
decodeFunctionResult(functionFragment: 'zkVerifyCalcCtHashesPacked', data: BytesLike): Result;
|
|
76
|
+
decodeFunctionResult(functionFragment: 'zkVerifyPacked', data: BytesLike): Result;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface MockZkVerifier extends BaseContract {
|
|
80
|
+
connect(runner?: ContractRunner | null): MockZkVerifier;
|
|
81
|
+
waitForDeployment(): Promise<this>;
|
|
82
|
+
|
|
83
|
+
interface: MockZkVerifierInterface;
|
|
84
|
+
|
|
85
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
86
|
+
event: TCEvent,
|
|
87
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
88
|
+
toBlock?: string | number | undefined
|
|
89
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
90
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
91
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
92
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
93
|
+
toBlock?: string | number | undefined
|
|
94
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
95
|
+
|
|
96
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
97
|
+
on<TCEvent extends TypedContractEvent>(
|
|
98
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
99
|
+
listener: TypedListener<TCEvent>
|
|
100
|
+
): Promise<this>;
|
|
101
|
+
|
|
102
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
103
|
+
once<TCEvent extends TypedContractEvent>(
|
|
104
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
105
|
+
listener: TypedListener<TCEvent>
|
|
106
|
+
): Promise<this>;
|
|
107
|
+
|
|
108
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
109
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
110
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
111
|
+
|
|
112
|
+
exists: TypedContractMethod<[], [boolean], 'view'>;
|
|
113
|
+
|
|
114
|
+
insertCtHash: TypedContractMethod<[ctHash: BigNumberish, value: BigNumberish], [void], 'nonpayable'>;
|
|
115
|
+
|
|
116
|
+
insertPackedCtHashes: TypedContractMethod<[ctHashes: BigNumberish[], values: BigNumberish[]], [void], 'nonpayable'>;
|
|
117
|
+
|
|
118
|
+
zkVerify: TypedContractMethod<
|
|
119
|
+
[value: BigNumberish, utype: BigNumberish, user: AddressLike, securityZone: BigNumberish, arg4: BigNumberish],
|
|
120
|
+
[EncryptedInputStructOutput],
|
|
121
|
+
'nonpayable'
|
|
122
|
+
>;
|
|
123
|
+
|
|
124
|
+
zkVerifyCalcCtHash: TypedContractMethod<
|
|
125
|
+
[value: BigNumberish, utype: BigNumberish, user: AddressLike, securityZone: BigNumberish, arg4: BigNumberish],
|
|
126
|
+
[bigint],
|
|
127
|
+
'view'
|
|
128
|
+
>;
|
|
129
|
+
|
|
130
|
+
zkVerifyCalcCtHashesPacked: TypedContractMethod<
|
|
131
|
+
[
|
|
132
|
+
values: BigNumberish[],
|
|
133
|
+
utypes: BigNumberish[],
|
|
134
|
+
user: AddressLike,
|
|
135
|
+
securityZone: BigNumberish,
|
|
136
|
+
chainId: BigNumberish,
|
|
137
|
+
],
|
|
138
|
+
[bigint[]],
|
|
139
|
+
'view'
|
|
140
|
+
>;
|
|
141
|
+
|
|
142
|
+
zkVerifyPacked: TypedContractMethod<
|
|
143
|
+
[
|
|
144
|
+
values: BigNumberish[],
|
|
145
|
+
utypes: BigNumberish[],
|
|
146
|
+
user: AddressLike,
|
|
147
|
+
securityZone: BigNumberish,
|
|
148
|
+
chainId: BigNumberish,
|
|
149
|
+
],
|
|
150
|
+
[EncryptedInputStructOutput[]],
|
|
151
|
+
'nonpayable'
|
|
152
|
+
>;
|
|
153
|
+
|
|
154
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
155
|
+
|
|
156
|
+
getFunction(nameOrSignature: 'exists'): TypedContractMethod<[], [boolean], 'view'>;
|
|
157
|
+
getFunction(
|
|
158
|
+
nameOrSignature: 'insertCtHash'
|
|
159
|
+
): TypedContractMethod<[ctHash: BigNumberish, value: BigNumberish], [void], 'nonpayable'>;
|
|
160
|
+
getFunction(
|
|
161
|
+
nameOrSignature: 'insertPackedCtHashes'
|
|
162
|
+
): TypedContractMethod<[ctHashes: BigNumberish[], values: BigNumberish[]], [void], 'nonpayable'>;
|
|
163
|
+
getFunction(
|
|
164
|
+
nameOrSignature: 'zkVerify'
|
|
165
|
+
): TypedContractMethod<
|
|
166
|
+
[value: BigNumberish, utype: BigNumberish, user: AddressLike, securityZone: BigNumberish, arg4: BigNumberish],
|
|
167
|
+
[EncryptedInputStructOutput],
|
|
168
|
+
'nonpayable'
|
|
169
|
+
>;
|
|
170
|
+
getFunction(
|
|
171
|
+
nameOrSignature: 'zkVerifyCalcCtHash'
|
|
172
|
+
): TypedContractMethod<
|
|
173
|
+
[value: BigNumberish, utype: BigNumberish, user: AddressLike, securityZone: BigNumberish, arg4: BigNumberish],
|
|
174
|
+
[bigint],
|
|
175
|
+
'view'
|
|
176
|
+
>;
|
|
177
|
+
getFunction(
|
|
178
|
+
nameOrSignature: 'zkVerifyCalcCtHashesPacked'
|
|
179
|
+
): TypedContractMethod<
|
|
180
|
+
[
|
|
181
|
+
values: BigNumberish[],
|
|
182
|
+
utypes: BigNumberish[],
|
|
183
|
+
user: AddressLike,
|
|
184
|
+
securityZone: BigNumberish,
|
|
185
|
+
chainId: BigNumberish,
|
|
186
|
+
],
|
|
187
|
+
[bigint[]],
|
|
188
|
+
'view'
|
|
189
|
+
>;
|
|
190
|
+
getFunction(
|
|
191
|
+
nameOrSignature: 'zkVerifyPacked'
|
|
192
|
+
): TypedContractMethod<
|
|
193
|
+
[
|
|
194
|
+
values: BigNumberish[],
|
|
195
|
+
utypes: BigNumberish[],
|
|
196
|
+
user: AddressLike,
|
|
197
|
+
securityZone: BigNumberish,
|
|
198
|
+
chainId: BigNumberish,
|
|
199
|
+
],
|
|
200
|
+
[EncryptedInputStructOutput[]],
|
|
201
|
+
'nonpayable'
|
|
202
|
+
>;
|
|
203
|
+
|
|
204
|
+
filters: {};
|
|
205
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumberish,
|
|
7
|
+
BytesLike,
|
|
8
|
+
FunctionFragment,
|
|
9
|
+
Result,
|
|
10
|
+
Interface,
|
|
11
|
+
ContractRunner,
|
|
12
|
+
ContractMethod,
|
|
13
|
+
Listener,
|
|
14
|
+
} from 'ethers';
|
|
15
|
+
import type {
|
|
16
|
+
TypedContractEvent,
|
|
17
|
+
TypedDeferredTopicFilter,
|
|
18
|
+
TypedEventLog,
|
|
19
|
+
TypedListener,
|
|
20
|
+
TypedContractMethod,
|
|
21
|
+
} from './common';
|
|
22
|
+
|
|
23
|
+
export type InEuint32Struct = {
|
|
24
|
+
ctHash: BigNumberish;
|
|
25
|
+
securityZone: BigNumberish;
|
|
26
|
+
utype: BigNumberish;
|
|
27
|
+
signature: BytesLike;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type InEuint32StructOutput = [ctHash: bigint, securityZone: bigint, utype: bigint, signature: string] & {
|
|
31
|
+
ctHash: bigint;
|
|
32
|
+
securityZone: bigint;
|
|
33
|
+
utype: bigint;
|
|
34
|
+
signature: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export interface TestBedInterface extends Interface {
|
|
38
|
+
getFunction(
|
|
39
|
+
nameOrSignature:
|
|
40
|
+
| 'add'
|
|
41
|
+
| 'decrypt'
|
|
42
|
+
| 'eNumber'
|
|
43
|
+
| 'exists'
|
|
44
|
+
| 'getDecryptResult'
|
|
45
|
+
| 'getDecryptResultSafe'
|
|
46
|
+
| 'increment'
|
|
47
|
+
| 'mul'
|
|
48
|
+
| 'numberHash'
|
|
49
|
+
| 'publishDecryptResult'
|
|
50
|
+
| 'setNumber'
|
|
51
|
+
| 'setNumberTrivial'
|
|
52
|
+
| 'sub'
|
|
53
|
+
): FunctionFragment;
|
|
54
|
+
|
|
55
|
+
encodeFunctionData(functionFragment: 'add', values: [InEuint32Struct]): string;
|
|
56
|
+
encodeFunctionData(functionFragment: 'decrypt', values?: undefined): string;
|
|
57
|
+
encodeFunctionData(functionFragment: 'eNumber', values?: undefined): string;
|
|
58
|
+
encodeFunctionData(functionFragment: 'exists', values?: undefined): string;
|
|
59
|
+
encodeFunctionData(functionFragment: 'getDecryptResult', values: [BytesLike]): string;
|
|
60
|
+
encodeFunctionData(functionFragment: 'getDecryptResultSafe', values: [BytesLike]): string;
|
|
61
|
+
encodeFunctionData(functionFragment: 'increment', values?: undefined): string;
|
|
62
|
+
encodeFunctionData(functionFragment: 'mul', values: [InEuint32Struct]): string;
|
|
63
|
+
encodeFunctionData(functionFragment: 'numberHash', values?: undefined): string;
|
|
64
|
+
encodeFunctionData(functionFragment: 'publishDecryptResult', values: [BytesLike, BigNumberish, BytesLike]): string;
|
|
65
|
+
encodeFunctionData(functionFragment: 'setNumber', values: [InEuint32Struct]): string;
|
|
66
|
+
encodeFunctionData(functionFragment: 'setNumberTrivial', values: [BigNumberish]): string;
|
|
67
|
+
encodeFunctionData(functionFragment: 'sub', values: [InEuint32Struct]): string;
|
|
68
|
+
|
|
69
|
+
decodeFunctionResult(functionFragment: 'add', data: BytesLike): Result;
|
|
70
|
+
decodeFunctionResult(functionFragment: 'decrypt', data: BytesLike): Result;
|
|
71
|
+
decodeFunctionResult(functionFragment: 'eNumber', data: BytesLike): Result;
|
|
72
|
+
decodeFunctionResult(functionFragment: 'exists', data: BytesLike): Result;
|
|
73
|
+
decodeFunctionResult(functionFragment: 'getDecryptResult', data: BytesLike): Result;
|
|
74
|
+
decodeFunctionResult(functionFragment: 'getDecryptResultSafe', data: BytesLike): Result;
|
|
75
|
+
decodeFunctionResult(functionFragment: 'increment', data: BytesLike): Result;
|
|
76
|
+
decodeFunctionResult(functionFragment: 'mul', data: BytesLike): Result;
|
|
77
|
+
decodeFunctionResult(functionFragment: 'numberHash', data: BytesLike): Result;
|
|
78
|
+
decodeFunctionResult(functionFragment: 'publishDecryptResult', data: BytesLike): Result;
|
|
79
|
+
decodeFunctionResult(functionFragment: 'setNumber', data: BytesLike): Result;
|
|
80
|
+
decodeFunctionResult(functionFragment: 'setNumberTrivial', data: BytesLike): Result;
|
|
81
|
+
decodeFunctionResult(functionFragment: 'sub', data: BytesLike): Result;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface TestBed extends BaseContract {
|
|
85
|
+
connect(runner?: ContractRunner | null): TestBed;
|
|
86
|
+
waitForDeployment(): Promise<this>;
|
|
87
|
+
|
|
88
|
+
interface: TestBedInterface;
|
|
89
|
+
|
|
90
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
91
|
+
event: TCEvent,
|
|
92
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
93
|
+
toBlock?: string | number | undefined
|
|
94
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
95
|
+
queryFilter<TCEvent extends TypedContractEvent>(
|
|
96
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
97
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
98
|
+
toBlock?: string | number | undefined
|
|
99
|
+
): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
100
|
+
|
|
101
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
102
|
+
on<TCEvent extends TypedContractEvent>(
|
|
103
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
104
|
+
listener: TypedListener<TCEvent>
|
|
105
|
+
): Promise<this>;
|
|
106
|
+
|
|
107
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
108
|
+
once<TCEvent extends TypedContractEvent>(
|
|
109
|
+
filter: TypedDeferredTopicFilter<TCEvent>,
|
|
110
|
+
listener: TypedListener<TCEvent>
|
|
111
|
+
): Promise<this>;
|
|
112
|
+
|
|
113
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
114
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
115
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
116
|
+
|
|
117
|
+
add: TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
118
|
+
|
|
119
|
+
decrypt: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
120
|
+
|
|
121
|
+
eNumber: TypedContractMethod<[], [string], 'view'>;
|
|
122
|
+
|
|
123
|
+
exists: TypedContractMethod<[], [boolean], 'view'>;
|
|
124
|
+
|
|
125
|
+
getDecryptResult: TypedContractMethod<[input1: BytesLike], [bigint], 'view'>;
|
|
126
|
+
|
|
127
|
+
getDecryptResultSafe: TypedContractMethod<
|
|
128
|
+
[input1: BytesLike],
|
|
129
|
+
[[bigint, boolean] & { value: bigint; decrypted: boolean }],
|
|
130
|
+
'view'
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
increment: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
134
|
+
|
|
135
|
+
mul: TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
136
|
+
|
|
137
|
+
numberHash: TypedContractMethod<[], [string], 'view'>;
|
|
138
|
+
|
|
139
|
+
publishDecryptResult: TypedContractMethod<
|
|
140
|
+
[input: BytesLike, result: BigNumberish, signature: BytesLike],
|
|
141
|
+
[void],
|
|
142
|
+
'nonpayable'
|
|
143
|
+
>;
|
|
144
|
+
|
|
145
|
+
setNumber: TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
146
|
+
|
|
147
|
+
setNumberTrivial: TypedContractMethod<[inNumber: BigNumberish], [void], 'nonpayable'>;
|
|
148
|
+
|
|
149
|
+
sub: TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
150
|
+
|
|
151
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
152
|
+
|
|
153
|
+
getFunction(nameOrSignature: 'add'): TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
154
|
+
getFunction(nameOrSignature: 'decrypt'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
155
|
+
getFunction(nameOrSignature: 'eNumber'): TypedContractMethod<[], [string], 'view'>;
|
|
156
|
+
getFunction(nameOrSignature: 'exists'): TypedContractMethod<[], [boolean], 'view'>;
|
|
157
|
+
getFunction(nameOrSignature: 'getDecryptResult'): TypedContractMethod<[input1: BytesLike], [bigint], 'view'>;
|
|
158
|
+
getFunction(
|
|
159
|
+
nameOrSignature: 'getDecryptResultSafe'
|
|
160
|
+
): TypedContractMethod<[input1: BytesLike], [[bigint, boolean] & { value: bigint; decrypted: boolean }], 'view'>;
|
|
161
|
+
getFunction(nameOrSignature: 'increment'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
162
|
+
getFunction(nameOrSignature: 'mul'): TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
163
|
+
getFunction(nameOrSignature: 'numberHash'): TypedContractMethod<[], [string], 'view'>;
|
|
164
|
+
getFunction(
|
|
165
|
+
nameOrSignature: 'publishDecryptResult'
|
|
166
|
+
): TypedContractMethod<[input: BytesLike, result: BigNumberish, signature: BytesLike], [void], 'nonpayable'>;
|
|
167
|
+
getFunction(nameOrSignature: 'setNumber'): TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
168
|
+
getFunction(nameOrSignature: 'setNumberTrivial'): TypedContractMethod<[inNumber: BigNumberish], [void], 'nonpayable'>;
|
|
169
|
+
getFunction(nameOrSignature: 'sub'): TypedContractMethod<[inNumber: InEuint32Struct], [void], 'nonpayable'>;
|
|
170
|
+
|
|
171
|
+
filters: {};
|
|
172
|
+
}
|