@galacticcouncil/sdk-next 0.7.0-pr193-3d86320 → 0.7.0-pr193-5a7589c
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/index.d.ts +0 -1
- package/build/types/factory.d.ts +3 -2
- package/build/types/{client/LiquidityMiningClient.d.ts → farm/LiquidityMiningApi.d.ts} +14 -28
- package/build/types/farm/LiquidityMiningClient.d.ts +138 -0
- package/build/types/{client → farm}/claimSimulator.d.ts +4 -7
- package/build/types/farm/index.d.ts +2 -0
- package/build/types/farm/multiCurrencyContainer.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { Papi } from '../api';
|
|
2
|
+
import { Binary, Enum } from 'polkadot-api';
|
|
3
|
+
export declare class LiquidityMiningClient extends Papi {
|
|
4
|
+
protected omnipoolAssetIds: string[];
|
|
5
|
+
getOraclePrice(orderedAssets: [number, number]): Promise<[{
|
|
6
|
+
price: {
|
|
7
|
+
n: bigint;
|
|
8
|
+
d: bigint;
|
|
9
|
+
};
|
|
10
|
+
volume: {
|
|
11
|
+
a_in: bigint;
|
|
12
|
+
b_out: bigint;
|
|
13
|
+
a_out: bigint;
|
|
14
|
+
b_in: bigint;
|
|
15
|
+
};
|
|
16
|
+
liquidity: {
|
|
17
|
+
a: bigint;
|
|
18
|
+
b: bigint;
|
|
19
|
+
};
|
|
20
|
+
shares_issuance: bigint | undefined;
|
|
21
|
+
updated_at: number;
|
|
22
|
+
}, number] | undefined>;
|
|
23
|
+
getRelayBlockNumber(): Promise<number | undefined>;
|
|
24
|
+
getOmnipooFarms(id: number): Promise<{
|
|
25
|
+
keyArgs: [number, number];
|
|
26
|
+
value: number;
|
|
27
|
+
}[]>;
|
|
28
|
+
getOmnipoolGlobalFarm(id: number): Promise<{
|
|
29
|
+
id: number;
|
|
30
|
+
owner: import("polkadot-api").SS58String;
|
|
31
|
+
updated_at: number;
|
|
32
|
+
total_shares_z: bigint;
|
|
33
|
+
accumulated_rpz: bigint;
|
|
34
|
+
reward_currency: number;
|
|
35
|
+
pending_rewards: bigint;
|
|
36
|
+
accumulated_paid_rewards: bigint;
|
|
37
|
+
yield_per_period: bigint;
|
|
38
|
+
planned_yielding_periods: number;
|
|
39
|
+
blocks_per_period: number;
|
|
40
|
+
incentivized_asset: number;
|
|
41
|
+
max_reward_per_period: bigint;
|
|
42
|
+
min_deposit: bigint;
|
|
43
|
+
live_yield_farms_count: number;
|
|
44
|
+
total_yield_farms_count: number;
|
|
45
|
+
price_adjustment: bigint;
|
|
46
|
+
state: Enum<{
|
|
47
|
+
Active: undefined;
|
|
48
|
+
Stopped: undefined;
|
|
49
|
+
Terminated: undefined;
|
|
50
|
+
}>;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
getOmnipoolYieldFarm(id: number, globalFarmId: number, yieldFarmId: number): Promise<{
|
|
53
|
+
id: number;
|
|
54
|
+
updated_at: number;
|
|
55
|
+
accumulated_rpz: bigint;
|
|
56
|
+
state: Enum<{
|
|
57
|
+
Active: undefined;
|
|
58
|
+
Stopped: undefined;
|
|
59
|
+
Terminated: undefined;
|
|
60
|
+
}>;
|
|
61
|
+
total_shares: bigint;
|
|
62
|
+
total_valued_shares: bigint;
|
|
63
|
+
accumulated_rpvs: bigint;
|
|
64
|
+
loyalty_curve: {
|
|
65
|
+
initial_reward_percentage: bigint;
|
|
66
|
+
scale_coef: number;
|
|
67
|
+
} | undefined;
|
|
68
|
+
multiplier: bigint;
|
|
69
|
+
entries_count: bigint;
|
|
70
|
+
left_to_distribute: bigint;
|
|
71
|
+
total_stopped: number;
|
|
72
|
+
} | undefined>;
|
|
73
|
+
getIsolatedFarms(id: string): Promise<{
|
|
74
|
+
keyArgs: [import("polkadot-api").SS58String, number];
|
|
75
|
+
value: number;
|
|
76
|
+
}[]>;
|
|
77
|
+
getIsolatedGlobalFarm(id: number): Promise<{
|
|
78
|
+
id: number;
|
|
79
|
+
owner: import("polkadot-api").SS58String;
|
|
80
|
+
updated_at: number;
|
|
81
|
+
total_shares_z: bigint;
|
|
82
|
+
accumulated_rpz: bigint;
|
|
83
|
+
reward_currency: number;
|
|
84
|
+
pending_rewards: bigint;
|
|
85
|
+
accumulated_paid_rewards: bigint;
|
|
86
|
+
yield_per_period: bigint;
|
|
87
|
+
planned_yielding_periods: number;
|
|
88
|
+
blocks_per_period: number;
|
|
89
|
+
incentivized_asset: number;
|
|
90
|
+
max_reward_per_period: bigint;
|
|
91
|
+
min_deposit: bigint;
|
|
92
|
+
live_yield_farms_count: number;
|
|
93
|
+
total_yield_farms_count: number;
|
|
94
|
+
price_adjustment: bigint;
|
|
95
|
+
state: Enum<{
|
|
96
|
+
Active: undefined;
|
|
97
|
+
Stopped: undefined;
|
|
98
|
+
Terminated: undefined;
|
|
99
|
+
}>;
|
|
100
|
+
} | undefined>;
|
|
101
|
+
getIsolatedYieldFarm(id: string, globalFarmId: number, yieldFarmId: number): Promise<{
|
|
102
|
+
id: number;
|
|
103
|
+
updated_at: number;
|
|
104
|
+
accumulated_rpz: bigint;
|
|
105
|
+
state: Enum<{
|
|
106
|
+
Active: undefined;
|
|
107
|
+
Stopped: undefined;
|
|
108
|
+
Terminated: undefined;
|
|
109
|
+
}>;
|
|
110
|
+
total_shares: bigint;
|
|
111
|
+
total_valued_shares: bigint;
|
|
112
|
+
accumulated_rpvs: bigint;
|
|
113
|
+
loyalty_curve: {
|
|
114
|
+
initial_reward_percentage: bigint;
|
|
115
|
+
scale_coef: number;
|
|
116
|
+
} | undefined;
|
|
117
|
+
multiplier: bigint;
|
|
118
|
+
entries_count: bigint;
|
|
119
|
+
left_to_distribute: bigint;
|
|
120
|
+
total_stopped: number;
|
|
121
|
+
} | undefined>;
|
|
122
|
+
getAsset(id: number): Promise<{
|
|
123
|
+
symbol: Binary | undefined;
|
|
124
|
+
decimals: number | undefined;
|
|
125
|
+
name: Binary | undefined;
|
|
126
|
+
asset_type: Enum<{
|
|
127
|
+
Token: undefined;
|
|
128
|
+
XYK: undefined;
|
|
129
|
+
StableSwap: undefined;
|
|
130
|
+
Bond: undefined;
|
|
131
|
+
External: undefined;
|
|
132
|
+
Erc20: undefined;
|
|
133
|
+
}>;
|
|
134
|
+
existential_deposit: bigint;
|
|
135
|
+
xcm_rate_limit: bigint | undefined;
|
|
136
|
+
is_sufficient: boolean;
|
|
137
|
+
} | undefined>;
|
|
138
|
+
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
type NotUndefined<T> = T extends undefined ? never : T;
|
|
6
|
-
type GlobalFarm = NotUndefined<Awaited<ReturnType<Api['query']['XYKWarehouseLM']['GlobalFarm']['getValue'] | Api['query']['OmnipoolWarehouseLM']['GlobalFarm']['getValue']>>>;
|
|
7
|
-
type YieldFarm = NotUndefined<Awaited<ReturnType<Api['query']['XYKWarehouseLM']['YieldFarm']['getValue'] | Api['query']['OmnipoolWarehouseLM']['YieldFarm']['getValue']>>>;
|
|
1
|
+
import { FarmDepositReward, IsolatedGlobalFarm, ISolatedYieldFarm, OmnipoolGlobalFarm, OmnipoolWarehouseLMDepositYieldFarmEntry, OmnipoolYieldFarm } from './LiquidityMiningApi';
|
|
2
|
+
import { MultiCurrencyContainer } from './multiCurrencyContainer';
|
|
3
|
+
type GlobalFarm = OmnipoolGlobalFarm | IsolatedGlobalFarm;
|
|
4
|
+
type YieldFarm = OmnipoolYieldFarm | ISolatedYieldFarm;
|
|
8
5
|
export declare class OmnipoolLiquidityMiningClaimSim {
|
|
9
6
|
protected get_account: (sub: number) => string;
|
|
10
7
|
protected multiCurrency: MultiCurrencyContainer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Balance } from 'types';
|
|
2
|
+
export declare class MultiCurrencyContainer {
|
|
3
|
+
result: Map<string, bigint>;
|
|
4
|
+
getKey(asset: number, accountId: string): string;
|
|
5
|
+
constructor(keys: [string, number][], values: Balance[]);
|
|
6
|
+
free_balance(asset: number, accountId: string): bigint;
|
|
7
|
+
transfer(asset: number, sourceAccount: string, targetAccount: string, amount: bigint): void;
|
|
8
|
+
}
|