zkjson 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- package/db.js +12 -13
- package/package.json +1 -1
package/db.js
CHANGED
@@ -79,7 +79,7 @@ class DB {
|
|
79
79
|
const { proof, publicSignals } = await snarkjs.groth16.fullProve(
|
80
80
|
inputs,
|
81
81
|
this.wasm,
|
82
|
-
this.zkey
|
82
|
+
this.zkey,
|
83
83
|
)
|
84
84
|
return [
|
85
85
|
...proof.pi_a.slice(0, 2),
|
@@ -95,7 +95,7 @@ class DB {
|
|
95
95
|
const { proof, publicSignals } = await snarkjs.groth16.fullProve(
|
96
96
|
inputs,
|
97
97
|
this.wasmRU,
|
98
|
-
this.zkeyRU
|
98
|
+
this.zkeyRU,
|
99
99
|
)
|
100
100
|
return [
|
101
101
|
...proof.pi_a.slice(0, 2),
|
@@ -115,14 +115,14 @@ class DB {
|
|
115
115
|
val === null
|
116
116
|
? 0
|
117
117
|
: typeof val === "string"
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
118
|
+
? 3
|
119
|
+
: typeof val === "boolean"
|
120
|
+
? 1
|
121
|
+
: typeof val === "number"
|
122
|
+
? Number.isInteger(val)
|
123
|
+
? 2
|
124
|
+
: 2.5
|
125
|
+
: 4
|
126
126
|
switch (type) {
|
127
127
|
case 0:
|
128
128
|
return await this.zkdb.qNull(...params)
|
@@ -335,9 +335,8 @@ class DB {
|
|
335
335
|
const _col = this.getColTree(col)
|
336
336
|
return await _col.get(_key)
|
337
337
|
}
|
338
|
-
async getCol(
|
339
|
-
|
340
|
-
return await this.tree.find(id)
|
338
|
+
async getCol(col) {
|
339
|
+
return await this.tree.find(col)
|
341
340
|
}
|
342
341
|
}
|
343
342
|
|