@galacticcouncil/sdk-next 0.7.1-pr199-9b2819e → 0.8.0-pr203-91dcafe
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/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/types/aave/AaveClient.d.ts +1 -0
- package/build/types/aave/AaveUtils.d.ts +6 -2
- package/build/types/aave/types.d.ts +1 -0
- package/build/types/farm/const.d.ts +1 -1
- package/build/types/farm/types.d.ts +0 -3
- package/build/types/staking/StakingApi.d.ts +46 -26
- package/build/types/staking/StakingClient.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import Big from 'big.js';
|
|
2
2
|
import { StakingClient } from './StakingClient';
|
|
3
3
|
import { BalanceClient } from 'client';
|
|
4
|
+
declare const CONVICTIONS: {
|
|
5
|
+
readonly none: 0.1;
|
|
6
|
+
readonly locked1x: 1;
|
|
7
|
+
readonly locked2x: 2;
|
|
8
|
+
readonly locked3x: 3;
|
|
9
|
+
readonly locked4x: 4;
|
|
10
|
+
readonly locked5x: 5;
|
|
11
|
+
readonly locked6x: 6;
|
|
12
|
+
};
|
|
13
|
+
type Conviction = keyof typeof CONVICTIONS;
|
|
14
|
+
type TVote = {
|
|
15
|
+
id: number;
|
|
16
|
+
amount: bigint;
|
|
17
|
+
conviction: Conviction;
|
|
18
|
+
};
|
|
4
19
|
export declare const BIG_10: Big.Big;
|
|
5
20
|
export declare const BIG_BILL: Big.Big;
|
|
6
21
|
export declare class StakingApi {
|
|
@@ -9,38 +24,43 @@ export declare class StakingApi {
|
|
|
9
24
|
constructor(client: StakingClient, balanceClient: BalanceClient);
|
|
10
25
|
getFreePotBalance(): Promise<bigint>;
|
|
11
26
|
getStakingPosition(id: bigint): Promise<{
|
|
12
|
-
stake: bigint
|
|
13
|
-
rewardPerStake: bigint
|
|
14
|
-
createdAt: number
|
|
15
|
-
actionPoints: bigint
|
|
16
|
-
accumulatedUnpaidRewards: bigint
|
|
17
|
-
accumulatedSlashPoints: bigint
|
|
18
|
-
accumulatedLockedRewards: bigint
|
|
19
|
-
votes:
|
|
20
|
-
|
|
21
|
-
amount: bigint;
|
|
22
|
-
conviction: string;
|
|
23
|
-
}[];
|
|
24
|
-
}>;
|
|
27
|
+
stake: bigint;
|
|
28
|
+
rewardPerStake: bigint;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
actionPoints: bigint;
|
|
31
|
+
accumulatedUnpaidRewards: bigint;
|
|
32
|
+
accumulatedSlashPoints: bigint;
|
|
33
|
+
accumulatedLockedRewards: bigint;
|
|
34
|
+
votes: TVote[];
|
|
35
|
+
} | undefined>;
|
|
25
36
|
getStake(address: string): Promise<{
|
|
26
37
|
totalStake: bigint;
|
|
27
38
|
accumulatedRewardPerStake: bigint;
|
|
28
39
|
potReservedBalance: bigint;
|
|
29
40
|
positionId: bigint | undefined;
|
|
30
41
|
stakePosition: {
|
|
31
|
-
stake: bigint
|
|
32
|
-
rewardPerStake: bigint
|
|
33
|
-
createdAt: number
|
|
34
|
-
actionPoints: bigint
|
|
35
|
-
accumulatedUnpaidRewards: bigint
|
|
36
|
-
accumulatedSlashPoints: bigint
|
|
37
|
-
accumulatedLockedRewards: bigint
|
|
38
|
-
votes:
|
|
39
|
-
id: number;
|
|
40
|
-
amount: bigint;
|
|
41
|
-
conviction: string;
|
|
42
|
-
}[];
|
|
42
|
+
stake: bigint;
|
|
43
|
+
rewardPerStake: bigint;
|
|
44
|
+
createdAt: number;
|
|
45
|
+
actionPoints: bigint;
|
|
46
|
+
accumulatedUnpaidRewards: bigint;
|
|
47
|
+
accumulatedSlashPoints: bigint;
|
|
48
|
+
accumulatedLockedRewards: bigint;
|
|
49
|
+
votes: TVote[];
|
|
43
50
|
} | undefined;
|
|
44
51
|
}>;
|
|
45
|
-
|
|
52
|
+
getCurrentActionPoints(votes: TVote[], initialActionPoints: bigint, stakePosition: bigint, activeReferendaIds: string[]): {
|
|
53
|
+
currentActionPoints: string;
|
|
54
|
+
maxActionPoints: string;
|
|
55
|
+
};
|
|
56
|
+
getRewards(account: string, activeReferendaIds: Array<string>, blockNumber: string): Promise<{
|
|
57
|
+
rewards: string;
|
|
58
|
+
maxRewards?: undefined;
|
|
59
|
+
allocatedRewardsPercentage?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
rewards: string;
|
|
62
|
+
maxRewards: string;
|
|
63
|
+
allocatedRewardsPercentage: number;
|
|
64
|
+
} | undefined>;
|
|
46
65
|
}
|
|
66
|
+
export {};
|
|
@@ -111,5 +111,8 @@ export declare class StakingClient extends Papi {
|
|
|
111
111
|
} | undefined];
|
|
112
112
|
Killed: number;
|
|
113
113
|
}> | undefined>;
|
|
114
|
+
getTimePointsPerPeriod(): Promise<number>;
|
|
115
|
+
getTimePointsWeight(): Promise<number>;
|
|
116
|
+
getActionPointsWeight(): Promise<number>;
|
|
114
117
|
getSixBlockSince(): Promise<string>;
|
|
115
118
|
}
|