upshift-config 0.5.14
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/LICENSE +21 -0
- package/README.md +349 -0
- package/lib/abis/AddressResolver.d.ts +28 -0
- package/lib/abis/AddressResolver.js +23 -0
- package/lib/abis/ChainlinkV3.d.ts +87 -0
- package/lib/abis/ChainlinkV3.js +117 -0
- package/lib/abis/ERC20.d.ts +168 -0
- package/lib/abis/ERC20.js +226 -0
- package/lib/abis/ERC20_Bytes32.d.ts +139 -0
- package/lib/abis/ERC20_Bytes32.js +196 -0
- package/lib/abis/ERC4626.d.ts +364 -0
- package/lib/abis/ERC4626.js +507 -0
- package/lib/abis/ERC721.d.ts +231 -0
- package/lib/abis/ERC721.js +321 -0
- package/lib/abis/FeeOracle.d.ts +120 -0
- package/lib/abis/FeeOracle.js +162 -0
- package/lib/abis/LendingPool.d.ts +1393 -0
- package/lib/abis/LendingPool.js +1807 -0
- package/lib/abis/LendingPoolV2.d.ts +1413 -0
- package/lib/abis/LendingPoolV2.js +1833 -0
- package/lib/abis/LendingPoolV3.d.ts +1677 -0
- package/lib/abis/LendingPoolV3.js +1160 -0
- package/lib/abis/Loan.d.ts +837 -0
- package/lib/abis/Loan.js +1080 -0
- package/lib/abis/MultiAssetNativeDepositWrapper.d.ts +137 -0
- package/lib/abis/MultiAssetNativeDepositWrapper.js +125 -0
- package/lib/abis/Multicall3.d.ts +30 -0
- package/lib/abis/Multicall3.js +97 -0
- package/lib/abis/OFT.d.ts +116 -0
- package/lib/abis/OFT.js +85 -0
- package/lib/abis/PoolAdapter.d.ts +36 -0
- package/lib/abis/PoolAdapter.js +51 -0
- package/lib/abis/RewardDistributor.d.ts +267 -0
- package/lib/abis/RewardDistributor.js +352 -0
- package/lib/abis/RwaRedeemSubaccount.d.ts +747 -0
- package/lib/abis/RwaRedeemSubaccount.js +548 -0
- package/lib/abis/SmartAccount.d.ts +17 -0
- package/lib/abis/SmartAccount.js +19 -0
- package/lib/abis/SwapRouter.d.ts +1043 -0
- package/lib/abis/SwapRouter.js +740 -0
- package/lib/abis/TextResolver.d.ts +16 -0
- package/lib/abis/TextResolver.js +16 -0
- package/lib/abis/TokenizedVaultV2.d.ts +1364 -0
- package/lib/abis/TokenizedVaultV2.js +1041 -0
- package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +1456 -0
- package/lib/abis/TokenizedVaultV2DepositWithPermit.js +1878 -0
- package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
- package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
- package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.d.ts +454 -0
- package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.js +327 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAllocation.d.ts +1466 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAllocation.js +1092 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
- package/lib/abis/UniversalResolverResolve.d.ts +69 -0
- package/lib/abis/UniversalResolverResolve.js +35 -0
- package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
- package/lib/abis/UniversalSignatureValidator.js +30 -0
- package/lib/abis/WrapperAdapter.d.ts +71 -0
- package/lib/abis/WrapperAdapter.js +77 -0
- package/lib/abis/index.d.ts +34 -0
- package/lib/abis/index.js +51 -0
- package/lib/adapters/evm/getters.d.ts +19 -0
- package/lib/adapters/evm/getters.js +209 -0
- package/lib/adapters/evm/index.d.ts +353 -0
- package/lib/adapters/evm/index.js +434 -0
- package/lib/adapters/evm/utils.d.ts +8 -0
- package/lib/adapters/evm/utils.js +51 -0
- package/lib/adapters/solana/constants.d.ts +33 -0
- package/lib/adapters/solana/constants.js +52 -0
- package/lib/adapters/solana/getters.d.ts +11 -0
- package/lib/adapters/solana/getters.js +165 -0
- package/lib/adapters/solana/idl/vault-idl.d.ts +272 -0
- package/lib/adapters/solana/idl/vault-idl.js +1084 -0
- package/lib/adapters/solana/index.d.ts +233 -0
- package/lib/adapters/solana/index.js +291 -0
- package/lib/adapters/solana/types.d.ts +67 -0
- package/lib/adapters/solana/types.js +3 -0
- package/lib/adapters/solana/utils.d.ts +141 -0
- package/lib/adapters/solana/utils.js +595 -0
- package/lib/adapters/solana/vault.actions.d.ts +57 -0
- package/lib/adapters/solana/vault.actions.js +379 -0
- package/lib/adapters/stellar/actions.d.ts +28 -0
- package/lib/adapters/stellar/actions.js +77 -0
- package/lib/adapters/stellar/constants.d.ts +43 -0
- package/lib/adapters/stellar/constants.js +53 -0
- package/lib/adapters/stellar/getters.d.ts +68 -0
- package/lib/adapters/stellar/getters.js +290 -0
- package/lib/adapters/stellar/index.d.ts +114 -0
- package/lib/adapters/stellar/index.js +175 -0
- package/lib/adapters/stellar/soroban.d.ts +123 -0
- package/lib/adapters/stellar/soroban.js +613 -0
- package/lib/adapters/stellar/submit.d.ts +34 -0
- package/lib/adapters/stellar/submit.js +149 -0
- package/lib/adapters/stellar/types.d.ts +58 -0
- package/lib/adapters/stellar/types.js +6 -0
- package/lib/adapters/stellar/utils.d.ts +24 -0
- package/lib/adapters/stellar/utils.js +34 -0
- package/lib/adapters/sui/constants.d.ts +14 -0
- package/lib/adapters/sui/constants.js +29 -0
- package/lib/adapters/sui/getters.d.ts +9 -0
- package/lib/adapters/sui/getters.js +60 -0
- package/lib/adapters/sui/index.d.ts +45 -0
- package/lib/adapters/sui/index.js +101 -0
- package/lib/adapters/sui/transformer.d.ts +10 -0
- package/lib/adapters/sui/transformer.js +107 -0
- package/lib/adapters/sui/types.d.ts +66 -0
- package/lib/adapters/sui/types.js +3 -0
- package/lib/adapters/sui/utils.d.ts +10 -0
- package/lib/adapters/sui/utils.js +29 -0
- package/lib/core/analytics/chain-name.d.ts +9 -0
- package/lib/core/analytics/chain-name.js +34 -0
- package/lib/core/analytics/constants.d.ts +5 -0
- package/lib/core/analytics/constants.js +9 -0
- package/lib/core/analytics/env.d.ts +29 -0
- package/lib/core/analytics/env.js +59 -0
- package/lib/core/analytics/index.d.ts +36 -0
- package/lib/core/analytics/index.js +79 -0
- package/lib/core/analytics/instrumentation.d.ts +29 -0
- package/lib/core/analytics/instrumentation.js +277 -0
- package/lib/core/analytics/method-taxonomy.d.ts +19 -0
- package/lib/core/analytics/method-taxonomy.js +128 -0
- package/lib/core/analytics/metrics.d.ts +33 -0
- package/lib/core/analytics/metrics.js +116 -0
- package/lib/core/analytics/sanitize.d.ts +44 -0
- package/lib/core/analytics/sanitize.js +260 -0
- package/lib/core/analytics/sentry-runtime.d.ts +15 -0
- package/lib/core/analytics/sentry-runtime.js +97 -0
- package/lib/core/analytics/sentry.d.ts +67 -0
- package/lib/core/analytics/sentry.js +613 -0
- package/lib/core/analytics/types.d.ts +48 -0
- package/lib/core/analytics/types.js +3 -0
- package/lib/core/analytics/user-identity.d.ts +41 -0
- package/lib/core/analytics/user-identity.js +141 -0
- package/lib/core/analytics/version.d.ts +6 -0
- package/lib/core/analytics/version.js +10 -0
- package/lib/core/attribution.d.ts +111 -0
- package/lib/core/attribution.js +142 -0
- package/lib/core/auth/index.d.ts +1 -0
- package/lib/core/auth/index.js +18 -0
- package/lib/core/auth/verify.d.ts +2 -0
- package/lib/core/auth/verify.js +31 -0
- package/lib/core/base.class.d.ts +152 -0
- package/lib/core/base.class.js +172 -0
- package/lib/core/cache.d.ts +9 -0
- package/lib/core/cache.js +31 -0
- package/lib/core/constants/adapters.d.ts +103 -0
- package/lib/core/constants/adapters.js +180 -0
- package/lib/core/constants/core.d.ts +133 -0
- package/lib/core/constants/core.js +209 -0
- package/lib/core/constants/swap-router.d.ts +150 -0
- package/lib/core/constants/swap-router.js +169 -0
- package/lib/core/constants/vaults.d.ts +93 -0
- package/lib/core/constants/vaults.js +273 -0
- package/lib/core/constants/web3.d.ts +91 -0
- package/lib/core/constants/web3.js +229 -0
- package/lib/core/errors/index.d.ts +114 -0
- package/lib/core/errors/index.js +183 -0
- package/lib/core/fetcher.d.ts +198 -0
- package/lib/core/fetcher.js +903 -0
- package/lib/core/helpers/adapters.d.ts +13 -0
- package/lib/core/helpers/adapters.js +39 -0
- package/lib/core/helpers/chain-address.d.ts +13 -0
- package/lib/core/helpers/chain-address.js +47 -0
- package/lib/core/helpers/chain-error.d.ts +207 -0
- package/lib/core/helpers/chain-error.js +682 -0
- package/lib/core/helpers/chain-support.d.ts +80 -0
- package/lib/core/helpers/chain-support.js +115 -0
- package/lib/core/helpers/core.d.ts +68 -0
- package/lib/core/helpers/core.js +285 -0
- package/lib/core/helpers/explorer-link.d.ts +16 -0
- package/lib/core/helpers/explorer-link.js +26 -0
- package/lib/core/helpers/multicall.d.ts +68 -0
- package/lib/core/helpers/multicall.js +103 -0
- package/lib/core/helpers/revert-decode.d.ts +248 -0
- package/lib/core/helpers/revert-decode.js +515 -0
- package/lib/core/helpers/signer.d.ts +52 -0
- package/lib/core/helpers/signer.js +145 -0
- package/lib/core/helpers/swap-router.d.ts +211 -0
- package/lib/core/helpers/swap-router.js +480 -0
- package/lib/core/helpers/vault-version.d.ts +23 -0
- package/lib/core/helpers/vault-version.js +75 -0
- package/lib/core/helpers/vaults.d.ts +89 -0
- package/lib/core/helpers/vaults.js +235 -0
- package/lib/core/helpers/web3.d.ts +353 -0
- package/lib/core/helpers/web3.js +992 -0
- package/lib/core/index.d.ts +23 -0
- package/lib/core/index.js +40 -0
- package/lib/core/logger/index.d.ts +98 -0
- package/lib/core/logger/index.js +144 -0
- package/lib/core/logger/slack.d.ts +16 -0
- package/lib/core/logger/slack.js +57 -0
- package/lib/core/vault-metadata.d.ts +12 -0
- package/lib/core/vault-metadata.js +42 -0
- package/lib/core/version-check.d.ts +58 -0
- package/lib/core/version-check.js +182 -0
- package/lib/evm/index.d.ts +2 -0
- package/lib/evm/index.js +19 -0
- package/lib/evm/methods/crossChainVault.d.ts +128 -0
- package/lib/evm/methods/crossChainVault.js +853 -0
- package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
- package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
- package/lib/evm/methods/index.d.ts +2 -0
- package/lib/evm/methods/index.js +19 -0
- package/lib/evm/types/crossChain.d.ts +363 -0
- package/lib/evm/types/crossChain.js +20 -0
- package/lib/evm/types/index.d.ts +1 -0
- package/lib/evm/types/index.js +18 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +52 -0
- package/lib/main.d.ts +527 -0
- package/lib/main.js +601 -0
- package/lib/modules/api/fetcher.d.ts +82 -0
- package/lib/modules/api/fetcher.js +150 -0
- package/lib/modules/api/index.d.ts +1 -0
- package/lib/modules/api/index.js +6 -0
- package/lib/modules/api/main.d.ts +313 -0
- package/lib/modules/api/main.js +479 -0
- package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
- package/lib/modules/sub-accounts/fetcher.js +120 -0
- package/lib/modules/sub-accounts/index.d.ts +2 -0
- package/lib/modules/sub-accounts/index.js +19 -0
- package/lib/modules/sub-accounts/main.d.ts +243 -0
- package/lib/modules/sub-accounts/main.js +205 -0
- package/lib/modules/sub-accounts/utils.d.ts +106 -0
- package/lib/modules/sub-accounts/utils.js +112 -0
- package/lib/modules/vaults/adapter.helpers.d.ts +64 -0
- package/lib/modules/vaults/adapter.helpers.js +184 -0
- package/lib/modules/vaults/fetcher.d.ts +147 -0
- package/lib/modules/vaults/fetcher.js +368 -0
- package/lib/modules/vaults/getters.d.ts +570 -0
- package/lib/modules/vaults/getters.js +3051 -0
- package/lib/modules/vaults/index.d.ts +20 -0
- package/lib/modules/vaults/index.js +44 -0
- package/lib/modules/vaults/main.d.ts +601 -0
- package/lib/modules/vaults/main.js +1623 -0
- package/lib/modules/vaults/prefetch.d.ts +65 -0
- package/lib/modules/vaults/prefetch.js +120 -0
- package/lib/modules/vaults/read.actions.d.ts +225 -0
- package/lib/modules/vaults/read.actions.js +596 -0
- package/lib/modules/vaults/types.d.ts +71 -0
- package/lib/modules/vaults/types.js +3 -0
- package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
- package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
- package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
- package/lib/modules/vaults/utils/date-utils.js +84 -0
- package/lib/modules/vaults/utils.d.ts +140 -0
- package/lib/modules/vaults/utils.js +799 -0
- package/lib/modules/vaults/write.actions.d.ts +529 -0
- package/lib/modules/vaults/write.actions.js +1749 -0
- package/lib/polyfills.d.ts +1 -0
- package/lib/polyfills.js +12 -0
- package/lib/sdk.d.ts +26721 -0
- package/lib/services/coingecko/fetcher.d.ts +15 -0
- package/lib/services/coingecko/fetcher.js +67 -0
- package/lib/services/coingecko/index.d.ts +2 -0
- package/lib/services/coingecko/index.js +19 -0
- package/lib/services/coingecko/utils.d.ts +1 -0
- package/lib/services/coingecko/utils.js +24 -0
- package/lib/services/debank/fetcher.d.ts +126 -0
- package/lib/services/debank/fetcher.js +47 -0
- package/lib/services/debank/index.d.ts +2 -0
- package/lib/services/debank/index.js +19 -0
- package/lib/services/debank/utils.d.ts +38 -0
- package/lib/services/debank/utils.js +297 -0
- package/lib/services/layerzero/deposits.d.ts +49 -0
- package/lib/services/layerzero/deposits.js +166 -0
- package/lib/services/layerzero/redeems.d.ts +20 -0
- package/lib/services/layerzero/redeems.js +92 -0
- package/lib/services/layerzero/utils.d.ts +9 -0
- package/lib/services/layerzero/utils.js +22 -0
- package/lib/services/octavfi/fetcher.d.ts +9 -0
- package/lib/services/octavfi/fetcher.js +103 -0
- package/lib/services/octavfi/index.d.ts +3 -0
- package/lib/services/octavfi/index.js +20 -0
- package/lib/services/octavfi/types.d.ts +34 -0
- package/lib/services/octavfi/types.js +3 -0
- package/lib/services/octavfi/utils.d.ts +16 -0
- package/lib/services/octavfi/utils.js +212 -0
- package/lib/services/subgraph/fetcher.d.ts +2 -0
- package/lib/services/subgraph/fetcher.js +61 -0
- package/lib/services/subgraph/index.d.ts +2 -0
- package/lib/services/subgraph/index.js +19 -0
- package/lib/services/subgraph/schema.d.ts +45 -0
- package/lib/services/subgraph/schema.js +75 -0
- package/lib/services/subgraph/vaults.d.ts +25 -0
- package/lib/services/subgraph/vaults.js +1106 -0
- package/lib/services/swap-quotes/index.d.ts +105 -0
- package/lib/services/swap-quotes/index.js +77 -0
- package/lib/services/swap-quotes/paraswap.d.ts +51 -0
- package/lib/services/swap-quotes/paraswap.js +138 -0
- package/lib/types/api.d.ts +280 -0
- package/lib/types/api.js +3 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.js +28 -0
- package/lib/types/points.d.ts +28 -0
- package/lib/types/points.js +3 -0
- package/lib/types/pools.d.ts +144 -0
- package/lib/types/pools.js +3 -0
- package/lib/types/staking.d.ts +28 -0
- package/lib/types/staking.js +3 -0
- package/lib/types/sub-accounts.d.ts +140 -0
- package/lib/types/sub-accounts.js +3 -0
- package/lib/types/subgraph.d.ts +74 -0
- package/lib/types/subgraph.js +3 -0
- package/lib/types/typed-contract.d.ts +102 -0
- package/lib/types/typed-contract.js +3 -0
- package/lib/types/user.d.ts +1 -0
- package/lib/types/user.js +3 -0
- package/lib/types/vaults.d.ts +714 -0
- package/lib/types/vaults.js +24 -0
- package/lib/types/web3.d.ts +51 -0
- package/lib/types/web3.js +14 -0
- package/lib/types/webserver.d.ts +698 -0
- package/lib/types/webserver.js +3 -0
- package/package.json +78 -0
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
import type { IUserRoles } from './user';
|
|
2
|
+
import type { IAddress, ChainType, IStellarNetwork } from './web3';
|
|
3
|
+
/**
|
|
4
|
+
* Table of Contents
|
|
5
|
+
* 1) Subaccounts
|
|
6
|
+
* 2) Metrics
|
|
7
|
+
* 3) Tokens
|
|
8
|
+
* 4) Users
|
|
9
|
+
* 5) Statuses
|
|
10
|
+
* 6) Integrations
|
|
11
|
+
* 7) Lending Pools
|
|
12
|
+
*/
|
|
13
|
+
export type IHIstoricalSnapshot = {
|
|
14
|
+
total_assets: number;
|
|
15
|
+
total_shares: number;
|
|
16
|
+
asset_share_ratio: number;
|
|
17
|
+
underlying_price: number;
|
|
18
|
+
snapshot_datetime: string;
|
|
19
|
+
block_id: number;
|
|
20
|
+
id: string;
|
|
21
|
+
tvl: number;
|
|
22
|
+
};
|
|
23
|
+
export interface IWSMonitorHeaders {
|
|
24
|
+
'x-user-id'?: string;
|
|
25
|
+
'x-environment'?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Subaccounts
|
|
29
|
+
*/
|
|
30
|
+
export type IWSSubaccountPermission = {
|
|
31
|
+
name: string;
|
|
32
|
+
chain: number;
|
|
33
|
+
account_address?: string;
|
|
34
|
+
};
|
|
35
|
+
export type IWSSubaccountTwap = {
|
|
36
|
+
source_token: string;
|
|
37
|
+
dest_token: string;
|
|
38
|
+
subaccount_chain: number;
|
|
39
|
+
time_interval: number;
|
|
40
|
+
amount: number;
|
|
41
|
+
start_time?: string;
|
|
42
|
+
limit_price?: number;
|
|
43
|
+
number_of_orders: number;
|
|
44
|
+
complete_all_orders?: boolean;
|
|
45
|
+
slippage_tolerance?: number;
|
|
46
|
+
};
|
|
47
|
+
export type IWSSubaccountTwapHistoryItem = {
|
|
48
|
+
start_time: string;
|
|
49
|
+
time_interval: number;
|
|
50
|
+
source_token: string;
|
|
51
|
+
destination_token: string;
|
|
52
|
+
amount: number | null;
|
|
53
|
+
limit_price: number;
|
|
54
|
+
active: boolean;
|
|
55
|
+
number_of_orders: number;
|
|
56
|
+
complete_all_orders: boolean;
|
|
57
|
+
id: string;
|
|
58
|
+
updated_at: string;
|
|
59
|
+
created_at: string;
|
|
60
|
+
subaccount_id: string;
|
|
61
|
+
};
|
|
62
|
+
export type IWSSubaccountTwapFill = {
|
|
63
|
+
transaction_hash: string | null;
|
|
64
|
+
source_token: string;
|
|
65
|
+
destination_token: string;
|
|
66
|
+
source_amount_in: number | null;
|
|
67
|
+
destination_amount_out: number | null;
|
|
68
|
+
implied_price: number | null;
|
|
69
|
+
fee_amount: number | null;
|
|
70
|
+
id: string;
|
|
71
|
+
updated_at: string;
|
|
72
|
+
created_at: string;
|
|
73
|
+
twap_id: string;
|
|
74
|
+
fireblocks_transaction_id: string;
|
|
75
|
+
status: IWSFireblocksTxStatus;
|
|
76
|
+
message: string;
|
|
77
|
+
};
|
|
78
|
+
export type IWSSubaccountToken = {
|
|
79
|
+
address: string;
|
|
80
|
+
chain: number;
|
|
81
|
+
decimals: number;
|
|
82
|
+
discount_factor: number;
|
|
83
|
+
img_url: string | null;
|
|
84
|
+
price: number;
|
|
85
|
+
symbol: string;
|
|
86
|
+
token_type: number;
|
|
87
|
+
};
|
|
88
|
+
interface IWSSubaccountCefiAsset {
|
|
89
|
+
type: string;
|
|
90
|
+
name: string;
|
|
91
|
+
underlying: string;
|
|
92
|
+
symbol: string;
|
|
93
|
+
asset_type: string;
|
|
94
|
+
}
|
|
95
|
+
interface IWSSubaccountCefiSpotToken {
|
|
96
|
+
asset: IWSSubaccountCefiAsset;
|
|
97
|
+
value: number;
|
|
98
|
+
balance: number;
|
|
99
|
+
}
|
|
100
|
+
interface IWSSubaccountCefiDerivative {
|
|
101
|
+
value: number;
|
|
102
|
+
asset_type: string;
|
|
103
|
+
asset: IWSSubaccountCefiAsset;
|
|
104
|
+
units: number;
|
|
105
|
+
avg_cost: number;
|
|
106
|
+
entry_cost: number;
|
|
107
|
+
}
|
|
108
|
+
export interface IWSSubaccountCefi {
|
|
109
|
+
value: number;
|
|
110
|
+
name: string;
|
|
111
|
+
spot_tokens: IWSSubaccountCefiSpotToken[];
|
|
112
|
+
derivative_positions: IWSSubaccountCefiDerivative[];
|
|
113
|
+
}
|
|
114
|
+
export interface IWSSubaccountLoan {
|
|
115
|
+
address: IAddress;
|
|
116
|
+
lender: IAddress;
|
|
117
|
+
borrower: IAddress;
|
|
118
|
+
state: string;
|
|
119
|
+
total_repaid: number;
|
|
120
|
+
principal_token: IWSTokenEntry;
|
|
121
|
+
principal_amount: number;
|
|
122
|
+
interest_amount: number;
|
|
123
|
+
upcoming_payment: {
|
|
124
|
+
amount: number;
|
|
125
|
+
due_date: string;
|
|
126
|
+
};
|
|
127
|
+
apr: number;
|
|
128
|
+
initial_principal_amount: number;
|
|
129
|
+
deployed_date: string;
|
|
130
|
+
payment_interval: number;
|
|
131
|
+
lender_apr: number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Metrics
|
|
135
|
+
*/
|
|
136
|
+
export type IWSMetricsPnlAttributes = {
|
|
137
|
+
pnl: number;
|
|
138
|
+
percent_return: number;
|
|
139
|
+
realized_apr: number;
|
|
140
|
+
} | null;
|
|
141
|
+
export type IWSMetricsPnl = {
|
|
142
|
+
id: string;
|
|
143
|
+
datetime: string | Date;
|
|
144
|
+
pnl: number;
|
|
145
|
+
pnl_vs_spot: number;
|
|
146
|
+
swaps_pnl: number;
|
|
147
|
+
timestamp: number;
|
|
148
|
+
debt_interest_owed: number;
|
|
149
|
+
credit_interest_owed: number;
|
|
150
|
+
total_account_value: number;
|
|
151
|
+
net_deposits: number;
|
|
152
|
+
net_deposits_pv: number;
|
|
153
|
+
hedger_pnl: number;
|
|
154
|
+
lifetime: IWSMetricsPnlAttributes;
|
|
155
|
+
lifetime_vs_spot: IWSMetricsPnlAttributes;
|
|
156
|
+
three_day: IWSMetricsPnlAttributes;
|
|
157
|
+
three_day_vs_spot: IWSMetricsPnlAttributes;
|
|
158
|
+
seven_day: IWSMetricsPnlAttributes;
|
|
159
|
+
seven_day_vs_spot: IWSMetricsPnlAttributes;
|
|
160
|
+
thirty_day: IWSMetricsPnlAttributes;
|
|
161
|
+
thirty_day_vs_spot: IWSMetricsPnlAttributes;
|
|
162
|
+
};
|
|
163
|
+
export type IWSMetricsStrategy = {
|
|
164
|
+
subaccount: string;
|
|
165
|
+
strategy: string;
|
|
166
|
+
datetime: string | Date;
|
|
167
|
+
chain_id: number;
|
|
168
|
+
estimated_apr: number;
|
|
169
|
+
strategy_pnl: number;
|
|
170
|
+
pending_rewards: number;
|
|
171
|
+
strategy_notional: number;
|
|
172
|
+
pnl_vs_spot: number;
|
|
173
|
+
pnl_vs_spot_3d: number;
|
|
174
|
+
pnl_vs_spot_7d: number;
|
|
175
|
+
pnl_vs_spot_30d: number;
|
|
176
|
+
realized_apr: number;
|
|
177
|
+
realized_apr_3d: number;
|
|
178
|
+
realized_apr_7d: number;
|
|
179
|
+
realized_apr_30d: number;
|
|
180
|
+
pool_weights: Record<string, number>;
|
|
181
|
+
lp_price: number;
|
|
182
|
+
strategy_name: string;
|
|
183
|
+
net_deposits: number;
|
|
184
|
+
};
|
|
185
|
+
export type IWSMetricsToken = {
|
|
186
|
+
subaccount: string;
|
|
187
|
+
strategy: string;
|
|
188
|
+
datetime: string | Date;
|
|
189
|
+
chain_id: number;
|
|
190
|
+
symbol: string;
|
|
191
|
+
units_held: number;
|
|
192
|
+
value_held: number;
|
|
193
|
+
units_implied: number;
|
|
194
|
+
value_implied: number;
|
|
195
|
+
collateral_posted_amount: number;
|
|
196
|
+
margin_posted_amount: number;
|
|
197
|
+
collateral_posted_value: number;
|
|
198
|
+
margin_posted_value: number;
|
|
199
|
+
pool_weight: number;
|
|
200
|
+
};
|
|
201
|
+
export type IWSMetricsTRS = {
|
|
202
|
+
datetime: string | Date;
|
|
203
|
+
reciever: string;
|
|
204
|
+
payer: string;
|
|
205
|
+
trs_address: string;
|
|
206
|
+
chain_id: number;
|
|
207
|
+
initial_underyling_price: number;
|
|
208
|
+
reference_underlying_price: number;
|
|
209
|
+
current_underlying_price: number;
|
|
210
|
+
required_reciever_margin: number;
|
|
211
|
+
required_payer_margin: number;
|
|
212
|
+
mark_to_market_pnl: number;
|
|
213
|
+
initial_margin: number;
|
|
214
|
+
swap_contract_units: number;
|
|
215
|
+
state: string;
|
|
216
|
+
direction: string;
|
|
217
|
+
underlying_token: string;
|
|
218
|
+
};
|
|
219
|
+
export type IWSMetricsHealthFactor = {
|
|
220
|
+
id: string;
|
|
221
|
+
datetime: string;
|
|
222
|
+
health_factor: number;
|
|
223
|
+
total_account_value: number;
|
|
224
|
+
total_equity_value: number;
|
|
225
|
+
total_loan_value: number;
|
|
226
|
+
total_loan_interest_amount: number;
|
|
227
|
+
total_pnl: number;
|
|
228
|
+
aggregate_payer_margin: number;
|
|
229
|
+
aggregate_receiver_margin: number;
|
|
230
|
+
intrest_paid: number;
|
|
231
|
+
total_net_deposits: number;
|
|
232
|
+
net_account_value: number;
|
|
233
|
+
life_time_apr: number;
|
|
234
|
+
percent_return: number;
|
|
235
|
+
margin_fraction: number;
|
|
236
|
+
maintenance_margin_fraction: number;
|
|
237
|
+
total_collateral_value: number;
|
|
238
|
+
total_pnl_3d: number;
|
|
239
|
+
total_pnl_7d: number;
|
|
240
|
+
total_pnl_30d: number;
|
|
241
|
+
realized_apr_3d: number;
|
|
242
|
+
realized_apr_7d: number;
|
|
243
|
+
realized_apr_30d: number;
|
|
244
|
+
};
|
|
245
|
+
export type IWSMetricsHedgerPnl = {
|
|
246
|
+
subaccount: string;
|
|
247
|
+
strategy: string;
|
|
248
|
+
datetime: string | Date;
|
|
249
|
+
chain_id: number;
|
|
250
|
+
symbol: string;
|
|
251
|
+
funding_payments: number;
|
|
252
|
+
fees: number;
|
|
253
|
+
unrealized: number;
|
|
254
|
+
realized: number;
|
|
255
|
+
pnl: number;
|
|
256
|
+
implied_delta: number;
|
|
257
|
+
hedge_delta: number;
|
|
258
|
+
oi_biased_implied_delta: number;
|
|
259
|
+
oi_bias: number;
|
|
260
|
+
};
|
|
261
|
+
export type IWSMetricsHedger = {
|
|
262
|
+
subaccount: string;
|
|
263
|
+
strategy: string;
|
|
264
|
+
datetime: string | Date;
|
|
265
|
+
chain_id: number;
|
|
266
|
+
strategy_notional: number;
|
|
267
|
+
strategy_pnl: number;
|
|
268
|
+
hedger_pnl: number;
|
|
269
|
+
trs_pnl: number;
|
|
270
|
+
realized_pnl: number;
|
|
271
|
+
unrealized_pnl: number;
|
|
272
|
+
fees: number;
|
|
273
|
+
funding: number;
|
|
274
|
+
corrections: number;
|
|
275
|
+
total_hedge_delta: number;
|
|
276
|
+
total_implied_delta: number;
|
|
277
|
+
net_pnl: number;
|
|
278
|
+
realized_apr_3d: number;
|
|
279
|
+
realized_apr_7d: number;
|
|
280
|
+
realized_apr_30d: number;
|
|
281
|
+
};
|
|
282
|
+
export type IWSMetricsTimeseries = {
|
|
283
|
+
aggregate_payer_margin: number;
|
|
284
|
+
aggregate_receiver_margin: number;
|
|
285
|
+
datetime: string | Date;
|
|
286
|
+
health_factor: number;
|
|
287
|
+
id: string;
|
|
288
|
+
intrest_paid: number;
|
|
289
|
+
life_time_apr: number;
|
|
290
|
+
maintenance_margin_fraction: number;
|
|
291
|
+
margin_fraction: number;
|
|
292
|
+
net_account_value: number;
|
|
293
|
+
percent_return: number;
|
|
294
|
+
realized_apr_3d: number | null;
|
|
295
|
+
realized_apr_7d: number | null;
|
|
296
|
+
realized_apr_30d: number | null;
|
|
297
|
+
total_account_value: number;
|
|
298
|
+
total_collateral_value: number;
|
|
299
|
+
total_equity_value: number;
|
|
300
|
+
total_loan_interest_amount: number;
|
|
301
|
+
total_loan_value: number;
|
|
302
|
+
total_net_deposits: number;
|
|
303
|
+
total_pnl: number;
|
|
304
|
+
total_pnl_3d: number | null;
|
|
305
|
+
total_pnl_7d: number | null;
|
|
306
|
+
total_pnl_30d: number | null;
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Tokens
|
|
310
|
+
*/
|
|
311
|
+
export type IWSTokenEntry = {
|
|
312
|
+
symbol: string;
|
|
313
|
+
address: `0x${string}`;
|
|
314
|
+
decimals: number;
|
|
315
|
+
img_url?: string;
|
|
316
|
+
price?: number;
|
|
317
|
+
chain?: number;
|
|
318
|
+
balance?: number;
|
|
319
|
+
value?: number;
|
|
320
|
+
label?: string;
|
|
321
|
+
discount_factor?: string;
|
|
322
|
+
type?: string;
|
|
323
|
+
};
|
|
324
|
+
export type IWSTokenPrice = {
|
|
325
|
+
price: number;
|
|
326
|
+
dt: string;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Users
|
|
330
|
+
*/
|
|
331
|
+
export type IWSUserSubaccount = {
|
|
332
|
+
internal_name: string;
|
|
333
|
+
friendly_name: string;
|
|
334
|
+
address: string;
|
|
335
|
+
chains: {
|
|
336
|
+
chain_id: number;
|
|
337
|
+
name: string;
|
|
338
|
+
id: string;
|
|
339
|
+
}[];
|
|
340
|
+
status: string;
|
|
341
|
+
subaccount_type: string;
|
|
342
|
+
min_health_factor: number;
|
|
343
|
+
estimated_apr: number;
|
|
344
|
+
id: string;
|
|
345
|
+
user_id: string;
|
|
346
|
+
implementation: string;
|
|
347
|
+
turnkey_address: string;
|
|
348
|
+
};
|
|
349
|
+
export type IWSUser = {
|
|
350
|
+
eoa: string;
|
|
351
|
+
full_name: string;
|
|
352
|
+
type_: IUserRoles;
|
|
353
|
+
nonce: string;
|
|
354
|
+
disabled: boolean;
|
|
355
|
+
id: string;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Statuses
|
|
359
|
+
*/
|
|
360
|
+
export type IWSFireblocksTxStatus = 'SUBMITTED' | 'PENDING_AML_SCREENING' | 'PENDING_AUTHORIZATION' | 'QUEUED' | 'PENDING_SIGNATURE' | 'PENDING_3RD_PARTY_MANUAL_APPROVAL' | 'PENDING_3RD_PARTY' | 'BROADCASTING' | 'CONFIRMING' | 'COMPLETED' | 'CANCELLING' | 'BLOCKED' | 'REJECTED' | 'FAILED';
|
|
361
|
+
/**
|
|
362
|
+
* Integrations
|
|
363
|
+
*/
|
|
364
|
+
export interface IWSIntegrationMorphoApy {
|
|
365
|
+
apy: number;
|
|
366
|
+
vault_positions: any[];
|
|
367
|
+
token: IWSTokenEntry;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Lending Pools
|
|
371
|
+
*/
|
|
372
|
+
export interface IWSVaultLoan {
|
|
373
|
+
address: IAddress;
|
|
374
|
+
lender: IAddress;
|
|
375
|
+
borrower: IAddress;
|
|
376
|
+
state: string;
|
|
377
|
+
total_repaid: number;
|
|
378
|
+
principal_token: IWSTokenEntry;
|
|
379
|
+
principal_amount: number;
|
|
380
|
+
interest_amount: number;
|
|
381
|
+
upcoming_payment: {
|
|
382
|
+
amount: number;
|
|
383
|
+
due_date: string;
|
|
384
|
+
};
|
|
385
|
+
apr: number;
|
|
386
|
+
initial_principal_amount: number;
|
|
387
|
+
deployed_date: string;
|
|
388
|
+
payment_interval: number;
|
|
389
|
+
}
|
|
390
|
+
export interface IDebankTokenExposure {
|
|
391
|
+
amount: number;
|
|
392
|
+
chain: string;
|
|
393
|
+
decimals: number;
|
|
394
|
+
id: IAddress;
|
|
395
|
+
logoUrl: string;
|
|
396
|
+
name: string;
|
|
397
|
+
symbol: string;
|
|
398
|
+
}
|
|
399
|
+
export interface IDebankProtocolExposure {
|
|
400
|
+
assetUsdValue: number;
|
|
401
|
+
chain: string;
|
|
402
|
+
debtUsdValue: number;
|
|
403
|
+
id: string;
|
|
404
|
+
logoUrl: string;
|
|
405
|
+
netUsdValue: number;
|
|
406
|
+
protocol: string;
|
|
407
|
+
siteUrl: string;
|
|
408
|
+
address: string;
|
|
409
|
+
tokenExposure: Record<string, string[] | string>;
|
|
410
|
+
protocolExposure: Record<string, string[] | string>;
|
|
411
|
+
}
|
|
412
|
+
export interface ITokenizedVaultSubaccount {
|
|
413
|
+
address: string;
|
|
414
|
+
strategist: ITokenizedVaultStrategist;
|
|
415
|
+
}
|
|
416
|
+
export type IOperatorTypeEnum = 'eoa' | 'subaccount';
|
|
417
|
+
export interface ITokenizedVaultOperator {
|
|
418
|
+
address: `0x${string}`;
|
|
419
|
+
operator_type: IOperatorTypeEnum;
|
|
420
|
+
}
|
|
421
|
+
export interface ITokenizedVaultEoaOperator {
|
|
422
|
+
address: string;
|
|
423
|
+
id: string;
|
|
424
|
+
name: string;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Controls how the vault's APY is displayed in the UI.
|
|
428
|
+
* When `is_show_target_apy` is true, the UI should show a target/projected APY.
|
|
429
|
+
* When `is_show_hardcoded_apy` is true, `hardcoded_apy` overrides the computed APY.
|
|
430
|
+
* When `is_show_compound_apy` is true, the UI should render the
|
|
431
|
+
* compound-annualized historical APY (`historical_compound_apy`) instead of
|
|
432
|
+
* the simple one.
|
|
433
|
+
*/
|
|
434
|
+
export interface IApyOverride {
|
|
435
|
+
/** Whether to display a target APY rather than historical performance. */
|
|
436
|
+
is_show_target_apy: boolean;
|
|
437
|
+
/** Whether to display `hardcoded_apy` in place of the computed APY. */
|
|
438
|
+
is_show_hardcoded_apy: boolean;
|
|
439
|
+
/** The fixed APY value to display when `is_show_hardcoded_apy` is true, or null. */
|
|
440
|
+
hardcoded_apy: number | null;
|
|
441
|
+
/**
|
|
442
|
+
* Whether to display the compound-annualized historical APY
|
|
443
|
+
* (`historical_compound_apy`) instead of the simple `historical_apy`.
|
|
444
|
+
* Absent (older/cached responses) or false means simple. Independent of the
|
|
445
|
+
* target/hardcoded flags above, which keep their existing precedence.
|
|
446
|
+
*/
|
|
447
|
+
is_show_compound_apy?: boolean;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Per-vault provenance timestamps returned by the backend on every tokenized-vault
|
|
451
|
+
* read (list and single-vault, on both the `api.augustdigital.io/tokenized_vault`
|
|
452
|
+
* and `api.upshift.finance/tokenized_vaults` surfaces).
|
|
453
|
+
*
|
|
454
|
+
* The three stamps describe *different* pipelines and are independently nullable —
|
|
455
|
+
* one of them cannot stand in for another. Consumers use the ordering between them
|
|
456
|
+
* to detect that the vault's share price has moved ahead of its APY: a
|
|
457
|
+
* `share_ratio_snapshot_at` later than `apy_computed_at` means a share-price
|
|
458
|
+
* snapshot has landed that the APY has not yet been recomputed from.
|
|
459
|
+
*
|
|
460
|
+
* All values are RFC 3339 UTC strings with a trailing `Z` (e.g.
|
|
461
|
+
* `'2026-07-25T00:01:46Z'`). The trailing `Z` matters: `new Date()` parses an
|
|
462
|
+
* offset-less date-time as *local* time, which would silently shift the stamp by
|
|
463
|
+
* the viewer's UTC offset.
|
|
464
|
+
*
|
|
465
|
+
* @see ITokenizedVault.freshness
|
|
466
|
+
*/
|
|
467
|
+
export interface ITokenizedVaultFreshness {
|
|
468
|
+
/**
|
|
469
|
+
* When `historical_apy`, TVL and drawdown were last recomputed, or null if they
|
|
470
|
+
* have never been computed for this vault.
|
|
471
|
+
*/
|
|
472
|
+
apy_computed_at: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* `snapshot_datetime` of the newest persisted share-price snapshot, or null when
|
|
475
|
+
* the vault has no snapshot yet.
|
|
476
|
+
*
|
|
477
|
+
* The backend stamps this from a scalar `max(snapshot_datetime)`, so it is
|
|
478
|
+
* populated independently of `load_snapshots` — including on the basic and
|
|
479
|
+
* sub-accounts views (`load_snapshots=false`), which is what every app call site
|
|
480
|
+
* sends. Never substitute another timestamp for it.
|
|
481
|
+
*/
|
|
482
|
+
share_ratio_snapshot_at: string | null;
|
|
483
|
+
/**
|
|
484
|
+
* When the backend assembled the response body, before it entered the backend's
|
|
485
|
+
* own response cache. Distinct from the top-level `cached_at` only in scope:
|
|
486
|
+
* this one travels with the vault object.
|
|
487
|
+
*/
|
|
488
|
+
cached_at: string | null;
|
|
489
|
+
}
|
|
490
|
+
export interface ITokenizedVaultStrategist {
|
|
491
|
+
strategist_name: string;
|
|
492
|
+
strategist_logo: string;
|
|
493
|
+
/** URL of the strategist's website, or null if not provided. */
|
|
494
|
+
website_url: string | null;
|
|
495
|
+
id: string;
|
|
496
|
+
}
|
|
497
|
+
export interface IOTCTrade {
|
|
498
|
+
value: number;
|
|
499
|
+
payer: string;
|
|
500
|
+
receiver: string;
|
|
501
|
+
units: number;
|
|
502
|
+
price: number;
|
|
503
|
+
trade_name: string;
|
|
504
|
+
symbol: string;
|
|
505
|
+
strike: number;
|
|
506
|
+
expiry: string;
|
|
507
|
+
asset_type: string;
|
|
508
|
+
underlying: string;
|
|
509
|
+
average_cost: number;
|
|
510
|
+
}
|
|
511
|
+
export interface IOTCPosition {
|
|
512
|
+
value: number;
|
|
513
|
+
underlying: string;
|
|
514
|
+
settlement_type: string;
|
|
515
|
+
settlement_currency: string;
|
|
516
|
+
asset_type: string;
|
|
517
|
+
symbol: string;
|
|
518
|
+
trades: IOTCTrade[];
|
|
519
|
+
}
|
|
520
|
+
export interface ITokenizedVaultReward {
|
|
521
|
+
tokenizedvault_id: string;
|
|
522
|
+
id: string;
|
|
523
|
+
text: string;
|
|
524
|
+
img_url: string;
|
|
525
|
+
multiplier: number;
|
|
526
|
+
created_at: string;
|
|
527
|
+
start_datetime: string;
|
|
528
|
+
}
|
|
529
|
+
export interface ITokenizedVaultReportedAPY {
|
|
530
|
+
apy: number;
|
|
531
|
+
underlying_apy: number;
|
|
532
|
+
liquid_apy: number;
|
|
533
|
+
points_apy: number | null;
|
|
534
|
+
rewards_compounded: number;
|
|
535
|
+
rewards_claimable: number;
|
|
536
|
+
explainer: string;
|
|
537
|
+
id: string;
|
|
538
|
+
tokenized_vault_id: string;
|
|
539
|
+
created_at: Date;
|
|
540
|
+
updated_at: Date;
|
|
541
|
+
}
|
|
542
|
+
export interface ITokenizedVaultReceiptTokenIntegration {
|
|
543
|
+
address: string;
|
|
544
|
+
chain: number;
|
|
545
|
+
token_class: string;
|
|
546
|
+
shorthand: string;
|
|
547
|
+
symbol: string;
|
|
548
|
+
tiingo_ticker: string;
|
|
549
|
+
img_url: string;
|
|
550
|
+
is_transferable: boolean;
|
|
551
|
+
id: string;
|
|
552
|
+
position_id: string;
|
|
553
|
+
stable_token_pair_id: string;
|
|
554
|
+
}
|
|
555
|
+
export interface IComposabilityIntegration {
|
|
556
|
+
name: string;
|
|
557
|
+
description: string;
|
|
558
|
+
earning_multiplier: number;
|
|
559
|
+
protocol_url: string;
|
|
560
|
+
logo_url: string;
|
|
561
|
+
tokenized_vault_id: string;
|
|
562
|
+
id: string;
|
|
563
|
+
}
|
|
564
|
+
export interface ISolanaVaultMetadata {
|
|
565
|
+
vault_state_pda: string;
|
|
566
|
+
share_mint: string;
|
|
567
|
+
deposit_mint: string;
|
|
568
|
+
deposit_token_symbol?: string;
|
|
569
|
+
deposit_token_decimals?: number;
|
|
570
|
+
program_id?: string;
|
|
571
|
+
}
|
|
572
|
+
export interface IStellarVaultMetadata {
|
|
573
|
+
deposit_token_address: string | null;
|
|
574
|
+
deposit_token_symbol?: string;
|
|
575
|
+
deposit_token_decimals?: number;
|
|
576
|
+
network_name: IStellarNetwork;
|
|
577
|
+
utila_vault_id?: string;
|
|
578
|
+
utila_wallet_id?: string;
|
|
579
|
+
}
|
|
580
|
+
export interface ITokenizedVault {
|
|
581
|
+
address: string;
|
|
582
|
+
yield_distributor: string;
|
|
583
|
+
chain: number;
|
|
584
|
+
enable_external_assets_update: boolean;
|
|
585
|
+
chain_type: ChainType;
|
|
586
|
+
default_apy_horizon: 7 | 30 | null;
|
|
587
|
+
enabled_historical_price_horizons: any[];
|
|
588
|
+
description: string;
|
|
589
|
+
internal_type: 'lendingPool' | 'tokenizedVault' | 'tokenizedVaultV2' | 'multiAssetVault';
|
|
590
|
+
public_type: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
591
|
+
is_featured: boolean;
|
|
592
|
+
is_spotlighted?: boolean;
|
|
593
|
+
withdrawal_only?: boolean | null;
|
|
594
|
+
is_visible: boolean;
|
|
595
|
+
weekly_performance_fee_bps: number;
|
|
596
|
+
platform_fee_override: {
|
|
597
|
+
management_fee: number;
|
|
598
|
+
is_fee_waived: boolean;
|
|
599
|
+
};
|
|
600
|
+
management_fee_waived_until_date: string | null;
|
|
601
|
+
management_fee_waived_until_tvl: number | null;
|
|
602
|
+
performance_fee_waived_until_date: string | null;
|
|
603
|
+
performance_fee_waived_until_tvl: number | null;
|
|
604
|
+
start_datetime: Date;
|
|
605
|
+
vault_name: string;
|
|
606
|
+
vault_logo_url: string;
|
|
607
|
+
reserve_target: number;
|
|
608
|
+
reserve_tolerance: number;
|
|
609
|
+
status: 'active' | 'closed';
|
|
610
|
+
is_charge_fees_manual: boolean;
|
|
611
|
+
id: string;
|
|
612
|
+
receipt_token_symbol: string;
|
|
613
|
+
rewards: ITokenizedVaultReward[];
|
|
614
|
+
subaccounts: ITokenizedVaultSubaccount[];
|
|
615
|
+
reported_apy: ITokenizedVaultReportedAPY | null;
|
|
616
|
+
campaign_apy: number | null;
|
|
617
|
+
receipt_token_integrations: ITokenizedVaultReceiptTokenIntegration[];
|
|
618
|
+
hardcoded_strategists: ITokenizedVaultStrategist[];
|
|
619
|
+
max_daily_drawdown: number | null;
|
|
620
|
+
risk: string;
|
|
621
|
+
operators: ITokenizedVaultOperator[];
|
|
622
|
+
eoa_operators: ITokenizedVaultEoaOperator[];
|
|
623
|
+
composability_integrations?: IComposabilityIntegration[];
|
|
624
|
+
solana_vault_metadata?: ISolanaVaultMetadata | null;
|
|
625
|
+
stellar_vault_metadata?: IStellarVaultMetadata | null;
|
|
626
|
+
lagDuration: number;
|
|
627
|
+
/**
|
|
628
|
+
* Display buffer in seconds added on top of the on-chain lag for the
|
|
629
|
+
* withdrawal period shown to users. Null when not configured.
|
|
630
|
+
*/
|
|
631
|
+
withdrawal_margin_seconds?: number | null;
|
|
632
|
+
/**
|
|
633
|
+
* IAT trader wallet addresses for the vault. Address format follows the
|
|
634
|
+
* vault's chain (EVM hex / Solana base58 / Stellar). Null when not
|
|
635
|
+
* configured.
|
|
636
|
+
*/
|
|
637
|
+
iat_traders?: string[] | null;
|
|
638
|
+
historical_apy: Record<number, number> | null;
|
|
639
|
+
/**
|
|
640
|
+
* Compound-annualized historical APY keyed by horizon in days (1/7/30), as
|
|
641
|
+
* decimal fractions (0.0795 = 7.95%). Same shape and per-horizon null
|
|
642
|
+
* semantics as `historical_apy`. Absent on older/cached responses.
|
|
643
|
+
*/
|
|
644
|
+
historical_compound_apy?: Record<number, number> | null;
|
|
645
|
+
/** @deprecated Use getVaultHistoricalTimeseries instead */
|
|
646
|
+
historical_snapshots?: IHIstoricalSnapshot[];
|
|
647
|
+
max_drawdown: number | null;
|
|
648
|
+
daily_pnl_per_share: Record<string, number>;
|
|
649
|
+
latest_reported_tvl: number | null;
|
|
650
|
+
cached_at?: string | null;
|
|
651
|
+
/**
|
|
652
|
+
* Per-vault provenance timestamps (APY recompute, newest share-price snapshot,
|
|
653
|
+
* response assembly). Absent on older/cached responses predating the backend
|
|
654
|
+
* change that added it.
|
|
655
|
+
*/
|
|
656
|
+
freshness?: ITokenizedVaultFreshness | null;
|
|
657
|
+
instant_redeem_config: null | {
|
|
658
|
+
subaccount_address: string;
|
|
659
|
+
output_asset_symbol: string;
|
|
660
|
+
is_paused: boolean;
|
|
661
|
+
available_liquidity: number;
|
|
662
|
+
redeemable_assets: Array<{
|
|
663
|
+
address: string;
|
|
664
|
+
symbol: string;
|
|
665
|
+
decimals: number;
|
|
666
|
+
spread_bps: number;
|
|
667
|
+
}>;
|
|
668
|
+
};
|
|
669
|
+
show_cap_filled: boolean | null;
|
|
670
|
+
/** Controls APY display behaviour in the UI; null when the server has not set an override. */
|
|
671
|
+
apy_override: IApyOverride | null;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* @deprecated
|
|
675
|
+
*/
|
|
676
|
+
export interface IWSVaultHistoricalApy {
|
|
677
|
+
data: {
|
|
678
|
+
labels: string[];
|
|
679
|
+
values: number[];
|
|
680
|
+
};
|
|
681
|
+
average_apy: number;
|
|
682
|
+
status: number;
|
|
683
|
+
error: string | null;
|
|
684
|
+
}
|
|
685
|
+
export interface IHistoricalTimeseriesPoint {
|
|
686
|
+
tvl: number | null;
|
|
687
|
+
daily_apy: number | null;
|
|
688
|
+
daily_pnl: number | null;
|
|
689
|
+
share_price: number | null;
|
|
690
|
+
total_assets: number | null;
|
|
691
|
+
total_shares: number | null;
|
|
692
|
+
asset_share_ratio: number | null;
|
|
693
|
+
missing: boolean;
|
|
694
|
+
}
|
|
695
|
+
export interface IHistoricalTimeseriesResponse {
|
|
696
|
+
data: Record<string, IHistoricalTimeseriesPoint>;
|
|
697
|
+
}
|
|
698
|
+
export {};
|