@dashevo/dapi-grpc 0.21.8 → 0.22.0-dev.10
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/README.md +1 -1
- package/clients/core/v0/nodejs/core_pbjs.js +21 -230
- package/clients/core/v0/nodejs/core_protoc.js +43 -224
- package/clients/core/v0/web/core_pb.js +43 -224
- package/clients/platform/v0/nodejs/platform_pbjs.js +48 -359
- package/clients/platform/v0/nodejs/platform_protoc.js +91 -432
- package/clients/platform/v0/web/platform_pb.js +91 -432
- package/package.json +4 -4
- package/protos/core/v0/core.proto +1 -5
- package/protos/platform/v0/platform.proto +7 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var $protobuf = require("protobufjs/minimal");
|
|
4
|
+
var $protobuf = require("@dashevo/protobufjs/minimal");
|
|
5
5
|
|
|
6
6
|
// Common aliases
|
|
7
7
|
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
@@ -353,304 +353,13 @@ $root.org = (function() {
|
|
|
353
353
|
return Platform;
|
|
354
354
|
})();
|
|
355
355
|
|
|
356
|
-
v0.StoreTreeProofs = (function() {
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Properties of a StoreTreeProofs.
|
|
360
|
-
* @memberof org.dash.platform.dapi.v0
|
|
361
|
-
* @interface IStoreTreeProofs
|
|
362
|
-
* @property {Uint8Array|null} [identitiesProof] StoreTreeProofs identitiesProof
|
|
363
|
-
* @property {Uint8Array|null} [publicKeyHashesToIdentityIdsProof] StoreTreeProofs publicKeyHashesToIdentityIdsProof
|
|
364
|
-
* @property {Uint8Array|null} [dataContractsProof] StoreTreeProofs dataContractsProof
|
|
365
|
-
* @property {Uint8Array|null} [documentsProof] StoreTreeProofs documentsProof
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Constructs a new StoreTreeProofs.
|
|
370
|
-
* @memberof org.dash.platform.dapi.v0
|
|
371
|
-
* @classdesc Represents a StoreTreeProofs.
|
|
372
|
-
* @implements IStoreTreeProofs
|
|
373
|
-
* @constructor
|
|
374
|
-
* @param {org.dash.platform.dapi.v0.IStoreTreeProofs=} [properties] Properties to set
|
|
375
|
-
*/
|
|
376
|
-
function StoreTreeProofs(properties) {
|
|
377
|
-
if (properties)
|
|
378
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
379
|
-
if (properties[keys[i]] != null)
|
|
380
|
-
this[keys[i]] = properties[keys[i]];
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* StoreTreeProofs identitiesProof.
|
|
385
|
-
* @member {Uint8Array} identitiesProof
|
|
386
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
387
|
-
* @instance
|
|
388
|
-
*/
|
|
389
|
-
StoreTreeProofs.prototype.identitiesProof = $util.newBuffer([]);
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* StoreTreeProofs publicKeyHashesToIdentityIdsProof.
|
|
393
|
-
* @member {Uint8Array} publicKeyHashesToIdentityIdsProof
|
|
394
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
395
|
-
* @instance
|
|
396
|
-
*/
|
|
397
|
-
StoreTreeProofs.prototype.publicKeyHashesToIdentityIdsProof = $util.newBuffer([]);
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* StoreTreeProofs dataContractsProof.
|
|
401
|
-
* @member {Uint8Array} dataContractsProof
|
|
402
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
403
|
-
* @instance
|
|
404
|
-
*/
|
|
405
|
-
StoreTreeProofs.prototype.dataContractsProof = $util.newBuffer([]);
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* StoreTreeProofs documentsProof.
|
|
409
|
-
* @member {Uint8Array} documentsProof
|
|
410
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
411
|
-
* @instance
|
|
412
|
-
*/
|
|
413
|
-
StoreTreeProofs.prototype.documentsProof = $util.newBuffer([]);
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* Creates a new StoreTreeProofs instance using the specified properties.
|
|
417
|
-
* @function create
|
|
418
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
419
|
-
* @static
|
|
420
|
-
* @param {org.dash.platform.dapi.v0.IStoreTreeProofs=} [properties] Properties to set
|
|
421
|
-
* @returns {org.dash.platform.dapi.v0.StoreTreeProofs} StoreTreeProofs instance
|
|
422
|
-
*/
|
|
423
|
-
StoreTreeProofs.create = function create(properties) {
|
|
424
|
-
return new StoreTreeProofs(properties);
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Encodes the specified StoreTreeProofs message. Does not implicitly {@link org.dash.platform.dapi.v0.StoreTreeProofs.verify|verify} messages.
|
|
429
|
-
* @function encode
|
|
430
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
431
|
-
* @static
|
|
432
|
-
* @param {org.dash.platform.dapi.v0.IStoreTreeProofs} message StoreTreeProofs message or plain object to encode
|
|
433
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
434
|
-
* @returns {$protobuf.Writer} Writer
|
|
435
|
-
*/
|
|
436
|
-
StoreTreeProofs.encode = function encode(message, writer) {
|
|
437
|
-
if (!writer)
|
|
438
|
-
writer = $Writer.create();
|
|
439
|
-
if (message.identitiesProof != null && Object.hasOwnProperty.call(message, "identitiesProof"))
|
|
440
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.identitiesProof);
|
|
441
|
-
if (message.publicKeyHashesToIdentityIdsProof != null && Object.hasOwnProperty.call(message, "publicKeyHashesToIdentityIdsProof"))
|
|
442
|
-
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKeyHashesToIdentityIdsProof);
|
|
443
|
-
if (message.dataContractsProof != null && Object.hasOwnProperty.call(message, "dataContractsProof"))
|
|
444
|
-
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.dataContractsProof);
|
|
445
|
-
if (message.documentsProof != null && Object.hasOwnProperty.call(message, "documentsProof"))
|
|
446
|
-
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.documentsProof);
|
|
447
|
-
return writer;
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Encodes the specified StoreTreeProofs message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.StoreTreeProofs.verify|verify} messages.
|
|
452
|
-
* @function encodeDelimited
|
|
453
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
454
|
-
* @static
|
|
455
|
-
* @param {org.dash.platform.dapi.v0.IStoreTreeProofs} message StoreTreeProofs message or plain object to encode
|
|
456
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
457
|
-
* @returns {$protobuf.Writer} Writer
|
|
458
|
-
*/
|
|
459
|
-
StoreTreeProofs.encodeDelimited = function encodeDelimited(message, writer) {
|
|
460
|
-
return this.encode(message, writer).ldelim();
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Decodes a StoreTreeProofs message from the specified reader or buffer.
|
|
465
|
-
* @function decode
|
|
466
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
467
|
-
* @static
|
|
468
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
469
|
-
* @param {number} [length] Message length if known beforehand
|
|
470
|
-
* @returns {org.dash.platform.dapi.v0.StoreTreeProofs} StoreTreeProofs
|
|
471
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
472
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
473
|
-
*/
|
|
474
|
-
StoreTreeProofs.decode = function decode(reader, length) {
|
|
475
|
-
if (!(reader instanceof $Reader))
|
|
476
|
-
reader = $Reader.create(reader);
|
|
477
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.StoreTreeProofs();
|
|
478
|
-
while (reader.pos < end) {
|
|
479
|
-
var tag = reader.uint32();
|
|
480
|
-
switch (tag >>> 3) {
|
|
481
|
-
case 1:
|
|
482
|
-
message.identitiesProof = reader.bytes();
|
|
483
|
-
break;
|
|
484
|
-
case 2:
|
|
485
|
-
message.publicKeyHashesToIdentityIdsProof = reader.bytes();
|
|
486
|
-
break;
|
|
487
|
-
case 3:
|
|
488
|
-
message.dataContractsProof = reader.bytes();
|
|
489
|
-
break;
|
|
490
|
-
case 4:
|
|
491
|
-
message.documentsProof = reader.bytes();
|
|
492
|
-
break;
|
|
493
|
-
default:
|
|
494
|
-
reader.skipType(tag & 7);
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
return message;
|
|
499
|
-
};
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Decodes a StoreTreeProofs message from the specified reader or buffer, length delimited.
|
|
503
|
-
* @function decodeDelimited
|
|
504
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
505
|
-
* @static
|
|
506
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
507
|
-
* @returns {org.dash.platform.dapi.v0.StoreTreeProofs} StoreTreeProofs
|
|
508
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
509
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
510
|
-
*/
|
|
511
|
-
StoreTreeProofs.decodeDelimited = function decodeDelimited(reader) {
|
|
512
|
-
if (!(reader instanceof $Reader))
|
|
513
|
-
reader = new $Reader(reader);
|
|
514
|
-
return this.decode(reader, reader.uint32());
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Verifies a StoreTreeProofs message.
|
|
519
|
-
* @function verify
|
|
520
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
521
|
-
* @static
|
|
522
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
523
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
524
|
-
*/
|
|
525
|
-
StoreTreeProofs.verify = function verify(message) {
|
|
526
|
-
if (typeof message !== "object" || message === null)
|
|
527
|
-
return "object expected";
|
|
528
|
-
if (message.identitiesProof != null && message.hasOwnProperty("identitiesProof"))
|
|
529
|
-
if (!(message.identitiesProof && typeof message.identitiesProof.length === "number" || $util.isString(message.identitiesProof)))
|
|
530
|
-
return "identitiesProof: buffer expected";
|
|
531
|
-
if (message.publicKeyHashesToIdentityIdsProof != null && message.hasOwnProperty("publicKeyHashesToIdentityIdsProof"))
|
|
532
|
-
if (!(message.publicKeyHashesToIdentityIdsProof && typeof message.publicKeyHashesToIdentityIdsProof.length === "number" || $util.isString(message.publicKeyHashesToIdentityIdsProof)))
|
|
533
|
-
return "publicKeyHashesToIdentityIdsProof: buffer expected";
|
|
534
|
-
if (message.dataContractsProof != null && message.hasOwnProperty("dataContractsProof"))
|
|
535
|
-
if (!(message.dataContractsProof && typeof message.dataContractsProof.length === "number" || $util.isString(message.dataContractsProof)))
|
|
536
|
-
return "dataContractsProof: buffer expected";
|
|
537
|
-
if (message.documentsProof != null && message.hasOwnProperty("documentsProof"))
|
|
538
|
-
if (!(message.documentsProof && typeof message.documentsProof.length === "number" || $util.isString(message.documentsProof)))
|
|
539
|
-
return "documentsProof: buffer expected";
|
|
540
|
-
return null;
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Creates a StoreTreeProofs message from a plain object. Also converts values to their respective internal types.
|
|
545
|
-
* @function fromObject
|
|
546
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
547
|
-
* @static
|
|
548
|
-
* @param {Object.<string,*>} object Plain object
|
|
549
|
-
* @returns {org.dash.platform.dapi.v0.StoreTreeProofs} StoreTreeProofs
|
|
550
|
-
*/
|
|
551
|
-
StoreTreeProofs.fromObject = function fromObject(object) {
|
|
552
|
-
if (object instanceof $root.org.dash.platform.dapi.v0.StoreTreeProofs)
|
|
553
|
-
return object;
|
|
554
|
-
var message = new $root.org.dash.platform.dapi.v0.StoreTreeProofs();
|
|
555
|
-
if (object.identitiesProof != null)
|
|
556
|
-
if (typeof object.identitiesProof === "string")
|
|
557
|
-
$util.base64.decode(object.identitiesProof, message.identitiesProof = $util.newBuffer($util.base64.length(object.identitiesProof)), 0);
|
|
558
|
-
else if (object.identitiesProof.length >= 0)
|
|
559
|
-
message.identitiesProof = object.identitiesProof;
|
|
560
|
-
if (object.publicKeyHashesToIdentityIdsProof != null)
|
|
561
|
-
if (typeof object.publicKeyHashesToIdentityIdsProof === "string")
|
|
562
|
-
$util.base64.decode(object.publicKeyHashesToIdentityIdsProof, message.publicKeyHashesToIdentityIdsProof = $util.newBuffer($util.base64.length(object.publicKeyHashesToIdentityIdsProof)), 0);
|
|
563
|
-
else if (object.publicKeyHashesToIdentityIdsProof.length >= 0)
|
|
564
|
-
message.publicKeyHashesToIdentityIdsProof = object.publicKeyHashesToIdentityIdsProof;
|
|
565
|
-
if (object.dataContractsProof != null)
|
|
566
|
-
if (typeof object.dataContractsProof === "string")
|
|
567
|
-
$util.base64.decode(object.dataContractsProof, message.dataContractsProof = $util.newBuffer($util.base64.length(object.dataContractsProof)), 0);
|
|
568
|
-
else if (object.dataContractsProof.length >= 0)
|
|
569
|
-
message.dataContractsProof = object.dataContractsProof;
|
|
570
|
-
if (object.documentsProof != null)
|
|
571
|
-
if (typeof object.documentsProof === "string")
|
|
572
|
-
$util.base64.decode(object.documentsProof, message.documentsProof = $util.newBuffer($util.base64.length(object.documentsProof)), 0);
|
|
573
|
-
else if (object.documentsProof.length >= 0)
|
|
574
|
-
message.documentsProof = object.documentsProof;
|
|
575
|
-
return message;
|
|
576
|
-
};
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Creates a plain object from a StoreTreeProofs message. Also converts values to other types if specified.
|
|
580
|
-
* @function toObject
|
|
581
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
582
|
-
* @static
|
|
583
|
-
* @param {org.dash.platform.dapi.v0.StoreTreeProofs} message StoreTreeProofs
|
|
584
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
585
|
-
* @returns {Object.<string,*>} Plain object
|
|
586
|
-
*/
|
|
587
|
-
StoreTreeProofs.toObject = function toObject(message, options) {
|
|
588
|
-
if (!options)
|
|
589
|
-
options = {};
|
|
590
|
-
var object = {};
|
|
591
|
-
if (options.defaults) {
|
|
592
|
-
if (options.bytes === String)
|
|
593
|
-
object.identitiesProof = "";
|
|
594
|
-
else {
|
|
595
|
-
object.identitiesProof = [];
|
|
596
|
-
if (options.bytes !== Array)
|
|
597
|
-
object.identitiesProof = $util.newBuffer(object.identitiesProof);
|
|
598
|
-
}
|
|
599
|
-
if (options.bytes === String)
|
|
600
|
-
object.publicKeyHashesToIdentityIdsProof = "";
|
|
601
|
-
else {
|
|
602
|
-
object.publicKeyHashesToIdentityIdsProof = [];
|
|
603
|
-
if (options.bytes !== Array)
|
|
604
|
-
object.publicKeyHashesToIdentityIdsProof = $util.newBuffer(object.publicKeyHashesToIdentityIdsProof);
|
|
605
|
-
}
|
|
606
|
-
if (options.bytes === String)
|
|
607
|
-
object.dataContractsProof = "";
|
|
608
|
-
else {
|
|
609
|
-
object.dataContractsProof = [];
|
|
610
|
-
if (options.bytes !== Array)
|
|
611
|
-
object.dataContractsProof = $util.newBuffer(object.dataContractsProof);
|
|
612
|
-
}
|
|
613
|
-
if (options.bytes === String)
|
|
614
|
-
object.documentsProof = "";
|
|
615
|
-
else {
|
|
616
|
-
object.documentsProof = [];
|
|
617
|
-
if (options.bytes !== Array)
|
|
618
|
-
object.documentsProof = $util.newBuffer(object.documentsProof);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
if (message.identitiesProof != null && message.hasOwnProperty("identitiesProof"))
|
|
622
|
-
object.identitiesProof = options.bytes === String ? $util.base64.encode(message.identitiesProof, 0, message.identitiesProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.identitiesProof) : message.identitiesProof;
|
|
623
|
-
if (message.publicKeyHashesToIdentityIdsProof != null && message.hasOwnProperty("publicKeyHashesToIdentityIdsProof"))
|
|
624
|
-
object.publicKeyHashesToIdentityIdsProof = options.bytes === String ? $util.base64.encode(message.publicKeyHashesToIdentityIdsProof, 0, message.publicKeyHashesToIdentityIdsProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeyHashesToIdentityIdsProof) : message.publicKeyHashesToIdentityIdsProof;
|
|
625
|
-
if (message.dataContractsProof != null && message.hasOwnProperty("dataContractsProof"))
|
|
626
|
-
object.dataContractsProof = options.bytes === String ? $util.base64.encode(message.dataContractsProof, 0, message.dataContractsProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractsProof) : message.dataContractsProof;
|
|
627
|
-
if (message.documentsProof != null && message.hasOwnProperty("documentsProof"))
|
|
628
|
-
object.documentsProof = options.bytes === String ? $util.base64.encode(message.documentsProof, 0, message.documentsProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.documentsProof) : message.documentsProof;
|
|
629
|
-
return object;
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* Converts this StoreTreeProofs to JSON.
|
|
634
|
-
* @function toJSON
|
|
635
|
-
* @memberof org.dash.platform.dapi.v0.StoreTreeProofs
|
|
636
|
-
* @instance
|
|
637
|
-
* @returns {Object.<string,*>} JSON object
|
|
638
|
-
*/
|
|
639
|
-
StoreTreeProofs.prototype.toJSON = function toJSON() {
|
|
640
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
return StoreTreeProofs;
|
|
644
|
-
})();
|
|
645
|
-
|
|
646
356
|
v0.Proof = (function() {
|
|
647
357
|
|
|
648
358
|
/**
|
|
649
359
|
* Properties of a Proof.
|
|
650
360
|
* @memberof org.dash.platform.dapi.v0
|
|
651
361
|
* @interface IProof
|
|
652
|
-
* @property {Uint8Array|null} [
|
|
653
|
-
* @property {org.dash.platform.dapi.v0.IStoreTreeProofs|null} [storeTreeProofs] Proof storeTreeProofs
|
|
362
|
+
* @property {Uint8Array|null} [merkleProof] Proof merkleProof
|
|
654
363
|
* @property {Uint8Array|null} [signatureLlmqHash] Proof signatureLlmqHash
|
|
655
364
|
* @property {Uint8Array|null} [signature] Proof signature
|
|
656
365
|
*/
|
|
@@ -671,20 +380,12 @@ $root.org = (function() {
|
|
|
671
380
|
}
|
|
672
381
|
|
|
673
382
|
/**
|
|
674
|
-
* Proof
|
|
675
|
-
* @member {Uint8Array}
|
|
383
|
+
* Proof merkleProof.
|
|
384
|
+
* @member {Uint8Array} merkleProof
|
|
676
385
|
* @memberof org.dash.platform.dapi.v0.Proof
|
|
677
386
|
* @instance
|
|
678
387
|
*/
|
|
679
|
-
Proof.prototype.
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Proof storeTreeProofs.
|
|
683
|
-
* @member {org.dash.platform.dapi.v0.IStoreTreeProofs|null|undefined} storeTreeProofs
|
|
684
|
-
* @memberof org.dash.platform.dapi.v0.Proof
|
|
685
|
-
* @instance
|
|
686
|
-
*/
|
|
687
|
-
Proof.prototype.storeTreeProofs = null;
|
|
388
|
+
Proof.prototype.merkleProof = $util.newBuffer([]);
|
|
688
389
|
|
|
689
390
|
/**
|
|
690
391
|
* Proof signatureLlmqHash.
|
|
@@ -726,14 +427,12 @@ $root.org = (function() {
|
|
|
726
427
|
Proof.encode = function encode(message, writer) {
|
|
727
428
|
if (!writer)
|
|
728
429
|
writer = $Writer.create();
|
|
729
|
-
if (message.
|
|
730
|
-
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.
|
|
731
|
-
if (message.storeTreeProofs != null && Object.hasOwnProperty.call(message, "storeTreeProofs"))
|
|
732
|
-
$root.org.dash.platform.dapi.v0.StoreTreeProofs.encode(message.storeTreeProofs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
430
|
+
if (message.merkleProof != null && Object.hasOwnProperty.call(message, "merkleProof"))
|
|
431
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.merkleProof);
|
|
733
432
|
if (message.signatureLlmqHash != null && Object.hasOwnProperty.call(message, "signatureLlmqHash"))
|
|
734
|
-
writer.uint32(/* id
|
|
433
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signatureLlmqHash);
|
|
735
434
|
if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
|
|
736
|
-
writer.uint32(/* id
|
|
435
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature);
|
|
737
436
|
return writer;
|
|
738
437
|
};
|
|
739
438
|
|
|
@@ -769,15 +468,12 @@ $root.org = (function() {
|
|
|
769
468
|
var tag = reader.uint32();
|
|
770
469
|
switch (tag >>> 3) {
|
|
771
470
|
case 1:
|
|
772
|
-
message.
|
|
471
|
+
message.merkleProof = reader.bytes();
|
|
773
472
|
break;
|
|
774
473
|
case 2:
|
|
775
|
-
message.storeTreeProofs = $root.org.dash.platform.dapi.v0.StoreTreeProofs.decode(reader, reader.uint32());
|
|
776
|
-
break;
|
|
777
|
-
case 3:
|
|
778
474
|
message.signatureLlmqHash = reader.bytes();
|
|
779
475
|
break;
|
|
780
|
-
case
|
|
476
|
+
case 3:
|
|
781
477
|
message.signature = reader.bytes();
|
|
782
478
|
break;
|
|
783
479
|
default:
|
|
@@ -815,14 +511,9 @@ $root.org = (function() {
|
|
|
815
511
|
Proof.verify = function verify(message) {
|
|
816
512
|
if (typeof message !== "object" || message === null)
|
|
817
513
|
return "object expected";
|
|
818
|
-
if (message.
|
|
819
|
-
if (!(message.
|
|
820
|
-
return "
|
|
821
|
-
if (message.storeTreeProofs != null && message.hasOwnProperty("storeTreeProofs")) {
|
|
822
|
-
var error = $root.org.dash.platform.dapi.v0.StoreTreeProofs.verify(message.storeTreeProofs);
|
|
823
|
-
if (error)
|
|
824
|
-
return "storeTreeProofs." + error;
|
|
825
|
-
}
|
|
514
|
+
if (message.merkleProof != null && message.hasOwnProperty("merkleProof"))
|
|
515
|
+
if (!(message.merkleProof && typeof message.merkleProof.length === "number" || $util.isString(message.merkleProof)))
|
|
516
|
+
return "merkleProof: buffer expected";
|
|
826
517
|
if (message.signatureLlmqHash != null && message.hasOwnProperty("signatureLlmqHash"))
|
|
827
518
|
if (!(message.signatureLlmqHash && typeof message.signatureLlmqHash.length === "number" || $util.isString(message.signatureLlmqHash)))
|
|
828
519
|
return "signatureLlmqHash: buffer expected";
|
|
@@ -844,16 +535,11 @@ $root.org = (function() {
|
|
|
844
535
|
if (object instanceof $root.org.dash.platform.dapi.v0.Proof)
|
|
845
536
|
return object;
|
|
846
537
|
var message = new $root.org.dash.platform.dapi.v0.Proof();
|
|
847
|
-
if (object.
|
|
848
|
-
if (typeof object.
|
|
849
|
-
$util.base64.decode(object.
|
|
850
|
-
else if (object.
|
|
851
|
-
message.
|
|
852
|
-
if (object.storeTreeProofs != null) {
|
|
853
|
-
if (typeof object.storeTreeProofs !== "object")
|
|
854
|
-
throw TypeError(".org.dash.platform.dapi.v0.Proof.storeTreeProofs: object expected");
|
|
855
|
-
message.storeTreeProofs = $root.org.dash.platform.dapi.v0.StoreTreeProofs.fromObject(object.storeTreeProofs);
|
|
856
|
-
}
|
|
538
|
+
if (object.merkleProof != null)
|
|
539
|
+
if (typeof object.merkleProof === "string")
|
|
540
|
+
$util.base64.decode(object.merkleProof, message.merkleProof = $util.newBuffer($util.base64.length(object.merkleProof)), 0);
|
|
541
|
+
else if (object.merkleProof.length >= 0)
|
|
542
|
+
message.merkleProof = object.merkleProof;
|
|
857
543
|
if (object.signatureLlmqHash != null)
|
|
858
544
|
if (typeof object.signatureLlmqHash === "string")
|
|
859
545
|
$util.base64.decode(object.signatureLlmqHash, message.signatureLlmqHash = $util.newBuffer($util.base64.length(object.signatureLlmqHash)), 0);
|
|
@@ -882,13 +568,12 @@ $root.org = (function() {
|
|
|
882
568
|
var object = {};
|
|
883
569
|
if (options.defaults) {
|
|
884
570
|
if (options.bytes === String)
|
|
885
|
-
object.
|
|
571
|
+
object.merkleProof = "";
|
|
886
572
|
else {
|
|
887
|
-
object.
|
|
573
|
+
object.merkleProof = [];
|
|
888
574
|
if (options.bytes !== Array)
|
|
889
|
-
object.
|
|
575
|
+
object.merkleProof = $util.newBuffer(object.merkleProof);
|
|
890
576
|
}
|
|
891
|
-
object.storeTreeProofs = null;
|
|
892
577
|
if (options.bytes === String)
|
|
893
578
|
object.signatureLlmqHash = "";
|
|
894
579
|
else {
|
|
@@ -904,10 +589,8 @@ $root.org = (function() {
|
|
|
904
589
|
object.signature = $util.newBuffer(object.signature);
|
|
905
590
|
}
|
|
906
591
|
}
|
|
907
|
-
if (message.
|
|
908
|
-
object.
|
|
909
|
-
if (message.storeTreeProofs != null && message.hasOwnProperty("storeTreeProofs"))
|
|
910
|
-
object.storeTreeProofs = $root.org.dash.platform.dapi.v0.StoreTreeProofs.toObject(message.storeTreeProofs, options);
|
|
592
|
+
if (message.merkleProof != null && message.hasOwnProperty("merkleProof"))
|
|
593
|
+
object.merkleProof = options.bytes === String ? $util.base64.encode(message.merkleProof, 0, message.merkleProof.length) : options.bytes === Array ? Array.prototype.slice.call(message.merkleProof) : message.merkleProof;
|
|
911
594
|
if (message.signatureLlmqHash != null && message.hasOwnProperty("signatureLlmqHash"))
|
|
912
595
|
object.signatureLlmqHash = options.bytes === String ? $util.base64.encode(message.signatureLlmqHash, 0, message.signatureLlmqHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.signatureLlmqHash) : message.signatureLlmqHash;
|
|
913
596
|
if (message.signature != null && message.hasOwnProperty("signature"))
|
|
@@ -2701,8 +2384,8 @@ $root.org = (function() {
|
|
|
2701
2384
|
* @property {Uint8Array|null} [where] GetDocumentsRequest where
|
|
2702
2385
|
* @property {Uint8Array|null} [orderBy] GetDocumentsRequest orderBy
|
|
2703
2386
|
* @property {number|null} [limit] GetDocumentsRequest limit
|
|
2704
|
-
* @property {
|
|
2705
|
-
* @property {
|
|
2387
|
+
* @property {Uint8Array|null} [startAfter] GetDocumentsRequest startAfter
|
|
2388
|
+
* @property {Uint8Array|null} [startAt] GetDocumentsRequest startAt
|
|
2706
2389
|
* @property {boolean|null} [prove] GetDocumentsRequest prove
|
|
2707
2390
|
*/
|
|
2708
2391
|
|
|
@@ -2763,19 +2446,19 @@ $root.org = (function() {
|
|
|
2763
2446
|
|
|
2764
2447
|
/**
|
|
2765
2448
|
* GetDocumentsRequest startAfter.
|
|
2766
|
-
* @member {
|
|
2449
|
+
* @member {Uint8Array} startAfter
|
|
2767
2450
|
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
2768
2451
|
* @instance
|
|
2769
2452
|
*/
|
|
2770
|
-
GetDocumentsRequest.prototype.startAfter =
|
|
2453
|
+
GetDocumentsRequest.prototype.startAfter = $util.newBuffer([]);
|
|
2771
2454
|
|
|
2772
2455
|
/**
|
|
2773
2456
|
* GetDocumentsRequest startAt.
|
|
2774
|
-
* @member {
|
|
2457
|
+
* @member {Uint8Array} startAt
|
|
2775
2458
|
* @memberof org.dash.platform.dapi.v0.GetDocumentsRequest
|
|
2776
2459
|
* @instance
|
|
2777
2460
|
*/
|
|
2778
|
-
GetDocumentsRequest.prototype.startAt =
|
|
2461
|
+
GetDocumentsRequest.prototype.startAt = $util.newBuffer([]);
|
|
2779
2462
|
|
|
2780
2463
|
/**
|
|
2781
2464
|
* GetDocumentsRequest prove.
|
|
@@ -2834,9 +2517,9 @@ $root.org = (function() {
|
|
|
2834
2517
|
if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
|
|
2835
2518
|
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.limit);
|
|
2836
2519
|
if (message.startAfter != null && Object.hasOwnProperty.call(message, "startAfter"))
|
|
2837
|
-
writer.uint32(/* id 6, wireType
|
|
2520
|
+
writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.startAfter);
|
|
2838
2521
|
if (message.startAt != null && Object.hasOwnProperty.call(message, "startAt"))
|
|
2839
|
-
writer.uint32(/* id 7, wireType
|
|
2522
|
+
writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.startAt);
|
|
2840
2523
|
if (message.prove != null && Object.hasOwnProperty.call(message, "prove"))
|
|
2841
2524
|
writer.uint32(/* id 8, wireType 0 =*/64).bool(message.prove);
|
|
2842
2525
|
return writer;
|
|
@@ -2889,10 +2572,10 @@ $root.org = (function() {
|
|
|
2889
2572
|
message.limit = reader.uint32();
|
|
2890
2573
|
break;
|
|
2891
2574
|
case 6:
|
|
2892
|
-
message.startAfter = reader.
|
|
2575
|
+
message.startAfter = reader.bytes();
|
|
2893
2576
|
break;
|
|
2894
2577
|
case 7:
|
|
2895
|
-
message.startAt = reader.
|
|
2578
|
+
message.startAt = reader.bytes();
|
|
2896
2579
|
break;
|
|
2897
2580
|
case 8:
|
|
2898
2581
|
message.prove = reader.bool();
|
|
@@ -2950,15 +2633,15 @@ $root.org = (function() {
|
|
|
2950
2633
|
return "limit: integer expected";
|
|
2951
2634
|
if (message.startAfter != null && message.hasOwnProperty("startAfter")) {
|
|
2952
2635
|
properties.start = 1;
|
|
2953
|
-
if (
|
|
2954
|
-
return "startAfter:
|
|
2636
|
+
if (!(message.startAfter && typeof message.startAfter.length === "number" || $util.isString(message.startAfter)))
|
|
2637
|
+
return "startAfter: buffer expected";
|
|
2955
2638
|
}
|
|
2956
2639
|
if (message.startAt != null && message.hasOwnProperty("startAt")) {
|
|
2957
2640
|
if (properties.start === 1)
|
|
2958
2641
|
return "start: multiple values";
|
|
2959
2642
|
properties.start = 1;
|
|
2960
|
-
if (
|
|
2961
|
-
return "startAt:
|
|
2643
|
+
if (!(message.startAt && typeof message.startAt.length === "number" || $util.isString(message.startAt)))
|
|
2644
|
+
return "startAt: buffer expected";
|
|
2962
2645
|
}
|
|
2963
2646
|
if (message.prove != null && message.hasOwnProperty("prove"))
|
|
2964
2647
|
if (typeof message.prove !== "boolean")
|
|
@@ -2998,9 +2681,15 @@ $root.org = (function() {
|
|
|
2998
2681
|
if (object.limit != null)
|
|
2999
2682
|
message.limit = object.limit >>> 0;
|
|
3000
2683
|
if (object.startAfter != null)
|
|
3001
|
-
|
|
2684
|
+
if (typeof object.startAfter === "string")
|
|
2685
|
+
$util.base64.decode(object.startAfter, message.startAfter = $util.newBuffer($util.base64.length(object.startAfter)), 0);
|
|
2686
|
+
else if (object.startAfter.length >= 0)
|
|
2687
|
+
message.startAfter = object.startAfter;
|
|
3002
2688
|
if (object.startAt != null)
|
|
3003
|
-
|
|
2689
|
+
if (typeof object.startAt === "string")
|
|
2690
|
+
$util.base64.decode(object.startAt, message.startAt = $util.newBuffer($util.base64.length(object.startAt)), 0);
|
|
2691
|
+
else if (object.startAt.length >= 0)
|
|
2692
|
+
message.startAt = object.startAt;
|
|
3004
2693
|
if (object.prove != null)
|
|
3005
2694
|
message.prove = Boolean(object.prove);
|
|
3006
2695
|
return message;
|
|
@@ -3056,12 +2745,12 @@ $root.org = (function() {
|
|
|
3056
2745
|
if (message.limit != null && message.hasOwnProperty("limit"))
|
|
3057
2746
|
object.limit = message.limit;
|
|
3058
2747
|
if (message.startAfter != null && message.hasOwnProperty("startAfter")) {
|
|
3059
|
-
object.startAfter = message.startAfter;
|
|
2748
|
+
object.startAfter = options.bytes === String ? $util.base64.encode(message.startAfter, 0, message.startAfter.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAfter) : message.startAfter;
|
|
3060
2749
|
if (options.oneofs)
|
|
3061
2750
|
object.start = "startAfter";
|
|
3062
2751
|
}
|
|
3063
2752
|
if (message.startAt != null && message.hasOwnProperty("startAt")) {
|
|
3064
|
-
object.startAt = message.startAt;
|
|
2753
|
+
object.startAt = options.bytes === String ? $util.base64.encode(message.startAt, 0, message.startAt.length) : options.bytes === Array ? Array.prototype.slice.call(message.startAt) : message.startAt;
|
|
3065
2754
|
if (options.oneofs)
|
|
3066
2755
|
object.start = "startAt";
|
|
3067
2756
|
}
|