@wireio/stake 0.7.3 → 0.9.1

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.
@@ -262,7 +262,7 @@ export type GlobalState = {
262
262
  roleWarmupDuration: BN;
263
263
 
264
264
  /** Wire lifecycle state (preLaunch / postLaunch / refund) */
265
- wireState: WireState;
265
+ wireState: WireState | any;
266
266
 
267
267
  /** PDA bump */
268
268
  bump: number;
@@ -615,7 +615,7 @@ export type LeaderboardState = {
615
615
  * Per-validator scores (i64 on-chain).
616
616
  * Index corresponds to `registryIndex` in ValidatorRecord.
617
617
  */
618
- scores: BN[];
618
+ scores: number[];
619
619
 
620
620
  /**
621
621
  * Sorted indices into `scores[]` / `voteAccounts[]`,
@@ -628,7 +628,7 @@ export type LeaderboardState = {
628
628
  * `voteAccounts[i]` is the vote account for validator with
629
629
  * `registryIndex == i`.
630
630
  */
631
- voteAccounts: PublicKey[];
631
+ voteAccounts: { bytes: number[]; }[];
632
632
 
633
633
  /**
634
634
  * Number of active validators currently tracked in the leaderboard.
@@ -643,7 +643,7 @@ export type LeaderboardState = {
643
643
  * Reserved padding / future-proofing on-chain (u64[8]).
644
644
  * Not used by client logic, but surfaced for completeness.
645
645
  */
646
- padding: BN[];
646
+ padding: number[];
647
647
  };
648
648
 
649
649
  /**
package/src/staker.ts CHANGED
@@ -36,12 +36,12 @@ export class Staker {
36
36
 
37
37
  config.forEach((cfg) => {
38
38
  switch (cfg.network.chainId) {
39
+ // case SolChainID.Mainnet:
39
40
  case SolChainID.Devnet:
40
- case SolChainID.WireTestnet:
41
41
  this.clients.set(cfg.network.chainId, new SolanaStakingClient(cfg));
42
42
  break;
43
43
 
44
- case EvmChainID.Ethereum:
44
+ // case EvmChainID.Ethereum:
45
45
  case EvmChainID.Hoodi:
46
46
  this.clients.set(cfg.network.chainId, new EthereumStakingClient(cfg));
47
47
  break;
package/src/types.ts CHANGED
@@ -7,8 +7,16 @@ export type StakerConfig = {
7
7
  network: ExternalNetwork;
8
8
  provider?: BaseSignerWalletAdapter | ethers.providers.Web3Provider;
9
9
  pubKey?: PublicKey;
10
+ extras?: {
11
+ squadsX?: SquadsXConfig;
12
+ }
10
13
  }
11
14
 
15
+ export type SquadsXConfig = {
16
+ multisigPDA: string; // REQUIRED, base58 multisig address string
17
+ vaultIndex?: number; // default 0
18
+ };
19
+
12
20
  export interface IStakingClient {
13
21
  pubKey?: PublicKey;
14
22
  network: ExternalNetwork;