@xyo-network/xl1-protocol-sdk 1.18.34 → 1.18.35

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.
@@ -3997,20 +3997,11 @@ import { assertEx as assertEx30 } from "@xylabs/sdk-js";
3997
3997
  var SimpleStakeViewer = class extends AbstractCreatableProvider {
3998
3998
  moniker = SimpleStakeViewer.defaultMoniker;
3999
3999
  _chainStakeEventsViewer;
4000
- get chainMap() {
4001
- return this.params.chainMap;
4002
- }
4003
- get minWithdrawalBlocks() {
4004
- return this.params.minWithdrawalBlocks ?? 10;
4005
- }
4006
- get rewardsContract() {
4007
- return toAddress9(toAddress9(1n));
4008
- }
4009
4000
  get stakeEvents() {
4010
4001
  return assertEx30(this._chainStakeEventsViewer, () => "Stake events viewer not set");
4011
4002
  }
4012
- get stakingTokenAddress() {
4013
- return toAddress9("0x000000000000000000000000000011");
4003
+ get chainMap() {
4004
+ return this.params.chainMap;
4014
4005
  }
4015
4006
  get positions() {
4016
4007
  return this.params.positions;
@@ -4049,6 +4040,9 @@ var SimpleStakeViewer = class extends AbstractCreatableProvider {
4049
4040
  () => "Failed to create StakeEventsViewer"
4050
4041
  );
4051
4042
  }
4043
+ minWithdrawalBlocks() {
4044
+ return this.params.minWithdrawalBlocks ?? 10;
4045
+ }
4052
4046
  pending() {
4053
4047
  let pending = 0n;
4054
4048
  for (const position of this.positions) {
@@ -4067,6 +4061,9 @@ var SimpleStakeViewer = class extends AbstractCreatableProvider {
4067
4061
  }
4068
4062
  return pending;
4069
4063
  }
4064
+ rewardsContract() {
4065
+ return toAddress9(toAddress9(1n));
4066
+ }
4070
4067
  stakeById(id) {
4071
4068
  return assertEx30(this.positions[id], () => new Error(`Stake with id ${id} not found`));
4072
4069
  }
@@ -4081,6 +4078,9 @@ var SimpleStakeViewer = class extends AbstractCreatableProvider {
4081
4078
  const endBlock = range[1] ?? Number.MAX_SAFE_INTEGER;
4082
4079
  return this.positions.filter((s) => asAddress5(s.staker) === asAddress5(staker) && s.addBlock <= endBlock && s.removeBlock <= endBlock);
4083
4080
  }
4081
+ stakingTokenAddress() {
4082
+ return toAddress9("0x000000000000000000000000000011");
4083
+ }
4084
4084
  withdrawn() {
4085
4085
  let withdrawn = 0n;
4086
4086
  for (const position of this.positions) {