@augustdigital/sdk 4.0.8-alpha → 4.1.0-alpha
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/lib/abis/AddressResolver.d.ts +28 -0
- package/lib/abis/AddressResolver.js +23 -0
- package/lib/abis/AddressResolver.js.map +1 -0
- package/lib/abis/ChainlinkV3.d.ts +87 -0
- package/lib/abis/ChainlinkV3.js +117 -0
- package/lib/abis/ChainlinkV3.js.map +1 -0
- package/lib/abis/ERC20.d.ts +168 -0
- package/lib/abis/ERC20.js +226 -0
- package/lib/abis/ERC20.js.map +1 -0
- package/lib/abis/ERC20_Bytes32.d.ts +135 -0
- package/lib/abis/ERC20_Bytes32.js +192 -0
- package/lib/abis/ERC20_Bytes32.js.map +1 -0
- package/lib/abis/ERC4626.d.ts +363 -0
- package/lib/abis/ERC4626.js +506 -0
- package/lib/abis/ERC4626.js.map +1 -0
- package/lib/abis/ERC721.d.ts +230 -0
- package/lib/abis/ERC721.js +320 -0
- package/lib/abis/ERC721.js.map +1 -0
- package/lib/abis/FeeOracle.d.ts +120 -0
- package/lib/abis/FeeOracle.js +161 -0
- package/lib/abis/FeeOracle.js.map +1 -0
- package/lib/abis/LendingPool.d.ts +1393 -0
- package/lib/abis/LendingPool.js +1806 -0
- package/lib/abis/LendingPool.js.map +1 -0
- package/lib/abis/LendingPoolV2.d.ts +55 -0
- package/lib/abis/LendingPoolV2.js +1832 -0
- package/lib/abis/LendingPoolV2.js.map +1 -0
- package/lib/abis/LendingPoolV3.d.ts +35 -0
- package/lib/abis/LendingPoolV3.js +1160 -0
- package/lib/abis/LendingPoolV3.js.map +1 -0
- package/lib/abis/Loan.d.ts +837 -0
- package/lib/abis/Loan.js +1080 -0
- package/lib/abis/Loan.js.map +1 -0
- package/lib/abis/Multicall3.d.ts +30 -0
- package/lib/abis/Multicall3.js +94 -0
- package/lib/abis/Multicall3.js.map +1 -0
- package/lib/abis/PoolAdapter.d.ts +76 -0
- package/lib/abis/PoolAdapter.js +412 -0
- package/lib/abis/PoolAdapter.js.map +1 -0
- package/lib/abis/RewardDistributor.d.ts +46 -0
- package/lib/abis/RewardDistributor.js +352 -0
- package/lib/abis/RewardDistributor.js.map +1 -0
- package/lib/abis/SmartAccount.d.ts +16 -0
- package/lib/abis/SmartAccount.js +16 -0
- package/lib/abis/SmartAccount.js.map +1 -0
- package/lib/abis/TextResolver.d.ts +16 -0
- package/lib/abis/TextResolver.js +16 -0
- package/lib/abis/TextResolver.js.map +1 -0
- package/lib/abis/TokenizedVaultV2.d.ts +1354 -0
- package/lib/abis/TokenizedVaultV2.js +1028 -0
- package/lib/abis/TokenizedVaultV2.js.map +1 -0
- package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
- package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
- package/lib/abis/TokenizedVaultV2Receipt.js.map +1 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js.map +1 -0
- package/lib/abis/UniversalResolverResolve.d.ts +69 -0
- package/lib/abis/UniversalResolverResolve.js +35 -0
- package/lib/abis/UniversalResolverResolve.js.map +1 -0
- package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
- package/lib/abis/UniversalSignatureValidator.js +27 -0
- package/lib/abis/UniversalSignatureValidator.js.map +1 -0
- package/lib/abis/WrapperAdapter.d.ts +60 -0
- package/lib/abis/WrapperAdapter.js +150 -0
- package/lib/abis/WrapperAdapter.js.map +1 -0
- package/lib/abis/index.d.ts +19 -0
- package/lib/abis/index.js +36 -0
- package/lib/abis/index.js.map +1 -0
- package/lib/adapters/evm/core.actions.d.ts +9 -0
- package/lib/adapters/evm/core.actions.js +51 -0
- package/lib/adapters/evm/core.actions.js.map +1 -0
- package/lib/adapters/evm/getters.d.ts +4 -0
- package/lib/adapters/evm/getters.js +163 -0
- package/lib/adapters/evm/getters.js.map +1 -0
- package/lib/adapters/evm/index.d.ts +19 -0
- package/lib/adapters/evm/index.js +55 -0
- package/lib/adapters/evm/index.js.map +1 -0
- package/lib/adapters/evm/read.actions.d.ts +3 -0
- package/lib/adapters/evm/read.actions.js +39 -0
- package/lib/adapters/evm/read.actions.js.map +1 -0
- package/lib/adapters/evm/utils.d.ts +28 -0
- package/lib/adapters/evm/utils.js +336 -0
- package/lib/adapters/evm/utils.js.map +1 -0
- package/lib/adapters/evm/vaults.actions.d.ts +10 -0
- package/lib/adapters/evm/vaults.actions.js +97 -0
- package/lib/adapters/evm/vaults.actions.js.map +1 -0
- package/lib/adapters/solana/actions.d.ts +20 -0
- package/lib/adapters/solana/actions.js +225 -0
- package/lib/adapters/solana/actions.js.map +1 -0
- package/lib/adapters/solana/class.d.ts +45 -0
- package/lib/adapters/solana/class.js +135 -0
- package/lib/adapters/solana/class.js.map +1 -0
- package/lib/adapters/solana/constants.d.ts +25 -0
- package/lib/adapters/solana/constants.js +32 -0
- package/lib/adapters/solana/constants.js.map +1 -0
- package/lib/adapters/solana/getters.d.ts +3 -0
- package/lib/adapters/solana/getters.js +126 -0
- package/lib/adapters/solana/getters.js.map +1 -0
- package/lib/adapters/solana/idl/vault-idl.d.ts +338 -0
- package/lib/adapters/solana/idl/vault-idl.js +1075 -0
- package/lib/adapters/solana/idl/vault-idl.js.map +1 -0
- package/lib/adapters/solana/index.d.ts +136 -0
- package/lib/adapters/solana/index.js +174 -0
- package/lib/adapters/solana/index.js.map +1 -0
- package/lib/adapters/solana/types.d.ts +58 -0
- package/lib/adapters/solana/types.js +3 -0
- package/lib/adapters/solana/types.js.map +1 -0
- package/lib/adapters/solana/utils.d.ts +104 -0
- package/lib/adapters/solana/utils.js +380 -0
- package/lib/adapters/solana/utils.js.map +1 -0
- package/lib/adapters/solana/vault-idl.d.ts +338 -0
- package/lib/adapters/solana/vault-idl.js +1075 -0
- package/lib/adapters/solana/vault-idl.js.map +1 -0
- package/lib/adapters/solana/vault.actions.d.ts +18 -0
- package/lib/adapters/solana/vault.actions.js +235 -0
- package/lib/adapters/solana/vault.actions.js.map +1 -0
- package/lib/adapters/sui/index.d.ts +0 -0
- package/lib/adapters/sui/index.js +1 -0
- package/lib/adapters/sui/index.js.map +1 -0
- package/lib/core/auth/index.d.ts +1 -0
- package/lib/core/auth/index.js +18 -0
- package/lib/core/auth/index.js.map +1 -0
- package/lib/core/auth/verify.d.ts +2 -0
- package/lib/core/auth/verify.js +21 -0
- package/lib/core/auth/verify.js.map +1 -0
- package/lib/core/base-class.d.ts +34 -0
- package/lib/core/base-class.js +55 -0
- package/lib/core/base-class.js.map +1 -0
- package/lib/core/base.class.d.ts +34 -0
- package/lib/core/base.class.js +61 -0
- package/lib/core/base.class.js.map +1 -0
- package/lib/core/constants.d.ts +86 -0
- package/lib/core/constants.js +146 -0
- package/lib/core/constants.js.map +1 -0
- package/lib/core/core.helpers.d.ts +23 -0
- package/lib/core/core.helpers.js +210 -0
- package/lib/core/core.helpers.js.map +1 -0
- package/lib/core/fetcher.d.ts +22 -0
- package/lib/core/fetcher.js +259 -0
- package/lib/core/fetcher.js.map +1 -0
- package/lib/core/helpers.core.d.ts +23 -0
- package/lib/core/helpers.core.js +210 -0
- package/lib/core/helpers.core.js.map +1 -0
- package/lib/core/helpers.d.ts +23 -0
- package/lib/core/helpers.js +210 -0
- package/lib/core/helpers.js.map +1 -0
- package/lib/core/helpers.web3.d.ts +26 -0
- package/lib/core/helpers.web3.js +315 -0
- package/lib/core/helpers.web3.js.map +1 -0
- package/lib/core/index.d.ts +9 -0
- package/lib/core/index.js +26 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/logger/index.d.ts +12 -0
- package/lib/core/logger/index.js +51 -0
- package/lib/core/logger/index.js.map +1 -0
- package/lib/core/logger/slack.d.ts +12 -0
- package/lib/core/logger/slack.js +49 -0
- package/lib/core/logger/slack.js.map +1 -0
- package/lib/core/read.actions.d.ts +3 -0
- package/lib/core/read.actions.js +39 -0
- package/lib/core/read.actions.js.map +1 -0
- package/lib/core/web3.helpers.d.ts +28 -0
- package/lib/core/web3.helpers.js +336 -0
- package/lib/core/web3.helpers.js.map +1 -0
- package/lib/core/write.actions.d.ts +9 -0
- package/lib/core/write.actions.js +51 -0
- package/lib/core/write.actions.js.map +1 -0
- package/lib/modules/vaults/admin-actions.d.ts +0 -0
- package/lib/modules/vaults/admin-actions.js +1 -0
- package/lib/modules/vaults/admin-actions.js.map +1 -0
- package/lib/modules/vaults/constants.d.ts +63 -0
- package/lib/modules/vaults/constants.js +190 -0
- package/lib/modules/vaults/constants.js.map +1 -0
- package/lib/modules/vaults/getters.d.ts +38 -0
- package/lib/modules/vaults/getters.js +636 -0
- package/lib/modules/vaults/getters.js.map +1 -0
- package/lib/modules/vaults/index.d.ts +84 -0
- package/lib/modules/vaults/index.js +498 -0
- package/lib/modules/vaults/index.js.map +1 -0
- package/lib/modules/vaults/main.d.ts +118 -0
- package/lib/modules/vaults/main.js +590 -0
- package/lib/modules/vaults/main.js.map +1 -0
- package/lib/modules/vaults/user-actions.d.ts +19 -0
- package/lib/modules/vaults/user-actions.js +172 -0
- package/lib/modules/vaults/user-actions.js.map +1 -0
- package/lib/modules/vaults/user.actions.d.ts +10 -0
- package/lib/modules/vaults/user.actions.js +95 -0
- package/lib/modules/vaults/user.actions.js.map +1 -0
- package/lib/modules/vaults/utils.d.ts +116 -0
- package/lib/modules/vaults/utils.js +395 -0
- package/lib/modules/vaults/utils.js.map +1 -0
- package/lib/modules/vaults/vault.actions.d.ts +10 -0
- package/lib/modules/vaults/vault.actions.js +95 -0
- package/lib/modules/vaults/vault.actions.js.map +1 -0
- package/lib/services/auth/index.d.ts +1 -0
- package/lib/services/auth/index.js +18 -0
- package/lib/services/auth/index.js.map +1 -0
- package/lib/services/auth/verify.d.ts +2 -0
- package/lib/services/auth/verify.js +20 -0
- package/lib/services/auth/verify.js.map +1 -0
- package/lib/services/coingecko/fetcher.d.ts +1 -0
- package/lib/services/coingecko/fetcher.js +36 -0
- package/lib/services/coingecko/fetcher.js.map +1 -0
- package/lib/services/coingecko/index.d.ts +2 -0
- package/lib/services/coingecko/index.js +19 -0
- package/lib/services/coingecko/index.js.map +1 -0
- package/lib/services/coingecko/utils.d.ts +1 -0
- package/lib/services/coingecko/utils.js +24 -0
- package/lib/services/coingecko/utils.js.map +1 -0
- package/lib/services/debank/fetcher.d.ts +2 -0
- package/lib/services/debank/fetcher.js +16 -0
- package/lib/services/debank/fetcher.js.map +1 -0
- package/lib/services/debank/index.d.ts +2 -0
- package/lib/services/debank/index.js +19 -0
- package/lib/services/debank/index.js.map +1 -0
- package/lib/services/debank/utils.d.ts +32 -0
- package/lib/services/debank/utils.js +229 -0
- package/lib/services/debank/utils.js.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +21 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/logger/index.d.ts +12 -0
- package/lib/services/logger/index.js +51 -0
- package/lib/services/logger/index.js.map +1 -0
- package/lib/services/logger/slack.d.ts +12 -0
- package/lib/services/logger/slack.js +48 -0
- package/lib/services/logger/slack.js.map +1 -0
- package/lib/services/solana/actions.d.ts +20 -0
- package/lib/services/solana/actions.js +225 -0
- package/lib/services/solana/actions.js.map +1 -0
- package/lib/services/solana/class.d.ts +45 -0
- package/lib/services/solana/class.js +135 -0
- package/lib/services/solana/class.js.map +1 -0
- package/lib/services/solana/constants.d.ts +25 -0
- package/lib/services/solana/constants.js +32 -0
- package/lib/services/solana/constants.js.map +1 -0
- package/lib/services/solana/index.d.ts +84 -0
- package/lib/services/solana/index.js +50 -0
- package/lib/services/solana/index.js.map +1 -0
- package/lib/services/solana/types.d.ts +58 -0
- package/lib/services/solana/types.js +3 -0
- package/lib/services/solana/types.js.map +1 -0
- package/lib/services/solana/utils.d.ts +96 -0
- package/lib/services/solana/utils.js +355 -0
- package/lib/services/solana/utils.js.map +1 -0
- package/lib/services/solana/vault-idl.d.ts +338 -0
- package/lib/services/solana/vault-idl.js +1075 -0
- package/lib/services/solana/vault-idl.js.map +1 -0
- package/lib/services/subgraph/fetcher.d.ts +2 -0
- package/lib/services/subgraph/fetcher.js +58 -0
- package/lib/services/subgraph/fetcher.js.map +1 -0
- package/lib/services/subgraph/index.d.ts +2 -0
- package/lib/services/subgraph/index.js +19 -0
- package/lib/services/subgraph/index.js.map +1 -0
- package/lib/services/subgraph/vaults.d.ts +10 -0
- package/lib/services/subgraph/vaults.js +473 -0
- package/lib/services/subgraph/vaults.js.map +1 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/index.js +24 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/pools.d.ts +141 -0
- package/lib/types/pools.js +3 -0
- package/lib/types/pools.js.map +1 -0
- package/lib/types/staking.d.ts +28 -0
- package/lib/types/staking.js +3 -0
- package/lib/types/staking.js.map +1 -0
- package/lib/types/subgraph.d.ts +45 -0
- package/lib/types/subgraph.js +3 -0
- package/lib/types/subgraph.js.map +1 -0
- package/lib/types/user.d.ts +1 -0
- package/lib/types/user.js +3 -0
- package/lib/types/user.js.map +1 -0
- package/lib/types/vaults.d.ts +164 -0
- package/lib/types/vaults.js +3 -0
- package/lib/types/vaults.js.map +1 -0
- package/lib/types/web3.d.ts +24 -0
- package/lib/types/web3.js +3 -0
- package/lib/types/web3.js.map +1 -0
- package/lib/types/webserver.d.ts +475 -0
- package/lib/types/webserver.js +3 -0
- package/lib/types/webserver.js.map +1 -0
- package/lib/utils/base-class.d.ts +34 -0
- package/lib/utils/base-class.js +55 -0
- package/lib/utils/base-class.js.map +1 -0
- package/lib/utils/constants/august.d.ts +57 -0
- package/lib/utils/constants/august.js +61 -0
- package/lib/utils/constants/august.js.map +1 -0
- package/lib/utils/constants/fallbacks.d.ts +3 -0
- package/lib/utils/constants/fallbacks.js +26 -0
- package/lib/utils/constants/fallbacks.js.map +1 -0
- package/lib/utils/constants/index.d.ts +3 -0
- package/lib/utils/constants/index.js +20 -0
- package/lib/utils/constants/index.js.map +1 -0
- package/lib/utils/constants/web3.d.ts +32 -0
- package/lib/utils/constants/web3.js +101 -0
- package/lib/utils/constants/web3.js.map +1 -0
- package/lib/utils/fetcher.d.ts +25 -0
- package/lib/utils/fetcher.js +334 -0
- package/lib/utils/fetcher.js.map +1 -0
- package/lib/utils/helpers/array.d.ts +6 -0
- package/lib/utils/helpers/array.js +40 -0
- package/lib/utils/helpers/array.js.map +1 -0
- package/lib/utils/helpers/datetime.d.ts +5 -0
- package/lib/utils/helpers/datetime.js +32 -0
- package/lib/utils/helpers/datetime.js.map +1 -0
- package/lib/utils/helpers/formatters.d.ts +8 -0
- package/lib/utils/helpers/formatters.js +113 -0
- package/lib/utils/helpers/formatters.js.map +1 -0
- package/lib/utils/helpers/index.d.ts +6 -0
- package/lib/utils/helpers/index.js +23 -0
- package/lib/utils/helpers/index.js.map +1 -0
- package/lib/utils/helpers/responses.d.ts +32 -0
- package/lib/utils/helpers/responses.js +229 -0
- package/lib/utils/helpers/responses.js.map +1 -0
- package/lib/utils/helpers/verify-keys.d.ts +2 -0
- package/lib/utils/helpers/verify-keys.js +21 -0
- package/lib/utils/helpers/verify-keys.js.map +1 -0
- package/lib/utils/helpers/web3.d.ts +27 -0
- package/lib/utils/helpers/web3.js +339 -0
- package/lib/utils/helpers/web3.js.map +1 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.js +22 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/vaults.d.ts +53 -0
- package/lib/utils/vaults.js +156 -0
- package/lib/utils/vaults.js.map +1 -0
- package/lib/vaults/admin-actions.d.ts +0 -0
- package/lib/vaults/admin-actions.js +1 -0
- package/lib/vaults/admin-actions.js.map +1 -0
- package/lib/vaults/getters.d.ts +38 -0
- package/lib/vaults/getters.js +760 -0
- package/lib/vaults/getters.js.map +1 -0
- package/lib/vaults/index.d.ts +4 -0
- package/lib/vaults/index.js +21 -0
- package/lib/vaults/index.js.map +1 -0
- package/lib/vaults/main.d.ts +118 -0
- package/lib/vaults/main.js +591 -0
- package/lib/vaults/main.js.map +1 -0
- package/lib/vaults/rpc-config.d.ts +4 -0
- package/lib/vaults/rpc-config.js +27 -0
- package/lib/vaults/rpc-config.js.map +1 -0
- package/lib/vaults/subgraph.d.ts +10 -0
- package/lib/vaults/subgraph.js +470 -0
- package/lib/vaults/subgraph.js.map +1 -0
- package/lib/vaults/user-actions.d.ts +19 -0
- package/lib/vaults/user-actions.js +172 -0
- package/lib/vaults/user-actions.js.map +1 -0
- package/lib/vaults/utils.d.ts +121 -0
- package/lib/vaults/utils.js +414 -0
- package/lib/vaults/utils.js.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./web3"), exports);
|
|
18
|
+
__exportStar(require("./user"), exports);
|
|
19
|
+
__exportStar(require("./webserver"), exports);
|
|
20
|
+
__exportStar(require("./pools"), exports);
|
|
21
|
+
__exportStar(require("./staking"), exports);
|
|
22
|
+
__exportStar(require("./subgraph"), exports);
|
|
23
|
+
__exportStar(require("./vaults"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { IAddress, INormalizedNumber } from './web3';
|
|
2
|
+
import { IDebankProtocolExposure, IDebankTokenExposure, ITokenizedVaultStrategist, IWSSubaccountCefi } from './webserver';
|
|
3
|
+
type ILabelValue = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
usd: number;
|
|
7
|
+
};
|
|
8
|
+
export type IPoolLoan = {
|
|
9
|
+
address: IAddress;
|
|
10
|
+
apr: number;
|
|
11
|
+
collateral: IAddress;
|
|
12
|
+
principal: INormalizedNumber;
|
|
13
|
+
allocation: number;
|
|
14
|
+
repaid: INormalizedNumber;
|
|
15
|
+
exposure?: ILabelValue[];
|
|
16
|
+
positions?: ILabelValue[];
|
|
17
|
+
idleCapital?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type IPoolRewards = {
|
|
20
|
+
upshift_points: string;
|
|
21
|
+
latestUpshiftPointMultiplier: number;
|
|
22
|
+
upshift_points_multipliers: {
|
|
23
|
+
multiplier: number;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}[];
|
|
26
|
+
additional_points: string[];
|
|
27
|
+
};
|
|
28
|
+
export type IPool = {
|
|
29
|
+
address: IAddress;
|
|
30
|
+
name: string;
|
|
31
|
+
logoUrl: string;
|
|
32
|
+
asset: IAddress;
|
|
33
|
+
loansOperator?: IAddress;
|
|
34
|
+
globalLoansAmount: INormalizedNumber;
|
|
35
|
+
symbol: string;
|
|
36
|
+
totalAssets?: INormalizedNumber;
|
|
37
|
+
totalSupply: INormalizedNumber;
|
|
38
|
+
maxSupply: INormalizedNumber;
|
|
39
|
+
decimals: number;
|
|
40
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
41
|
+
chainId: number;
|
|
42
|
+
withdrawalFee: INormalizedNumber;
|
|
43
|
+
loans?: IPoolLoan[];
|
|
44
|
+
collateral?: IAddress[];
|
|
45
|
+
apy?: number;
|
|
46
|
+
sUSDeAPY?: number;
|
|
47
|
+
leverageLoopAPR?: number;
|
|
48
|
+
leverage?: string;
|
|
49
|
+
managementFee?: number | undefined;
|
|
50
|
+
stakeAPY?: number;
|
|
51
|
+
idleAssets?: INormalizedNumber;
|
|
52
|
+
description?: string;
|
|
53
|
+
hardcodedStrategist?: string;
|
|
54
|
+
protocolExposure?: IDebankProtocolExposure[];
|
|
55
|
+
tokenExposure?: IDebankTokenExposure[];
|
|
56
|
+
cefiExposure?: IWSSubaccountCefi[];
|
|
57
|
+
vaultsSubAccWhitelist?: IAddress[];
|
|
58
|
+
internalType?: 'lendingPool' | 'tokenizedVault';
|
|
59
|
+
publicType?: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
60
|
+
strategist: ITokenizedVaultStrategist;
|
|
61
|
+
isFeatured?: boolean;
|
|
62
|
+
isVisible?: boolean;
|
|
63
|
+
rewards?: IPoolRewards;
|
|
64
|
+
};
|
|
65
|
+
export type IPoolWithUnderlying = IPool & {
|
|
66
|
+
underlying: {
|
|
67
|
+
address: IAddress;
|
|
68
|
+
symbol: string;
|
|
69
|
+
decimals: number;
|
|
70
|
+
chain: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export interface ISubgraphFormattedPool {
|
|
74
|
+
decimals: number;
|
|
75
|
+
symbol: string;
|
|
76
|
+
name: string;
|
|
77
|
+
asset: IAddress;
|
|
78
|
+
totalSupply: INormalizedNumber;
|
|
79
|
+
totalAssets: INormalizedNumber;
|
|
80
|
+
maxSupply: INormalizedNumber;
|
|
81
|
+
globalLoansAmount: INormalizedNumber;
|
|
82
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
83
|
+
withdrawalFee: INormalizedNumber;
|
|
84
|
+
chainId: number;
|
|
85
|
+
address: IAddress;
|
|
86
|
+
managementFee: number;
|
|
87
|
+
underlying: {
|
|
88
|
+
address: IAddress;
|
|
89
|
+
chain: number;
|
|
90
|
+
};
|
|
91
|
+
loansOperator: IAddress;
|
|
92
|
+
loans: ISubgraphFormattedLoan[];
|
|
93
|
+
}
|
|
94
|
+
export interface ISubgraphFormattedLoan {
|
|
95
|
+
amount: INormalizedNumber;
|
|
96
|
+
address: IAddress;
|
|
97
|
+
apr: number;
|
|
98
|
+
collateral: IAddress;
|
|
99
|
+
repaid: INormalizedNumber;
|
|
100
|
+
borrower: IAddress;
|
|
101
|
+
}
|
|
102
|
+
export type IPoolWithPositions = IPoolWithUnderlying & {
|
|
103
|
+
token: IAddress;
|
|
104
|
+
position: string;
|
|
105
|
+
apy: number;
|
|
106
|
+
status: string;
|
|
107
|
+
availableRedemptions: IPoolAvailableRedemption[];
|
|
108
|
+
redeemable: INormalizedNumber;
|
|
109
|
+
walletBalance: string;
|
|
110
|
+
};
|
|
111
|
+
export type IPoolFunctions = 'decimals' | 'symbol' | 'name' | 'asset' | 'totalSupply' | 'maxSupply' | 'totalAssets' | 'globalLoansAmount' | 'loansOperator' | 'getTotalLoansDeployed' | 'withdrawalFee' | 'lagDuration' | 'withdrawalsPaused' | 'assetsWhitelistAddress' | 'getWhitelistedAssets' | 'maxDepositAmount' | 'getTotalAssets';
|
|
112
|
+
export type IPoolAction = 'deposit' | 'withdraw' | 'claim' | 'stake' | 'getReward' | 'unstake';
|
|
113
|
+
export type IPoolModal = {
|
|
114
|
+
isOpen: boolean;
|
|
115
|
+
onClose: (e: any) => void;
|
|
116
|
+
type: IPoolAction;
|
|
117
|
+
mode?: 'light' | 'dark';
|
|
118
|
+
} & IPoolWithUnderlying;
|
|
119
|
+
export type IPoolAvailableRedemption = {
|
|
120
|
+
receiver: IAddress;
|
|
121
|
+
day: INormalizedNumber;
|
|
122
|
+
month: INormalizedNumber;
|
|
123
|
+
year: INormalizedNumber;
|
|
124
|
+
amount: INormalizedNumber;
|
|
125
|
+
date: Date;
|
|
126
|
+
pool: IAddress;
|
|
127
|
+
};
|
|
128
|
+
export type IPoolRedemptionHistoryItem = {
|
|
129
|
+
receiver: IAddress;
|
|
130
|
+
amount: INormalizedNumber;
|
|
131
|
+
processed: Date;
|
|
132
|
+
requested: Date;
|
|
133
|
+
pool: IAddress;
|
|
134
|
+
};
|
|
135
|
+
export type IPoolOrderParam = 'asc' | 'desc';
|
|
136
|
+
export type IPoolHistoricalParams = {
|
|
137
|
+
order?: IPoolOrderParam;
|
|
138
|
+
start: Date;
|
|
139
|
+
interval?: 'years' | 'quarters' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes';
|
|
140
|
+
};
|
|
141
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../src.ts/types/pools.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IAddress, INormalizedNumber } from './web3';
|
|
2
|
+
export type IActiveStakingPosition = {
|
|
3
|
+
stakingToken: {
|
|
4
|
+
decimals: number;
|
|
5
|
+
symbol: string;
|
|
6
|
+
address: IAddress;
|
|
7
|
+
chain: number;
|
|
8
|
+
totalStaked: INormalizedNumber;
|
|
9
|
+
usd: INormalizedNumber;
|
|
10
|
+
totalSupply?: INormalizedNumber;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
rewardToken: {
|
|
14
|
+
decimals: number;
|
|
15
|
+
symbol: string;
|
|
16
|
+
address: IAddress;
|
|
17
|
+
chain: number;
|
|
18
|
+
redeemable: INormalizedNumber;
|
|
19
|
+
usd: INormalizedNumber;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
rewardDistributor: IAddress;
|
|
23
|
+
rewardPerSecond: INormalizedNumber;
|
|
24
|
+
apy?: number;
|
|
25
|
+
maxApy?: number;
|
|
26
|
+
chainId: number;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking.js","sourceRoot":"","sources":["../../src.ts/types/staking.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IAddress } from './web3';
|
|
2
|
+
export interface ISubgraphBase {
|
|
3
|
+
id: string;
|
|
4
|
+
contractId_: IAddress;
|
|
5
|
+
timestamp_: string;
|
|
6
|
+
transactionHash_: IAddress;
|
|
7
|
+
block_number: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ISubgraphUserHistoryItem extends ISubgraphBase {
|
|
10
|
+
address: IAddress;
|
|
11
|
+
amount: string;
|
|
12
|
+
type: 'withdraw-request' | 'deposit' | 'withdraw-processed';
|
|
13
|
+
decimals?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ISubgraphWithdrawProccessed extends ISubgraphBase {
|
|
16
|
+
processedOn: string;
|
|
17
|
+
requestedOn: string;
|
|
18
|
+
receiverAddr: IAddress;
|
|
19
|
+
assetsAmount: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ISubgraphDeposit extends ISubgraphBase {
|
|
22
|
+
assets: string;
|
|
23
|
+
sender: IAddress;
|
|
24
|
+
shares: string;
|
|
25
|
+
owner: IAddress;
|
|
26
|
+
}
|
|
27
|
+
export interface ISubgraphWithdrawRequest extends ISubgraphBase {
|
|
28
|
+
day: string;
|
|
29
|
+
month: string;
|
|
30
|
+
year: string;
|
|
31
|
+
shares: string;
|
|
32
|
+
assets: string;
|
|
33
|
+
receiverAddr: IAddress;
|
|
34
|
+
ownerAddr: IAddress;
|
|
35
|
+
}
|
|
36
|
+
export interface ISubgraphWithdraw extends ISubgraphBase {
|
|
37
|
+
receiver: IAddress;
|
|
38
|
+
sender: string;
|
|
39
|
+
assets: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ISubgraphTransfer extends ISubgraphBase {
|
|
42
|
+
from: IAddress;
|
|
43
|
+
to: IAddress;
|
|
44
|
+
value: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subgraph.js","sourceRoot":"","sources":["../../src.ts/types/subgraph.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IUserRoles = 'client' | 'admin' | 'dev';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src.ts/types/user.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { IAddress, INormalizedNumber } from './web3';
|
|
2
|
+
import { IDebankProtocolExposure, IDebankTokenExposure, IOTCPosition, IWSSubaccountCefi, IWSSubaccountLoan, IWSTokenEntry } from './webserver';
|
|
3
|
+
export interface IVaultLoan {
|
|
4
|
+
vault: IAddress;
|
|
5
|
+
address: IAddress;
|
|
6
|
+
lender: IAddress;
|
|
7
|
+
borrower: IAddress;
|
|
8
|
+
state: string;
|
|
9
|
+
totalRepaid: number;
|
|
10
|
+
principalToken: IWSTokenEntry;
|
|
11
|
+
principalAmount: number;
|
|
12
|
+
interestAmount: number;
|
|
13
|
+
upcomingPayment: {
|
|
14
|
+
amount: number;
|
|
15
|
+
dueDate: string;
|
|
16
|
+
};
|
|
17
|
+
apr: number;
|
|
18
|
+
initialPrincipalAmount: number;
|
|
19
|
+
deployedDate: string;
|
|
20
|
+
paymentInterval: number;
|
|
21
|
+
isIdleCapital: boolean;
|
|
22
|
+
allocation: number;
|
|
23
|
+
}
|
|
24
|
+
export type IVaultUserHistoryItem = {
|
|
25
|
+
timestamp: number;
|
|
26
|
+
address: IAddress;
|
|
27
|
+
amount: INormalizedNumber;
|
|
28
|
+
pool: IAddress;
|
|
29
|
+
chainId: number;
|
|
30
|
+
type: 'withdraw-request' | 'deposit' | 'withdraw-processed';
|
|
31
|
+
transactionHash: IAddress;
|
|
32
|
+
};
|
|
33
|
+
export type IVaultRewards = {
|
|
34
|
+
points: string;
|
|
35
|
+
multiplier: number;
|
|
36
|
+
multipliers: {
|
|
37
|
+
value: number;
|
|
38
|
+
timestamp: number;
|
|
39
|
+
}[];
|
|
40
|
+
additionalPoints: string[];
|
|
41
|
+
};
|
|
42
|
+
export type IVaultExposureItem = {
|
|
43
|
+
amount: number;
|
|
44
|
+
chain: string;
|
|
45
|
+
decimals: number;
|
|
46
|
+
exposureType?: string;
|
|
47
|
+
id: string;
|
|
48
|
+
logoUrl?: string;
|
|
49
|
+
name: string;
|
|
50
|
+
protocol?: string;
|
|
51
|
+
symbol: string;
|
|
52
|
+
};
|
|
53
|
+
export type IExposurePerCategory = {
|
|
54
|
+
borrowing: IVaultExposureItem[];
|
|
55
|
+
supplying: IVaultExposureItem[];
|
|
56
|
+
lending: IWSSubaccountLoan[];
|
|
57
|
+
wallet: IVaultExposureItem[];
|
|
58
|
+
cefiBalance: number;
|
|
59
|
+
defiBalance: number;
|
|
60
|
+
walletBalance: number;
|
|
61
|
+
loanBalance: number;
|
|
62
|
+
};
|
|
63
|
+
export interface IVaultAllocations {
|
|
64
|
+
defi: IDebankProtocolExposure[];
|
|
65
|
+
tokens: IDebankTokenExposure[];
|
|
66
|
+
cefi: IWSSubaccountCefi[];
|
|
67
|
+
unfilteredTokens: IDebankTokenExposure[];
|
|
68
|
+
otc: Record<string, IOTCPosition>;
|
|
69
|
+
exposurePerCategory?: IExposurePerCategory;
|
|
70
|
+
netValue?: number;
|
|
71
|
+
defiPerBorrower: Record<`0x${string}`, {
|
|
72
|
+
exposure: any[];
|
|
73
|
+
positions: any[];
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
export interface IVaultApy {
|
|
77
|
+
apy: number;
|
|
78
|
+
explainer: string;
|
|
79
|
+
liquidApy: number;
|
|
80
|
+
rewardsClaimable: number;
|
|
81
|
+
rewardsCompounded: number;
|
|
82
|
+
underlyingApy: number;
|
|
83
|
+
}
|
|
84
|
+
export interface IVaultStrategist {
|
|
85
|
+
address: IAddress;
|
|
86
|
+
logo: string;
|
|
87
|
+
name: string;
|
|
88
|
+
}
|
|
89
|
+
export type IVaultVersion = 'evm-0' | 'evm-1' | 'evm-2' | 'sol-0';
|
|
90
|
+
export interface IVault {
|
|
91
|
+
address: IAddress;
|
|
92
|
+
chainId: number;
|
|
93
|
+
name: string;
|
|
94
|
+
logoUrl: string;
|
|
95
|
+
receipt: {
|
|
96
|
+
address: IAddress;
|
|
97
|
+
symbol: string;
|
|
98
|
+
decimals: number;
|
|
99
|
+
};
|
|
100
|
+
description: string;
|
|
101
|
+
startDatetime: string;
|
|
102
|
+
status: 'active' | 'closed' | 'testing';
|
|
103
|
+
version: IVaultVersion;
|
|
104
|
+
tags: string[];
|
|
105
|
+
isFeatured: boolean;
|
|
106
|
+
isVisible: boolean;
|
|
107
|
+
reserveTarget: number;
|
|
108
|
+
reserveTolerance: number;
|
|
109
|
+
decimals: number;
|
|
110
|
+
totalAssets: INormalizedNumber;
|
|
111
|
+
totalSupply: INormalizedNumber;
|
|
112
|
+
maxSupply: INormalizedNumber;
|
|
113
|
+
depositAssets: {
|
|
114
|
+
address: IAddress;
|
|
115
|
+
symbol: string;
|
|
116
|
+
decimals: number;
|
|
117
|
+
}[];
|
|
118
|
+
apy: IVaultApy;
|
|
119
|
+
operator: IAddress;
|
|
120
|
+
rewards: IVaultRewards;
|
|
121
|
+
strategists: IVaultStrategist[];
|
|
122
|
+
fees: {
|
|
123
|
+
management: number;
|
|
124
|
+
isManagementWaived: boolean;
|
|
125
|
+
performance: number;
|
|
126
|
+
isPerformanceWaived: boolean;
|
|
127
|
+
};
|
|
128
|
+
lagDuration: number;
|
|
129
|
+
maxDailyDrawdown: number;
|
|
130
|
+
risk: string;
|
|
131
|
+
isWithdrawalPaused: boolean;
|
|
132
|
+
isDepositPaused: boolean;
|
|
133
|
+
idleAssets: INormalizedNumber;
|
|
134
|
+
loans?: IVaultLoan[];
|
|
135
|
+
allocations?: IVaultAllocations;
|
|
136
|
+
position?: IVaultPosition;
|
|
137
|
+
}
|
|
138
|
+
export type IVaultAvailableRedemption = {
|
|
139
|
+
id: string;
|
|
140
|
+
hash: string;
|
|
141
|
+
timestamp: number;
|
|
142
|
+
receiver: IAddress;
|
|
143
|
+
day: INormalizedNumber;
|
|
144
|
+
month: INormalizedNumber;
|
|
145
|
+
year: INormalizedNumber;
|
|
146
|
+
amount: INormalizedNumber;
|
|
147
|
+
date: Date;
|
|
148
|
+
vault: IAddress;
|
|
149
|
+
};
|
|
150
|
+
export type IVaultRedemptionHistoryItem = {
|
|
151
|
+
receiver: IAddress;
|
|
152
|
+
amount: INormalizedNumber;
|
|
153
|
+
processed: Date;
|
|
154
|
+
requested: Date;
|
|
155
|
+
vault: IAddress;
|
|
156
|
+
};
|
|
157
|
+
export interface IVaultPosition {
|
|
158
|
+
vault: IAddress;
|
|
159
|
+
status: string;
|
|
160
|
+
availableRedemptions: IVaultAvailableRedemption[];
|
|
161
|
+
pendingRedemptions: IVaultAvailableRedemption[];
|
|
162
|
+
redeemable: INormalizedNumber;
|
|
163
|
+
walletBalance: INormalizedNumber;
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaults.js","sourceRoot":"","sources":["../../src.ts/types/vaults.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Signer, Provider } from 'ethers';
|
|
2
|
+
export type IAddress = `0x${string}`;
|
|
3
|
+
export type IChainId = number;
|
|
4
|
+
export type IChainObj = {
|
|
5
|
+
chainId: number;
|
|
6
|
+
name: string;
|
|
7
|
+
explorer: string;
|
|
8
|
+
};
|
|
9
|
+
export type INormalizedNumber = {
|
|
10
|
+
normalized: string;
|
|
11
|
+
raw: string;
|
|
12
|
+
};
|
|
13
|
+
export type IExplorerType = 'tx' | 'address' | 'token';
|
|
14
|
+
export type IContractRunner = Signer | Provider;
|
|
15
|
+
export type IProvidersConfig = Partial<Record<IChainId, string>>;
|
|
16
|
+
export type IInfuraOptions = {
|
|
17
|
+
chainId: IChainId;
|
|
18
|
+
apiKey: string;
|
|
19
|
+
};
|
|
20
|
+
export type ISolanaNetwork = 'devnet' | 'mainnet-beta' | 'testnet' | 'localnet';
|
|
21
|
+
export interface ISolanaConfig {
|
|
22
|
+
rpcUrl: string;
|
|
23
|
+
network: ISolanaNetwork;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web3.js","sourceRoot":"","sources":["../../src.ts/types/web3.ts"],"names":[],"mappings":""}
|