@galacticcouncil/sdk-next 0.6.0-pr192-eb1e3d2 → 0.6.0-pr193-99644e4
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/client/BalanceClient.d.ts +11 -10
- package/build/types/client/LiquidityMiningClient.d.ts +75 -0
- package/build/types/client/claimSimulator.d.ts +196 -0
- package/build/types/client/index.d.ts +1 -0
- package/build/types/factory.d.ts +4 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/pool/PoolContextProvider.d.ts +3 -2
- package/build/types/pool/stable/StableSwap.d.ts +1 -1
- package/build/types/pool/types.d.ts +5 -1
- package/build/types/sor/Router.d.ts +12 -6
- package/build/types/sor/TradeRouter.d.ts +62 -33
- package/build/types/sor/route/bfs.d.ts +11 -2
- package/build/types/sor/route/index.d.ts +1 -1
- package/build/types/sor/route/suggester.d.ts +21 -12
- package/build/types/staking/StakingApi.d.ts +46 -0
- package/build/types/staking/StakingClient.d.ts +120 -0
- package/build/types/staking/index.d.ts +2 -0
- package/build/types/types.d.ts +9 -2
- package/build/types/utils/format.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Papi } from '../api';
|
|
2
|
+
export declare class StakingClient extends Papi {
|
|
3
|
+
getPalletId(): Promise<string>;
|
|
4
|
+
getPeriodLength(): Promise<number>;
|
|
5
|
+
getUnclaimablePeriods(): Promise<bigint>;
|
|
6
|
+
getNFTCollectionId(): Promise<bigint>;
|
|
7
|
+
getStaking(): Promise<{
|
|
8
|
+
total_stake: bigint;
|
|
9
|
+
accumulated_reward_per_stake: bigint;
|
|
10
|
+
pot_reserved_balance: bigint;
|
|
11
|
+
}>;
|
|
12
|
+
getUniques(address: string, collectionId: bigint): Promise<{
|
|
13
|
+
address: import("polkadot-api").SS58String;
|
|
14
|
+
collectionId: bigint;
|
|
15
|
+
itemId: bigint;
|
|
16
|
+
}[]>;
|
|
17
|
+
getStakingPositionsValue(id: bigint): Promise<{
|
|
18
|
+
stake: bigint;
|
|
19
|
+
action_points: bigint;
|
|
20
|
+
reward_per_stake: bigint;
|
|
21
|
+
created_at: number;
|
|
22
|
+
accumulated_slash_points: bigint;
|
|
23
|
+
accumulated_unpaid_rewards: bigint;
|
|
24
|
+
accumulated_locked_rewards: bigint;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
getStakingVotes(id: bigint): Promise<[number, {
|
|
27
|
+
amount: bigint;
|
|
28
|
+
conviction: import("@galacticcouncil/descriptors").VotingConviction;
|
|
29
|
+
}][]>;
|
|
30
|
+
getReferendumInfo(key: number): Promise<import("polkadot-api").Enum<{
|
|
31
|
+
Ongoing: {
|
|
32
|
+
"track": number;
|
|
33
|
+
"origin": import("polkadot-api").Enum<{
|
|
34
|
+
system: import("@galacticcouncil/descriptors").DispatchRawOrigin;
|
|
35
|
+
Council: import("polkadot-api").Enum<{
|
|
36
|
+
"Members": import("polkadot-api").FixedSizeArray<2, number>;
|
|
37
|
+
"Member": import("polkadot-api").SS58String;
|
|
38
|
+
"_Phantom": undefined;
|
|
39
|
+
}>;
|
|
40
|
+
TechnicalCommittee: import("polkadot-api").Enum<{
|
|
41
|
+
"Members": import("polkadot-api").FixedSizeArray<2, number>;
|
|
42
|
+
"Member": import("polkadot-api").SS58String;
|
|
43
|
+
"_Phantom": undefined;
|
|
44
|
+
}>;
|
|
45
|
+
Origins: import("polkadot-api").Enum<{
|
|
46
|
+
"WhitelistedCaller": undefined;
|
|
47
|
+
"ReferendumCanceller": undefined;
|
|
48
|
+
"ReferendumKiller": undefined;
|
|
49
|
+
"GeneralAdmin": undefined;
|
|
50
|
+
"OmnipoolAdmin": undefined;
|
|
51
|
+
"Treasurer": undefined;
|
|
52
|
+
"Spender": undefined;
|
|
53
|
+
"Tipper": undefined;
|
|
54
|
+
"EconomicParameters": undefined;
|
|
55
|
+
}>;
|
|
56
|
+
Ethereum: import("polkadot-api").Enum<{
|
|
57
|
+
"EthereumTransaction": import("polkadot-api").FixedSizeBinary<20>;
|
|
58
|
+
}>;
|
|
59
|
+
PolkadotXcm: import("@galacticcouncil/descriptors").XcmPalletOrigin;
|
|
60
|
+
CumulusXcm: import("polkadot-api").Enum<{
|
|
61
|
+
"Relay": undefined;
|
|
62
|
+
"SiblingParachain": number;
|
|
63
|
+
}>;
|
|
64
|
+
Void: undefined;
|
|
65
|
+
}>;
|
|
66
|
+
"proposal": import("@galacticcouncil/descriptors").PreimagesBounded;
|
|
67
|
+
"enactment": import("@galacticcouncil/descriptors").TraitsScheduleDispatchTime;
|
|
68
|
+
"submitted": number;
|
|
69
|
+
"submission_deposit": {
|
|
70
|
+
amount: bigint;
|
|
71
|
+
who: import("polkadot-api").SS58String;
|
|
72
|
+
};
|
|
73
|
+
"decision_deposit"?: {
|
|
74
|
+
amount: bigint;
|
|
75
|
+
who: import("polkadot-api").SS58String;
|
|
76
|
+
} | undefined;
|
|
77
|
+
"deciding"?: ({
|
|
78
|
+
"since": number;
|
|
79
|
+
"confirming"?: number | undefined;
|
|
80
|
+
}) | undefined;
|
|
81
|
+
"tally": {
|
|
82
|
+
ayes: bigint;
|
|
83
|
+
nays: bigint;
|
|
84
|
+
support: bigint;
|
|
85
|
+
};
|
|
86
|
+
"in_queue": boolean;
|
|
87
|
+
"alarm"?: ([number, import("polkadot-api").FixedSizeArray<2, number>]) | undefined;
|
|
88
|
+
};
|
|
89
|
+
Approved: [number, {
|
|
90
|
+
amount: bigint;
|
|
91
|
+
who: import("polkadot-api").SS58String;
|
|
92
|
+
} | undefined, {
|
|
93
|
+
amount: bigint;
|
|
94
|
+
who: import("polkadot-api").SS58String;
|
|
95
|
+
} | undefined];
|
|
96
|
+
Rejected: [number, {
|
|
97
|
+
amount: bigint;
|
|
98
|
+
who: import("polkadot-api").SS58String;
|
|
99
|
+
} | undefined, {
|
|
100
|
+
amount: bigint;
|
|
101
|
+
who: import("polkadot-api").SS58String;
|
|
102
|
+
} | undefined];
|
|
103
|
+
Cancelled: [number, {
|
|
104
|
+
amount: bigint;
|
|
105
|
+
who: import("polkadot-api").SS58String;
|
|
106
|
+
} | undefined, {
|
|
107
|
+
amount: bigint;
|
|
108
|
+
who: import("polkadot-api").SS58String;
|
|
109
|
+
} | undefined];
|
|
110
|
+
TimedOut: [number, {
|
|
111
|
+
amount: bigint;
|
|
112
|
+
who: import("polkadot-api").SS58String;
|
|
113
|
+
} | undefined, {
|
|
114
|
+
amount: bigint;
|
|
115
|
+
who: import("polkadot-api").SS58String;
|
|
116
|
+
} | undefined];
|
|
117
|
+
Killed: number;
|
|
118
|
+
}> | undefined>;
|
|
119
|
+
getSixBlockSince(): Promise<string>;
|
|
120
|
+
}
|
package/build/types/types.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export type Amount = {
|
|
|
3
3
|
amount: bigint;
|
|
4
4
|
decimals: number;
|
|
5
5
|
};
|
|
6
|
-
export interface
|
|
6
|
+
export interface AssetBalance {
|
|
7
7
|
id: number;
|
|
8
|
-
|
|
8
|
+
balance: Balance;
|
|
9
9
|
}
|
|
10
10
|
export interface AssetMetadata {
|
|
11
11
|
decimals: number;
|
|
@@ -34,6 +34,13 @@ export interface ExternalAsset extends AssetMetadata {
|
|
|
34
34
|
internalId: number;
|
|
35
35
|
isWhiteListed?: boolean;
|
|
36
36
|
}
|
|
37
|
+
export interface Balance {
|
|
38
|
+
free: bigint;
|
|
39
|
+
total: bigint;
|
|
40
|
+
transferable: bigint;
|
|
41
|
+
reserved: bigint;
|
|
42
|
+
frozen: bigint;
|
|
43
|
+
}
|
|
37
44
|
export type XcmV3Multilocation = {
|
|
38
45
|
parents: number;
|
|
39
46
|
interior: XcmV3Junctions;
|
|
@@ -2,3 +2,4 @@ import { PoolFee } from '../pool';
|
|
|
2
2
|
export declare function toPct(fee: PoolFee): number;
|
|
3
3
|
export declare function toDecimals(fee: PoolFee): number;
|
|
4
4
|
export declare function fromPermill(permill: number): PoolFee;
|
|
5
|
+
export declare function shiftNeg(amount: string | number | bigint, decimals: number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacticcouncil/sdk-next",
|
|
3
|
-
"version": "0.6.0-
|
|
3
|
+
"version": "0.6.0-pr193-99644e4",
|
|
4
4
|
"description": "Galactic next gen sdk (papi)",
|
|
5
5
|
"author": "GalacticCouncil",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/big.js": "^6.2.2"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@galacticcouncil/descriptors": "
|
|
38
|
+
"@galacticcouncil/descriptors": "1.4.0-pr193-99644e4",
|
|
39
39
|
"@galacticcouncil/math-lbp": "^1.2.0",
|
|
40
40
|
"@galacticcouncil/math-liquidity-mining": "^1.2.0",
|
|
41
41
|
"@galacticcouncil/math-omnipool": "^1.3.0",
|