@aurigami/sdk 1.12.9 → 1.13.0

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/dist/SDK.d.ts CHANGED
@@ -38,6 +38,8 @@ export declare class SdkRead extends BlockchainEntityRead {
38
38
  getPlyCirculatingSupply(): Promise<TokenAmount>;
39
39
  getUtilisation(userAddr: types.Address): Promise<BigNumber>;
40
40
  sneakAccounts(accounts: string[], tokenAddresses: string[], dust?: BigNumber): Promise<types.AccountAuTokensInfo[]>;
41
+ getNetApyWithoutIncentive(userAddress: types.Address): Promise<BigNumber>;
42
+ getNetApyWithIncentive(userAddress: types.Address): Promise<BigNumber>;
41
43
  }
42
44
  export declare class SdkReadWrite extends SdkRead {
43
45
  /**
@@ -44,3 +44,4 @@ export declare const REFERRAL_CAMPAIGNS: {
44
44
  end: number;
45
45
  };
46
46
  };
47
+ export declare const CACHE_TIMEOUT: number;
@@ -14,6 +14,7 @@ export declare function getDecimal(address: Address): number;
14
14
  export declare function getSymbol(address: Address): string;
15
15
  export declare function getUnderlying(address: Address): Address;
16
16
  export declare function calcLMRewardApr(rewardsValue: BigNumber, totalStakeValue: BigNumber, frequencyPerYear: number): BigNumber;
17
+ export declare function calcNetApy(suppliedValue: BigNumber, supplyApy: BigNumber, borrowedValue: BigNumber, borrowApy: BigNumber): BigNumber;
17
18
  export declare function getBlockTimestamp(provider: Provider, blockNumber: number): Promise<number>;
18
19
  export declare function getBlocksTimestampViaRPC(provider: Provider, blocksNumber: number[]): Promise<number[]>;
19
20
  /**
@@ -37,3 +38,4 @@ export declare function devLog(message?: any, ...optionalParams: any[]): void;
37
38
  * This method mutates the array and returns a reference to the same array.
38
39
  **/
39
40
  export declare function sortEvents<T extends Result>(events: TypedEvent<T>[]): TypedEvent<T>[];
41
+ export declare function Cache(cacheTimeout: number): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
@@ -3,7 +3,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
3
3
  import BigNumber from 'bignumber.js';
4
4
  import { BigNumber as BN } from 'ethers';
5
5
  import { AuriEnv, BlockchainEntity, BlockchainEntityRead, Token, TokenAmount } from '../entities';
6
- import { Address, MoneyMarketDetails, NetworkConnection } from '../types';
6
+ import { Address, Apy, MoneyMarketDetails, NetworkConnection } from '../types';
7
7
  declare type RewardSpeeds = {
8
8
  plyRewardSupplySpeed: BN;
9
9
  plyRewardBorrowSpeed: BN;
@@ -15,6 +15,8 @@ export declare class MoneyMarketRead extends BlockchainEntityRead {
15
15
  auToken: AuErc20 | AuETH;
16
16
  readonly env: AuriEnv;
17
17
  constructor(networkConnection: NetworkConnection, auToken: Address, underlyingAsset: Address);
18
+ getUnderlyingPrice(): Promise<BigNumber>;
19
+ getPlyPrice(): Promise<BigNumber>;
18
20
  protected getRewardSpeeds(): Promise<RewardSpeeds>;
19
21
  getTotalTokenBorrowed(): Promise<TokenAmount>;
20
22
  getTotalTokenDeposited(): Promise<TokenAmount>;
@@ -23,6 +25,9 @@ export declare class MoneyMarketRead extends BlockchainEntityRead {
23
25
  getCollateralRatio(): Promise<BigNumber>;
24
26
  getBorrowPlyAPY(): Promise<BigNumber>;
25
27
  getDepositPlyAPY(): Promise<BigNumber>;
28
+ getDepositNearAPY(): Promise<BigNumber>;
29
+ getBorrowNearAPY(): Promise<BigNumber>;
30
+ getDepositMetaAPY(): Promise<BigNumber>;
26
31
  getDetails(): Promise<MoneyMarketDetails>;
27
32
  getUserBorrowBalance(userAddress: string): Promise<TokenAmount>;
28
33
  getUserDepositBalance(userAddress: string): Promise<TokenAmount>;
@@ -30,6 +35,8 @@ export declare class MoneyMarketRead extends BlockchainEntityRead {
30
35
  private getBorrowNEARRewardPerWeek;
31
36
  mintCap(): Promise<TokenAmount>;
32
37
  borrowCap(): Promise<TokenAmount>;
38
+ getApyWithoutIncentive(userAddress: Address): Promise<Apy>;
39
+ getApyWithIncentive(userAddress: Address): Promise<Apy>;
33
40
  }
34
41
  export declare class MoneyMarketReadWrite extends MoneyMarketRead {
35
42
  protected _EthRepayHelper: EthRepayHelper;
@@ -26,7 +26,6 @@ export declare class PlyGameRead extends BlockchainEntityRead {
26
26
  winner: Address;
27
27
  amount: TokenAmount;
28
28
  }>;
29
- overallLeaderboard(): Promise<PlyGameLeaderboardItem[]>;
30
29
  }
31
30
  export declare class PlyGameReadWrite extends PlyGameRead {
32
31
  /**
@@ -26,4 +26,6 @@ export declare class MiscRead extends BlockchainEntityRead {
26
26
  getPlyCirculatingSupply(): Promise<TokenAmount>;
27
27
  getUtilisation(userAddr: types.Address): Promise<BigNumber>;
28
28
  sneakAccounts(accounts: string[], tokenAddresses: string[], dust?: BigNumber): Promise<types.AccountAuTokensInfo[]>;
29
+ getNetApyWithoutIncentive(userAddress: types.Address): Promise<BigNumber>;
30
+ getNetApyWithIncentive(userAddress: types.Address): Promise<BigNumber>;
29
31
  }