@audius/sdk 2.0.3-beta.7 → 2.0.3-beta.9

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/dist/index.esm.js CHANGED
@@ -27982,7 +27982,7 @@ var EthWeb3Manager = /*#__PURE__*/function () {
27982
27982
  }();
27983
27983
 
27984
27984
  var name = "@audius/sdk";
27985
- var version = "2.0.3-beta.7";
27985
+ var version = "2.0.3-beta.9";
27986
27986
  var audius = {
27987
27987
  releaseSHA: "0a1b8fee5de228d48f2aab265720fbaf45bda661"
27988
27988
  };
@@ -48734,7 +48734,7 @@ var BaseRewardsReporter = /*#__PURE__*/function () {
48734
48734
 
48735
48735
  var MAX_DISBURSED_CACHE_SIZE = 100;
48736
48736
  var SOLANA_EST_SEC_PER_SLOT = 0.5;
48737
- var POA_SEC_PER_BLOCK = 5;
48737
+ var POA_SEC_PER_BLOCK = 1;
48738
48738
  var MAX_DISCOVERY_NODE_BLOCKLIST_LEN = 10;
48739
48739
  /**
48740
48740
  * Class to encapsulate logic for calculating disbursement delay thresholds.
@@ -48752,6 +48752,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48752
48752
  var libs = _ref.libs,
48753
48753
  runBehindSec = _ref.runBehindSec,
48754
48754
  allowedStalenessSec = _ref.allowedStalenessSec,
48755
+ blockOffset = _ref.blockOffset,
48755
48756
  _ref$solanaPollingInt = _ref.solanaPollingInterval,
48756
48757
  solanaPollingInterval = _ref$solanaPollingInt === void 0 ? 30 : _ref$solanaPollingInt,
48757
48758
  _ref$logger = _ref.logger,
@@ -48768,6 +48769,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48768
48769
  this.solanaPollingInterval = solanaPollingInterval;
48769
48770
  this.logger = logger;
48770
48771
  this.intervalHandle = null;
48772
+ this.blockOffset = blockOffset;
48771
48773
  }
48772
48774
 
48773
48775
  _createClass(AttestationDelayCalculator, [{
@@ -48851,11 +48853,15 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48851
48853
  return _context7.abrupt("return", this.lastPOAThreshold.threshold);
48852
48854
 
48853
48855
  case 2:
48854
- _context7.next = 4;
48856
+ _context7.t0 = Number;
48857
+ _context7.next = 5;
48855
48858
  return this.libs.web3Manager.getWeb3().eth.getBlockNumber();
48856
48859
 
48857
- case 4:
48858
- currentBlock = _context7.sent;
48860
+ case 5:
48861
+ _context7.t1 = _context7.sent;
48862
+ _context7.t2 = (0, _context7.t0)(_context7.t1);
48863
+ _context7.t3 = this.blockOffset;
48864
+ currentBlock = _context7.t2 + _context7.t3;
48859
48865
  threshold = currentBlock - this.runBehindSec / POA_SEC_PER_BLOCK;
48860
48866
  this.lastPOAThreshold = {
48861
48867
  threshold: threshold,
@@ -48863,7 +48869,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48863
48869
  };
48864
48870
  return _context7.abrupt("return", threshold);
48865
48871
 
48866
- case 8:
48872
+ case 12:
48867
48873
  case "end":
48868
48874
  return _context7.stop();
48869
48875
  }
@@ -49003,7 +49009,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49003
49009
  };
49004
49010
  }() : _ref3$updateStateCall,
49005
49011
  _ref3$maxCooldownMsec = _ref3.maxCooldownMsec,
49006
- maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec;
49012
+ maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec,
49013
+ blockOffset = _ref3.blockOffset;
49007
49014
 
49008
49015
  _classCallCheck(this, RewardsAttester);
49009
49016
 
@@ -49040,7 +49047,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49040
49047
  libs: libs,
49041
49048
  runBehindSec: runBehindSec,
49042
49049
  logger: logger,
49043
- allowedStalenessSec: 5
49050
+ allowedStalenessSec: 5,
49051
+ blockOffset: blockOffset
49044
49052
  });
49045
49053
  this.isSolanaChallenge = isSolanaChallenge;
49046
49054
  this._performSingleAttestation = this._performSingleAttestation.bind(this);