@galacticcouncil/sdk-next 0.7.0-pr169-91a593c → 0.7.0-pr193-3d86320

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.
@@ -1,24 +1,23 @@
1
1
  import { PolkadotClient } from 'polkadot-api';
2
2
  import { AaveUtils } from './aave';
3
- import { AssetClient, BalanceClient } from './client';
3
+ import { AssetClient, BalanceClient, LiquidityMining } from './client';
4
4
  import { EvmClient } from './evm';
5
5
  import { PoolContextProvider } from './pool';
6
6
  import { TradeRouter, TradeScheduler } from './sor';
7
7
  import { TxBuilderFactory } from './tx';
8
8
  import { StakingApi } from './staking';
9
- import { LiquidityMiningApi } from './farm';
10
9
  export type SdkCtx = {
11
10
  api: {
12
11
  aave: AaveUtils;
13
12
  router: TradeRouter;
14
13
  scheduler: TradeScheduler;
15
14
  staking: StakingApi;
16
- farm: LiquidityMiningApi;
17
15
  };
18
16
  client: {
19
17
  asset: AssetClient;
20
18
  balance: BalanceClient;
21
19
  evm: EvmClient;
20
+ mining: LiquidityMining;
22
21
  };
23
22
  ctx: {
24
23
  pool: PoolContextProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacticcouncil/sdk-next",
3
- "version": "0.7.0-pr169-91a593c",
3
+ "version": "0.7.0-pr193-3d86320",
4
4
  "description": "Galactic next gen sdk (papi)",
5
5
  "author": "GalacticCouncil",
6
6
  "repository": {
@@ -1,45 +0,0 @@
1
- import { BalanceClient } from '../client/BalanceClient';
2
- import { LiquidityMiningClient } from './LiquidityMiningClient';
3
- export declare class LiquidityMiningApi {
4
- private readonly client;
5
- private readonly balanceClient;
6
- protected omnipoolAssetIds: string[];
7
- constructor(client: LiquidityMiningClient, balanceClient: BalanceClient);
8
- getOraclePrice(rewardCurrency: number, incentivizedAsset: number): Promise<bigint | undefined>;
9
- private getFarmAddress;
10
- private getGlobalRewardPerPeriod;
11
- private getPoolYieldPerPeriod;
12
- private farmData;
13
- getOmnipoolFarms(id: string): Promise<({
14
- apr: string;
15
- minApr: string | undefined;
16
- isDistributed: boolean;
17
- estimatedEndPeriod: string;
18
- maxRewards: bigint;
19
- incentivizedAsset: number;
20
- rewardCurrency: number;
21
- loyaltyCurve: {
22
- initial_reward_percentage: bigint;
23
- scale_coef: number;
24
- } | undefined;
25
- currentPeriod: string;
26
- potMaxRewards: bigint;
27
- fullness: string;
28
- } | undefined)[]>;
29
- getIsolatedFarms(id: string): Promise<({
30
- apr: string;
31
- minApr: string | undefined;
32
- isDistributed: boolean;
33
- estimatedEndPeriod: string;
34
- maxRewards: bigint;
35
- incentivizedAsset: number;
36
- rewardCurrency: number;
37
- loyaltyCurve: {
38
- initial_reward_percentage: bigint;
39
- scale_coef: number;
40
- } | undefined;
41
- currentPeriod: string;
42
- potMaxRewards: bigint;
43
- fullness: string;
44
- } | undefined)[]>;
45
- }
@@ -1,122 +0,0 @@
1
- import { Papi } from 'api';
2
- import { 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
- }
@@ -1,2 +0,0 @@
1
- export * from './LiquidityMiningApi';
2
- export * from './LiquidityMiningClient';