@aurigami/sdk 1.19.0 → 1.19.2
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 +6 -0
- package/dist/consts/constants.d.ts +2 -0
- package/dist/helpers/graphql-helpers.d.ts +1 -1
- package/dist/helpers/subgraphQuery.d.ts +1 -0
- package/dist/interactors/MoneyMarket.d.ts +4 -0
- package/dist/interactors/misc.d.ts +8 -0
- package/dist/sdk.cjs.development.js +428 -203
- 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 +427 -204
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/index.d.ts +20 -0
- package/package.json +1 -1
- package/src/SDK.ts +44 -5
- package/src/consts/constants.ts +5 -0
- package/src/helpers/graphql-helpers.ts +2 -4
- package/src/helpers/helpers.ts +2 -2
- package/src/helpers/subgraphQuery.ts +17 -0
- package/src/interactors/MoneyMarket.ts +14 -0
- package/src/interactors/misc.ts +64 -0
- package/src/types/index.ts +24 -0
package/dist/SDK.d.ts
CHANGED
|
@@ -38,11 +38,17 @@ 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
|
+
getLTVAndLiquidationThreshold(userAddr: types.Address): Promise<{
|
|
42
|
+
ltv: BigNumber;
|
|
43
|
+
liquidationThreshold: BigNumber;
|
|
44
|
+
}>;
|
|
41
45
|
getNetApyWithoutIncentive(userAddress: types.Address): Promise<BigNumber>;
|
|
42
46
|
getNetApyWithIncentive(userAddress: types.Address): Promise<BigNumber>;
|
|
43
47
|
setUserNotificationSettings(address: types.Address, mail: string, utilisation: number, liquidation: boolean, captchaResponse: string): Promise<any>;
|
|
44
48
|
unsetUserNotificationSettings(address: types.Address, captchaResponse: string): Promise<any>;
|
|
45
49
|
getUserNotificationSettings(addresses: types.Address[]): Promise<types.UserNotification>;
|
|
50
|
+
getLiquidationHistory(address: string): Promise<types.LiquidationDetail[]>;
|
|
51
|
+
calculateBorrowPower(tokenAmount: TokenAmount): Promise<types.CurrencyAmount>;
|
|
46
52
|
}
|
|
47
53
|
export declare class SdkReadWrite extends SdkRead {
|
|
48
54
|
/**
|
|
@@ -124,3 +124,5 @@ export declare const CACHE_TIMEOUT: number;
|
|
|
124
124
|
export declare const SD_INCENTIVE_IN_SD = 83.35;
|
|
125
125
|
export declare const STADER_ETH: string;
|
|
126
126
|
export declare const USDT_ETH: string;
|
|
127
|
+
export declare const AURIGAMI_SUBGRAPH_URL = "https://api.thegraph.com/subgraphs/name/takao-aurigami/aurigami-feb-27";
|
|
128
|
+
export declare const GRAPHQL_URL = "https://explorer.mainnet.aurora.dev/graphiql";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function queryGraphQL(query: string): Promise<any>;
|
|
1
|
+
export declare function queryGraphQL(query: string, graphqlUrl: string): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getLiquidationEventsQuery(address: string, limit: number): string;
|
|
@@ -36,6 +36,10 @@ export declare class MoneyMarketRead extends BlockchainEntityRead {
|
|
|
36
36
|
private getBorrowNEARRewardPerWeek;
|
|
37
37
|
mintCap(): Promise<TokenAmount>;
|
|
38
38
|
borrowCap(): Promise<TokenAmount>;
|
|
39
|
+
getDepositBorrowValue(userAddress: Address): Promise<{
|
|
40
|
+
suppliedValue: BigNumber;
|
|
41
|
+
borrowedValue: BigNumber;
|
|
42
|
+
}>;
|
|
39
43
|
getApyWithoutIncentive(userAddress: Address): Promise<Apy>;
|
|
40
44
|
getApyWithIncentive(userAddress: Address): Promise<Apy>;
|
|
41
45
|
}
|
|
@@ -8,6 +8,10 @@ export declare class MiscRead extends BlockchainEntityRead {
|
|
|
8
8
|
constructor(networkConnection: types.NetworkConnection);
|
|
9
9
|
getUserDetails(userAddress: string): Promise<types.UserDetails>;
|
|
10
10
|
getTokenPrice(token: Token): Promise<types.CurrencyAmount>;
|
|
11
|
+
calcBorrowPower(tokenAmount: TokenAmount): Promise<{
|
|
12
|
+
currency: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
}>;
|
|
11
15
|
calcHypotheticalStats({ userMarketDetail, currentBorrowLimit, currentBorrowValuation, action, tokenAmount, }: {
|
|
12
16
|
userMarketDetail: types.UserMarketDetails;
|
|
13
17
|
currentBorrowLimit: types.CurrencyAmount;
|
|
@@ -26,6 +30,10 @@ export declare class MiscRead extends BlockchainEntityRead {
|
|
|
26
30
|
getPlyCirculatingSupply(): Promise<TokenAmount>;
|
|
27
31
|
getUtilisation(userAddr: types.Address): Promise<BigNumber>;
|
|
28
32
|
sneakAccounts(accounts: string[], tokenAddresses: string[], dust?: BigNumber): Promise<types.AccountAuTokensInfo[]>;
|
|
33
|
+
getLTVAndLiquidationThreshold(userAddr: types.Address): Promise<{
|
|
34
|
+
ltv: BigNumber;
|
|
35
|
+
liquidationThreshold: BigNumber;
|
|
36
|
+
}>;
|
|
29
37
|
getNetApyWithoutIncentive(userAddress: types.Address): Promise<BigNumber>;
|
|
30
38
|
getNetApyWithIncentive(userAddress: types.Address): Promise<BigNumber>;
|
|
31
39
|
}
|