@aurigami/sdk 1.4.8 → 1.5.0-dummy-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.
- package/dist/MoneyMarket.d.ts +2 -2
- package/dist/Papermill.d.ts +31 -0
- package/dist/SDK.d.ts +6 -7
- package/dist/airdrop-lottery.d.ts +4 -4
- package/dist/constants.d.ts +6 -2
- package/dist/helpers.d.ts +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/priceFetcher.d.ts +6 -4
- package/dist/sdk.cjs.development.js +700 -270
- 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 +690 -268
- package/dist/sdk.esm.js.map +1 -1
- package/dist/token.d.ts +1 -1
- package/dist/tokenAmount.d.ts +1 -1
- package/dist/transfer-event-query.d.ts +4 -4
- package/dist/types.d.ts +13 -9
- package/package.json +5 -11
- package/src/BlockchainEntity.ts +6 -2
- package/src/MoneyMarket.ts +317 -105
- package/src/Papermill.ts +243 -0
- package/src/SDK.ts +307 -147
- package/src/airdrop-lottery.ts +293 -248
- package/src/aurora-api-helpers.ts +11 -6
- package/src/constants.ts +82 -60
- package/src/decimals.ts +5 -3
- package/src/dummy.ts +17 -23
- package/src/helpers.ts +45 -26
- package/src/index.ts +2 -1
- package/src/priceFetcher.ts +256 -103
- package/src/token.ts +16 -16
- package/src/tokenAmount.ts +21 -21
- package/src/transfer-event-query.ts +64 -54
- package/src/types.ts +39 -19
package/dist/token.d.ts
CHANGED
package/dist/tokenAmount.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BlockchainEntityRead } from
|
|
2
|
-
import { NetworkConnection } from
|
|
3
|
-
import { AuToken } from
|
|
4
|
-
import { BigNumber as BN } from
|
|
1
|
+
import { BlockchainEntityRead } from './BlockchainEntity';
|
|
2
|
+
import { NetworkConnection } from './types';
|
|
3
|
+
import { AuToken } from '@aurigami/contracts/typechain';
|
|
4
|
+
import { BigNumber as BN } from 'ethers';
|
|
5
5
|
declare type SimpleTransfer = {
|
|
6
6
|
from: string;
|
|
7
7
|
to: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export declare type CurrencyAmount = {
|
|
|
13
13
|
currency: string;
|
|
14
14
|
amount: string;
|
|
15
15
|
};
|
|
16
|
+
export declare type TokenValuation = {
|
|
17
|
+
tokenAmount: TokenAmount;
|
|
18
|
+
currencyAmount: CurrencyAmount;
|
|
19
|
+
};
|
|
16
20
|
export declare type MoneyMarketDetails = {
|
|
17
21
|
auTokenAddress: string;
|
|
18
22
|
totalTokenDeposited: TokenAmount;
|
|
@@ -31,18 +35,18 @@ export declare type MoneyMarketDetails = {
|
|
|
31
35
|
export declare type UserDetails = {
|
|
32
36
|
markets: UserMarketDetails[];
|
|
33
37
|
borrowLimit: CurrencyAmount;
|
|
34
|
-
|
|
35
|
-
lockedPly: TokenAmount;
|
|
38
|
+
userLockingDetails: UserLockingDetails;
|
|
36
39
|
borrowableAmount: CurrencyAmount;
|
|
37
40
|
};
|
|
38
|
-
export declare type
|
|
41
|
+
export declare type UserLockingDetails = {
|
|
39
42
|
vestingStart: number;
|
|
40
43
|
currentUnlockPortion: number;
|
|
44
|
+
accruedPly: TokenAmount;
|
|
45
|
+
currentPly: TokenAmount;
|
|
46
|
+
currentPulp: TokenAmount;
|
|
41
47
|
nextUnlockPortion: number;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
totalStakedLiquidity: CurrencyAmount;
|
|
45
|
-
apy: number;
|
|
48
|
+
nextPly: TokenAmount;
|
|
49
|
+
nextPulp: TokenAmount;
|
|
46
50
|
};
|
|
47
51
|
export declare type UserMarketDetails = {
|
|
48
52
|
market: string;
|
|
@@ -53,8 +57,8 @@ export declare type UserMarketDetails = {
|
|
|
53
57
|
collateralRatio: number;
|
|
54
58
|
underlyingPrice: string;
|
|
55
59
|
};
|
|
56
|
-
export declare type
|
|
57
|
-
totalStakedLiquidity:
|
|
60
|
+
export declare type PlyUsdcPoolDetails = {
|
|
61
|
+
totalStakedLiquidity: TokenValuation;
|
|
58
62
|
apy: string;
|
|
59
63
|
};
|
|
60
64
|
export declare enum MarketAction {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.5.0-dummy-1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"start": "tsdx watch",
|
|
15
15
|
"build": "tsdx build",
|
|
16
16
|
"test": "tsdx test --no-cache",
|
|
17
|
-
"
|
|
18
|
-
"lint": "
|
|
17
|
+
"w-hardhat": "env TS_NODE_PROJECT=\"tsconfig.test.json\" yarn hardhat",
|
|
18
|
+
"lint": "prettier --check \"{src,test,test-hardhat}/**/*.{js,ts}\"",
|
|
19
|
+
"format": "prettier --write \"{src,test,test-hardhat}/**/*.{js,ts}\"",
|
|
19
20
|
"prepare": "tsdx build",
|
|
20
21
|
"size": "size-limit",
|
|
21
|
-
"analyze": "size-limit --why"
|
|
22
|
-
"format": "yarn prettier --write \"{src,test}/**/*.{ts,js}\""
|
|
22
|
+
"analyze": "size-limit --why"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {},
|
|
25
25
|
"husky": {
|
|
@@ -27,12 +27,6 @@
|
|
|
27
27
|
"pre-commit": "tsdx lint"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"prettier": {
|
|
31
|
-
"printWidth": 80,
|
|
32
|
-
"semi": true,
|
|
33
|
-
"singleQuote": true,
|
|
34
|
-
"trailingComma": "es5"
|
|
35
|
-
},
|
|
36
30
|
"name": "@aurigami/sdk",
|
|
37
31
|
"author": "Aurigami Finance",
|
|
38
32
|
"module": "dist/sdk.esm.js",
|
package/src/BlockchainEntity.ts
CHANGED
|
@@ -11,7 +11,9 @@ export class BlockchainEntityRead {
|
|
|
11
11
|
export class BlockchainEntityReadWrite extends BlockchainEntityRead {
|
|
12
12
|
public constructor(networkConnection: NetworkConnection) {
|
|
13
13
|
if (!(networkConnection.signer instanceof Signer)) {
|
|
14
|
-
throw Error(
|
|
14
|
+
throw Error(
|
|
15
|
+
'Signer is not provided when constructing BlockchainEntityReadWrite'
|
|
16
|
+
);
|
|
15
17
|
}
|
|
16
18
|
super(networkConnection);
|
|
17
19
|
}
|
|
@@ -23,7 +25,9 @@ export class BlockchainEntity {
|
|
|
23
25
|
return new BlockchainEntityRead(networkConnection);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
public readWrite(
|
|
28
|
+
public readWrite(
|
|
29
|
+
networkConnection: NetworkConnection
|
|
30
|
+
): BlockchainEntityReadWrite {
|
|
27
31
|
return new BlockchainEntityReadWrite(networkConnection);
|
|
28
32
|
}
|
|
29
33
|
}
|