@dashevo/dapi-grpc 0.21.8 → 0.22.0-dev.12

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 CHANGED
@@ -136,7 +136,7 @@ Available methods :
136
136
 
137
137
  ## Contributing
138
138
 
139
- Feel free to dive in! [Open an issue](https://github.com/dashevo/dapi-grpc/issues/new) or submit PRs.
139
+ Feel free to dive in! [Open an issue](https://github.com/dashevo/platform/issues/new/choose) or submit PRs.
140
140
 
141
141
  ## License
142
142
 
@@ -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;
@@ -4095,7 +4095,7 @@ $root.org = (function() {
4095
4095
  * @memberof org.dash.platform.dapi.v0
4096
4096
  * @interface IBlockHeadersWithChainLocksResponse
4097
4097
  * @property {org.dash.platform.dapi.v0.IBlockHeaders|null} [blockHeaders] BlockHeadersWithChainLocksResponse blockHeaders
4098
- * @property {org.dash.platform.dapi.v0.IChainLockSignatureMessages|null} [chainLockSignatureMessages] BlockHeadersWithChainLocksResponse chainLockSignatureMessages
4098
+ * @property {Uint8Array|null} [chainLock] BlockHeadersWithChainLocksResponse chainLock
4099
4099
  */
4100
4100
 
4101
4101
  /**
@@ -4122,24 +4122,24 @@ $root.org = (function() {
4122
4122
  BlockHeadersWithChainLocksResponse.prototype.blockHeaders = null;
4123
4123
 
4124
4124
  /**
4125
- * BlockHeadersWithChainLocksResponse chainLockSignatureMessages.
4126
- * @member {org.dash.platform.dapi.v0.IChainLockSignatureMessages|null|undefined} chainLockSignatureMessages
4125
+ * BlockHeadersWithChainLocksResponse chainLock.
4126
+ * @member {Uint8Array} chainLock
4127
4127
  * @memberof org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse
4128
4128
  * @instance
4129
4129
  */
4130
- BlockHeadersWithChainLocksResponse.prototype.chainLockSignatureMessages = null;
4130
+ BlockHeadersWithChainLocksResponse.prototype.chainLock = $util.newBuffer([]);
4131
4131
 
4132
4132
  // OneOf field names bound to virtual getters and setters
4133
4133
  var $oneOfFields;
4134
4134
 
4135
4135
  /**
4136
4136
  * BlockHeadersWithChainLocksResponse responses.
4137
- * @member {"blockHeaders"|"chainLockSignatureMessages"|undefined} responses
4137
+ * @member {"blockHeaders"|"chainLock"|undefined} responses
4138
4138
  * @memberof org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse
4139
4139
  * @instance
4140
4140
  */
4141
4141
  Object.defineProperty(BlockHeadersWithChainLocksResponse.prototype, "responses", {
4142
- get: $util.oneOfGetter($oneOfFields = ["blockHeaders", "chainLockSignatureMessages"]),
4142
+ get: $util.oneOfGetter($oneOfFields = ["blockHeaders", "chainLock"]),
4143
4143
  set: $util.oneOfSetter($oneOfFields)
4144
4144
  });
4145
4145
 
@@ -4169,8 +4169,8 @@ $root.org = (function() {
4169
4169
  writer = $Writer.create();
4170
4170
  if (message.blockHeaders != null && Object.hasOwnProperty.call(message, "blockHeaders"))
4171
4171
  $root.org.dash.platform.dapi.v0.BlockHeaders.encode(message.blockHeaders, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4172
- if (message.chainLockSignatureMessages != null && Object.hasOwnProperty.call(message, "chainLockSignatureMessages"))
4173
- $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages.encode(message.chainLockSignatureMessages, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4172
+ if (message.chainLock != null && Object.hasOwnProperty.call(message, "chainLock"))
4173
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.chainLock);
4174
4174
  return writer;
4175
4175
  };
4176
4176
 
@@ -4209,7 +4209,7 @@ $root.org = (function() {
4209
4209
  message.blockHeaders = $root.org.dash.platform.dapi.v0.BlockHeaders.decode(reader, reader.uint32());
4210
4210
  break;
4211
4211
  case 2:
4212
- message.chainLockSignatureMessages = $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages.decode(reader, reader.uint32());
4212
+ message.chainLock = reader.bytes();
4213
4213
  break;
4214
4214
  default:
4215
4215
  reader.skipType(tag & 7);
@@ -4255,15 +4255,12 @@ $root.org = (function() {
4255
4255
  return "blockHeaders." + error;
4256
4256
  }
4257
4257
  }
4258
- if (message.chainLockSignatureMessages != null && message.hasOwnProperty("chainLockSignatureMessages")) {
4258
+ if (message.chainLock != null && message.hasOwnProperty("chainLock")) {
4259
4259
  if (properties.responses === 1)
4260
4260
  return "responses: multiple values";
4261
4261
  properties.responses = 1;
4262
- {
4263
- var error = $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages.verify(message.chainLockSignatureMessages);
4264
- if (error)
4265
- return "chainLockSignatureMessages." + error;
4266
- }
4262
+ if (!(message.chainLock && typeof message.chainLock.length === "number" || $util.isString(message.chainLock)))
4263
+ return "chainLock: buffer expected";
4267
4264
  }
4268
4265
  return null;
4269
4266
  };
@@ -4285,11 +4282,11 @@ $root.org = (function() {
4285
4282
  throw TypeError(".org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.blockHeaders: object expected");
4286
4283
  message.blockHeaders = $root.org.dash.platform.dapi.v0.BlockHeaders.fromObject(object.blockHeaders);
4287
4284
  }
4288
- if (object.chainLockSignatureMessages != null) {
4289
- if (typeof object.chainLockSignatureMessages !== "object")
4290
- throw TypeError(".org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.chainLockSignatureMessages: object expected");
4291
- message.chainLockSignatureMessages = $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages.fromObject(object.chainLockSignatureMessages);
4292
- }
4285
+ if (object.chainLock != null)
4286
+ if (typeof object.chainLock === "string")
4287
+ $util.base64.decode(object.chainLock, message.chainLock = $util.newBuffer($util.base64.length(object.chainLock)), 0);
4288
+ else if (object.chainLock.length >= 0)
4289
+ message.chainLock = object.chainLock;
4293
4290
  return message;
4294
4291
  };
4295
4292
 
@@ -4311,10 +4308,10 @@ $root.org = (function() {
4311
4308
  if (options.oneofs)
4312
4309
  object.responses = "blockHeaders";
4313
4310
  }
4314
- if (message.chainLockSignatureMessages != null && message.hasOwnProperty("chainLockSignatureMessages")) {
4315
- object.chainLockSignatureMessages = $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages.toObject(message.chainLockSignatureMessages, options);
4311
+ if (message.chainLock != null && message.hasOwnProperty("chainLock")) {
4312
+ object.chainLock = options.bytes === String ? $util.base64.encode(message.chainLock, 0, message.chainLock.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainLock) : message.chainLock;
4316
4313
  if (options.oneofs)
4317
- object.responses = "chainLockSignatureMessages";
4314
+ object.responses = "chainLock";
4318
4315
  }
4319
4316
  return object;
4320
4317
  };
@@ -4539,212 +4536,6 @@ $root.org = (function() {
4539
4536
  return BlockHeaders;
4540
4537
  })();
4541
4538
 
4542
- v0.ChainLockSignatureMessages = (function() {
4543
-
4544
- /**
4545
- * Properties of a ChainLockSignatureMessages.
4546
- * @memberof org.dash.platform.dapi.v0
4547
- * @interface IChainLockSignatureMessages
4548
- * @property {Array.<Uint8Array>|null} [messages] ChainLockSignatureMessages messages
4549
- */
4550
-
4551
- /**
4552
- * Constructs a new ChainLockSignatureMessages.
4553
- * @memberof org.dash.platform.dapi.v0
4554
- * @classdesc Represents a ChainLockSignatureMessages.
4555
- * @implements IChainLockSignatureMessages
4556
- * @constructor
4557
- * @param {org.dash.platform.dapi.v0.IChainLockSignatureMessages=} [properties] Properties to set
4558
- */
4559
- function ChainLockSignatureMessages(properties) {
4560
- this.messages = [];
4561
- if (properties)
4562
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4563
- if (properties[keys[i]] != null)
4564
- this[keys[i]] = properties[keys[i]];
4565
- }
4566
-
4567
- /**
4568
- * ChainLockSignatureMessages messages.
4569
- * @member {Array.<Uint8Array>} messages
4570
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4571
- * @instance
4572
- */
4573
- ChainLockSignatureMessages.prototype.messages = $util.emptyArray;
4574
-
4575
- /**
4576
- * Creates a new ChainLockSignatureMessages instance using the specified properties.
4577
- * @function create
4578
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4579
- * @static
4580
- * @param {org.dash.platform.dapi.v0.IChainLockSignatureMessages=} [properties] Properties to set
4581
- * @returns {org.dash.platform.dapi.v0.ChainLockSignatureMessages} ChainLockSignatureMessages instance
4582
- */
4583
- ChainLockSignatureMessages.create = function create(properties) {
4584
- return new ChainLockSignatureMessages(properties);
4585
- };
4586
-
4587
- /**
4588
- * Encodes the specified ChainLockSignatureMessages message. Does not implicitly {@link org.dash.platform.dapi.v0.ChainLockSignatureMessages.verify|verify} messages.
4589
- * @function encode
4590
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4591
- * @static
4592
- * @param {org.dash.platform.dapi.v0.IChainLockSignatureMessages} message ChainLockSignatureMessages message or plain object to encode
4593
- * @param {$protobuf.Writer} [writer] Writer to encode to
4594
- * @returns {$protobuf.Writer} Writer
4595
- */
4596
- ChainLockSignatureMessages.encode = function encode(message, writer) {
4597
- if (!writer)
4598
- writer = $Writer.create();
4599
- if (message.messages != null && message.messages.length)
4600
- for (var i = 0; i < message.messages.length; ++i)
4601
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.messages[i]);
4602
- return writer;
4603
- };
4604
-
4605
- /**
4606
- * Encodes the specified ChainLockSignatureMessages message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.ChainLockSignatureMessages.verify|verify} messages.
4607
- * @function encodeDelimited
4608
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4609
- * @static
4610
- * @param {org.dash.platform.dapi.v0.IChainLockSignatureMessages} message ChainLockSignatureMessages message or plain object to encode
4611
- * @param {$protobuf.Writer} [writer] Writer to encode to
4612
- * @returns {$protobuf.Writer} Writer
4613
- */
4614
- ChainLockSignatureMessages.encodeDelimited = function encodeDelimited(message, writer) {
4615
- return this.encode(message, writer).ldelim();
4616
- };
4617
-
4618
- /**
4619
- * Decodes a ChainLockSignatureMessages message from the specified reader or buffer.
4620
- * @function decode
4621
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4622
- * @static
4623
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4624
- * @param {number} [length] Message length if known beforehand
4625
- * @returns {org.dash.platform.dapi.v0.ChainLockSignatureMessages} ChainLockSignatureMessages
4626
- * @throws {Error} If the payload is not a reader or valid buffer
4627
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4628
- */
4629
- ChainLockSignatureMessages.decode = function decode(reader, length) {
4630
- if (!(reader instanceof $Reader))
4631
- reader = $Reader.create(reader);
4632
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages();
4633
- while (reader.pos < end) {
4634
- var tag = reader.uint32();
4635
- switch (tag >>> 3) {
4636
- case 1:
4637
- if (!(message.messages && message.messages.length))
4638
- message.messages = [];
4639
- message.messages.push(reader.bytes());
4640
- break;
4641
- default:
4642
- reader.skipType(tag & 7);
4643
- break;
4644
- }
4645
- }
4646
- return message;
4647
- };
4648
-
4649
- /**
4650
- * Decodes a ChainLockSignatureMessages message from the specified reader or buffer, length delimited.
4651
- * @function decodeDelimited
4652
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4653
- * @static
4654
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4655
- * @returns {org.dash.platform.dapi.v0.ChainLockSignatureMessages} ChainLockSignatureMessages
4656
- * @throws {Error} If the payload is not a reader or valid buffer
4657
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4658
- */
4659
- ChainLockSignatureMessages.decodeDelimited = function decodeDelimited(reader) {
4660
- if (!(reader instanceof $Reader))
4661
- reader = new $Reader(reader);
4662
- return this.decode(reader, reader.uint32());
4663
- };
4664
-
4665
- /**
4666
- * Verifies a ChainLockSignatureMessages message.
4667
- * @function verify
4668
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4669
- * @static
4670
- * @param {Object.<string,*>} message Plain object to verify
4671
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4672
- */
4673
- ChainLockSignatureMessages.verify = function verify(message) {
4674
- if (typeof message !== "object" || message === null)
4675
- return "object expected";
4676
- if (message.messages != null && message.hasOwnProperty("messages")) {
4677
- if (!Array.isArray(message.messages))
4678
- return "messages: array expected";
4679
- for (var i = 0; i < message.messages.length; ++i)
4680
- if (!(message.messages[i] && typeof message.messages[i].length === "number" || $util.isString(message.messages[i])))
4681
- return "messages: buffer[] expected";
4682
- }
4683
- return null;
4684
- };
4685
-
4686
- /**
4687
- * Creates a ChainLockSignatureMessages message from a plain object. Also converts values to their respective internal types.
4688
- * @function fromObject
4689
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4690
- * @static
4691
- * @param {Object.<string,*>} object Plain object
4692
- * @returns {org.dash.platform.dapi.v0.ChainLockSignatureMessages} ChainLockSignatureMessages
4693
- */
4694
- ChainLockSignatureMessages.fromObject = function fromObject(object) {
4695
- if (object instanceof $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages)
4696
- return object;
4697
- var message = new $root.org.dash.platform.dapi.v0.ChainLockSignatureMessages();
4698
- if (object.messages) {
4699
- if (!Array.isArray(object.messages))
4700
- throw TypeError(".org.dash.platform.dapi.v0.ChainLockSignatureMessages.messages: array expected");
4701
- message.messages = [];
4702
- for (var i = 0; i < object.messages.length; ++i)
4703
- if (typeof object.messages[i] === "string")
4704
- $util.base64.decode(object.messages[i], message.messages[i] = $util.newBuffer($util.base64.length(object.messages[i])), 0);
4705
- else if (object.messages[i].length >= 0)
4706
- message.messages[i] = object.messages[i];
4707
- }
4708
- return message;
4709
- };
4710
-
4711
- /**
4712
- * Creates a plain object from a ChainLockSignatureMessages message. Also converts values to other types if specified.
4713
- * @function toObject
4714
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4715
- * @static
4716
- * @param {org.dash.platform.dapi.v0.ChainLockSignatureMessages} message ChainLockSignatureMessages
4717
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4718
- * @returns {Object.<string,*>} Plain object
4719
- */
4720
- ChainLockSignatureMessages.toObject = function toObject(message, options) {
4721
- if (!options)
4722
- options = {};
4723
- var object = {};
4724
- if (options.arrays || options.defaults)
4725
- object.messages = [];
4726
- if (message.messages && message.messages.length) {
4727
- object.messages = [];
4728
- for (var j = 0; j < message.messages.length; ++j)
4729
- object.messages[j] = options.bytes === String ? $util.base64.encode(message.messages[j], 0, message.messages[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.messages[j]) : message.messages[j];
4730
- }
4731
- return object;
4732
- };
4733
-
4734
- /**
4735
- * Converts this ChainLockSignatureMessages to JSON.
4736
- * @function toJSON
4737
- * @memberof org.dash.platform.dapi.v0.ChainLockSignatureMessages
4738
- * @instance
4739
- * @returns {Object.<string,*>} JSON object
4740
- */
4741
- ChainLockSignatureMessages.prototype.toJSON = function toJSON() {
4742
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4743
- };
4744
-
4745
- return ChainLockSignatureMessages;
4746
- })();
4747
-
4748
4539
  v0.GetEstimatedTransactionFeeRequest = (function() {
4749
4540
 
4750
4541
  /**