@taquito/rpc 12.0.2 → 12.1.0

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.
@@ -137,12 +137,12 @@
137
137
  }
138
138
  validateAddress(address) {
139
139
  if (utils.validateAddress(address) !== utils.ValidationResult.VALID) {
140
- throw new utils.InvalidAddressError(`Invalid address: ${address}`);
140
+ throw new utils.InvalidAddressError(address);
141
141
  }
142
142
  }
143
143
  validateContract(address) {
144
144
  if (utils.validateContractAddress(address) !== utils.ValidationResult.VALID) {
145
- throw new utils.InvalidContractAddressError(`Invalid contract address: ${address}`);
145
+ throw new utils.InvalidContractAddressError(address);
146
146
  }
147
147
  }
148
148
  /**
@@ -993,8 +993,8 @@
993
993
 
994
994
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
995
995
  const VERSION = {
996
- "commitHash": "5996bf6b665e26de3201cf45884b4a2bb9218e09",
997
- "version": "12.0.2"
996
+ "commitHash": "cbdd0af87e400489076259d065e2d328feb8e1b4",
997
+ "version": "12.1.0"
998
998
  };
999
999
 
1000
1000
  /***
@@ -1021,12 +1021,12 @@
1021
1021
  }
1022
1022
  validateAddress(address) {
1023
1023
  if (utils.validateAddress(address) !== utils.ValidationResult.VALID) {
1024
- throw new utils.InvalidAddressError(`Invalid address: ${address}`);
1024
+ throw new utils.InvalidAddressError(address);
1025
1025
  }
1026
1026
  }
1027
1027
  validateContract(address) {
1028
1028
  if (utils.validateContractAddress(address) !== utils.ValidationResult.VALID) {
1029
- throw new utils.InvalidAddressError(`Invalid address: ${address}`);
1029
+ throw new utils.InvalidAddressError(address);
1030
1030
  }
1031
1031
  }
1032
1032
  /**
@@ -1266,6 +1266,7 @@
1266
1266
  'frozen_deposits_limit',
1267
1267
  'staking_balance',
1268
1268
  'delegated_balance',
1269
+ 'voting_power',
1269
1270
  ]);
1270
1271
  return Object.assign(Object.assign(Object.assign({}, response), castedResponse), { frozen_balance_by_cycle: response.frozen_balance_by_cycle
1271
1272
  ? response.frozen_balance_by_cycle.map((_a) => {
@@ -1445,7 +1446,8 @@
1445
1446
  url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballots`),
1446
1447
  method: 'GET',
1447
1448
  });
1448
- return response;
1449
+ const casted = castToBigNumber(response, ['yay', 'nay', 'pass']);
1450
+ return casted;
1449
1451
  });
1450
1452
  }
1451
1453
  /**
@@ -1496,6 +1498,12 @@
1496
1498
  url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/listings`),
1497
1499
  method: 'GET',
1498
1500
  });
1501
+ response.map((item) => {
1502
+ if (item.voting_power) {
1503
+ item.voting_power = new BigNumber__default["default"](item.voting_power);
1504
+ }
1505
+ return item;
1506
+ });
1499
1507
  return response;
1500
1508
  });
1501
1509
  }
@@ -1513,6 +1521,9 @@
1513
1521
  url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/proposals`),
1514
1522
  method: 'GET',
1515
1523
  });
1524
+ response.map((item) => {
1525
+ return (item[1] = new BigNumber__default["default"](item[1]));
1526
+ });
1516
1527
  return response;
1517
1528
  });
1518
1529
  }