@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.
- package/lib/stake.browser.js +628 -816
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +196 -549
- package/lib/stake.js +661 -816
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +628 -816
- package/lib/stake.m.js.map +1 -1
- package/package.json +2 -1
- package/src/assets/solana/idl/liqsol_core.json +114 -377
- package/src/assets/solana/idl/validator_leaderboard.json +0 -146
- package/src/assets/solana/types/liqsol_core.ts +114 -377
- package/src/assets/solana/types/validator_leaderboard.ts +0 -146
- package/src/networks/ethereum/clients/opp.client.ts +20 -21
- package/src/networks/ethereum/clients/receipt.client.ts +8 -1
- package/src/networks/ethereum/contract.ts +40 -5
- package/src/networks/ethereum/ethereum.ts +148 -139
- package/src/networks/ethereum/types.ts +1 -2
- package/src/networks/solana/clients/deposit.client.ts +260 -9
- package/src/networks/solana/clients/distribution.client.ts +1 -1
- package/src/networks/solana/clients/outpost.client.ts +1 -1
- package/src/networks/solana/constants.ts +1 -1
- package/src/networks/solana/solana.ts +439 -233
- package/src/networks/solana/types.ts +4 -4
- package/src/staker.ts +2 -2
- package/src/types.ts +8 -0
|
@@ -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:
|
|
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:
|
|
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:
|
|
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;
|