@inco/lightning 0.1.20 → 0.1.21

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.
@@ -0,0 +1,15 @@
1
+ DEPLOYER_ADDRESS=0x8202D2D747784Cb7D48868E44C42C4bf162a70BC
2
+ STATE_DUMP=incoLightning_0_1_26__444235330.dump.json
3
+ SESSION_VERIFIER_ADDRESS=0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F
4
+ ADD_TWO_ADDRESS=0x723c2be5E61e7bBec4684DEfEaE63656ad3eaa10
5
+ EXECUTOR_ADDRESS=0xdc8eD938ff2eB900bD5f86A88555a9f1956994fC
6
+ ECIES_PUBLIC_KEY=0x037eb9320ccde2bf8f19cb3d9fae7f46f63ca79455326cfc82ac4f1da8b527f5dd
7
+ CALLBACK_ADDRESS=0xa511628F4519C75B1Afc761e70389BE67B8F97AB
8
+ SENDER_ADDRESS=0x389B617D3E1241010d0D23BC4c430729f2f14436
9
+ SENDER_PRIVATE_KEY=0x79aae91f68fb2235ebcc9553c35c79606a543d47c2b92d85bebb3e579529caef
10
+ COVALIDATOR_ECIES_PRIVATE_KEY=0xbe70572bf559ee69509b8cce3d433509b7449ea26f32a92a90972044d86d2f96
11
+ COVALIDATOR_CALLBACK_PRIVATE_KEY=0xb79cfd1429e47f49d4f50d5ee3a8cf483f4456c0ae237b81b45e53760934da0b
12
+ COVALIDATOR_ACL_ADDR=0xdc8eD938ff2eB900bD5f86A88555a9f1956994fC
13
+ COVALIDATOR_INCO_EXECUTOR_ADDR=0xdc8eD938ff2eB900bD5f86A88555a9f1956994fC
14
+ COVALIDATOR_DECRYPTION_HANDLER_ADDR=0xdc8eD938ff2eB900bD5f86A88555a9f1956994fC
15
+
package/manifest.yaml ADDED
@@ -0,0 +1,92 @@
1
+ incoLightning_0_1_26__18043964:
2
+ release:
3
+ name: incoLightning_0_1_26__18043964
4
+ executorAddress: "0x69Ef6a59f9eE2d6f3b49eA3F79bcF1553512DF0e"
5
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
6
+ pepper: testnet
7
+ version:
8
+ major: 0
9
+ minor: 1
10
+ patch: 26
11
+ shortSalt: "18043964"
12
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00858064cb0f58c7ef7a843c"
13
+ deployments:
14
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
15
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
16
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
17
+ chainId: "7311099111"
18
+ blockNumber: "1"
19
+ chainName: Inco Release Chain
20
+ active: true
21
+ deployDate: 2025-04-22T12:14:50.447Z
22
+ commit: v3-26-g623cec72-dirty
23
+ sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
24
+ addTwoAddress: "0x70fC34B18B12E945cb2204FA77E5f8e1581890C3"
25
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
26
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
27
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
28
+ chainId: "10143"
29
+ blockNumber: "13439069"
30
+ chainName: Monad Testnet
31
+ active: true
32
+ deployDate: 2025-04-22T12:14:42.391Z
33
+ commit: v3-26-g623cec72-dirty
34
+ sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
35
+ addTwoAddress: "0x4A49112FB866F6d5D05845D264b430cD3bbAb9f6"
36
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
37
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
38
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
39
+ chainId: "84532"
40
+ blockNumber: "24777885"
41
+ chainName: Base Sepolia
42
+ active: true
43
+ deployDate: 2025-04-22T12:14:25.354Z
44
+ commit: v3-26-g623cec72-dirty
45
+ sessionVerifierAddress: "0x0F508B0Fb940595046AB0eceB7A4C8b3e20Cb674"
46
+ addTwoAddress: "0x2b5E34844997681168049783D30CD84B5962cb50"
47
+ incoLightning_0_1_26__444235330:
48
+ release:
49
+ name: incoLightning_0_1_26__444235330
50
+ executorAddress: "0xdc8eD938ff2eB900bD5f86A88555a9f1956994fC"
51
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
52
+ pepper: devnet
53
+ version:
54
+ major: 0
55
+ minor: 1
56
+ patch: 26
57
+ shortSalt: "444235330"
58
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc001bab4c5927c52fbea0d042"
59
+ deployments:
60
+ - decryptSigner: "0x000000000000000000000000000000000000baBe"
61
+ eciesPublicKey: "0x000000000000000000000000000000000000000000000000000000000000\
62
+ 000000000000000000000000000000000000000000000000000000000000000000babe"
63
+ chainId: "7311099111"
64
+ blockNumber: "1"
65
+ chainName: Inco Release Chain
66
+ active: true
67
+ deployDate: 2025-04-22T09:11:15.398Z
68
+ commit: v3-24-gc9716e6c-dirty
69
+ sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
70
+ addTwoAddress: "0x70fC34B18B12E945cb2204FA77E5f8e1581890C3"
71
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
72
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
73
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
74
+ chainId: "10143"
75
+ blockNumber: "13418528"
76
+ chainName: Monad Testnet
77
+ active: true
78
+ deployDate: 2025-04-22T09:11:06.223Z
79
+ commit: v3-24-gc9716e6c-dirty
80
+ sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
81
+ addTwoAddress: "0xfeE9C1E41b2268a4ad8EaDA35f510b8d89Cd041c"
82
+ - decryptSigner: "0xA8822DE8910f66D3d03F1eAfe2C0141dBc327Ee0"
83
+ eciesPublicKey: "0x048a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b8\
84
+ 4095b1e647a9e377175fcb66bda05087c93b05e1fd53a704d0914bb23a0b2a69e9f235"
85
+ chainId: "84532"
86
+ blockNumber: "24772369"
87
+ chainName: Base Sepolia
88
+ active: true
89
+ deployDate: 2025-04-22T09:10:33.275Z
90
+ commit: v3-24-gc9716e6c-dirty
91
+ sessionVerifierAddress: "0x3D4eB5f90E6d996c2b45b0BEb4110b5be98e243F"
92
+ addTwoAddress: "0xeEa387f7c866A81c2AF532D9ed48c60F179C9827"
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "@inco/lightning",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "files": [
6
6
  "src/",
7
7
  "foundry.toml",
8
8
  "dumps/",
9
9
  "CHANGELOG.md",
10
- "remappings.txt"
10
+ "remappings.txt",
11
+ "foundry.toml",
12
+ "manifest.yaml"
11
13
  ],
12
14
  "scripts": {
13
- "generate:libraries": "bun run ../pega/lib/deployment/cmd/generate-libraries.ts",
14
15
  "publish:github": "bun publish --registry=https://npm.pkg.github.com",
15
- "publish:npm": "bun publish --access public"
16
+ "publish:npm": "bun publish",
17
+ "generate:libraries": "bun run ../pega/lib/deployment/cmd/generate-libraries.ts"
16
18
  },
17
19
  "dependencies": {
18
20
  "@openzeppelin/contracts": "^5.2.0",
package/src/Lib.sol CHANGED
@@ -8,7 +8,7 @@ pragma solidity ^0.8;
8
8
  import "./IncoLightning.sol";
9
9
  import { ebool, euint256, ETypes } from "./Types.sol";
10
10
 
11
- IncoLightning constant inco = IncoLightning(0xc3c81F7Bf86Af7ed3a5f5Bb1924A063a1c126cDd);
11
+ IncoLightning constant inco = IncoLightning(0x69Ef6a59f9eE2d6f3b49eA3F79bcF1553512DF0e);
12
12
  address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
13
13
  uint256 constant defaultDecryptionDelayLimit = 2 hours;
14
14
 
@@ -0,0 +1,389 @@
1
+ // AUTOGENERATED FILE. DO NOT EDIT.
2
+ // This file was generated by the IncoLightning library generator.
3
+ // The original template is located at Lib.template.sol
4
+
5
+ /// SPDX-License-Identifier: No License
6
+ pragma solidity ^0.8;
7
+
8
+ import "../IncoLightning.sol";
9
+ import { ebool, euint256, ETypes } from "../Types.sol";
10
+
11
+ IncoLightning constant inco = IncoLightning(0xbfb55e2E217edAD49910C3E8c411FbdD4bF9aaA5);
12
+ address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
13
+ uint256 constant defaultDecryptionDelayLimit = 2 hours;
14
+
15
+ library e {
16
+ function sanitize(euint256 a) internal returns (euint256) {
17
+ if (euint256.unwrap(a) == bytes32(0)) {
18
+ return asEuint256(0);
19
+ }
20
+ return a;
21
+ }
22
+
23
+ function sanitize(ebool a) internal returns (ebool) {
24
+ if (ebool.unwrap(a) == bytes32(0)) {
25
+ return asEbool(false);
26
+ }
27
+ return a;
28
+ }
29
+
30
+ function s(euint256 a) internal returns (euint256) {
31
+ return sanitize(a);
32
+ }
33
+
34
+ function s(ebool a) internal returns (ebool) {
35
+ return sanitize(a);
36
+ }
37
+
38
+ function add(euint256 a, euint256 b) internal returns (euint256) {
39
+ return inco.eAdd(s(a), s(b));
40
+ }
41
+
42
+ function add(euint256 a, uint256 b) internal returns (euint256) {
43
+ return inco.eAdd(s(a), asEuint256(b));
44
+ }
45
+
46
+ function add(uint256 a, euint256 b) internal returns (euint256) {
47
+ return inco.eAdd(asEuint256(a), s(b));
48
+ }
49
+
50
+ function sub(euint256 a, euint256 b) internal returns (euint256) {
51
+ return inco.eSub(s(a), s(b));
52
+ }
53
+
54
+ function sub(euint256 a, uint256 b) internal returns (euint256) {
55
+ return inco.eSub(s(a), asEuint256(b));
56
+ }
57
+
58
+ function sub(uint256 a, euint256 b) internal returns (euint256) {
59
+ return inco.eSub(asEuint256(a), s(b));
60
+ }
61
+
62
+ function mul(euint256 a, euint256 b) internal returns (euint256) {
63
+ return inco.eMul(s(a), s(b));
64
+ }
65
+
66
+ function mul(euint256 a, uint256 b) internal returns (euint256) {
67
+ return inco.eMul(s(a), asEuint256(b));
68
+ }
69
+
70
+ function mul(uint256 a, euint256 b) internal returns (euint256) {
71
+ return inco.eMul(asEuint256(a), s(b));
72
+ }
73
+
74
+ function div(euint256 a, euint256 b) internal returns (euint256) {
75
+ return inco.eDiv(s(a), s(b));
76
+ }
77
+
78
+ function div(euint256 a, uint256 b) internal returns (euint256) {
79
+ return inco.eDiv(s(a), asEuint256(b));
80
+ }
81
+
82
+ function div(uint256 a, euint256 b) internal returns (euint256) {
83
+ return inco.eDiv(asEuint256(a), s(b));
84
+ }
85
+
86
+ function rem(euint256 a, euint256 b) internal returns (euint256) {
87
+ return inco.eRem(s(a), s(b));
88
+ }
89
+
90
+ function rem(euint256 a, uint256 b) internal returns (euint256) {
91
+ return inco.eRem(s(a), asEuint256(b));
92
+ }
93
+
94
+ function rem(uint256 a, euint256 b) internal returns (euint256) {
95
+ return inco.eRem(asEuint256(a), s(b));
96
+ }
97
+
98
+ function and(euint256 a, euint256 b) internal returns (euint256) {
99
+ return euint256.wrap(inco.eBitAnd(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
100
+ }
101
+
102
+ function and(euint256 a, uint256 b) internal returns (euint256) {
103
+ return euint256.wrap(inco.eBitAnd(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
104
+ }
105
+
106
+ function and(uint256 a, euint256 b) internal returns (euint256) {
107
+ return euint256.wrap(inco.eBitAnd(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
108
+ }
109
+
110
+ function and(ebool a, ebool b) internal returns (ebool) {
111
+ return ebool.wrap(inco.eBitAnd(ebool.unwrap(s(a)), ebool.unwrap(s(b))));
112
+ }
113
+
114
+ function and(ebool a, bool b) internal returns (ebool) {
115
+ return ebool.wrap(inco.eBitAnd(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
116
+ }
117
+
118
+ function and(bool a, ebool b) internal returns (ebool) {
119
+ return ebool.wrap(inco.eBitAnd(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
120
+ }
121
+
122
+ function or(euint256 a, euint256 b) internal returns (euint256) {
123
+ return euint256.wrap(inco.eBitOr(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
124
+ }
125
+
126
+ function or(euint256 a, uint256 b) internal returns (euint256) {
127
+ return euint256.wrap(inco.eBitOr(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
128
+ }
129
+
130
+ function or(uint256 a, euint256 b) internal returns (euint256) {
131
+ return euint256.wrap(inco.eBitOr(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
132
+ }
133
+
134
+ function or(ebool a, ebool b) internal returns (ebool) {
135
+ return ebool.wrap(inco.eBitOr(ebool.unwrap(s(a)), ebool.unwrap(s(b))));
136
+ }
137
+
138
+ function or(ebool a, bool b) internal returns (ebool) {
139
+ return ebool.wrap(inco.eBitOr(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
140
+ }
141
+
142
+ function or(bool a, ebool b) internal returns (ebool) {
143
+ return ebool.wrap(inco.eBitOr(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
144
+ }
145
+
146
+ function xor(euint256 a, euint256 b) internal returns (euint256) {
147
+ return euint256.wrap(inco.eBitXor(euint256.unwrap(s(a)), euint256.unwrap(s(b))));
148
+ }
149
+
150
+ function xor(euint256 a, uint256 b) internal returns (euint256) {
151
+ return euint256.wrap(inco.eBitXor(euint256.unwrap(s(a)), euint256.unwrap(asEuint256(b))));
152
+ }
153
+
154
+ function xor(uint256 a, euint256 b) internal returns (euint256) {
155
+ return euint256.wrap(inco.eBitXor(euint256.unwrap(asEuint256(a)), euint256.unwrap(s(b))));
156
+ }
157
+
158
+ function xor(ebool a, ebool b) internal returns (ebool) {
159
+ return ebool.wrap(inco.eBitXor(ebool.unwrap(s(a)), ebool.unwrap(s(b))));
160
+ }
161
+
162
+ function xor(ebool a, bool b) internal returns (ebool) {
163
+ return ebool.wrap(inco.eBitXor(ebool.unwrap(s(a)), ebool.unwrap(asEbool(b))));
164
+ }
165
+
166
+ function xor(bool a, ebool b) internal returns (ebool) {
167
+ return ebool.wrap(inco.eBitXor(ebool.unwrap(asEbool(a)), ebool.unwrap(s(b))));
168
+ }
169
+
170
+ function shl(euint256 a, euint256 b) internal returns (euint256) {
171
+ return inco.eShl(s(a), s(b));
172
+ }
173
+
174
+ function shl(euint256 a, uint256 b) internal returns (euint256) {
175
+ return inco.eShl(s(a), asEuint256(b));
176
+ }
177
+
178
+ function shl(uint256 a, euint256 b) internal returns (euint256) {
179
+ return inco.eShl(asEuint256(a), s(b));
180
+ }
181
+
182
+ function shr(euint256 a, euint256 b) internal returns (euint256) {
183
+ return inco.eShr(s(a), s(b));
184
+ }
185
+
186
+ function shr(euint256 a, uint256 b) internal returns (euint256) {
187
+ return inco.eShr(s(a), asEuint256(b));
188
+ }
189
+
190
+ function shr(uint256 a, euint256 b) internal returns (euint256) {
191
+ return inco.eShr(asEuint256(a), s(b));
192
+ }
193
+
194
+ function rotl(euint256 a, euint256 b) internal returns (euint256) {
195
+ return inco.eRotl(s(a), s(b));
196
+ }
197
+
198
+ function rotl(euint256 a, uint256 b) internal returns (euint256) {
199
+ return inco.eRotl(s(a), asEuint256(b));
200
+ }
201
+
202
+ function rotl(uint256 a, euint256 b) internal returns (euint256) {
203
+ return inco.eRotl(asEuint256(a), s(b));
204
+ }
205
+
206
+ function rotr(euint256 a, euint256 b) internal returns (euint256) {
207
+ return inco.eRotr(s(a), s(b));
208
+ }
209
+
210
+ function rotr(euint256 a, uint256 b) internal returns (euint256) {
211
+ return inco.eRotr(s(a), asEuint256(b));
212
+ }
213
+
214
+ function rotr(uint256 a, euint256 b) internal returns (euint256) {
215
+ return inco.eRotr(asEuint256(a), s(b));
216
+ }
217
+
218
+ function eq(euint256 a, euint256 b) internal returns (ebool) {
219
+ return inco.eEq(s(a), s(b));
220
+ }
221
+
222
+ function eq(euint256 a, uint256 b) internal returns (ebool) {
223
+ return inco.eEq(s(a), asEuint256(b));
224
+ }
225
+
226
+ function eq(uint256 a, euint256 b) internal returns (ebool) {
227
+ return inco.eEq(asEuint256(a), s(b));
228
+ }
229
+
230
+ function ne(euint256 a, euint256 b) internal returns (ebool) {
231
+ return inco.eNe(s(a), s(b));
232
+ }
233
+
234
+ function ne(euint256 a, uint256 b) internal returns (ebool) {
235
+ return inco.eNe(s(a), asEuint256(b));
236
+ }
237
+
238
+ function ne(uint256 a, euint256 b) internal returns (ebool) {
239
+ return inco.eNe(asEuint256(a), s(b));
240
+ }
241
+
242
+ function ge(euint256 a, euint256 b) internal returns (ebool) {
243
+ return inco.eGe(s(a), s(b));
244
+ }
245
+
246
+ function ge(euint256 a, uint256 b) internal returns (ebool) {
247
+ return inco.eGe(s(a), asEuint256(b));
248
+ }
249
+
250
+ function ge(uint256 a, euint256 b) internal returns (ebool) {
251
+ return inco.eGe(asEuint256(a), s(b));
252
+ }
253
+
254
+ function gt(euint256 a, euint256 b) internal returns (ebool) {
255
+ return inco.eGt(s(a), s(b));
256
+ }
257
+
258
+ function gt(euint256 a, uint256 b) internal returns (ebool) {
259
+ return inco.eGt(s(a), asEuint256(b));
260
+ }
261
+
262
+ function gt(uint256 a, euint256 b) internal returns (ebool) {
263
+ return inco.eGt(asEuint256(a), s(b));
264
+ }
265
+
266
+ function le(euint256 a, euint256 b) internal returns (ebool) {
267
+ return inco.eLe(s(a), s(b));
268
+ }
269
+
270
+ function le(euint256 a, uint256 b) internal returns (ebool) {
271
+ return inco.eLe(s(a), asEuint256(b));
272
+ }
273
+
274
+ function le(uint256 a, euint256 b) internal returns (ebool) {
275
+ return inco.eLe(asEuint256(a), s(b));
276
+ }
277
+
278
+ function lt(euint256 a, euint256 b) internal returns (ebool) {
279
+ return inco.eLt(s(a), s(b));
280
+ }
281
+
282
+ function lt(euint256 a, uint256 b) internal returns (ebool) {
283
+ return inco.eLt(s(a), asEuint256(b));
284
+ }
285
+
286
+ function lt(uint256 a, euint256 b) internal returns (ebool) {
287
+ return inco.eLt(asEuint256(a), s(b));
288
+ }
289
+
290
+ function min(euint256 a, euint256 b) internal returns (euint256) {
291
+ return inco.eMin(s(a), s(b));
292
+ }
293
+
294
+ function min(euint256 a, uint256 b) internal returns (euint256) {
295
+ return inco.eMin(s(a), asEuint256(b));
296
+ }
297
+
298
+ function min(uint256 a, euint256 b) internal returns (euint256) {
299
+ return inco.eMin(asEuint256(a), s(b));
300
+ }
301
+
302
+ function max(euint256 a, euint256 b) internal returns (euint256) {
303
+ return inco.eMax(s(a), s(b));
304
+ }
305
+
306
+ function max(euint256 a, uint256 b) internal returns (euint256) {
307
+ return inco.eMax(s(a), asEuint256(b));
308
+ }
309
+
310
+ function max(uint256 a, euint256 b) internal returns (euint256) {
311
+ return inco.eMax(asEuint256(a), s(b));
312
+ }
313
+
314
+ function not(ebool a) internal returns (ebool) {
315
+ return inco.eNot(s(a));
316
+ }
317
+
318
+ function rand() internal returns (euint256) {
319
+ return euint256.wrap(inco.eRand(ETypes.Uint256));
320
+ }
321
+
322
+ function randBounded(uint256 upperBound) internal returns (euint256) {
323
+ return euint256.wrap(inco.eRandBounded(euint256.unwrap(asEuint256(upperBound)), ETypes.Uint256));
324
+ }
325
+
326
+ function randBounded(euint256 upperBound) internal returns (euint256) {
327
+ return euint256.wrap(inco.eRandBounded(euint256.unwrap(s(upperBound)), ETypes.Uint256));
328
+ }
329
+
330
+ function asEuint256(uint256 a) internal returns (euint256) {
331
+ return inco.asEuint256(a);
332
+ }
333
+
334
+ function asEbool(bool a) internal returns (ebool) {
335
+ return inco.asEbool(a);
336
+ }
337
+
338
+ function asEbool(euint256 a) internal returns (ebool) {
339
+ return ebool.wrap(inco.eCast(euint256.unwrap(a), ETypes.Bool));
340
+ }
341
+
342
+ function asEuint256(ebool a) internal returns (euint256) {
343
+ return euint256.wrap(inco.eCast(ebool.unwrap(a), ETypes.Uint256));
344
+ }
345
+
346
+ function newEuint256(bytes memory ciphertext, address user) internal returns (euint256) {
347
+ return inco.newEuint256(ciphertext, user);
348
+ }
349
+
350
+ function newEbool(bytes memory ciphertext, address user) internal returns (ebool) {
351
+ return inco.newEbool(ciphertext, user);
352
+ }
353
+
354
+ function allow(euint256 a, address to) internal {
355
+ inco.allow(euint256.unwrap(a), to);
356
+ }
357
+
358
+ function allow(ebool a, address to) internal {
359
+ inco.allow(ebool.unwrap(a), to);
360
+ }
361
+
362
+ function allowThis(euint256 a) internal {
363
+ allow(a, address(this));
364
+ }
365
+
366
+ function allowThis(ebool a) internal {
367
+ allow(a, address(this));
368
+ }
369
+
370
+ function isAllowed(address user, euint256 a) internal view returns (bool) {
371
+ return inco.isAllowed(euint256.unwrap(a), user);
372
+ }
373
+
374
+ function select(ebool control, euint256 ifTrue, euint256 ifFalse) internal returns (euint256) {
375
+ return euint256.wrap(inco.eIfThenElse(s(control), euint256.unwrap(s(ifTrue)), euint256.unwrap(s(ifFalse))));
376
+ }
377
+
378
+ function select(ebool control, ebool ifTrue, ebool ifFalse) internal returns (ebool) {
379
+ return ebool.wrap(inco.eIfThenElse(s(control), ebool.unwrap(s(ifTrue)), ebool.unwrap(s(ifFalse))));
380
+ }
381
+
382
+ function requestDecryption(euint256 a, bytes4 callbackSelector, bytes memory callbackData) internal returns (uint256 requestId) {
383
+ requestId = inco.requestDecryption(callbackSelector, block.timestamp + defaultDecryptionDelayLimit, euint256.unwrap(s(a)), callbackData);
384
+ }
385
+
386
+ function requestDecryption(ebool a, bytes4 callbackSelector, bytes memory callbackData) internal returns (uint256 requestId) {
387
+ requestId = inco.requestDecryption(callbackSelector, block.timestamp + defaultDecryptionDelayLimit, ebool.unwrap(s(a)), callbackData);
388
+ }
389
+ }