@leofcoin/chain 1.5.67 → 1.5.69

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.
@@ -14499,55 +14499,56 @@ class ValidatorMessage extends FormatInterface {
14499
14499
  }
14500
14500
 
14501
14501
  var proto$4 = {
14502
- index: Number(),
14503
- previousHash: String(),
14504
- timestamp: Number(),
14505
- reward: BigNumber.from(0),
14506
- fees: BigNumber.from(0),
14507
- transactions: new Uint8Array(),
14508
- validators: new Uint8Array()
14502
+ index: Number(),
14503
+ previousHash: String(),
14504
+ timestamp: Number(),
14505
+ reward: BigNumber.from(0),
14506
+ fees: BigNumber.from(0),
14507
+ transactions: new Uint8Array(),
14508
+ validators: new Uint8Array()
14509
14509
  };
14510
14510
 
14511
14511
  class BlockMessage extends FormatInterface {
14512
- get messageName() {
14513
- return 'BlockMessage'
14514
- }
14515
- constructor(buffer) {
14516
- if (buffer instanceof BlockMessage) return buffer
14517
- const name = 'block-message';
14518
- super(buffer, proto$4, { name });
14519
- }
14520
- encode(decoded) {
14521
- decoded = decoded || this.decoded;
14522
- const validators = [];
14523
- const transactions = [];
14524
- for (const validator of decoded.validators) {
14525
- if (validator instanceof ValidatorMessage) validators.push(validator.encode());
14526
- else validators.push(new ValidatorMessage(validator).encode());
14527
- }
14528
- for (const transaction of decoded.transactions) {
14529
- if (transaction instanceof TransactionMessage) transactions.push(transaction.encode());
14530
- else transactions.push(new TransactionMessage(transaction).encode());
14531
- }
14532
- return super.encode({
14533
- ...decoded,
14534
- validators: index$5(validators),
14535
- transactions: index$5(transactions)
14536
- })
14537
- }
14538
- decode(encoded) {
14539
- encoded = encoded || this.encoded;
14540
- super.decode(encoded);
14541
- // @ts-ignore
14542
- this.decoded.transactions = index$4(this.decoded.transactions).map(
14543
- (transaction) => new TransactionMessage(transaction).decoded
14544
- );
14545
- // @ts-ignore
14546
- this.decoded.validators = index$4(this.decoded.validators).map(
14547
- (validator) => new ValidatorMessage(validator).decoded
14548
- );
14549
- return this.decoded
14550
- }
14512
+ get messageName() {
14513
+ return 'BlockMessage';
14514
+ }
14515
+ constructor(buffer) {
14516
+ if (buffer instanceof BlockMessage)
14517
+ return buffer;
14518
+ const name = 'block-message';
14519
+ super(buffer, proto$4, { name });
14520
+ }
14521
+ encode(decoded) {
14522
+ decoded = decoded || this.decoded;
14523
+ const validators = [];
14524
+ const transactions = [];
14525
+ for (const validator of decoded.validators) {
14526
+ if (validator instanceof ValidatorMessage)
14527
+ validators.push(validator.encode());
14528
+ else
14529
+ validators.push(new ValidatorMessage(validator).encode());
14530
+ }
14531
+ for (const transaction of decoded.transactions) {
14532
+ if (transaction instanceof TransactionMessage)
14533
+ transactions.push(transaction.encode());
14534
+ else
14535
+ transactions.push(new TransactionMessage(transaction).encode());
14536
+ }
14537
+ return super.encode({
14538
+ ...decoded,
14539
+ validators: index$5(validators),
14540
+ transactions: index$5(transactions)
14541
+ });
14542
+ }
14543
+ decode(encoded) {
14544
+ encoded = encoded || this.encoded;
14545
+ super.decode(encoded);
14546
+ // @ts-ignore
14547
+ this.decoded.transactions = index$4(this.decoded.transactions).map((transaction) => new TransactionMessage(transaction).decoded);
14548
+ // @ts-ignore
14549
+ this.decoded.validators = index$4(this.decoded.validators).map((validator) => new ValidatorMessage(validator).decoded);
14550
+ return this.decoded;
14551
+ }
14551
14552
  }
14552
14553
 
14553
14554
  var proto$3 = {
@@ -14623,4 +14624,4 @@ var _polyfillNode_child_process = /*#__PURE__*/Object.freeze({
14623
14624
  __proto__: null
14624
14625
  });
14625
14626
 
14626
- export { BlockMessage as B, ContractMessage as C, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, _polyfillNode_child_process as _, BWMessage as a, BWRequestMessage as b, BigNumber as c, arrayify as d, isBytes as e, getDefaultExportFromCjs as f, global$1 as g, hexZeroPad as h, isBigNumberish as i, toBase58 as t, version as v };
14627
+ export { BlockMessage as B, ContractMessage as C, FormatInterface as F, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, _polyfillNode_child_process as _, BWMessage as a, BWRequestMessage as b, BigNumber as c, arrayify as d, isBytes as e, getDefaultExportFromCjs as f, global$1 as g, hexZeroPad as h, isBigNumberish as i, toBase58 as t, version as v };
@@ -1,4 +1,4 @@
1
- import { g as global } from './_polyfill-node.child_process-BsjYmFff.js';
1
+ import { g as global } from './_polyfill-node.child_process-CblghArn.js';
2
2
 
3
3
  /*! https://mths.be/punycode v1.4.1 by @mathias */
4
4
 
@@ -1,5 +1,5 @@
1
- import { g as getDefaultExportFromCjs } from './node-browser-DqIklEKv.js';
2
- import './_polyfill-node.child_process-BsjYmFff.js';
1
+ import { g as getDefaultExportFromCjs } from './node-browser-CeM_F-HL.js';
2
+ import './_polyfill-node.child_process-CblghArn.js';
3
3
 
4
4
  var global;
5
5
  var hasRequiredGlobal;