upshift-finance 1.0.0
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,28 @@
|
|
|
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("./typed-contract"), exports);
|
|
19
|
+
__exportStar(require("./user"), exports);
|
|
20
|
+
__exportStar(require("./webserver"), exports);
|
|
21
|
+
__exportStar(require("./pools"), exports);
|
|
22
|
+
__exportStar(require("./staking"), exports);
|
|
23
|
+
__exportStar(require("./subgraph"), exports);
|
|
24
|
+
__exportStar(require("./vaults"), exports);
|
|
25
|
+
__exportStar(require("./points"), exports);
|
|
26
|
+
__exportStar(require("./sub-accounts"), exports);
|
|
27
|
+
__exportStar(require("./api"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IUserPoints {
|
|
2
|
+
totalPoints?: number;
|
|
3
|
+
referralEarnings?: number;
|
|
4
|
+
pools?: Record<string, {
|
|
5
|
+
amountDepositedInUsd?: number;
|
|
6
|
+
nativeAmountDeposited?: number;
|
|
7
|
+
totalPoints?: number;
|
|
8
|
+
hasPendingRewards?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
external?: Record<string, {
|
|
11
|
+
protocol?: string;
|
|
12
|
+
externalName?: string;
|
|
13
|
+
amountDepositedInUsd?: number;
|
|
14
|
+
nativeAmountDeposited?: number;
|
|
15
|
+
totalPoints?: number;
|
|
16
|
+
}>;
|
|
17
|
+
referrals?: Record<string, {
|
|
18
|
+
totalPoints?: number;
|
|
19
|
+
amountDepositedInUsd?: number;
|
|
20
|
+
nativeAmountDeposited?: number;
|
|
21
|
+
}>;
|
|
22
|
+
topVault?: {
|
|
23
|
+
lifetimeDeposit?: number;
|
|
24
|
+
address?: string;
|
|
25
|
+
} | null;
|
|
26
|
+
streak?: number;
|
|
27
|
+
rank?: number | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated
|
|
3
|
+
*/
|
|
4
|
+
import type { IAddress, INormalizedNumber } from './web3';
|
|
5
|
+
import type { IDebankProtocolExposure, IDebankTokenExposure, ITokenizedVaultStrategist, IWSSubaccountCefi } from './webserver';
|
|
6
|
+
type ILabelValue = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
usd: number;
|
|
10
|
+
};
|
|
11
|
+
export type IPoolLoan = {
|
|
12
|
+
address: IAddress;
|
|
13
|
+
apr: number;
|
|
14
|
+
collateral: IAddress;
|
|
15
|
+
principal: INormalizedNumber;
|
|
16
|
+
allocation: number;
|
|
17
|
+
repaid: INormalizedNumber;
|
|
18
|
+
exposure?: ILabelValue[];
|
|
19
|
+
positions?: ILabelValue[];
|
|
20
|
+
idleCapital?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type IPoolRewards = {
|
|
23
|
+
upshift_points: string;
|
|
24
|
+
latestUpshiftPointMultiplier: number;
|
|
25
|
+
upshift_points_multipliers: {
|
|
26
|
+
multiplier: number;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
}[];
|
|
29
|
+
additional_points: string[];
|
|
30
|
+
};
|
|
31
|
+
export type IPool = {
|
|
32
|
+
address: IAddress;
|
|
33
|
+
name: string;
|
|
34
|
+
logoUrl: string;
|
|
35
|
+
asset: IAddress;
|
|
36
|
+
loansOperator?: IAddress;
|
|
37
|
+
globalLoansAmount: INormalizedNumber;
|
|
38
|
+
symbol: string;
|
|
39
|
+
totalAssets?: INormalizedNumber;
|
|
40
|
+
totalSupply: INormalizedNumber;
|
|
41
|
+
maxSupply: INormalizedNumber;
|
|
42
|
+
decimals: number;
|
|
43
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
44
|
+
chainId: number;
|
|
45
|
+
withdrawalFee: INormalizedNumber;
|
|
46
|
+
loans?: IPoolLoan[];
|
|
47
|
+
collateral?: IAddress[];
|
|
48
|
+
apy?: number;
|
|
49
|
+
sUSDeAPY?: number;
|
|
50
|
+
leverageLoopAPR?: number;
|
|
51
|
+
leverage?: string;
|
|
52
|
+
managementFee?: number | undefined;
|
|
53
|
+
stakeAPY?: number;
|
|
54
|
+
idleAssets?: INormalizedNumber;
|
|
55
|
+
description?: string;
|
|
56
|
+
hardcodedStrategist?: string;
|
|
57
|
+
protocolExposure?: IDebankProtocolExposure[];
|
|
58
|
+
tokenExposure?: IDebankTokenExposure[];
|
|
59
|
+
cefiExposure?: IWSSubaccountCefi[];
|
|
60
|
+
vaultsSubAccWhitelist?: IAddress[];
|
|
61
|
+
internalType?: 'lendingPool' | 'tokenizedVault';
|
|
62
|
+
publicType?: 'Lending' | 'Defi Yield' | 'Pre-deposit';
|
|
63
|
+
strategist: ITokenizedVaultStrategist;
|
|
64
|
+
isFeatured?: boolean;
|
|
65
|
+
isVisible?: boolean;
|
|
66
|
+
rewards?: IPoolRewards;
|
|
67
|
+
};
|
|
68
|
+
export type IPoolWithUnderlying = IPool & {
|
|
69
|
+
underlying: {
|
|
70
|
+
address: IAddress;
|
|
71
|
+
symbol: string;
|
|
72
|
+
decimals: number;
|
|
73
|
+
chain: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export interface ISubgraphFormattedPool {
|
|
77
|
+
decimals: number;
|
|
78
|
+
symbol: string;
|
|
79
|
+
name: string;
|
|
80
|
+
asset: IAddress;
|
|
81
|
+
totalSupply: INormalizedNumber;
|
|
82
|
+
totalAssets: INormalizedNumber;
|
|
83
|
+
maxSupply: INormalizedNumber;
|
|
84
|
+
globalLoansAmount: INormalizedNumber;
|
|
85
|
+
getTotalLoansDeployed: INormalizedNumber;
|
|
86
|
+
withdrawalFee: INormalizedNumber;
|
|
87
|
+
chainId: number;
|
|
88
|
+
address: IAddress;
|
|
89
|
+
managementFee: number;
|
|
90
|
+
underlying: {
|
|
91
|
+
address: IAddress;
|
|
92
|
+
chain: number;
|
|
93
|
+
};
|
|
94
|
+
loansOperator: IAddress;
|
|
95
|
+
loans: ISubgraphFormattedLoan[];
|
|
96
|
+
}
|
|
97
|
+
export interface ISubgraphFormattedLoan {
|
|
98
|
+
amount: INormalizedNumber;
|
|
99
|
+
address: IAddress;
|
|
100
|
+
apr: number;
|
|
101
|
+
collateral: IAddress;
|
|
102
|
+
repaid: INormalizedNumber;
|
|
103
|
+
borrower: IAddress;
|
|
104
|
+
}
|
|
105
|
+
export type IPoolWithPositions = IPoolWithUnderlying & {
|
|
106
|
+
token: IAddress;
|
|
107
|
+
position: string;
|
|
108
|
+
apy: number;
|
|
109
|
+
status: string;
|
|
110
|
+
availableRedemptions: IPoolAvailableRedemption[];
|
|
111
|
+
redeemable: INormalizedNumber;
|
|
112
|
+
walletBalance: string;
|
|
113
|
+
};
|
|
114
|
+
export type IPoolFunctions = 'decimals' | 'symbol' | 'name' | 'asset' | 'totalSupply' | 'maxSupply' | 'totalAssets' | 'globalLoansAmount' | 'loansOperator' | 'getTotalLoansDeployed' | 'withdrawalFee' | 'lagDuration' | 'withdrawalsPaused' | 'assetsWhitelistAddress' | 'getWhitelistedAssets' | 'maxDepositAmount' | 'getTotalAssets' | 'lpTokenAddress' | 'depositCap';
|
|
115
|
+
export type IPoolAction = 'deposit' | 'withdraw' | 'claim' | 'stake' | 'getReward' | 'unstake';
|
|
116
|
+
export type IPoolModal = {
|
|
117
|
+
isOpen: boolean;
|
|
118
|
+
onClose: (e: any) => void;
|
|
119
|
+
type: IPoolAction;
|
|
120
|
+
mode?: 'light' | 'dark';
|
|
121
|
+
} & IPoolWithUnderlying;
|
|
122
|
+
export type IPoolAvailableRedemption = {
|
|
123
|
+
receiver: IAddress;
|
|
124
|
+
day: INormalizedNumber;
|
|
125
|
+
month: INormalizedNumber;
|
|
126
|
+
year: INormalizedNumber;
|
|
127
|
+
amount: INormalizedNumber;
|
|
128
|
+
date: Date;
|
|
129
|
+
pool: IAddress;
|
|
130
|
+
};
|
|
131
|
+
export type IPoolRedemptionHistoryItem = {
|
|
132
|
+
receiver: IAddress;
|
|
133
|
+
amount: INormalizedNumber;
|
|
134
|
+
processed: Date;
|
|
135
|
+
requested: Date;
|
|
136
|
+
pool: IAddress;
|
|
137
|
+
};
|
|
138
|
+
export type IPoolOrderParam = 'asc' | 'desc';
|
|
139
|
+
export type IPoolHistoricalParams = {
|
|
140
|
+
order?: IPoolOrderParam;
|
|
141
|
+
start: Date;
|
|
142
|
+
interval?: 'years' | 'quarters' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes';
|
|
143
|
+
};
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { 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,140 @@
|
|
|
1
|
+
import type { IAddress } from './web3';
|
|
2
|
+
/**
|
|
3
|
+
* Chain record attached to a subaccount directory entry, as serialized by the
|
|
4
|
+
* backend `IChainRead` schema.
|
|
5
|
+
*/
|
|
6
|
+
export interface IWSSubaccountListChain {
|
|
7
|
+
id: string;
|
|
8
|
+
chain_id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One subaccount record from the admin-only `GET /subaccount` directory
|
|
13
|
+
* endpoint (backend `ISubaccountRead` schema). Nullable fields are optional
|
|
14
|
+
* metadata the operations team may not have filled in.
|
|
15
|
+
*/
|
|
16
|
+
export interface IWSSubaccountListItem {
|
|
17
|
+
id: string;
|
|
18
|
+
user_id: string | null;
|
|
19
|
+
internal_name: string;
|
|
20
|
+
friendly_name: string | null;
|
|
21
|
+
address: IAddress;
|
|
22
|
+
status: string | null;
|
|
23
|
+
subaccount_type: string | null;
|
|
24
|
+
min_health_factor: number | null;
|
|
25
|
+
estimated_apr: number | null;
|
|
26
|
+
notes: string | null;
|
|
27
|
+
proxy_salt: string | null;
|
|
28
|
+
admin_salt: string | null;
|
|
29
|
+
disable_discount_factor: boolean | null;
|
|
30
|
+
turnkey_address: IAddress | null;
|
|
31
|
+
autopay_frequency: string | null;
|
|
32
|
+
implementation: string | null;
|
|
33
|
+
variant: string | null;
|
|
34
|
+
default_fee_rate_in_bips: number | null;
|
|
35
|
+
wallet_role: string | null;
|
|
36
|
+
chains: IWSSubaccountListChain[];
|
|
37
|
+
}
|
|
38
|
+
export interface IWSSubAccountHealthFactor {
|
|
39
|
+
id: IAddress;
|
|
40
|
+
datetime: string;
|
|
41
|
+
health_factor: number;
|
|
42
|
+
total_collateral_value: number;
|
|
43
|
+
total_loan_value: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IWSSubaccountSummaryToken {
|
|
46
|
+
type: string;
|
|
47
|
+
name: string;
|
|
48
|
+
address: string;
|
|
49
|
+
chain: number;
|
|
50
|
+
symbol: string;
|
|
51
|
+
decimals: number;
|
|
52
|
+
img_url: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IWSSubaccountSummaryPortfolioToken {
|
|
55
|
+
value: number;
|
|
56
|
+
balance: number;
|
|
57
|
+
token: IWSSubaccountSummaryToken;
|
|
58
|
+
}
|
|
59
|
+
export interface IWSSubaccountSummaryFullToken extends IWSSubaccountSummaryToken {
|
|
60
|
+
price: number;
|
|
61
|
+
raw_balance: number;
|
|
62
|
+
balance: number;
|
|
63
|
+
value: number;
|
|
64
|
+
}
|
|
65
|
+
export interface IWSSubaccountSummaryChain {
|
|
66
|
+
name: string;
|
|
67
|
+
chain_id: number;
|
|
68
|
+
}
|
|
69
|
+
export interface IWSSubaccountSummaryLoanBook {
|
|
70
|
+
address: IAddress;
|
|
71
|
+
lender: IAddress;
|
|
72
|
+
borrower: IAddress;
|
|
73
|
+
state: string;
|
|
74
|
+
total_repaid: number;
|
|
75
|
+
principal_token: IWSSubaccountSummaryToken & {
|
|
76
|
+
token_type: number;
|
|
77
|
+
discount_factor: number;
|
|
78
|
+
price: number;
|
|
79
|
+
};
|
|
80
|
+
principal_amount: number;
|
|
81
|
+
interest_amount: number;
|
|
82
|
+
upcoming_payment: {
|
|
83
|
+
amount: number;
|
|
84
|
+
due_date: string;
|
|
85
|
+
};
|
|
86
|
+
apr: number;
|
|
87
|
+
initial_principal_amount: number;
|
|
88
|
+
deployed_date: string;
|
|
89
|
+
payment_interval: number;
|
|
90
|
+
total_interest_payment_fees: number;
|
|
91
|
+
}
|
|
92
|
+
export interface IWSSubaccountSummaryLoan {
|
|
93
|
+
subaccount_address: IAddress;
|
|
94
|
+
book: IWSSubaccountSummaryLoanBook;
|
|
95
|
+
is_borrow: boolean;
|
|
96
|
+
debt_info: {
|
|
97
|
+
interest_owed: number;
|
|
98
|
+
principal_debt_owed: number;
|
|
99
|
+
interest_repaid: number;
|
|
100
|
+
};
|
|
101
|
+
credit_info: {
|
|
102
|
+
net_interest_owed: number;
|
|
103
|
+
principal_debt_owed: number;
|
|
104
|
+
net_interest_repaid: number;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export interface IWSSubaccountSummaryLoanbook {
|
|
108
|
+
loans: IWSSubaccountSummaryLoan[];
|
|
109
|
+
total_debt: number;
|
|
110
|
+
total_credit: number;
|
|
111
|
+
aggregates_by_token: unknown[];
|
|
112
|
+
}
|
|
113
|
+
export interface IWSSubaccountSummaryPortfolio {
|
|
114
|
+
tokens: IWSSubaccountSummaryPortfolioToken[];
|
|
115
|
+
margin_balances: unknown[];
|
|
116
|
+
collateral_balances: unknown[];
|
|
117
|
+
cefi_positions: unknown[];
|
|
118
|
+
defi_positions: unknown[];
|
|
119
|
+
trs_positions: unknown[];
|
|
120
|
+
strategy_contract_positions: unknown[];
|
|
121
|
+
legacy_hedger_positions: unknown[];
|
|
122
|
+
otc_positions: unknown[];
|
|
123
|
+
total_value: number;
|
|
124
|
+
discounted_value: number;
|
|
125
|
+
}
|
|
126
|
+
export interface IWSSubaccountSummary {
|
|
127
|
+
address: IAddress;
|
|
128
|
+
name: string;
|
|
129
|
+
type: 'subaccount' | 'eoa';
|
|
130
|
+
portfolio: IWSSubaccountSummaryPortfolio;
|
|
131
|
+
loanbook: IWSSubaccountSummaryLoanbook;
|
|
132
|
+
chains: IWSSubaccountSummaryChain[];
|
|
133
|
+
tokens: IWSSubaccountSummaryFullToken[];
|
|
134
|
+
total_account_value: number;
|
|
135
|
+
total_collateral_value: number;
|
|
136
|
+
total_loan_value: number;
|
|
137
|
+
health_factor: number | null;
|
|
138
|
+
net_account_value: number;
|
|
139
|
+
total_equity_value: number;
|
|
140
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { 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
|
+
isInstant?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Receipt-token (vault share) amount burned, raw base units. Present on
|
|
17
|
+
* withdraw-request rows: an async withdrawal burns shares up front, but the
|
|
18
|
+
* assets ultimately received are only known once the request settles (share
|
|
19
|
+
* price can move). Consumers showing a pending request should surface these
|
|
20
|
+
* shares (the concrete on-chain fact) rather than the request's `assets`
|
|
21
|
+
* preview. Absent on deposits and settled withdraws.
|
|
22
|
+
*/
|
|
23
|
+
shares?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Deposit asset token address, when known. Pre-deposit vaults accept
|
|
26
|
+
* multiple deposit assets with differing decimals (e.g. USDS at 18,
|
|
27
|
+
* USDC at 6), so `amount` cannot be normalized with the vault's own
|
|
28
|
+
* decimals alone — consumers (notably lifetime PnL) key off this address
|
|
29
|
+
* to resolve the correct per-asset decimals and USD price. Absent for
|
|
30
|
+
* single-asset vaults, where the vault `decimals` is correct.
|
|
31
|
+
*/
|
|
32
|
+
assetIn?: IAddress;
|
|
33
|
+
}
|
|
34
|
+
export interface ISubgraphWithdrawProccessed extends ISubgraphBase {
|
|
35
|
+
processedOn: string;
|
|
36
|
+
requestedOn: string;
|
|
37
|
+
receiverAddr: IAddress;
|
|
38
|
+
assetsAmount: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ISubgraphDeposit extends ISubgraphBase {
|
|
41
|
+
assets: string;
|
|
42
|
+
sender: IAddress;
|
|
43
|
+
shares: string;
|
|
44
|
+
owner: IAddress;
|
|
45
|
+
senderAddr?: IAddress;
|
|
46
|
+
amountIn?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Deposit asset token address (evm-2 / pre-deposit vaults). The deposited
|
|
49
|
+
* asset can differ from the vault's underlying and carry different decimals
|
|
50
|
+
* (e.g. RLUSD at 18 into a 6-decimal sentUSD vault), so `amountIn` must be
|
|
51
|
+
* normalized against this token's decimals, not the vault's. Absent for
|
|
52
|
+
* single-asset vaults.
|
|
53
|
+
*/
|
|
54
|
+
assetIn?: IAddress;
|
|
55
|
+
}
|
|
56
|
+
export interface ISubgraphWithdrawRequest extends ISubgraphBase {
|
|
57
|
+
day: string;
|
|
58
|
+
month: string;
|
|
59
|
+
year: string;
|
|
60
|
+
shares: string;
|
|
61
|
+
assets: string;
|
|
62
|
+
receiverAddr: IAddress;
|
|
63
|
+
ownerAddr: IAddress;
|
|
64
|
+
}
|
|
65
|
+
export interface ISubgraphWithdraw extends ISubgraphBase {
|
|
66
|
+
receiver: IAddress;
|
|
67
|
+
sender: string;
|
|
68
|
+
assets: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ISubgraphTransfer extends ISubgraphBase {
|
|
71
|
+
from: IAddress;
|
|
72
|
+
to: IAddress;
|
|
73
|
+
value: string;
|
|
74
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypedContract type definitions for ethers v6 with abitype.
|
|
3
|
+
*
|
|
4
|
+
* This is a local copy of types from ethers-abitype to avoid the global
|
|
5
|
+
* abitype module augmentation that pollutes AddressType with `string | Addressable`,
|
|
6
|
+
* which breaks viem type compatibility.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/ethers-io/ethers.js/issues/4475
|
|
9
|
+
*/
|
|
10
|
+
import type { BaseContract, ContractTransaction, ContractTransactionResponse, DeferredTopicFilter, EventFragment, FunctionFragment, Result, Overrides } from 'ethers';
|
|
11
|
+
import type { Abi, AbiParametersToPrimitiveTypes, ExtractAbiEvent, ExtractAbiEventNames, ExtractAbiEvents, ExtractAbiFunction, ExtractAbiFunctionNames, ExtractAbiFunctions } from 'abitype';
|
|
12
|
+
type AsArray<T> = T extends readonly unknown[] ? T : never;
|
|
13
|
+
export type TypedContractFunctionResult<TAbi extends Abi, TFunctionName extends string, TOutputArgs = AbiParametersToPrimitiveTypes<ExtractAbiFunction<TAbi, TFunctionName>['outputs']>> = TOutputArgs extends readonly [] ? void : TOutputArgs extends readonly [infer Arg] ? Arg : TOutputArgs;
|
|
14
|
+
export type TypedFragment<TAbi extends Abi, TFunctionName extends string, TFunction extends ExtractAbiFunctions<TAbi> = ExtractAbiFunction<TAbi, TFunctionName>> = Omit<FunctionFragment, 'inputs' | 'outputs' | 'stateMutability' | 'name' | 'type'> & {
|
|
15
|
+
name: TFunction['name'];
|
|
16
|
+
type: TFunction['type'];
|
|
17
|
+
inputs: TFunction['inputs'];
|
|
18
|
+
outputs: TFunction['outputs'];
|
|
19
|
+
stateMutability: TFunction['stateMutability'];
|
|
20
|
+
};
|
|
21
|
+
export interface TypedContractFunction<TAbi extends Abi, TFunctionName extends string, TFunction extends ExtractAbiFunctions<TAbi> = ExtractAbiFunction<TAbi, TFunctionName>, TInputArgs extends readonly unknown[] = AsArray<AbiParametersToPrimitiveTypes<TFunction['inputs']>>, TResult = TypedContractFunctionResult<TAbi, TFunctionName>, TFragment = TypedFragment<TAbi, TFunctionName>> {
|
|
22
|
+
(...args: [...TInputArgs, overrides?: Overrides]): Promise<TFunction['stateMutability'] extends 'view' | 'pure' ? TResult : ContractTransactionResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the Contract method.
|
|
25
|
+
*/
|
|
26
|
+
name: TFunctionName;
|
|
27
|
+
/**
|
|
28
|
+
* The fragment of the Contract method. This will throw on ambiguous
|
|
29
|
+
* method names.
|
|
30
|
+
*/
|
|
31
|
+
fragment: TFragment;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the fragment constrained by %%args%%. This can be used to
|
|
34
|
+
* resolve ambiguous method names.
|
|
35
|
+
*/
|
|
36
|
+
getFragment(...args: [...TInputArgs]): TFragment;
|
|
37
|
+
/**
|
|
38
|
+
* Returns a populated transaction that can be used to perform the
|
|
39
|
+
* contract method with %%args%%.
|
|
40
|
+
*/
|
|
41
|
+
populateTransaction(...args: [...TInputArgs, overrides?: Overrides]): Promise<ContractTransaction>;
|
|
42
|
+
/**
|
|
43
|
+
* Call the contract method with %%args%% and return the value.
|
|
44
|
+
*
|
|
45
|
+
* If the return value is a single type, it will be dereferenced and
|
|
46
|
+
* returned directly, otherwise the full Result will be returned.
|
|
47
|
+
*/
|
|
48
|
+
staticCall(...args: [...TInputArgs, overrides?: Overrides]): Promise<TResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Send a transaction for the contract method with %%args%%.
|
|
51
|
+
*/
|
|
52
|
+
send(...args: [...TInputArgs, overrides?: Overrides]): Promise<ContractTransactionResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Estimate the gas to send the contract method with %%args%%.
|
|
55
|
+
*/
|
|
56
|
+
estimateGas(...args: [...TInputArgs, overrides?: Overrides]): Promise<bigint>;
|
|
57
|
+
/**
|
|
58
|
+
* Call the contract method with %%args%% and return the Result
|
|
59
|
+
* without any dereferencing.
|
|
60
|
+
*/
|
|
61
|
+
staticCallResult(...args: [...TInputArgs, overrides?: Overrides]): Promise<Result>;
|
|
62
|
+
}
|
|
63
|
+
export interface TypedContractEvent<TAbi extends Abi, TEventName extends string, TEvent extends ExtractAbiEvents<TAbi> = ExtractAbiEvent<TAbi, TEventName>, TEventArgs extends readonly unknown[] = AsArray<Partial<AbiParametersToPrimitiveTypes<TEvent['inputs']>>>> {
|
|
64
|
+
(...args: [...TEventArgs]): DeferredTopicFilter;
|
|
65
|
+
/**
|
|
66
|
+
* The name of the Contract event.
|
|
67
|
+
*/
|
|
68
|
+
name: TEventName;
|
|
69
|
+
/**
|
|
70
|
+
* The fragment of the Contract event. This will throw on ambiguous
|
|
71
|
+
* method names.
|
|
72
|
+
*/
|
|
73
|
+
fragment: EventFragment;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the fragment constrained by %%args%%. This can be used to
|
|
76
|
+
* resolve ambiguous event names.
|
|
77
|
+
*/
|
|
78
|
+
getFragment(...args: [...TEventArgs]): EventFragment;
|
|
79
|
+
}
|
|
80
|
+
export type TypedContract<TAbi extends Abi> = Omit<BaseContract, 'getFunction' | 'getEvent'> & {
|
|
81
|
+
[Method in ExtractAbiFunctionNames<TAbi>]: TypedContractFunction<TAbi, Method>;
|
|
82
|
+
} & {
|
|
83
|
+
/**
|
|
84
|
+
* Return the function for a given name. This is useful when a contract
|
|
85
|
+
* method name conflicts with a JavaScript name such as ``prototype`` or
|
|
86
|
+
* when using a Contract programatically.
|
|
87
|
+
*/
|
|
88
|
+
getFunction<T extends ExtractAbiFunctionNames<TAbi>>(key: T | TypedFragment<TAbi, T>): TypedContractFunction<TAbi, T>;
|
|
89
|
+
/**
|
|
90
|
+
* Return the event for a given name. This is useful when a contract
|
|
91
|
+
* event name conflicts with a JavaScript name such as ``prototype`` or
|
|
92
|
+
* when using a Contract programatically.
|
|
93
|
+
*/
|
|
94
|
+
getEvent<T extends ExtractAbiEventNames<TAbi>>(key: T | EventFragment): TypedContractEvent<TAbi, T>;
|
|
95
|
+
/**
|
|
96
|
+
* All the Events available on this contract.
|
|
97
|
+
*/
|
|
98
|
+
filters: {
|
|
99
|
+
[EventName in ExtractAbiEventNames<TAbi>]: TypedContractEvent<TAbi, EventName>;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IUserRoles = 'client' | 'admin' | 'dev' | 'internal';
|