@vocdoni/proto 1.15.11 → 1.15.13
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/build/js/client-store/index.js +124 -99
- package/build/js/client-store/index.mjs +141 -109
- package/build/js/{index-b83a5c8c.d.ts → index-1aac8cbb.d.ts} +20 -1
- package/build/js/index.d.ts +1 -1
- package/build/js/index.js +146 -106
- package/build/js/index.mjs +163 -116
- package/build/js/metadata/index.js +124 -99
- package/build/js/metadata/index.mjs +141 -109
- package/build/js/vochain/index.d.ts +1 -1
- package/build/js/vochain/index.js +146 -106
- package/build/js/vochain/index.mjs +163 -116
- package/package.json +1 -1
|
@@ -4,8 +4,15 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
8
|
-
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined")
|
|
11
|
+
return require.apply(this, arguments);
|
|
12
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
16
|
};
|
|
10
17
|
var __export = (target, all) => {
|
|
11
18
|
for (var name in all)
|
|
@@ -19,20 +26,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
26
|
}
|
|
20
27
|
return to;
|
|
21
28
|
};
|
|
22
|
-
var __toESM = (
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
30
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
31
|
// file that has been converted to a CommonJS file using a Babel-
|
|
25
32
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
33
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !
|
|
28
|
-
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
29
36
|
));
|
|
30
37
|
|
|
31
38
|
// node_modules/@protobufjs/aspromise/index.js
|
|
32
39
|
var require_aspromise = __commonJS({
|
|
33
|
-
"node_modules/@protobufjs/aspromise/index.js"(
|
|
40
|
+
"node_modules/@protobufjs/aspromise/index.js"(exports, module) {
|
|
34
41
|
"use strict";
|
|
35
|
-
|
|
42
|
+
module.exports = asPromise;
|
|
36
43
|
function asPromise(fn, ctx) {
|
|
37
44
|
var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
|
|
38
45
|
while (index < arguments.length)
|
|
@@ -66,9 +73,9 @@ var require_aspromise = __commonJS({
|
|
|
66
73
|
|
|
67
74
|
// node_modules/@protobufjs/base64/index.js
|
|
68
75
|
var require_base64 = __commonJS({
|
|
69
|
-
"node_modules/@protobufjs/base64/index.js"(
|
|
76
|
+
"node_modules/@protobufjs/base64/index.js"(exports) {
|
|
70
77
|
"use strict";
|
|
71
|
-
var base64 =
|
|
78
|
+
var base64 = exports;
|
|
72
79
|
base64.length = function length(string) {
|
|
73
80
|
var p = string.length;
|
|
74
81
|
if (!p)
|
|
@@ -166,11 +173,11 @@ var require_base64 = __commonJS({
|
|
|
166
173
|
|
|
167
174
|
// node_modules/@protobufjs/eventemitter/index.js
|
|
168
175
|
var require_eventemitter = __commonJS({
|
|
169
|
-
"node_modules/@protobufjs/eventemitter/index.js"(
|
|
176
|
+
"node_modules/@protobufjs/eventemitter/index.js"(exports, module) {
|
|
170
177
|
"use strict";
|
|
171
|
-
|
|
178
|
+
module.exports = EventEmitter;
|
|
172
179
|
function EventEmitter() {
|
|
173
|
-
this._listeners =
|
|
180
|
+
this._listeners = /* @__PURE__ */ Object.create(null);
|
|
174
181
|
}
|
|
175
182
|
EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
|
176
183
|
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
|
@@ -181,12 +188,14 @@ var require_eventemitter = __commonJS({
|
|
|
181
188
|
};
|
|
182
189
|
EventEmitter.prototype.off = function off(evt, fn) {
|
|
183
190
|
if (evt === void 0)
|
|
184
|
-
this._listeners =
|
|
191
|
+
this._listeners = /* @__PURE__ */ Object.create(null);
|
|
185
192
|
else {
|
|
186
193
|
if (fn === void 0)
|
|
187
194
|
this._listeners[evt] = [];
|
|
188
195
|
else {
|
|
189
196
|
var listeners = this._listeners[evt];
|
|
197
|
+
if (!listeners)
|
|
198
|
+
return this;
|
|
190
199
|
for (var i = 0; i < listeners.length; )
|
|
191
200
|
if (listeners[i].fn === fn)
|
|
192
201
|
listeners.splice(i, 1);
|
|
@@ -212,10 +221,10 @@ var require_eventemitter = __commonJS({
|
|
|
212
221
|
|
|
213
222
|
// node_modules/@protobufjs/float/index.js
|
|
214
223
|
var require_float = __commonJS({
|
|
215
|
-
"node_modules/@protobufjs/float/index.js"(
|
|
224
|
+
"node_modules/@protobufjs/float/index.js"(exports, module) {
|
|
216
225
|
"use strict";
|
|
217
|
-
|
|
218
|
-
function factory(
|
|
226
|
+
module.exports = factory(factory);
|
|
227
|
+
function factory(exports2) {
|
|
219
228
|
if (typeof Float32Array !== "undefined")
|
|
220
229
|
(function() {
|
|
221
230
|
var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
|
|
@@ -233,8 +242,8 @@ var require_float = __commonJS({
|
|
|
233
242
|
buf[pos + 2] = f8b[1];
|
|
234
243
|
buf[pos + 3] = f8b[0];
|
|
235
244
|
}
|
|
236
|
-
|
|
237
|
-
|
|
245
|
+
exports2.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
|
|
246
|
+
exports2.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
|
|
238
247
|
function readFloat_f32_cpy(buf, pos) {
|
|
239
248
|
f8b[0] = buf[pos];
|
|
240
249
|
f8b[1] = buf[pos + 1];
|
|
@@ -249,8 +258,8 @@ var require_float = __commonJS({
|
|
|
249
258
|
f8b[0] = buf[pos + 3];
|
|
250
259
|
return f32[0];
|
|
251
260
|
}
|
|
252
|
-
|
|
253
|
-
|
|
261
|
+
exports2.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
|
|
262
|
+
exports2.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
|
254
263
|
})();
|
|
255
264
|
else
|
|
256
265
|
(function() {
|
|
@@ -277,14 +286,14 @@ var require_float = __commonJS({
|
|
|
277
286
|
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
|
278
287
|
}
|
|
279
288
|
}
|
|
280
|
-
|
|
281
|
-
|
|
289
|
+
exports2.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
|
|
290
|
+
exports2.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
|
|
282
291
|
function readFloat_ieee754(readUint, buf, pos) {
|
|
283
292
|
var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
|
|
284
293
|
return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
|
285
294
|
}
|
|
286
|
-
|
|
287
|
-
|
|
295
|
+
exports2.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
|
|
296
|
+
exports2.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
|
|
288
297
|
})();
|
|
289
298
|
if (typeof Float64Array !== "undefined")
|
|
290
299
|
(function() {
|
|
@@ -311,8 +320,8 @@ var require_float = __commonJS({
|
|
|
311
320
|
buf[pos + 6] = f8b[1];
|
|
312
321
|
buf[pos + 7] = f8b[0];
|
|
313
322
|
}
|
|
314
|
-
|
|
315
|
-
|
|
323
|
+
exports2.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
|
|
324
|
+
exports2.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
|
316
325
|
function readDouble_f64_cpy(buf, pos) {
|
|
317
326
|
f8b[0] = buf[pos];
|
|
318
327
|
f8b[1] = buf[pos + 1];
|
|
@@ -335,8 +344,8 @@ var require_float = __commonJS({
|
|
|
335
344
|
f8b[0] = buf[pos + 7];
|
|
336
345
|
return f64[0];
|
|
337
346
|
}
|
|
338
|
-
|
|
339
|
-
|
|
347
|
+
exports2.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
|
|
348
|
+
exports2.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
|
340
349
|
})();
|
|
341
350
|
else
|
|
342
351
|
(function() {
|
|
@@ -375,17 +384,17 @@ var require_float = __commonJS({
|
|
|
375
384
|
}
|
|
376
385
|
}
|
|
377
386
|
}
|
|
378
|
-
|
|
379
|
-
|
|
387
|
+
exports2.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
|
|
388
|
+
exports2.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
|
|
380
389
|
function readDouble_ieee754(readUint, off0, off1, buf, pos) {
|
|
381
390
|
var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
|
|
382
391
|
var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
|
|
383
392
|
return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
|
384
393
|
}
|
|
385
|
-
|
|
386
|
-
|
|
394
|
+
exports2.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
|
|
395
|
+
exports2.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
|
|
387
396
|
})();
|
|
388
|
-
return
|
|
397
|
+
return exports2;
|
|
389
398
|
}
|
|
390
399
|
function writeUintLE(val, buf, pos) {
|
|
391
400
|
buf[pos] = val & 255;
|
|
@@ -408,28 +417,12 @@ var require_float = __commonJS({
|
|
|
408
417
|
}
|
|
409
418
|
});
|
|
410
419
|
|
|
411
|
-
// node_modules/@protobufjs/inquire/index.js
|
|
412
|
-
var require_inquire = __commonJS({
|
|
413
|
-
"node_modules/@protobufjs/inquire/index.js"(exports, module) {
|
|
414
|
-
"use strict";
|
|
415
|
-
module.exports = inquire;
|
|
416
|
-
function inquire(moduleName) {
|
|
417
|
-
try {
|
|
418
|
-
var mod = eval("quire".replace(/^/, "re"))(moduleName);
|
|
419
|
-
if (mod && (mod.length || Object.keys(mod).length))
|
|
420
|
-
return mod;
|
|
421
|
-
} catch (e) {
|
|
422
|
-
}
|
|
423
|
-
return null;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
|
|
428
420
|
// node_modules/@protobufjs/utf8/index.js
|
|
429
421
|
var require_utf8 = __commonJS({
|
|
430
|
-
"node_modules/@protobufjs/utf8/index.js"(
|
|
422
|
+
"node_modules/@protobufjs/utf8/index.js"(exports) {
|
|
431
423
|
"use strict";
|
|
432
|
-
var utf8 =
|
|
424
|
+
var utf8 = exports;
|
|
425
|
+
var replacementCharCode = 65533;
|
|
433
426
|
utf8.length = function utf8_length(string) {
|
|
434
427
|
var len = 0, c = 0;
|
|
435
428
|
for (var i = 0; i < string.length; ++i) {
|
|
@@ -447,24 +440,31 @@ var require_utf8 = __commonJS({
|
|
|
447
440
|
return len;
|
|
448
441
|
};
|
|
449
442
|
utf8.read = function utf8_read(buffer, start, end) {
|
|
450
|
-
|
|
451
|
-
if (len < 1)
|
|
443
|
+
if (end - start < 1)
|
|
452
444
|
return "";
|
|
453
|
-
var parts = null, chunk = [], i = 0, t;
|
|
445
|
+
var parts = null, chunk = [], i = 0, t, t2, c2, c3;
|
|
454
446
|
while (start < end) {
|
|
455
447
|
t = buffer[start++];
|
|
456
|
-
if (t
|
|
448
|
+
if (t <= 127) {
|
|
457
449
|
chunk[i++] = t;
|
|
458
|
-
else if (t
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
chunk[i++] =
|
|
464
|
-
} else
|
|
465
|
-
|
|
450
|
+
} else if (t >= 192 && t < 224) {
|
|
451
|
+
c2 = (t & 31) << 6 | buffer[start++] & 63;
|
|
452
|
+
chunk[i++] = c2 >= 128 ? c2 : replacementCharCode;
|
|
453
|
+
} else if (t >= 224 && t < 240) {
|
|
454
|
+
c3 = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
455
|
+
chunk[i++] = c3 >= 2048 ? c3 : replacementCharCode;
|
|
456
|
+
} else if (t >= 240) {
|
|
457
|
+
t2 = (t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
458
|
+
if (t2 < 65536 || t2 > 1114111)
|
|
459
|
+
chunk[i++] = replacementCharCode;
|
|
460
|
+
else {
|
|
461
|
+
t2 -= 65536;
|
|
462
|
+
chunk[i++] = 55296 + (t2 >> 10);
|
|
463
|
+
chunk[i++] = 56320 + (t2 & 1023);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
466
|
if (i > 8191) {
|
|
467
|
-
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
467
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
468
468
|
i = 0;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
@@ -504,9 +504,9 @@ var require_utf8 = __commonJS({
|
|
|
504
504
|
|
|
505
505
|
// node_modules/@protobufjs/pool/index.js
|
|
506
506
|
var require_pool = __commonJS({
|
|
507
|
-
"node_modules/@protobufjs/pool/index.js"(
|
|
507
|
+
"node_modules/@protobufjs/pool/index.js"(exports, module) {
|
|
508
508
|
"use strict";
|
|
509
|
-
|
|
509
|
+
module.exports = pool;
|
|
510
510
|
function pool(alloc, slice, size) {
|
|
511
511
|
var SIZE = size || 8192;
|
|
512
512
|
var MAX = SIZE >>> 1;
|
|
@@ -530,9 +530,9 @@ var require_pool = __commonJS({
|
|
|
530
530
|
|
|
531
531
|
// node_modules/protobufjs/src/util/longbits.js
|
|
532
532
|
var require_longbits = __commonJS({
|
|
533
|
-
"node_modules/protobufjs/src/util/longbits.js"(
|
|
533
|
+
"node_modules/protobufjs/src/util/longbits.js"(exports, module) {
|
|
534
534
|
"use strict";
|
|
535
|
-
|
|
535
|
+
module.exports = LongBits;
|
|
536
536
|
var util = require_minimal();
|
|
537
537
|
function LongBits(lo, hi) {
|
|
538
538
|
this.lo = lo >>> 0;
|
|
@@ -632,19 +632,22 @@ var require_longbits = __commonJS({
|
|
|
632
632
|
|
|
633
633
|
// node_modules/protobufjs/src/util/minimal.js
|
|
634
634
|
var require_minimal = __commonJS({
|
|
635
|
-
"node_modules/protobufjs/src/util/minimal.js"(
|
|
635
|
+
"node_modules/protobufjs/src/util/minimal.js"(exports) {
|
|
636
636
|
"use strict";
|
|
637
|
-
var util =
|
|
637
|
+
var util = exports;
|
|
638
638
|
util.asPromise = require_aspromise();
|
|
639
639
|
util.base64 = require_base64();
|
|
640
640
|
util.EventEmitter = require_eventemitter();
|
|
641
641
|
util.float = require_float();
|
|
642
|
-
util.inquire = require_inquire();
|
|
643
642
|
util.utf8 = require_utf8();
|
|
644
643
|
util.pool = require_pool();
|
|
645
644
|
util.LongBits = require_longbits();
|
|
645
|
+
function isUnsafeProperty(key) {
|
|
646
|
+
return key === "__proto__" || key === "prototype" || key === "constructor";
|
|
647
|
+
}
|
|
648
|
+
util.isUnsafeProperty = isUnsafeProperty;
|
|
646
649
|
util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
|
|
647
|
-
util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self ||
|
|
650
|
+
util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports;
|
|
648
651
|
util.emptyArray = Object.freeze ? Object.freeze([]) : (
|
|
649
652
|
/* istanbul ignore next */
|
|
650
653
|
[]
|
|
@@ -671,13 +674,13 @@ var require_minimal = __commonJS({
|
|
|
671
674
|
*/
|
|
672
675
|
util.isSet = function isSet6(obj, prop) {
|
|
673
676
|
var value = obj[prop];
|
|
674
|
-
if (value != null &&
|
|
677
|
+
if (value != null && Object.hasOwnProperty.call(obj, prop))
|
|
675
678
|
return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
|
|
676
679
|
return false;
|
|
677
680
|
};
|
|
678
681
|
util.Buffer = function() {
|
|
679
682
|
try {
|
|
680
|
-
var Buffer2 = util.
|
|
683
|
+
var Buffer2 = util.global.Buffer;
|
|
681
684
|
return Buffer2.prototype.utf8Write ? Buffer2 : (
|
|
682
685
|
/* istanbul ignore next */
|
|
683
686
|
null
|
|
@@ -695,7 +698,14 @@ var require_minimal = __commonJS({
|
|
|
695
698
|
util.Long = /* istanbul ignore next */
|
|
696
699
|
util.global.dcodeIO && /* istanbul ignore next */
|
|
697
700
|
util.global.dcodeIO.Long || /* istanbul ignore next */
|
|
698
|
-
util.global.Long ||
|
|
701
|
+
util.global.Long || function() {
|
|
702
|
+
try {
|
|
703
|
+
var Long2 = __require("long");
|
|
704
|
+
return Long2 && Long2.isLong ? Long2 : null;
|
|
705
|
+
} catch (e) {
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
}();
|
|
699
709
|
util.key2Re = /^true|false|0|1$/;
|
|
700
710
|
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
|
|
701
711
|
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
|
|
@@ -708,13 +718,29 @@ var require_minimal = __commonJS({
|
|
|
708
718
|
return util.Long.fromBits(bits.lo, bits.hi, unsigned);
|
|
709
719
|
return bits.toNumber(Boolean(unsigned));
|
|
710
720
|
};
|
|
711
|
-
function merge(dst
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
721
|
+
function merge(dst) {
|
|
722
|
+
var ifNotSet = typeof arguments[arguments.length - 1] === "boolean", limit = ifNotSet ? arguments.length - 1 : arguments.length;
|
|
723
|
+
ifNotSet = ifNotSet && arguments[arguments.length - 1];
|
|
724
|
+
for (var a = 1; a < limit; ++a) {
|
|
725
|
+
var src = arguments[a];
|
|
726
|
+
if (!src)
|
|
727
|
+
continue;
|
|
728
|
+
for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
|
|
729
|
+
if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === void 0 || !ifNotSet))
|
|
730
|
+
dst[keys[i]] = src[keys[i]];
|
|
731
|
+
}
|
|
715
732
|
return dst;
|
|
716
733
|
}
|
|
717
734
|
util.merge = merge;
|
|
735
|
+
util.nestingLimit = 32;
|
|
736
|
+
util.recursionLimit = 100;
|
|
737
|
+
util.makeProp = function makeProp(obj, key) {
|
|
738
|
+
Object.defineProperty(obj, key, {
|
|
739
|
+
enumerable: true,
|
|
740
|
+
configurable: true,
|
|
741
|
+
writable: true
|
|
742
|
+
});
|
|
743
|
+
};
|
|
718
744
|
util.lcFirst = function lcFirst(str) {
|
|
719
745
|
return str.charAt(0).toLowerCase() + str.substring(1);
|
|
720
746
|
};
|
|
@@ -807,9 +833,9 @@ var require_minimal = __commonJS({
|
|
|
807
833
|
|
|
808
834
|
// node_modules/protobufjs/src/writer.js
|
|
809
835
|
var require_writer = __commonJS({
|
|
810
|
-
"node_modules/protobufjs/src/writer.js"(
|
|
836
|
+
"node_modules/protobufjs/src/writer.js"(exports, module) {
|
|
811
837
|
"use strict";
|
|
812
|
-
|
|
838
|
+
module.exports = Writer;
|
|
813
839
|
var util = require_minimal();
|
|
814
840
|
var BufferWriter;
|
|
815
841
|
var LongBits = util.LongBits;
|
|
@@ -880,22 +906,23 @@ var require_writer = __commonJS({
|
|
|
880
906
|
return this;
|
|
881
907
|
};
|
|
882
908
|
Writer.prototype.int32 = function write_int32(value) {
|
|
883
|
-
return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
|
|
909
|
+
return (value |= 0) < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
|
|
884
910
|
};
|
|
885
911
|
Writer.prototype.sint32 = function write_sint32(value) {
|
|
886
912
|
return this.uint32((value << 1 ^ value >> 31) >>> 0);
|
|
887
913
|
};
|
|
888
914
|
function writeVarint64(val, buf, pos) {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
915
|
+
var lo = val.lo, hi = val.hi;
|
|
916
|
+
while (hi) {
|
|
917
|
+
buf[pos++] = lo & 127 | 128;
|
|
918
|
+
lo = (lo >>> 7 | hi << 25) >>> 0;
|
|
919
|
+
hi >>>= 7;
|
|
893
920
|
}
|
|
894
|
-
while (
|
|
895
|
-
buf[pos++] =
|
|
896
|
-
|
|
921
|
+
while (lo > 127) {
|
|
922
|
+
buf[pos++] = lo & 127 | 128;
|
|
923
|
+
lo = lo >>> 7;
|
|
897
924
|
}
|
|
898
|
-
buf[pos++] =
|
|
925
|
+
buf[pos++] = lo;
|
|
899
926
|
}
|
|
900
927
|
Writer.prototype.uint64 = function write_uint64(value) {
|
|
901
928
|
var bits = LongBits.from(value);
|
|
@@ -998,9 +1025,9 @@ var require_writer = __commonJS({
|
|
|
998
1025
|
|
|
999
1026
|
// node_modules/protobufjs/src/writer_buffer.js
|
|
1000
1027
|
var require_writer_buffer = __commonJS({
|
|
1001
|
-
"node_modules/protobufjs/src/writer_buffer.js"(
|
|
1028
|
+
"node_modules/protobufjs/src/writer_buffer.js"(exports, module) {
|
|
1002
1029
|
"use strict";
|
|
1003
|
-
|
|
1030
|
+
module.exports = BufferWriter;
|
|
1004
1031
|
var Writer = require_writer();
|
|
1005
1032
|
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
|
1006
1033
|
var util = require_minimal();
|
|
@@ -1049,9 +1076,9 @@ var require_writer_buffer = __commonJS({
|
|
|
1049
1076
|
|
|
1050
1077
|
// node_modules/protobufjs/src/reader.js
|
|
1051
1078
|
var require_reader = __commonJS({
|
|
1052
|
-
"node_modules/protobufjs/src/reader.js"(
|
|
1079
|
+
"node_modules/protobufjs/src/reader.js"(exports, module) {
|
|
1053
1080
|
"use strict";
|
|
1054
|
-
|
|
1081
|
+
module.exports = Reader;
|
|
1055
1082
|
var util = require_minimal();
|
|
1056
1083
|
var BufferReader;
|
|
1057
1084
|
var LongBits = util.LongBits;
|
|
@@ -1222,7 +1249,12 @@ var require_reader = __commonJS({
|
|
|
1222
1249
|
}
|
|
1223
1250
|
return this;
|
|
1224
1251
|
};
|
|
1225
|
-
Reader.
|
|
1252
|
+
Reader.recursionLimit = util.recursionLimit;
|
|
1253
|
+
Reader.prototype.skipType = function(wireType, depth) {
|
|
1254
|
+
if (depth === void 0)
|
|
1255
|
+
depth = 0;
|
|
1256
|
+
if (depth > Reader.recursionLimit)
|
|
1257
|
+
throw Error("maximum nesting depth exceeded");
|
|
1226
1258
|
switch (wireType) {
|
|
1227
1259
|
case 0:
|
|
1228
1260
|
this.skip();
|
|
@@ -1235,7 +1267,7 @@ var require_reader = __commonJS({
|
|
|
1235
1267
|
break;
|
|
1236
1268
|
case 3:
|
|
1237
1269
|
while ((wireType = this.uint32() & 7) !== 4) {
|
|
1238
|
-
this.skipType(wireType);
|
|
1270
|
+
this.skipType(wireType, depth + 1);
|
|
1239
1271
|
}
|
|
1240
1272
|
break;
|
|
1241
1273
|
case 5:
|
|
@@ -1277,9 +1309,9 @@ var require_reader = __commonJS({
|
|
|
1277
1309
|
|
|
1278
1310
|
// node_modules/protobufjs/src/reader_buffer.js
|
|
1279
1311
|
var require_reader_buffer = __commonJS({
|
|
1280
|
-
"node_modules/protobufjs/src/reader_buffer.js"(
|
|
1312
|
+
"node_modules/protobufjs/src/reader_buffer.js"(exports, module) {
|
|
1281
1313
|
"use strict";
|
|
1282
|
-
|
|
1314
|
+
module.exports = BufferReader;
|
|
1283
1315
|
var Reader = require_reader();
|
|
1284
1316
|
(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
|
|
1285
1317
|
var util = require_minimal();
|
|
@@ -1300,9 +1332,9 @@ var require_reader_buffer = __commonJS({
|
|
|
1300
1332
|
|
|
1301
1333
|
// node_modules/protobufjs/src/rpc/service.js
|
|
1302
1334
|
var require_service = __commonJS({
|
|
1303
|
-
"node_modules/protobufjs/src/rpc/service.js"(
|
|
1335
|
+
"node_modules/protobufjs/src/rpc/service.js"(exports, module) {
|
|
1304
1336
|
"use strict";
|
|
1305
|
-
|
|
1337
|
+
module.exports = Service;
|
|
1306
1338
|
var util = require_minimal();
|
|
1307
1339
|
(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
|
|
1308
1340
|
function Service(rpcImpl, requestDelimited, responseDelimited) {
|
|
@@ -1375,26 +1407,26 @@ var require_service = __commonJS({
|
|
|
1375
1407
|
|
|
1376
1408
|
// node_modules/protobufjs/src/rpc.js
|
|
1377
1409
|
var require_rpc = __commonJS({
|
|
1378
|
-
"node_modules/protobufjs/src/rpc.js"(
|
|
1410
|
+
"node_modules/protobufjs/src/rpc.js"(exports) {
|
|
1379
1411
|
"use strict";
|
|
1380
|
-
var rpc =
|
|
1412
|
+
var rpc = exports;
|
|
1381
1413
|
rpc.Service = require_service();
|
|
1382
1414
|
}
|
|
1383
1415
|
});
|
|
1384
1416
|
|
|
1385
1417
|
// node_modules/protobufjs/src/roots.js
|
|
1386
1418
|
var require_roots = __commonJS({
|
|
1387
|
-
"node_modules/protobufjs/src/roots.js"(
|
|
1419
|
+
"node_modules/protobufjs/src/roots.js"(exports, module) {
|
|
1388
1420
|
"use strict";
|
|
1389
|
-
|
|
1421
|
+
module.exports = /* @__PURE__ */ Object.create(null);
|
|
1390
1422
|
}
|
|
1391
1423
|
});
|
|
1392
1424
|
|
|
1393
1425
|
// node_modules/protobufjs/src/index-minimal.js
|
|
1394
1426
|
var require_index_minimal = __commonJS({
|
|
1395
|
-
"node_modules/protobufjs/src/index-minimal.js"(
|
|
1427
|
+
"node_modules/protobufjs/src/index-minimal.js"(exports) {
|
|
1396
1428
|
"use strict";
|
|
1397
|
-
var protobuf =
|
|
1429
|
+
var protobuf = exports;
|
|
1398
1430
|
protobuf.build = "minimal";
|
|
1399
1431
|
protobuf.Writer = require_writer();
|
|
1400
1432
|
protobuf.BufferWriter = require_writer_buffer();
|
|
@@ -1415,9 +1447,9 @@ var require_index_minimal = __commonJS({
|
|
|
1415
1447
|
|
|
1416
1448
|
// node_modules/protobufjs/minimal.js
|
|
1417
1449
|
var require_minimal2 = __commonJS({
|
|
1418
|
-
"node_modules/protobufjs/minimal.js"(
|
|
1450
|
+
"node_modules/protobufjs/minimal.js"(exports, module) {
|
|
1419
1451
|
"use strict";
|
|
1420
|
-
|
|
1452
|
+
module.exports = require_index_minimal();
|
|
1421
1453
|
}
|
|
1422
1454
|
});
|
|
1423
1455
|
|
|
@@ -127,6 +127,13 @@ interface VoteEnvelope {
|
|
|
127
127
|
nullifier: Uint8Array;
|
|
128
128
|
/** On encrypted votes, contains the (sorted) indexes of the keys used to encrypt */
|
|
129
129
|
encryptionKeyIndexes: number[];
|
|
130
|
+
/**
|
|
131
|
+
* Optional free-text note attached by the voter (max 256 bytes), e.g. an open "Other" answer.
|
|
132
|
+
* Declared as bytes (not string) so that nodes without this field treat it as an opaque
|
|
133
|
+
* unknown field identically to nodes that have it — avoiding a proto3-string UTF-8 decode
|
|
134
|
+
* divergence during a rolling upgrade. UTF-8/size validation is enforced at the app layer.
|
|
135
|
+
*/
|
|
136
|
+
memo?: Uint8Array | undefined;
|
|
130
137
|
}
|
|
131
138
|
declare const VoteEnvelope: {
|
|
132
139
|
encode(message: VoteEnvelope, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -221,6 +228,7 @@ declare const VoteEnvelope: {
|
|
|
221
228
|
votePackage?: Uint8Array | undefined;
|
|
222
229
|
nullifier?: Uint8Array | undefined;
|
|
223
230
|
encryptionKeyIndexes?: number[] | undefined;
|
|
231
|
+
memo?: Uint8Array | undefined;
|
|
224
232
|
} & {
|
|
225
233
|
nonce?: Uint8Array | undefined;
|
|
226
234
|
processId?: Uint8Array | undefined;
|
|
@@ -531,6 +539,7 @@ declare const VoteEnvelope: {
|
|
|
531
539
|
votePackage?: Uint8Array | undefined;
|
|
532
540
|
nullifier?: Uint8Array | undefined;
|
|
533
541
|
encryptionKeyIndexes?: (number[] & number[] & { [K_27 in Exclude<keyof I["encryptionKeyIndexes"], keyof number[]>]: never; }) | undefined;
|
|
542
|
+
memo?: Uint8Array | undefined;
|
|
534
543
|
} & { [K_28 in Exclude<keyof I, keyof VoteEnvelope>]: never; }>(base?: I | undefined): VoteEnvelope;
|
|
535
544
|
fromPartial<I_1 extends {
|
|
536
545
|
nonce?: Uint8Array | undefined;
|
|
@@ -620,6 +629,7 @@ declare const VoteEnvelope: {
|
|
|
620
629
|
votePackage?: Uint8Array | undefined;
|
|
621
630
|
nullifier?: Uint8Array | undefined;
|
|
622
631
|
encryptionKeyIndexes?: number[] | undefined;
|
|
632
|
+
memo?: Uint8Array | undefined;
|
|
623
633
|
} & {
|
|
624
634
|
nonce?: Uint8Array | undefined;
|
|
625
635
|
processId?: Uint8Array | undefined;
|
|
@@ -930,6 +940,7 @@ declare const VoteEnvelope: {
|
|
|
930
940
|
votePackage?: Uint8Array | undefined;
|
|
931
941
|
nullifier?: Uint8Array | undefined;
|
|
932
942
|
encryptionKeyIndexes?: (number[] & number[] & { [K_56 in Exclude<keyof I_1["encryptionKeyIndexes"], keyof number[]>]: never; }) | undefined;
|
|
943
|
+
memo?: Uint8Array | undefined;
|
|
933
944
|
} & { [K_57 in Exclude<keyof I_1, keyof VoteEnvelope>]: never; }>(object: I_1): VoteEnvelope;
|
|
934
945
|
};
|
|
935
946
|
interface Census {
|
|
@@ -1777,7 +1788,7 @@ declare const ProofCA: {
|
|
|
1777
1788
|
interface CAbundle {
|
|
1778
1789
|
processId: Uint8Array;
|
|
1779
1790
|
address: Uint8Array;
|
|
1780
|
-
voteWeight
|
|
1791
|
+
voteWeight?: Uint8Array | undefined;
|
|
1781
1792
|
}
|
|
1782
1793
|
declare const CAbundle: {
|
|
1783
1794
|
encode(message: CAbundle, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -2139,6 +2150,7 @@ declare const Tx: {
|
|
|
2139
2150
|
votePackage?: Uint8Array | undefined;
|
|
2140
2151
|
nullifier?: Uint8Array | undefined;
|
|
2141
2152
|
encryptionKeyIndexes?: number[] | undefined;
|
|
2153
|
+
memo?: Uint8Array | undefined;
|
|
2142
2154
|
} | undefined;
|
|
2143
2155
|
} & {
|
|
2144
2156
|
$case: "vote";
|
|
@@ -2679,6 +2691,7 @@ declare const Tx: {
|
|
|
2679
2691
|
votePackage?: Uint8Array | undefined;
|
|
2680
2692
|
nullifier?: Uint8Array | undefined;
|
|
2681
2693
|
encryptionKeyIndexes?: number[] | undefined;
|
|
2694
|
+
memo?: Uint8Array | undefined;
|
|
2682
2695
|
} | undefined;
|
|
2683
2696
|
} & {
|
|
2684
2697
|
$case: "vote";
|
|
@@ -2771,6 +2784,7 @@ declare const Tx: {
|
|
|
2771
2784
|
votePackage?: Uint8Array | undefined;
|
|
2772
2785
|
nullifier?: Uint8Array | undefined;
|
|
2773
2786
|
encryptionKeyIndexes?: number[] | undefined;
|
|
2787
|
+
memo?: Uint8Array | undefined;
|
|
2774
2788
|
} & {
|
|
2775
2789
|
nonce?: Uint8Array | undefined;
|
|
2776
2790
|
processId?: Uint8Array | undefined;
|
|
@@ -3081,6 +3095,7 @@ declare const Tx: {
|
|
|
3081
3095
|
votePackage?: Uint8Array | undefined;
|
|
3082
3096
|
nullifier?: Uint8Array | undefined;
|
|
3083
3097
|
encryptionKeyIndexes?: (number[] & number[] & { [K_27 in Exclude<keyof I["payload"]["vote"]["encryptionKeyIndexes"], keyof number[]>]: never; }) | undefined;
|
|
3098
|
+
memo?: Uint8Array | undefined;
|
|
3084
3099
|
} & { [K_28 in Exclude<keyof I["payload"]["vote"], keyof VoteEnvelope>]: never; }) | undefined;
|
|
3085
3100
|
$case: "vote";
|
|
3086
3101
|
} & { [K_29 in Exclude<keyof I["payload"], "$case" | "vote">]: never; }) | ({
|
|
@@ -5231,6 +5246,7 @@ declare const Tx: {
|
|
|
5231
5246
|
votePackage?: Uint8Array | undefined;
|
|
5232
5247
|
nullifier?: Uint8Array | undefined;
|
|
5233
5248
|
encryptionKeyIndexes?: number[] | undefined;
|
|
5249
|
+
memo?: Uint8Array | undefined;
|
|
5234
5250
|
} | undefined;
|
|
5235
5251
|
} & {
|
|
5236
5252
|
$case: "vote";
|
|
@@ -5771,6 +5787,7 @@ declare const Tx: {
|
|
|
5771
5787
|
votePackage?: Uint8Array | undefined;
|
|
5772
5788
|
nullifier?: Uint8Array | undefined;
|
|
5773
5789
|
encryptionKeyIndexes?: number[] | undefined;
|
|
5790
|
+
memo?: Uint8Array | undefined;
|
|
5774
5791
|
} | undefined;
|
|
5775
5792
|
} & {
|
|
5776
5793
|
$case: "vote";
|
|
@@ -5863,6 +5880,7 @@ declare const Tx: {
|
|
|
5863
5880
|
votePackage?: Uint8Array | undefined;
|
|
5864
5881
|
nullifier?: Uint8Array | undefined;
|
|
5865
5882
|
encryptionKeyIndexes?: number[] | undefined;
|
|
5883
|
+
memo?: Uint8Array | undefined;
|
|
5866
5884
|
} & {
|
|
5867
5885
|
nonce?: Uint8Array | undefined;
|
|
5868
5886
|
processId?: Uint8Array | undefined;
|
|
@@ -6173,6 +6191,7 @@ declare const Tx: {
|
|
|
6173
6191
|
votePackage?: Uint8Array | undefined;
|
|
6174
6192
|
nullifier?: Uint8Array | undefined;
|
|
6175
6193
|
encryptionKeyIndexes?: (number[] & number[] & { [K_184 in Exclude<keyof I_1["payload"]["vote"]["encryptionKeyIndexes"], keyof number[]>]: never; }) | undefined;
|
|
6194
|
+
memo?: Uint8Array | undefined;
|
|
6176
6195
|
} & { [K_185 in Exclude<keyof I_1["payload"]["vote"], keyof VoteEnvelope>]: never; }) | undefined;
|
|
6177
6196
|
$case: "vote";
|
|
6178
6197
|
} & { [K_186 in Exclude<keyof I_1["payload"], "$case" | "vote">]: never; }) | ({
|
package/build/js/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { i as ClientStore } from './index-d457aeb5.js';
|
|
2
2
|
export { i as Metadata } from './index-05df597a.js';
|
|
3
|
-
export { i as Vochain } from './index-
|
|
3
|
+
export { i as Vochain } from './index-1aac8cbb.js';
|
|
4
4
|
import 'protobufjs/minimal';
|
|
5
5
|
import './entity-e8dfcd83.js';
|