zkjson 0.1.16 → 0.1.17

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.
@@ -203,6 +203,13 @@ contract ZKQuery {
203
203
  return true;
204
204
  }
205
205
 
206
+ function _qCond (uint[] memory value, uint[] memory cond) internal pure returns (bool) {
207
+ uint[] memory _cond = toArr(cond);
208
+ require(value.length == _cond.length, "wrong query");
209
+ for(uint i = 0; i < value.length; i++) require(_cond[i] == value[i], "wrong query");
210
+ return true;
211
+ }
212
+
206
213
  function getInt (uint[] memory path, uint[] memory raw) internal pure returns (int) {
207
214
  uint[] memory value = getVal(path, raw);
208
215
  return _qInt(value);
@@ -222,6 +229,7 @@ contract ZKQuery {
222
229
  uint[] memory value = getVal(path, raw);
223
230
  _qNull(value);
224
231
  }
232
+
225
233
  function verify(uint[] memory zkp, bytes4 selector, address addr) internal view returns (bool) {
226
234
  uint size;
227
235
  assembly {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zkjson",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Zero Knowledge Provable JSON",
5
5
  "main": "index.js",
6
6
  "license": "MIT",