@coti-io/coti-contracts 0.1.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.
Files changed (180) hide show
  1. package/.github/workflows/npm-publish.yml +52 -0
  2. package/CODE_OF_CONDUCT.md +44 -0
  3. package/CONTRIBUTING.md +101 -0
  4. package/LICENSE +201 -0
  5. package/README.md +48 -0
  6. package/contracts/access/DataPrivacyFramework/DataPrivacyFramework.sol +480 -0
  7. package/contracts/access/DataPrivacyFramework/README.md +68 -0
  8. package/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.sol +1139 -0
  9. package/contracts/mocks/README.md +5 -0
  10. package/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.sol +9 -0
  11. package/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.sol +17 -0
  12. package/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.sol +34 -0
  13. package/contracts/mocks/utils/mpc/ArithmeticTestsContract.sol +431 -0
  14. package/contracts/mocks/utils/mpc/BitwiseTestsContract.sol +361 -0
  15. package/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol +307 -0
  16. package/contracts/mocks/utils/mpc/Comparison2TestsContract.sol +307 -0
  17. package/contracts/mocks/utils/mpc/MinMaxTestsContract.sol +297 -0
  18. package/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.sol +185 -0
  19. package/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.sol +448 -0
  20. package/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol +81 -0
  21. package/contracts/mocks/utils/mpc/README.md +486 -0
  22. package/contracts/mocks/utils/mpc/ShiftTestsContract.sol +311 -0
  23. package/contracts/mocks/utils/mpc/StringTestsContract.sol +59 -0
  24. package/contracts/mocks/utils/mpc/TransferScalarTestsContract.sol +271 -0
  25. package/contracts/mocks/utils/mpc/TransferTestsContract.sol +715 -0
  26. package/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.sol +25 -0
  27. package/contracts/onboard/AccountOnboard.sol +21 -0
  28. package/contracts/onboard/README.md +65 -0
  29. package/contracts/package.json +11 -0
  30. package/contracts/token/PrivateERC20/IPrivateERC20.sol +142 -0
  31. package/contracts/token/PrivateERC20/PrivateERC20.sol +478 -0
  32. package/contracts/token/PrivateERC20/README.md +104 -0
  33. package/contracts/token/PrivateERC721/PrivateERC721.sol +458 -0
  34. package/contracts/token/PrivateERC721/README.md +282 -0
  35. package/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.sol +87 -0
  36. package/contracts/utils/mpc/MpcCore.sol +3215 -0
  37. package/contracts/utils/mpc/MpcInterface.sol +41 -0
  38. package/contracts/utils/mpc/README.md +82 -0
  39. package/hardhat.config.ts +18 -0
  40. package/package.json +14 -0
  41. package/test/access/DataPrivacyFramework/DataPrivacyFramework.test.ts +780 -0
  42. package/test/onboard/AccountOnboard.test.ts +45 -0
  43. package/test/token/PrivateERC20/PrivateERC20.test.ts +546 -0
  44. package/test/token/PrivateERC721/PrivateERC721.test.ts +223 -0
  45. package/test/utils/accounts.ts +55 -0
  46. package/test/utils/mpc/Precompile.test.ts +113 -0
  47. package/test/utils/mpc/String.test.ts +227 -0
  48. package/tsconfig.json +11 -0
  49. package/typechain-types/@openzeppelin/contracts/index.ts +9 -0
  50. package/typechain-types/@openzeppelin/contracts/interfaces/IERC4906.ts +462 -0
  51. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts +69 -0
  52. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts +69 -0
  53. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts +69 -0
  54. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
  55. package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +6 -0
  56. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.ts +393 -0
  57. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +110 -0
  58. package/typechain-types/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
  59. package/typechain-types/@openzeppelin/contracts/token/index.ts +5 -0
  60. package/typechain-types/@openzeppelin/contracts/utils/index.ts +5 -0
  61. package/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.ts +94 -0
  62. package/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts +94 -0
  63. package/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
  64. package/typechain-types/@openzeppelin/index.ts +5 -0
  65. package/typechain-types/common.ts +131 -0
  66. package/typechain-types/contracts/access/DataPrivacyFramework/DataPrivacyFramework.ts +598 -0
  67. package/typechain-types/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc.ts +598 -0
  68. package/typechain-types/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
  69. package/typechain-types/contracts/access/DataPrivacyFramework/index.ts +6 -0
  70. package/typechain-types/contracts/access/index.ts +5 -0
  71. package/typechain-types/contracts/index.ts +13 -0
  72. package/typechain-types/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock.ts +598 -0
  73. package/typechain-types/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
  74. package/typechain-types/contracts/mocks/access/index.ts +5 -0
  75. package/typechain-types/contracts/mocks/index.ts +11 -0
  76. package/typechain-types/contracts/mocks/token/PrivateERC20/PrivateERC20Mock.ts +543 -0
  77. package/typechain-types/contracts/mocks/token/PrivateERC20/index.ts +4 -0
  78. package/typechain-types/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock.ts +576 -0
  79. package/typechain-types/contracts/mocks/token/PrivateERC721/index.ts +4 -0
  80. package/typechain-types/contracts/mocks/token/index.ts +7 -0
  81. package/typechain-types/contracts/mocks/utils/index.ts +5 -0
  82. package/typechain-types/contracts/mocks/utils/mpc/ArithmeticTestsContract.ts +354 -0
  83. package/typechain-types/contracts/mocks/utils/mpc/BitwiseTestsContract.ts +340 -0
  84. package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract.ts +340 -0
  85. package/typechain-types/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
  86. package/typechain-types/contracts/mocks/utils/mpc/Comparison2TestsContract.ts +340 -0
  87. package/typechain-types/contracts/mocks/utils/mpc/MinMaxTestsContract.ts +321 -0
  88. package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous1TestsContract.ts +199 -0
  89. package/typechain-types/contracts/mocks/utils/mpc/Miscellaneous2TestsContract.ts +384 -0
  90. package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract.ts +218 -0
  91. package/typechain-types/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
  92. package/typechain-types/contracts/mocks/utils/mpc/ShiftTestsContract.ts +339 -0
  93. package/typechain-types/contracts/mocks/utils/mpc/StringTestsContract.ts +211 -0
  94. package/typechain-types/contracts/mocks/utils/mpc/TransferScalarTestsContract.ts +266 -0
  95. package/typechain-types/contracts/mocks/utils/mpc/TransferTestsContract.ts +288 -0
  96. package/typechain-types/contracts/mocks/utils/mpc/index.ts +17 -0
  97. package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock.ts +173 -0
  98. package/typechain-types/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
  99. package/typechain-types/contracts/mocks/wallet/index.ts +5 -0
  100. package/typechain-types/contracts/onboard/AccountOnboard.ts +135 -0
  101. package/typechain-types/contracts/onboard/index.ts +4 -0
  102. package/typechain-types/contracts/token/PrivateERC20/IPrivateERC20.ts +437 -0
  103. package/typechain-types/contracts/token/PrivateERC20/PrivateERC20.ts +505 -0
  104. package/typechain-types/contracts/token/PrivateERC20/index.ts +5 -0
  105. package/typechain-types/contracts/token/PrivateERC721/PrivateERC721.ts +409 -0
  106. package/typechain-types/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage.ts +501 -0
  107. package/typechain-types/contracts/token/PrivateERC721/extensions/index.ts +4 -0
  108. package/typechain-types/contracts/token/PrivateERC721/index.ts +6 -0
  109. package/typechain-types/contracts/token/index.ts +7 -0
  110. package/typechain-types/contracts/utils/index.ts +5 -0
  111. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations.ts +698 -0
  112. package/typechain-types/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
  113. package/typechain-types/contracts/utils/mpc/index.ts +5 -0
  114. package/typechain-types/factories/@openzeppelin/contracts/index.ts +6 -0
  115. package/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC4906__factory.ts +339 -0
  116. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts +127 -0
  117. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts +111 -0
  118. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts +128 -0
  119. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
  120. package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +5 -0
  121. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +59 -0
  122. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +307 -0
  123. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.ts +5 -0
  124. package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +4 -0
  125. package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +4 -0
  126. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.ts +41 -0
  127. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts +41 -0
  128. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
  129. package/typechain-types/factories/@openzeppelin/index.ts +4 -0
  130. package/typechain-types/factories/contracts/access/DataPrivacyFramework/DataPrivacyFramework__factory.ts +621 -0
  131. package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/DataPrivacyFrameworkMpc__factory.ts +621 -0
  132. package/typechain-types/factories/contracts/access/DataPrivacyFramework/extensions/index.ts +4 -0
  133. package/typechain-types/factories/contracts/access/DataPrivacyFramework/index.ts +5 -0
  134. package/typechain-types/factories/contracts/access/index.ts +4 -0
  135. package/typechain-types/factories/contracts/index.ts +8 -0
  136. package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/DataPrivacyFrameworkMock__factory.ts +670 -0
  137. package/typechain-types/factories/contracts/mocks/access/DataPrivacyFramework/index.ts +4 -0
  138. package/typechain-types/factories/contracts/mocks/access/index.ts +4 -0
  139. package/typechain-types/factories/contracts/mocks/index.ts +7 -0
  140. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/PrivateERC20Mock__factory.ts +615 -0
  141. package/typechain-types/factories/contracts/mocks/token/PrivateERC20/index.ts +4 -0
  142. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/PrivateERC721URIStorageMock__factory.ts +630 -0
  143. package/typechain-types/factories/contracts/mocks/token/PrivateERC721/index.ts +4 -0
  144. package/typechain-types/factories/contracts/mocks/token/index.ts +5 -0
  145. package/typechain-types/factories/contracts/mocks/utils/index.ts +4 -0
  146. package/typechain-types/factories/contracts/mocks/utils/mpc/ArithmeticTestsContract__factory.ts +374 -0
  147. package/typechain-types/factories/contracts/mocks/utils/mpc/BitwiseTestsContract__factory.ts +361 -0
  148. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/Comparison1TestsContract__factory.ts +361 -0
  149. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison1Tests.Contract.sol/index.ts +4 -0
  150. package/typechain-types/factories/contracts/mocks/utils/mpc/Comparison2TestsContract__factory.ts +361 -0
  151. package/typechain-types/factories/contracts/mocks/utils/mpc/MinMaxTestsContract__factory.ts +337 -0
  152. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous1TestsContract__factory.ts +236 -0
  153. package/typechain-types/factories/contracts/mocks/utils/mpc/Miscellaneous2TestsContract__factory.ts +432 -0
  154. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/OffboardToUserKeyTestContract__factory.ts +245 -0
  155. package/typechain-types/factories/contracts/mocks/utils/mpc/OffboardToUserKeyTestsContract.sol/index.ts +4 -0
  156. package/typechain-types/factories/contracts/mocks/utils/mpc/ShiftTestsContract__factory.ts +374 -0
  157. package/typechain-types/factories/contracts/mocks/utils/mpc/StringTestsContract__factory.ts +264 -0
  158. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferScalarTestsContract__factory.ts +360 -0
  159. package/typechain-types/factories/contracts/mocks/utils/mpc/TransferTestsContract__factory.ts +441 -0
  160. package/typechain-types/factories/contracts/mocks/utils/mpc/index.ts +15 -0
  161. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/PrivateERC20WalletMock__factory.ts +194 -0
  162. package/typechain-types/factories/contracts/mocks/wallet/PrivateERC20Wallet/index.ts +4 -0
  163. package/typechain-types/factories/contracts/mocks/wallet/index.ts +4 -0
  164. package/typechain-types/factories/contracts/onboard/AccountOnboard__factory.ts +104 -0
  165. package/typechain-types/factories/contracts/onboard/index.ts +4 -0
  166. package/typechain-types/factories/contracts/token/PrivateERC20/IPrivateERC20__factory.ts +406 -0
  167. package/typechain-types/factories/contracts/token/PrivateERC20/PrivateERC20__factory.ts +532 -0
  168. package/typechain-types/factories/contracts/token/PrivateERC20/index.ts +5 -0
  169. package/typechain-types/factories/contracts/token/PrivateERC721/PrivateERC721__factory.ts +439 -0
  170. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/PrivateERC721URIStorage__factory.ts +512 -0
  171. package/typechain-types/factories/contracts/token/PrivateERC721/extensions/index.ts +4 -0
  172. package/typechain-types/factories/contracts/token/PrivateERC721/index.ts +5 -0
  173. package/typechain-types/factories/contracts/token/index.ts +5 -0
  174. package/typechain-types/factories/contracts/utils/index.ts +4 -0
  175. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/ExtendedOperations__factory.ts +919 -0
  176. package/typechain-types/factories/contracts/utils/mpc/MpcInterface.sol/index.ts +4 -0
  177. package/typechain-types/factories/contracts/utils/mpc/index.ts +4 -0
  178. package/typechain-types/factories/index.ts +5 -0
  179. package/typechain-types/hardhat.d.ts +621 -0
  180. package/typechain-types/index.ts +72 -0
@@ -0,0 +1,919 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Interface, type ContractRunner } from "ethers";
6
+ import type {
7
+ ExtendedOperations,
8
+ ExtendedOperationsInterface,
9
+ } from "../../../../../contracts/utils/mpc/MpcInterface.sol/ExtendedOperations";
10
+
11
+ const _abi = [
12
+ {
13
+ inputs: [
14
+ {
15
+ internalType: "bytes3",
16
+ name: "metaData",
17
+ type: "bytes3",
18
+ },
19
+ {
20
+ internalType: "uint256",
21
+ name: "lhs",
22
+ type: "uint256",
23
+ },
24
+ {
25
+ internalType: "uint256",
26
+ name: "rhs",
27
+ type: "uint256",
28
+ },
29
+ ],
30
+ name: "Add",
31
+ outputs: [
32
+ {
33
+ internalType: "uint256",
34
+ name: "result",
35
+ type: "uint256",
36
+ },
37
+ ],
38
+ stateMutability: "nonpayable",
39
+ type: "function",
40
+ },
41
+ {
42
+ inputs: [
43
+ {
44
+ internalType: "bytes3",
45
+ name: "metaData",
46
+ type: "bytes3",
47
+ },
48
+ {
49
+ internalType: "uint256",
50
+ name: "lhs",
51
+ type: "uint256",
52
+ },
53
+ {
54
+ internalType: "uint256",
55
+ name: "rhs",
56
+ type: "uint256",
57
+ },
58
+ ],
59
+ name: "And",
60
+ outputs: [
61
+ {
62
+ internalType: "uint256",
63
+ name: "result",
64
+ type: "uint256",
65
+ },
66
+ ],
67
+ stateMutability: "nonpayable",
68
+ type: "function",
69
+ },
70
+ {
71
+ inputs: [
72
+ {
73
+ internalType: "bytes1",
74
+ name: "metaData",
75
+ type: "bytes1",
76
+ },
77
+ {
78
+ internalType: "uint256",
79
+ name: "a",
80
+ type: "uint256",
81
+ },
82
+ ],
83
+ name: "Decrypt",
84
+ outputs: [
85
+ {
86
+ internalType: "uint256",
87
+ name: "result",
88
+ type: "uint256",
89
+ },
90
+ ],
91
+ stateMutability: "nonpayable",
92
+ type: "function",
93
+ },
94
+ {
95
+ inputs: [
96
+ {
97
+ internalType: "bytes3",
98
+ name: "metaData",
99
+ type: "bytes3",
100
+ },
101
+ {
102
+ internalType: "uint256",
103
+ name: "lhs",
104
+ type: "uint256",
105
+ },
106
+ {
107
+ internalType: "uint256",
108
+ name: "rhs",
109
+ type: "uint256",
110
+ },
111
+ ],
112
+ name: "Div",
113
+ outputs: [
114
+ {
115
+ internalType: "uint256",
116
+ name: "result",
117
+ type: "uint256",
118
+ },
119
+ ],
120
+ stateMutability: "nonpayable",
121
+ type: "function",
122
+ },
123
+ {
124
+ inputs: [
125
+ {
126
+ internalType: "bytes3",
127
+ name: "metaData",
128
+ type: "bytes3",
129
+ },
130
+ {
131
+ internalType: "uint256",
132
+ name: "lhs",
133
+ type: "uint256",
134
+ },
135
+ {
136
+ internalType: "uint256",
137
+ name: "rhs",
138
+ type: "uint256",
139
+ },
140
+ ],
141
+ name: "Eq",
142
+ outputs: [
143
+ {
144
+ internalType: "uint256",
145
+ name: "result",
146
+ type: "uint256",
147
+ },
148
+ ],
149
+ stateMutability: "nonpayable",
150
+ type: "function",
151
+ },
152
+ {
153
+ inputs: [
154
+ {
155
+ internalType: "bytes3",
156
+ name: "metaData",
157
+ type: "bytes3",
158
+ },
159
+ {
160
+ internalType: "uint256",
161
+ name: "lhs",
162
+ type: "uint256",
163
+ },
164
+ {
165
+ internalType: "uint256",
166
+ name: "rhs",
167
+ type: "uint256",
168
+ },
169
+ ],
170
+ name: "Ge",
171
+ outputs: [
172
+ {
173
+ internalType: "uint256",
174
+ name: "result",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ stateMutability: "nonpayable",
179
+ type: "function",
180
+ },
181
+ {
182
+ inputs: [
183
+ {
184
+ internalType: "bytes",
185
+ name: "signedEK",
186
+ type: "bytes",
187
+ },
188
+ ],
189
+ name: "GetUserKey",
190
+ outputs: [
191
+ {
192
+ internalType: "bytes",
193
+ name: "encryptedKey",
194
+ type: "bytes",
195
+ },
196
+ ],
197
+ stateMutability: "view",
198
+ type: "function",
199
+ },
200
+ {
201
+ inputs: [
202
+ {
203
+ internalType: "bytes3",
204
+ name: "metaData",
205
+ type: "bytes3",
206
+ },
207
+ {
208
+ internalType: "uint256",
209
+ name: "lhs",
210
+ type: "uint256",
211
+ },
212
+ {
213
+ internalType: "uint256",
214
+ name: "rhs",
215
+ type: "uint256",
216
+ },
217
+ ],
218
+ name: "Gt",
219
+ outputs: [
220
+ {
221
+ internalType: "uint256",
222
+ name: "result",
223
+ type: "uint256",
224
+ },
225
+ ],
226
+ stateMutability: "nonpayable",
227
+ type: "function",
228
+ },
229
+ {
230
+ inputs: [
231
+ {
232
+ internalType: "bytes3",
233
+ name: "metaData",
234
+ type: "bytes3",
235
+ },
236
+ {
237
+ internalType: "uint256",
238
+ name: "lhs",
239
+ type: "uint256",
240
+ },
241
+ {
242
+ internalType: "uint256",
243
+ name: "rhs",
244
+ type: "uint256",
245
+ },
246
+ ],
247
+ name: "Le",
248
+ outputs: [
249
+ {
250
+ internalType: "uint256",
251
+ name: "result",
252
+ type: "uint256",
253
+ },
254
+ ],
255
+ stateMutability: "nonpayable",
256
+ type: "function",
257
+ },
258
+ {
259
+ inputs: [
260
+ {
261
+ internalType: "bytes3",
262
+ name: "metaData",
263
+ type: "bytes3",
264
+ },
265
+ {
266
+ internalType: "uint256",
267
+ name: "lhs",
268
+ type: "uint256",
269
+ },
270
+ {
271
+ internalType: "uint256",
272
+ name: "rhs",
273
+ type: "uint256",
274
+ },
275
+ ],
276
+ name: "Lt",
277
+ outputs: [
278
+ {
279
+ internalType: "uint256",
280
+ name: "result",
281
+ type: "uint256",
282
+ },
283
+ ],
284
+ stateMutability: "nonpayable",
285
+ type: "function",
286
+ },
287
+ {
288
+ inputs: [
289
+ {
290
+ internalType: "bytes3",
291
+ name: "metaData",
292
+ type: "bytes3",
293
+ },
294
+ {
295
+ internalType: "uint256",
296
+ name: "lhs",
297
+ type: "uint256",
298
+ },
299
+ {
300
+ internalType: "uint256",
301
+ name: "rhs",
302
+ type: "uint256",
303
+ },
304
+ ],
305
+ name: "Max",
306
+ outputs: [
307
+ {
308
+ internalType: "uint256",
309
+ name: "result",
310
+ type: "uint256",
311
+ },
312
+ ],
313
+ stateMutability: "nonpayable",
314
+ type: "function",
315
+ },
316
+ {
317
+ inputs: [
318
+ {
319
+ internalType: "bytes3",
320
+ name: "metaData",
321
+ type: "bytes3",
322
+ },
323
+ {
324
+ internalType: "uint256",
325
+ name: "lhs",
326
+ type: "uint256",
327
+ },
328
+ {
329
+ internalType: "uint256",
330
+ name: "rhs",
331
+ type: "uint256",
332
+ },
333
+ ],
334
+ name: "Min",
335
+ outputs: [
336
+ {
337
+ internalType: "uint256",
338
+ name: "result",
339
+ type: "uint256",
340
+ },
341
+ ],
342
+ stateMutability: "nonpayable",
343
+ type: "function",
344
+ },
345
+ {
346
+ inputs: [
347
+ {
348
+ internalType: "bytes3",
349
+ name: "metaData",
350
+ type: "bytes3",
351
+ },
352
+ {
353
+ internalType: "uint256",
354
+ name: "lhs",
355
+ type: "uint256",
356
+ },
357
+ {
358
+ internalType: "uint256",
359
+ name: "rhs",
360
+ type: "uint256",
361
+ },
362
+ ],
363
+ name: "Mul",
364
+ outputs: [
365
+ {
366
+ internalType: "uint256",
367
+ name: "result",
368
+ type: "uint256",
369
+ },
370
+ ],
371
+ stateMutability: "nonpayable",
372
+ type: "function",
373
+ },
374
+ {
375
+ inputs: [
376
+ {
377
+ internalType: "bytes3",
378
+ name: "metaData",
379
+ type: "bytes3",
380
+ },
381
+ {
382
+ internalType: "uint256",
383
+ name: "bit",
384
+ type: "uint256",
385
+ },
386
+ {
387
+ internalType: "uint256",
388
+ name: "a",
389
+ type: "uint256",
390
+ },
391
+ {
392
+ internalType: "uint256",
393
+ name: "b",
394
+ type: "uint256",
395
+ },
396
+ ],
397
+ name: "Mux",
398
+ outputs: [
399
+ {
400
+ internalType: "uint256",
401
+ name: "result",
402
+ type: "uint256",
403
+ },
404
+ ],
405
+ stateMutability: "nonpayable",
406
+ type: "function",
407
+ },
408
+ {
409
+ inputs: [
410
+ {
411
+ internalType: "bytes3",
412
+ name: "metaData",
413
+ type: "bytes3",
414
+ },
415
+ {
416
+ internalType: "uint256",
417
+ name: "lhs",
418
+ type: "uint256",
419
+ },
420
+ {
421
+ internalType: "uint256",
422
+ name: "rhs",
423
+ type: "uint256",
424
+ },
425
+ ],
426
+ name: "Ne",
427
+ outputs: [
428
+ {
429
+ internalType: "uint256",
430
+ name: "result",
431
+ type: "uint256",
432
+ },
433
+ ],
434
+ stateMutability: "nonpayable",
435
+ type: "function",
436
+ },
437
+ {
438
+ inputs: [
439
+ {
440
+ internalType: "bytes1",
441
+ name: "metaData",
442
+ type: "bytes1",
443
+ },
444
+ {
445
+ internalType: "uint256",
446
+ name: "a",
447
+ type: "uint256",
448
+ },
449
+ ],
450
+ name: "Not",
451
+ outputs: [
452
+ {
453
+ internalType: "uint256",
454
+ name: "result",
455
+ type: "uint256",
456
+ },
457
+ ],
458
+ stateMutability: "nonpayable",
459
+ type: "function",
460
+ },
461
+ {
462
+ inputs: [
463
+ {
464
+ internalType: "bytes1",
465
+ name: "metaData",
466
+ type: "bytes1",
467
+ },
468
+ {
469
+ internalType: "uint256",
470
+ name: "ct",
471
+ type: "uint256",
472
+ },
473
+ ],
474
+ name: "OffBoard",
475
+ outputs: [
476
+ {
477
+ internalType: "uint256",
478
+ name: "result",
479
+ type: "uint256",
480
+ },
481
+ ],
482
+ stateMutability: "nonpayable",
483
+ type: "function",
484
+ },
485
+ {
486
+ inputs: [
487
+ {
488
+ internalType: "bytes1",
489
+ name: "metaData",
490
+ type: "bytes1",
491
+ },
492
+ {
493
+ internalType: "uint256",
494
+ name: "ct",
495
+ type: "uint256",
496
+ },
497
+ {
498
+ internalType: "bytes",
499
+ name: "addr",
500
+ type: "bytes",
501
+ },
502
+ ],
503
+ name: "OffBoardToUser",
504
+ outputs: [
505
+ {
506
+ internalType: "uint256",
507
+ name: "result",
508
+ type: "uint256",
509
+ },
510
+ ],
511
+ stateMutability: "nonpayable",
512
+ type: "function",
513
+ },
514
+ {
515
+ inputs: [
516
+ {
517
+ internalType: "bytes1",
518
+ name: "metaData",
519
+ type: "bytes1",
520
+ },
521
+ {
522
+ internalType: "uint256",
523
+ name: "ct",
524
+ type: "uint256",
525
+ },
526
+ ],
527
+ name: "OnBoard",
528
+ outputs: [
529
+ {
530
+ internalType: "uint256",
531
+ name: "result",
532
+ type: "uint256",
533
+ },
534
+ ],
535
+ stateMutability: "nonpayable",
536
+ type: "function",
537
+ },
538
+ {
539
+ inputs: [
540
+ {
541
+ internalType: "bytes3",
542
+ name: "metaData",
543
+ type: "bytes3",
544
+ },
545
+ {
546
+ internalType: "uint256",
547
+ name: "lhs",
548
+ type: "uint256",
549
+ },
550
+ {
551
+ internalType: "uint256",
552
+ name: "rhs",
553
+ type: "uint256",
554
+ },
555
+ ],
556
+ name: "Or",
557
+ outputs: [
558
+ {
559
+ internalType: "uint256",
560
+ name: "result",
561
+ type: "uint256",
562
+ },
563
+ ],
564
+ stateMutability: "nonpayable",
565
+ type: "function",
566
+ },
567
+ {
568
+ inputs: [
569
+ {
570
+ internalType: "bytes1",
571
+ name: "metaData",
572
+ type: "bytes1",
573
+ },
574
+ ],
575
+ name: "Rand",
576
+ outputs: [
577
+ {
578
+ internalType: "uint256",
579
+ name: "result",
580
+ type: "uint256",
581
+ },
582
+ ],
583
+ stateMutability: "nonpayable",
584
+ type: "function",
585
+ },
586
+ {
587
+ inputs: [
588
+ {
589
+ internalType: "bytes1",
590
+ name: "metaData",
591
+ type: "bytes1",
592
+ },
593
+ {
594
+ internalType: "uint8",
595
+ name: "numBits",
596
+ type: "uint8",
597
+ },
598
+ ],
599
+ name: "RandBoundedBits",
600
+ outputs: [
601
+ {
602
+ internalType: "uint256",
603
+ name: "result",
604
+ type: "uint256",
605
+ },
606
+ ],
607
+ stateMutability: "nonpayable",
608
+ type: "function",
609
+ },
610
+ {
611
+ inputs: [
612
+ {
613
+ internalType: "bytes3",
614
+ name: "metaData",
615
+ type: "bytes3",
616
+ },
617
+ {
618
+ internalType: "uint256",
619
+ name: "lhs",
620
+ type: "uint256",
621
+ },
622
+ {
623
+ internalType: "uint256",
624
+ name: "rhs",
625
+ type: "uint256",
626
+ },
627
+ ],
628
+ name: "Rem",
629
+ outputs: [
630
+ {
631
+ internalType: "uint256",
632
+ name: "result",
633
+ type: "uint256",
634
+ },
635
+ ],
636
+ stateMutability: "nonpayable",
637
+ type: "function",
638
+ },
639
+ {
640
+ inputs: [
641
+ {
642
+ internalType: "bytes1",
643
+ name: "metaData",
644
+ type: "bytes1",
645
+ },
646
+ {
647
+ internalType: "uint256",
648
+ name: "ct",
649
+ type: "uint256",
650
+ },
651
+ ],
652
+ name: "SetPublic",
653
+ outputs: [
654
+ {
655
+ internalType: "uint256",
656
+ name: "result",
657
+ type: "uint256",
658
+ },
659
+ ],
660
+ stateMutability: "nonpayable",
661
+ type: "function",
662
+ },
663
+ {
664
+ inputs: [
665
+ {
666
+ internalType: "bytes3",
667
+ name: "metaData",
668
+ type: "bytes3",
669
+ },
670
+ {
671
+ internalType: "uint256",
672
+ name: "lhs",
673
+ type: "uint256",
674
+ },
675
+ {
676
+ internalType: "uint256",
677
+ name: "rhs",
678
+ type: "uint256",
679
+ },
680
+ ],
681
+ name: "Shl",
682
+ outputs: [
683
+ {
684
+ internalType: "uint256",
685
+ name: "result",
686
+ type: "uint256",
687
+ },
688
+ ],
689
+ stateMutability: "nonpayable",
690
+ type: "function",
691
+ },
692
+ {
693
+ inputs: [
694
+ {
695
+ internalType: "bytes3",
696
+ name: "metaData",
697
+ type: "bytes3",
698
+ },
699
+ {
700
+ internalType: "uint256",
701
+ name: "lhs",
702
+ type: "uint256",
703
+ },
704
+ {
705
+ internalType: "uint256",
706
+ name: "rhs",
707
+ type: "uint256",
708
+ },
709
+ ],
710
+ name: "Shr",
711
+ outputs: [
712
+ {
713
+ internalType: "uint256",
714
+ name: "result",
715
+ type: "uint256",
716
+ },
717
+ ],
718
+ stateMutability: "nonpayable",
719
+ type: "function",
720
+ },
721
+ {
722
+ inputs: [
723
+ {
724
+ internalType: "bytes3",
725
+ name: "metaData",
726
+ type: "bytes3",
727
+ },
728
+ {
729
+ internalType: "uint256",
730
+ name: "lhs",
731
+ type: "uint256",
732
+ },
733
+ {
734
+ internalType: "uint256",
735
+ name: "rhs",
736
+ type: "uint256",
737
+ },
738
+ ],
739
+ name: "Sub",
740
+ outputs: [
741
+ {
742
+ internalType: "uint256",
743
+ name: "result",
744
+ type: "uint256",
745
+ },
746
+ ],
747
+ stateMutability: "nonpayable",
748
+ type: "function",
749
+ },
750
+ {
751
+ inputs: [
752
+ {
753
+ internalType: "bytes4",
754
+ name: "metaData",
755
+ type: "bytes4",
756
+ },
757
+ {
758
+ internalType: "uint256",
759
+ name: "a",
760
+ type: "uint256",
761
+ },
762
+ {
763
+ internalType: "uint256",
764
+ name: "b",
765
+ type: "uint256",
766
+ },
767
+ {
768
+ internalType: "uint256",
769
+ name: "amount",
770
+ type: "uint256",
771
+ },
772
+ ],
773
+ name: "Transfer",
774
+ outputs: [
775
+ {
776
+ internalType: "uint256",
777
+ name: "new_a",
778
+ type: "uint256",
779
+ },
780
+ {
781
+ internalType: "uint256",
782
+ name: "new_b",
783
+ type: "uint256",
784
+ },
785
+ {
786
+ internalType: "uint256",
787
+ name: "res",
788
+ type: "uint256",
789
+ },
790
+ ],
791
+ stateMutability: "nonpayable",
792
+ type: "function",
793
+ },
794
+ {
795
+ inputs: [
796
+ {
797
+ internalType: "bytes4",
798
+ name: "metaData",
799
+ type: "bytes4",
800
+ },
801
+ {
802
+ internalType: "uint256",
803
+ name: "a",
804
+ type: "uint256",
805
+ },
806
+ {
807
+ internalType: "uint256",
808
+ name: "b",
809
+ type: "uint256",
810
+ },
811
+ {
812
+ internalType: "uint256",
813
+ name: "amount",
814
+ type: "uint256",
815
+ },
816
+ {
817
+ internalType: "uint256",
818
+ name: "allowance",
819
+ type: "uint256",
820
+ },
821
+ ],
822
+ name: "TransferWithAllowance",
823
+ outputs: [
824
+ {
825
+ internalType: "uint256",
826
+ name: "new_a",
827
+ type: "uint256",
828
+ },
829
+ {
830
+ internalType: "uint256",
831
+ name: "new_b",
832
+ type: "uint256",
833
+ },
834
+ {
835
+ internalType: "uint256",
836
+ name: "res",
837
+ type: "uint256",
838
+ },
839
+ {
840
+ internalType: "uint256",
841
+ name: "new_allowance",
842
+ type: "uint256",
843
+ },
844
+ ],
845
+ stateMutability: "nonpayable",
846
+ type: "function",
847
+ },
848
+ {
849
+ inputs: [
850
+ {
851
+ internalType: "bytes1",
852
+ name: "metaData",
853
+ type: "bytes1",
854
+ },
855
+ {
856
+ internalType: "uint256",
857
+ name: "ciphertext",
858
+ type: "uint256",
859
+ },
860
+ {
861
+ internalType: "bytes",
862
+ name: "signature",
863
+ type: "bytes",
864
+ },
865
+ ],
866
+ name: "ValidateCiphertext",
867
+ outputs: [
868
+ {
869
+ internalType: "uint256",
870
+ name: "result",
871
+ type: "uint256",
872
+ },
873
+ ],
874
+ stateMutability: "nonpayable",
875
+ type: "function",
876
+ },
877
+ {
878
+ inputs: [
879
+ {
880
+ internalType: "bytes3",
881
+ name: "metaData",
882
+ type: "bytes3",
883
+ },
884
+ {
885
+ internalType: "uint256",
886
+ name: "lhs",
887
+ type: "uint256",
888
+ },
889
+ {
890
+ internalType: "uint256",
891
+ name: "rhs",
892
+ type: "uint256",
893
+ },
894
+ ],
895
+ name: "Xor",
896
+ outputs: [
897
+ {
898
+ internalType: "uint256",
899
+ name: "result",
900
+ type: "uint256",
901
+ },
902
+ ],
903
+ stateMutability: "nonpayable",
904
+ type: "function",
905
+ },
906
+ ] as const;
907
+
908
+ export class ExtendedOperations__factory {
909
+ static readonly abi = _abi;
910
+ static createInterface(): ExtendedOperationsInterface {
911
+ return new Interface(_abi) as ExtendedOperationsInterface;
912
+ }
913
+ static connect(
914
+ address: string,
915
+ runner?: ContractRunner | null
916
+ ): ExtendedOperations {
917
+ return new Contract(address, _abi, runner) as unknown as ExtendedOperations;
918
+ }
919
+ }