@aurigami/sdk 1.4.8 → 1.5.0-dummy
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/Papermill.d.ts +30 -0
- package/dist/SDK.d.ts +5 -6
- package/dist/constants.d.ts +5 -2
- package/dist/hardhat.config.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/priceFetcher.d.ts +3 -1
- package/dist/sdk.cjs.development.js +648 -230
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +638 -228
- package/dist/sdk.esm.js.map +1 -1
- package/dist/test/constants.d.ts +6 -0
- package/dist/test-hardhat/helper.d.ts +6 -0
- package/dist/token.d.ts +1 -1
- package/dist/types.d.ts +13 -9
- package/package.json +2 -2
- package/src/Papermill.ts +162 -0
- package/src/SDK.ts +90 -76
- package/src/constants.ts +26 -5
- package/src/decimals.ts +4 -2
- package/src/helpers.ts +4 -1
- package/src/index.ts +1 -0
- package/src/priceFetcher.ts +95 -28
- package/src/token.ts +7 -7
- package/src/types.ts +31 -11
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BlockchainEntity, BlockchainEntityRead } from './BlockchainEntity';
|
|
2
|
+
import { NetworkConnection, Address, UserLockingDetails } from './types';
|
|
3
|
+
import { AuriFairLaunch, AuriLens, Comptroller, IERC20, PULP } from "@aurigami/contracts/typechain";
|
|
4
|
+
import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
5
|
+
import { Token } from './token';
|
|
6
|
+
import { TokenAmount } from './tokenAmount';
|
|
7
|
+
export declare class PapermillRead extends BlockchainEntityRead {
|
|
8
|
+
plyToken: Token;
|
|
9
|
+
pulpToken: Token;
|
|
10
|
+
protected _ply: IERC20;
|
|
11
|
+
protected _pulp: PULP;
|
|
12
|
+
protected _comptroller: Comptroller;
|
|
13
|
+
protected _auriFairLaunch: AuriFairLaunch;
|
|
14
|
+
protected _auriLens: AuriLens;
|
|
15
|
+
constructor(networkConnection: NetworkConnection);
|
|
16
|
+
getPlyBalance(userAddress: Address): Promise<TokenAmount>;
|
|
17
|
+
getPulpBalance(userAddress: Address): Promise<TokenAmount>;
|
|
18
|
+
getUnclaimedPlyReward(userAddress: Address): Promise<TokenAmount>;
|
|
19
|
+
getLockingDetails(userAddress: Address): Promise<UserLockingDetails>;
|
|
20
|
+
}
|
|
21
|
+
export declare class PapermillReadWrite extends PapermillRead {
|
|
22
|
+
constructor(networkConnection: NetworkConnection);
|
|
23
|
+
redeem(recipient: Address, amount: TokenAmount): Promise<TransactionResponse>;
|
|
24
|
+
selfRedeem(amount: TokenAmount): Promise<TransactionResponse>;
|
|
25
|
+
}
|
|
26
|
+
export declare class Papermill extends BlockchainEntity {
|
|
27
|
+
constructor();
|
|
28
|
+
read(networkConnection: NetworkConnection): PapermillRead;
|
|
29
|
+
readWrite(networkConnection: NetworkConnection): PapermillReadWrite;
|
|
30
|
+
}
|
package/dist/SDK.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { BlockchainEntity, BlockchainEntityRead } from './BlockchainEntity';
|
|
2
|
-
import {
|
|
2
|
+
import { PlyUsdcPoolDetails, NetworkConnection, UserDetails, UserMarketDetails, CurrencyAmount, HypotheticalStats, MarketAction, TokenValuation } from './types';
|
|
3
3
|
import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
4
|
-
import { AuriFairLaunch, Comptroller,
|
|
4
|
+
import { AuriFairLaunch, Comptroller, AuriLens } from '@aurigami/contracts/typechain';
|
|
5
5
|
import { TokenAmount } from './tokenAmount';
|
|
6
6
|
import { Token } from './token';
|
|
7
7
|
export declare class SdkRead extends BlockchainEntityRead {
|
|
8
8
|
protected _comptroller: Comptroller;
|
|
9
|
-
protected _tokenLock: TokenLock;
|
|
10
9
|
protected _auriFairLaunch: AuriFairLaunch;
|
|
11
10
|
protected _auriLens: AuriLens;
|
|
12
11
|
constructor(networkConnection: NetworkConnection);
|
|
13
|
-
getLockingDetails(): Promise<LockingDetails>;
|
|
14
12
|
getUserDetails(userAddress: string): Promise<UserDetails>;
|
|
15
|
-
|
|
13
|
+
getPlyUsdcPoolDetails(): Promise<PlyUsdcPoolDetails>;
|
|
16
14
|
getTokenPrice(token: Token): Promise<CurrencyAmount>;
|
|
17
|
-
stakeBalanceOf(user: string): Promise<
|
|
15
|
+
stakeBalanceOf(user: string): Promise<TokenValuation>;
|
|
16
|
+
LpBalanceOf(user: string): Promise<TokenValuation>;
|
|
18
17
|
calcHypotheticalStats({ userMarketDetail, currentBorrowLimit, currentBorrowValuation, action, tokenAmount }: {
|
|
19
18
|
userMarketDetail: UserMarketDetails;
|
|
20
19
|
currentBorrowLimit: CurrencyAmount;
|
package/dist/constants.d.ts
CHANGED
|
@@ -14,11 +14,14 @@ export declare type NetworkAddresses = {
|
|
|
14
14
|
tokens: Record<string, string>;
|
|
15
15
|
};
|
|
16
16
|
export declare const networkAddresses: NetworkAddresses;
|
|
17
|
+
export declare const PRICE_WHITELISTED: Set<string>;
|
|
18
|
+
export declare const REWARD_CLAIM_START = 1651762800;
|
|
17
19
|
export declare const BORROW_LIMIT_BUFFER: BigNumber;
|
|
18
|
-
export declare const REWARDCLAIMSTART = 1640995200;
|
|
19
20
|
export declare const ONE_DAY = 86400;
|
|
20
21
|
export declare const ONE_YEAR: number;
|
|
21
|
-
export declare const
|
|
22
|
+
export declare const PlyUsdcPid = 0;
|
|
23
|
+
export declare const PLYUSDCRewardTokens: string[];
|
|
24
|
+
export declare const ALL_STAKING_POOLS: never[];
|
|
22
25
|
export declare const INF: ethers.BigNumber;
|
|
23
26
|
export declare const AIRDROP_START_TIMESTAMP = 1649858400;
|
|
24
27
|
export declare const AIRDROP_END_TIMESTAMP = 1651068000;
|
package/dist/index.d.ts
CHANGED
package/dist/priceFetcher.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BigNumber from "bignumber.js";
|
|
2
2
|
import { providers, BigNumber as BN } from "ethers";
|
|
3
3
|
import { TokenAmount } from "./tokenAmount";
|
|
4
|
-
import { Address } from "./types";
|
|
4
|
+
import { Address, TokenValuation } from "./types";
|
|
5
5
|
export declare function fetchPriceFromCoingeckoAPI(id: string): Promise<BigNumber>;
|
|
6
6
|
export declare function fetchPriceFromCoingecko(id: Address): Promise<BigNumber>;
|
|
7
7
|
export declare function fetchLPPositions(LPAddress: Address, provider: providers.Provider): Promise<{
|
|
@@ -19,5 +19,7 @@ export declare function fetchUnderlyingTokensPrices(provider: providers.Provider
|
|
|
19
19
|
}[]>;
|
|
20
20
|
export declare function fetchStNEARPrice(): Promise<BigNumber>;
|
|
21
21
|
export declare function fetchPrice(address: Address, provider: providers.Provider): Promise<BigNumber>;
|
|
22
|
+
export declare function fetchPLYPrice(provider: providers.Provider): Promise<BigNumber>;
|
|
22
23
|
export declare function fetchValuation(tokenAmount: TokenAmount, provider: providers.Provider): Promise<BigNumber>;
|
|
23
24
|
export declare function calcValuation(tokenAmount: TokenAmount, price: BigNumber): BigNumber;
|
|
25
|
+
export declare function valuateToken(tokenAmount: TokenAmount, provider: providers.Provider): Promise<TokenValuation>;
|