@aurigami/sdk 1.6.0-no-src → 1.6.1

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.
Files changed (39) hide show
  1. package/dist/SDK.d.ts +9 -0
  2. package/dist/contracts/Multicall.d.ts +18 -0
  3. package/dist/contracts/Papermill.d.ts +8 -0
  4. package/dist/sdk.cjs.development.js +102841 -40
  5. package/dist/sdk.cjs.development.js.map +1 -1
  6. package/dist/sdk.cjs.production.min.js +1 -1
  7. package/dist/sdk.cjs.production.min.js.map +1 -1
  8. package/dist/sdk.esm.js +102841 -40
  9. package/dist/sdk.esm.js.map +1 -1
  10. package/package.json +4 -3
  11. package/src/SDK.ts +430 -0
  12. package/src/abis/Faucet.json +157 -0
  13. package/src/abis/IUniswapV2Pair.json +663 -0
  14. package/src/abis/Oracle.json +247 -0
  15. package/src/abis/dummy.json +3 -0
  16. package/src/consts/constants.ts +146 -0
  17. package/src/consts/decimals.ts +24 -0
  18. package/src/consts/deployments.ts +4 -0
  19. package/src/consts/dummy.ts +38 -0
  20. package/src/consts/index.ts +4 -0
  21. package/src/contracts/MoneyMarket.ts +510 -0
  22. package/src/contracts/Multicall.ts +55 -0
  23. package/src/contracts/Papermill.ts +271 -0
  24. package/src/contracts/Staking.ts +183 -0
  25. package/src/contracts/airdrop-lottery.ts +320 -0
  26. package/src/contracts/index.ts +4 -0
  27. package/src/entities/BlockchainEntity.ts +33 -0
  28. package/src/entities/index.ts +3 -0
  29. package/src/entities/token.ts +21 -0
  30. package/src/entities/tokenAmount.ts +42 -0
  31. package/src/helpers/aurora-api-helpers.ts +20 -0
  32. package/src/helpers/helpers.ts +97 -0
  33. package/src/helpers/index.ts +4 -0
  34. package/src/helpers/priceFetcher.ts +317 -0
  35. package/src/helpers/transfer-event-query.ts +70 -0
  36. package/src/index.ts +13 -0
  37. package/src/misc/airdrop_misc/auTokensInfo.json +34 -0
  38. package/src/misc/airdrop_misc/whitelist.json +102629 -0
  39. package/src/types/index.ts +106 -0
@@ -0,0 +1,106 @@
1
+ import type { BigNumber, providers, Signer } from 'ethers';
2
+ import { TokenAmount } from '../entities/tokenAmount';
3
+
4
+ export enum ComptrollerRewardType {
5
+ PLY = 0,
6
+ AURORA,
7
+ }
8
+ export type NetworkConnection = {
9
+ provider: providers.Provider;
10
+ signer?: Signer;
11
+ };
12
+
13
+ export type Address = string;
14
+
15
+ export type CurrencyAmount = {
16
+ currency: string;
17
+ amount: string;
18
+ };
19
+
20
+ export type TokenValuation = {
21
+ tokenAmount: TokenAmount;
22
+ currencyAmount: CurrencyAmount;
23
+ };
24
+
25
+ export type MoneyMarketDetails = {
26
+ auTokenAddress: string;
27
+ totalTokenDeposited: TokenAmount;
28
+ totalTokenBorrowed: TokenAmount;
29
+ depositApy: number;
30
+ depositPlyApy: number;
31
+ borrowApy: number;
32
+ borrowPlyApy: number;
33
+ collateralRatio: number;
34
+ depositPlyPerWeek: TokenAmount;
35
+ borrowPlyPerWeek: TokenAmount;
36
+ depositMETAApy: number;
37
+ depositNEARApy: number;
38
+ borrowNEARApy: number;
39
+ };
40
+
41
+ export type UserDetails = {
42
+ markets: UserMarketDetails[];
43
+ borrowLimit: CurrencyAmount;
44
+ userLockingDetails: UserLockingDetails;
45
+ borrowableAmount: CurrencyAmount;
46
+ };
47
+
48
+ export type UserLockingDetails = {
49
+ vestingStart: number;
50
+ /** % of reward they will receive in PLY, if they claim this week */
51
+ currentUnlockPortion: number;
52
+ //** Amount of PLY rewards that a user has. Equal to currentPly + currentPulp */
53
+ accruedPly: TokenAmount;
54
+ /** Amount of PLY they will receive, if they claim this week */
55
+ currentPly: TokenAmount;
56
+ /** Amount of PULP they will receive, if they claim this week */
57
+ currentPulp: TokenAmount;
58
+ /** % of reward they will receive in PLY, if they claim next week */
59
+ nextUnlockPortion: number;
60
+ /**
61
+ * Amount of PLY they will receive, if they claim next week.
62
+ * This doesn't include the additional reward that they will earn
63
+ * in the next week.
64
+ */
65
+ nextPly: TokenAmount;
66
+ /**
67
+ * Amount of PULP they will receive, if they claim next week.
68
+ * This doesn't include the additional reward that they will earn
69
+ * in the next week.
70
+ */
71
+ nextPulp: TokenAmount;
72
+ };
73
+
74
+ export type UserMarketDetails = {
75
+ market: string;
76
+ depositBalance: TokenAmount;
77
+ borrowBalance: TokenAmount;
78
+ isCollateral: boolean;
79
+ maxWithdrawableAmount: TokenAmount;
80
+ collateralRatio: number;
81
+ underlyingPrice: string;
82
+ };
83
+
84
+ export type TokenAPY = {
85
+ address: string;
86
+ apy: string;
87
+ };
88
+
89
+ export type PLYWNEARPoolDetails = {
90
+ totalStakedLiquidity: TokenAmount;
91
+ APYs: TokenAPY[];
92
+ };
93
+
94
+ export enum MarketAction {
95
+ Deposit = 0,
96
+ Borrow,
97
+ Withdraw,
98
+ Repay,
99
+ EnableCollateral,
100
+ DisableCollateral,
101
+ }
102
+
103
+ export type HypotheticalStats = {
104
+ newBorrowLimit: CurrencyAmount;
105
+ newBorrowUtilization: number;
106
+ };