@galacticcouncil/sdk-next 0.6.0-pr193-92a6b4e → 0.6.0-pr194-1c1c0d6
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 +1 -2
- package/build/types/utils/format.d.ts +0 -1
- package/package.json +2 -2
- package/build/types/client/LiquidityMiningClient.d.ts +0 -75
- package/build/types/client/claimSimulator.d.ts +0 -196
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { TypedApi } from 'polkadot-api';
|
|
2
|
-
import { MultiCurrencyContainer, OmnipoolWarehouseLMDepositYieldFarmEntry } from './LiquidityMiningClient';
|
|
3
|
-
import { hydration } from '@galacticcouncil/descriptors';
|
|
4
|
-
import Big from 'big.js';
|
|
5
|
-
type Api = TypedApi<typeof hydration>;
|
|
6
|
-
type NotUndefined<T> = T extends undefined ? never : T;
|
|
7
|
-
type GlobalFarm = NotUndefined<Awaited<ReturnType<Api['query']['XYKWarehouseLM']['GlobalFarm']['getValue'] | Api['query']['OmnipoolWarehouseLM']['GlobalFarm']['getValue']>>>;
|
|
8
|
-
type YieldFarm = NotUndefined<Awaited<ReturnType<Api['query']['XYKWarehouseLM']['YieldFarm']['getValue'] | Api['query']['OmnipoolWarehouseLM']['YieldFarm']['getValue']>>>;
|
|
9
|
-
export declare class OmnipoolLiquidityMiningClaimSim {
|
|
10
|
-
protected get_account: (sub: number) => string;
|
|
11
|
-
protected multiCurrency: MultiCurrencyContainer;
|
|
12
|
-
protected getAsset: (id: number) => Promise<{
|
|
13
|
-
existential_deposit: bigint;
|
|
14
|
-
} | undefined>;
|
|
15
|
-
constructor(get_account: (sub: number) => string, multiCurrency: MultiCurrencyContainer, getAsset: (id: number) => Promise<{
|
|
16
|
-
existential_deposit: bigint;
|
|
17
|
-
} | undefined>);
|
|
18
|
-
calculate_rewards_from_pot(global_farm: GlobalFarm, yield_farm: YieldFarm, stake_in_global_farm: Big): {
|
|
19
|
-
reward: Big.Big;
|
|
20
|
-
mutatedYieldFarm: {
|
|
21
|
-
id: number;
|
|
22
|
-
updated_at: number;
|
|
23
|
-
accumulated_rpz: bigint;
|
|
24
|
-
state: import("polkadot-api").Enum<{
|
|
25
|
-
Active: undefined;
|
|
26
|
-
Stopped: undefined;
|
|
27
|
-
Terminated: undefined;
|
|
28
|
-
}>;
|
|
29
|
-
total_shares: bigint;
|
|
30
|
-
total_valued_shares: bigint;
|
|
31
|
-
accumulated_rpvs: bigint;
|
|
32
|
-
loyalty_curve: {
|
|
33
|
-
initial_reward_percentage: bigint;
|
|
34
|
-
scale_coef: number;
|
|
35
|
-
} | undefined;
|
|
36
|
-
multiplier: bigint;
|
|
37
|
-
entries_count: bigint;
|
|
38
|
-
left_to_distribute: bigint;
|
|
39
|
-
total_stopped: number;
|
|
40
|
-
};
|
|
41
|
-
mutatedGlobalFarm: {
|
|
42
|
-
id: number;
|
|
43
|
-
owner: import("polkadot-api").SS58String;
|
|
44
|
-
updated_at: number;
|
|
45
|
-
total_shares_z: bigint;
|
|
46
|
-
accumulated_rpz: bigint;
|
|
47
|
-
reward_currency: number;
|
|
48
|
-
pending_rewards: bigint;
|
|
49
|
-
accumulated_paid_rewards: bigint;
|
|
50
|
-
yield_per_period: bigint;
|
|
51
|
-
planned_yielding_periods: number;
|
|
52
|
-
blocks_per_period: number;
|
|
53
|
-
incentivized_asset: number;
|
|
54
|
-
max_reward_per_period: bigint;
|
|
55
|
-
min_deposit: bigint;
|
|
56
|
-
live_yield_farms_count: number;
|
|
57
|
-
total_yield_farms_count: number;
|
|
58
|
-
price_adjustment: bigint;
|
|
59
|
-
state: import("polkadot-api").Enum<{
|
|
60
|
-
Active: undefined;
|
|
61
|
-
Stopped: undefined;
|
|
62
|
-
Terminated: undefined;
|
|
63
|
-
}>;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
sync_global_farm(global_farm: GlobalFarm, current_period: number, oraclePrice: bigint): Promise<{
|
|
67
|
-
global_farm: {
|
|
68
|
-
updated_at: number;
|
|
69
|
-
id: number;
|
|
70
|
-
owner: import("polkadot-api").SS58String;
|
|
71
|
-
total_shares_z: bigint;
|
|
72
|
-
accumulated_rpz: bigint;
|
|
73
|
-
reward_currency: number;
|
|
74
|
-
pending_rewards: bigint;
|
|
75
|
-
accumulated_paid_rewards: bigint;
|
|
76
|
-
yield_per_period: bigint;
|
|
77
|
-
planned_yielding_periods: number;
|
|
78
|
-
blocks_per_period: number;
|
|
79
|
-
incentivized_asset: number;
|
|
80
|
-
max_reward_per_period: bigint;
|
|
81
|
-
min_deposit: bigint;
|
|
82
|
-
live_yield_farms_count: number;
|
|
83
|
-
total_yield_farms_count: number;
|
|
84
|
-
price_adjustment: bigint;
|
|
85
|
-
state: import("polkadot-api").Enum<{
|
|
86
|
-
Active: undefined;
|
|
87
|
-
Stopped: undefined;
|
|
88
|
-
Terminated: undefined;
|
|
89
|
-
}>;
|
|
90
|
-
};
|
|
91
|
-
reward?: undefined;
|
|
92
|
-
} | {
|
|
93
|
-
reward: Big.Big;
|
|
94
|
-
global_farm: {
|
|
95
|
-
id: number;
|
|
96
|
-
owner: import("polkadot-api").SS58String;
|
|
97
|
-
updated_at: number;
|
|
98
|
-
total_shares_z: bigint;
|
|
99
|
-
accumulated_rpz: bigint;
|
|
100
|
-
reward_currency: number;
|
|
101
|
-
pending_rewards: bigint;
|
|
102
|
-
accumulated_paid_rewards: bigint;
|
|
103
|
-
yield_per_period: bigint;
|
|
104
|
-
planned_yielding_periods: number;
|
|
105
|
-
blocks_per_period: number;
|
|
106
|
-
incentivized_asset: number;
|
|
107
|
-
max_reward_per_period: bigint;
|
|
108
|
-
min_deposit: bigint;
|
|
109
|
-
live_yield_farms_count: number;
|
|
110
|
-
total_yield_farms_count: number;
|
|
111
|
-
price_adjustment: bigint;
|
|
112
|
-
state: import("polkadot-api").Enum<{
|
|
113
|
-
Active: undefined;
|
|
114
|
-
Stopped: undefined;
|
|
115
|
-
Terminated: undefined;
|
|
116
|
-
}>;
|
|
117
|
-
};
|
|
118
|
-
} | undefined>;
|
|
119
|
-
sync_yield_farm(yield_farm: YieldFarm, global_farm: GlobalFarm, current_period: number): {
|
|
120
|
-
yield_farm: {
|
|
121
|
-
accumulated_rpz: bigint;
|
|
122
|
-
updated_at: number;
|
|
123
|
-
id: number;
|
|
124
|
-
state: import("polkadot-api").Enum<{
|
|
125
|
-
Active: undefined;
|
|
126
|
-
Stopped: undefined;
|
|
127
|
-
Terminated: undefined;
|
|
128
|
-
}>;
|
|
129
|
-
total_shares: bigint;
|
|
130
|
-
total_valued_shares: bigint;
|
|
131
|
-
accumulated_rpvs: bigint;
|
|
132
|
-
loyalty_curve: {
|
|
133
|
-
initial_reward_percentage: bigint;
|
|
134
|
-
scale_coef: number;
|
|
135
|
-
} | undefined;
|
|
136
|
-
multiplier: bigint;
|
|
137
|
-
entries_count: bigint;
|
|
138
|
-
left_to_distribute: bigint;
|
|
139
|
-
total_stopped: number;
|
|
140
|
-
};
|
|
141
|
-
global_farm?: undefined;
|
|
142
|
-
} | {
|
|
143
|
-
yield_farm: {
|
|
144
|
-
id: number;
|
|
145
|
-
updated_at: number;
|
|
146
|
-
accumulated_rpz: bigint;
|
|
147
|
-
state: import("polkadot-api").Enum<{
|
|
148
|
-
Active: undefined;
|
|
149
|
-
Stopped: undefined;
|
|
150
|
-
Terminated: undefined;
|
|
151
|
-
}>;
|
|
152
|
-
total_shares: bigint;
|
|
153
|
-
total_valued_shares: bigint;
|
|
154
|
-
accumulated_rpvs: bigint;
|
|
155
|
-
loyalty_curve: {
|
|
156
|
-
initial_reward_percentage: bigint;
|
|
157
|
-
scale_coef: number;
|
|
158
|
-
} | undefined;
|
|
159
|
-
multiplier: bigint;
|
|
160
|
-
entries_count: bigint;
|
|
161
|
-
left_to_distribute: bigint;
|
|
162
|
-
total_stopped: number;
|
|
163
|
-
};
|
|
164
|
-
global_farm: {
|
|
165
|
-
id: number;
|
|
166
|
-
owner: import("polkadot-api").SS58String;
|
|
167
|
-
updated_at: number;
|
|
168
|
-
total_shares_z: bigint;
|
|
169
|
-
accumulated_rpz: bigint;
|
|
170
|
-
reward_currency: number;
|
|
171
|
-
pending_rewards: bigint;
|
|
172
|
-
accumulated_paid_rewards: bigint;
|
|
173
|
-
yield_per_period: bigint;
|
|
174
|
-
planned_yielding_periods: number;
|
|
175
|
-
blocks_per_period: number;
|
|
176
|
-
incentivized_asset: number;
|
|
177
|
-
max_reward_per_period: bigint;
|
|
178
|
-
min_deposit: bigint;
|
|
179
|
-
live_yield_farms_count: number;
|
|
180
|
-
total_yield_farms_count: number;
|
|
181
|
-
price_adjustment: bigint;
|
|
182
|
-
state: import("polkadot-api").Enum<{
|
|
183
|
-
Active: undefined;
|
|
184
|
-
Stopped: undefined;
|
|
185
|
-
Terminated: undefined;
|
|
186
|
-
}>;
|
|
187
|
-
};
|
|
188
|
-
} | undefined;
|
|
189
|
-
get_loyalty_multiplier(periods: Big, loyaltyCurve: YieldFarm['loyalty_curve']): string;
|
|
190
|
-
claim_rewards(global_farm: GlobalFarm, yield_farm: YieldFarm, farmEntry: OmnipoolWarehouseLMDepositYieldFarmEntry, relaychainBlockNumber: number, oraclePrice: bigint): Promise<{
|
|
191
|
-
reward: Big.Big;
|
|
192
|
-
maxReward: Big.Big;
|
|
193
|
-
assetId: number;
|
|
194
|
-
} | null>;
|
|
195
|
-
}
|
|
196
|
-
export {};
|