@hinkal/common 0.2.9 → 0.2.11
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/API/API.d.mts +49 -0
- package/API/HinkalPointsCalls.d.mts +20 -0
- package/API/callBeefyGraphAPI.d.mts +2 -0
- package/API/callCurveAPI.d.mts +9 -0
- package/API/callMonitor.d.mts +1 -0
- package/API/callOdosAPI.d.mts +63 -0
- package/API/callOneInchAPI.d.mts +18 -0
- package/API/callRelayer.d.mts +10 -0
- package/API/checkRisk.d.mts +1 -0
- package/API/dataServerCalls.d.mts +2 -0
- package/API/duneAPI.d.mts +11 -0
- package/API/fetchCommitmentsCache.d.mts +20 -0
- package/API/fetchNullifiers.d.mts +5 -0
- package/API/getAxelarGasEstimate.d.mts +5 -0
- package/API/getCoingeckoPrice.d.mts +22 -0
- package/API/getConnextReceiveFee.d.mts +2 -0
- package/API/getGasEstimates.d.mts +9 -0
- package/API/getRelayerURL.d.mts +1 -0
- package/API/getServerURL.d.mts +2 -0
- package/API/getTokenPrice.d.mts +16 -0
- package/API/index.d.mts +14 -0
- package/API/kycCalls.d.mts +30 -0
- package/API/passwordCalls.d.mts +9 -0
- package/API/referralProgramCalls.d.mts +36 -0
- package/API/relayCalls.d.mts +5 -0
- package/API/restoreSnapshots.d.mts +1 -0
- package/API/rewardsPointsCalls.d.mts +13 -0
- package/API/userVerifyTransactions.d.mts +19 -0
- package/constants/assets.constants.d.mts +13 -0
- package/constants/axelar.constants.d.mts +5 -0
- package/constants/backend.constants.d.mts +11 -0
- package/constants/beefy.registry.d.mts +8 -0
- package/constants/chains.constants.d.mts +36 -0
- package/constants/coingecko.constants.d.mts +13 -0
- package/constants/contracts.constants.d.mts +119 -0
- package/constants/crvCvx.registry.d.mts +20 -0
- package/constants/crvDynamic.registry.d.mts +1 -0
- package/constants/deploy-data/index.d.mts +11 -0
- package/constants/fees.constants.d.mts +11 -0
- package/constants/index.d.mts +20 -0
- package/constants/kyc.constants.d.mts +28 -0
- package/constants/lido.constants.d.mts +10 -0
- package/constants/pendle.registry.d.mts +21 -0
- package/constants/protocol.constants.d.mts +18 -0
- package/constants/reorg-depths.constants.d.mts +3 -0
- package/constants/rewards.constants.d.mts +19 -0
- package/constants/server.constants.d.mts +155 -0
- package/constants/token-data/ERC20Registry.d.mts +3 -0
- package/constants/token-data/index.d.mts +976 -0
- package/constants/token-data/popularTokens.constants.d.mts +3 -0
- package/constants/token-data/tokenPricing.consts.d.mts +5 -0
- package/constants/vite.constants.d.mts +14 -0
- package/crypto/babyJub.d.mts +16 -0
- package/crypto/index.d.mts +3 -0
- package/crypto/poseidon.d.mts +15 -0
- package/crypto/preProcessing.d.mts +1 -0
- package/data-structures/Hinkal/Hinkal.d.mts +100 -0
- package/data-structures/Hinkal/IHinkal.d.mts +93 -0
- package/data-structures/Hinkal/hinkalActionBeefy.d.mts +3 -0
- package/data-structures/Hinkal/hinkalActionConvex.d.mts +12 -0
- package/data-structures/Hinkal/hinkalActionCurve.d.mts +12 -0
- package/data-structures/Hinkal/hinkalActionLidoEth.d.mts +4 -0
- package/data-structures/Hinkal/hinkalActionPendle.d.mts +3 -0
- package/data-structures/Hinkal/hinkalActionPendleLP.d.mts +7 -0
- package/data-structures/Hinkal/hinkalActionStake.d.mts +3 -0
- package/data-structures/Hinkal/hinkalActionVolatile.d.mts +3 -0
- package/data-structures/Hinkal/hinkalDeposit.d.mts +3 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.d.mts +2 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.d.mts +3 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.d.mts +2 -0
- package/data-structures/Hinkal/hinkalSwap.d.mts +3 -0
- package/data-structures/Hinkal/hinkalTransfer.d.mts +1 -0
- package/data-structures/Hinkal/hinkalWithdraw.d.mts +2 -0
- package/data-structures/Hinkal/index.d.mts +12 -0
- package/data-structures/Hinkal/resetMerkleTrees.d.mts +2 -0
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.mts +20 -0
- package/data-structures/ValueCache/ValueCache.d.mts +10 -0
- package/data-structures/ValueCache/index.d.mts +1 -0
- package/data-structures/cacheDevices/BaseCacheDevice.d.mts +8 -0
- package/data-structures/cacheDevices/FileCacheDevice.d.mts +9 -0
- package/data-structures/cacheDevices/LocalStorageCacheDevice.d.mts +7 -0
- package/data-structures/cacheDevices/index.d.mts +2 -0
- package/data-structures/crypto-keys/decodeUTXO.d.mts +14 -0
- package/data-structures/crypto-keys/encryptDecryptUtxo.d.mts +18 -0
- package/data-structures/crypto-keys/index.d.mts +4 -0
- package/data-structures/crypto-keys/keyUtils.d.mts +2 -0
- package/data-structures/crypto-keys/keys.d.mts +58 -0
- package/data-structures/custom-token-registry/CustomTokenRegistry.d.mts +13 -0
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.d.mts +35 -0
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.d.mts +30 -0
- package/data-structures/event-service/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/AbstractEventService.d.mts +31 -0
- package/data-structures/event-service/AbstractEventService.mjs +42 -30
- package/data-structures/event-service/AbstractNullifierSnapshotService.d.mts +22 -0
- package/data-structures/event-service/AbstractSnapshotService.d.mts +23 -0
- package/data-structures/event-service/index.d.mts +5 -0
- package/data-structures/index.d.mts +13 -0
- package/data-structures/merkle-tree/MerkleTree.d.mts +78 -0
- package/data-structures/merkle-tree/MerkleTreeIncompleteError.d.mts +3 -0
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.mts +3 -0
- package/data-structures/merkle-tree/index.d.mts +3 -0
- package/data-structures/provider-adapter/IProviderAdapter.d.mts +35 -0
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.d.mts +7 -0
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +10 -5
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.d.mts +7 -0
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +10 -5
- package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientNullifierSnapshotService.d.mts +7 -0
- package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +8 -3
- package/data-structures/token-price-fetcher/TokenChecker.d.mts +20 -0
- package/data-structures/token-price-fetcher/index.d.mts +1 -0
- package/data-structures/transactions-manager/TransactionsManager.d.mts +27 -0
- package/data-structures/transactions-manager/history/getBeefyData.d.mts +3 -0
- package/data-structures/transactions-manager/history/getConvexData.d.mts +6 -0
- package/data-structures/transactions-manager/history/getCurveData.d.mts +6 -0
- package/data-structures/transactions-manager/history/getDepositData.d.mts +2 -0
- package/data-structures/transactions-manager/history/getLidoData.d.mts +10 -0
- package/data-structures/transactions-manager/history/getPendleData.d.mts +3 -0
- package/data-structures/transactions-manager/history/getSwapData.d.mts +3 -0
- package/data-structures/transactions-manager/history/getTxDetails.d.mts +3 -0
- package/data-structures/transactions-manager/history/getVolatileData.d.mts +32 -0
- package/data-structures/transactions-manager/history/history.types.d.mts +95 -0
- package/data-structures/transactions-manager/history/history.utils.d.mts +8 -0
- package/data-structures/transactions-manager/index.d.mts +2 -0
- package/data-structures/utxo/Utxo.d.mts +63 -0
- package/data-structures/volatile-helper/VolatileHelper.d.mts +57 -0
- package/data-structures/volatile-helper/index.d.mts +1 -0
- package/error-handling/customErrors/ErrorWithAmount.d.mts +4 -0
- package/error-handling/customErrors/FeeOverTransactionValueError.d.mts +9 -0
- package/error-handling/customErrors/customErrors.helpers.d.mts +5 -0
- package/error-handling/customErrors/index.d.mts +3 -0
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.mts +181 -0
- package/error-handling/error-codes.constants.mjs +13 -13
- package/error-handling/get-error.message.d.mts +3 -0
- package/error-handling/handleErrorRestore.d.mts +2 -0
- package/error-handling/index.d.mts +7 -0
- package/error-handling/logError.d.mts +1 -0
- package/error-handling/types.d.mts +5 -0
- package/externalABIs/BUSD.d.mts +38 -0
- package/externalABIs/DAI.d.mts +45 -0
- package/externalABIs/ERC20.d.mts +1 -0
- package/externalABIs/SanctionsList.d.mts +35 -0
- package/externalABIs/USDC.d.mts +28 -0
- package/externalABIs/USDR.d.mts +28 -0
- package/externalABIs/USDR3CRV.d.mts +49 -0
- package/externalABIs/USDT.d.mts +41 -0
- package/externalABIs/WETH.d.mts +38 -0
- package/externalABIs/amToken.d.mts +28 -0
- package/externalABIs/crvFRAX.d.mts +38 -0
- package/externalABIs/index.d.mts +323 -0
- package/externalABIs/swapAbi.d.mts +77 -0
- package/functions/index.d.mts +14 -0
- package/functions/kyc/aiPriseHelper.d.mts +0 -0
- package/functions/kyc/authentoHelper.d.mts +12 -0
- package/functions/kyc/index.d.mts +3 -0
- package/functions/kyc/openDefaultPassportWindow.d.mts +1 -0
- package/functions/kyc/passportHelper.d.mts +3 -0
- package/functions/kyc/zkMeHelper.d.mts +4 -0
- package/functions/pre-transaction/getFlatFees.d.mts +12 -0
- package/functions/pre-transaction/index.d.mts +5 -0
- package/functions/pre-transaction/interaction-to-action.d.mts +2 -0
- package/functions/pre-transaction/outputUtxoProcessing.d.mts +5 -0
- package/functions/pre-transaction/process-gas-estimates.d.mts +5 -0
- package/functions/pre-transaction/processAmountChanges.d.mts +12 -0
- package/functions/private-wallet/emporium.helpers.d.mts +5 -0
- package/functions/private-wallet/index.d.mts +2 -0
- package/functions/private-wallet/opProducer.d.mts +5 -0
- package/functions/protocols/convex.protocols.d.mts +1 -0
- package/functions/protocols/curve.protocols.d.mts +1 -0
- package/functions/protocols/index.d.mts +3 -0
- package/functions/protocols/pendle.helpers.d.mts +8 -0
- package/functions/snarkjs/common.snarkjs.d.mts +22 -0
- package/functions/snarkjs/constant.d.mts +151 -0
- package/functions/snarkjs/constructEmporiumProof.d.mts +10 -0
- package/functions/snarkjs/constructGeneralZkProof.d.mts +12 -0
- package/functions/snarkjs/generateCircomData.d.mts +4 -0
- package/functions/snarkjs/generateZkProof.d.mts +5 -0
- package/functions/snarkjs/generateZkProofEnclave.d.mts +5 -0
- package/functions/snarkjs/generateZkProofSelf.d.mts +5 -0
- package/functions/snarkjs/getZKFiles.d.mts +2 -0
- package/functions/snarkjs/index.d.mts +4 -0
- package/functions/staking/index.d.mts +11 -0
- package/functions/utils/amounts.utils.d.mts +21 -0
- package/functions/utils/axelar.utils.d.mts +2 -0
- package/functions/utils/cacheDevice.utils.d.mts +3 -0
- package/functions/utils/cacheFunctions.d.mts +17 -0
- package/functions/utils/caseInsensitive.utils.d.mts +3 -0
- package/functions/utils/convertIntegrationProviderToExternalActionId.d.mts +2 -0
- package/functions/utils/create-provider.d.mts +2 -0
- package/functions/utils/enum.utils.d.mts +9 -0
- package/functions/utils/erc20tokenFunctions.d.mts +4 -0
- package/functions/utils/evmNetworkFunctions.d.mts +4 -0
- package/functions/utils/external-action.utils.d.mts +8 -0
- package/functions/utils/getDataFromTransaction.d.mts +45 -0
- package/functions/utils/index.d.mts +21 -0
- package/functions/utils/memoize.utils.d.mts +1 -0
- package/functions/utils/nickname.utils.d.mts +1 -0
- package/functions/utils/process.utils.d.mts +7 -0
- package/functions/utils/reloadPage.d.mts +1 -0
- package/functions/utils/requireEnv.d.mts +1 -0
- package/functions/utils/resolve-sync.utils.d.mts +6 -0
- package/functions/utils/serialize.utils.d.mts +1 -0
- package/functions/utils/string.utils.d.mts +8 -0
- package/functions/utils/time.utils.d.mts +1 -0
- package/functions/utils/userAgent.d.mts +2 -0
- package/functions/utils/volatile-patcher.utils.d.mts +1 -0
- package/functions/web3/etherFunctions.d.mts +20 -0
- package/functions/web3/events/balanceChangedHandler.d.mts +1 -0
- package/functions/web3/events/getInputUtxoAndBalance.d.mts +24 -0
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.mts +18 -0
- package/functions/web3/events/getShieldedBalance.mjs +66 -58
- package/functions/web3/events/index.d.mts +4 -0
- package/functions/web3/events/web3RetrieveEvents.d.mts +14 -0
- package/functions/web3/functionCalls/accessTokenCalls.d.mts +6 -0
- package/functions/web3/functionCalls/approveToken.d.mts +4 -0
- package/functions/web3/functionCalls/estimateGasRelayer.d.mts +4 -0
- package/functions/web3/functionCalls/getRootHash.d.mts +2 -0
- package/functions/web3/functionCalls/relayFunctions.d.mts +17 -0
- package/functions/web3/functionCalls/transactCallDirect.d.mts +6 -0
- package/functions/web3/functionCalls/transactCallRelayer.d.mts +7 -0
- package/functions/web3/getContractMetadata.d.mts +5 -0
- package/functions/web3/index.d.mts +6 -0
- package/functions/web3/odosAPI.d.mts +5 -0
- package/functions/web3/oneInchAPI.d.mts +5 -0
- package/functions/web3/runContractFunction.d.mts +15 -0
- package/functions/web3/uniswapAPI.d.mts +16 -0
- package/index.d.mts +8 -0
- package/package.json +42 -11
- package/providers/EthersProviderAdapter.d.mts +39 -0
- package/providers/WagmiProviderAdapter.d.mts +46 -0
- package/providers/exportProviers.d.mts +3 -0
- package/providers/prepareEthersHinkal.d.mts +4 -0
- package/providers/prepareWagmiHinkal.d.mts +3 -0
- package/types/API.types.d.mts +23 -0
- package/types/ICacheDevice.d.mts +4 -0
- package/types/IMultiThreadedUtxoUtils.d.mts +8 -0
- package/types/admin.types.d.mts +22 -0
- package/types/axelar.types.d.mts +14 -0
- package/types/beefy.types.d.mts +11 -0
- package/types/big-intable.types.d.mts +2 -0
- package/types/circom-data.types.d.mts +70 -0
- package/types/coingecko.types.d.mts +8 -0
- package/types/commitments.types.d.mts +26 -0
- package/types/connext.types.d.mts +13 -0
- package/types/crypto.types.d.mts +7 -0
- package/types/curve.types.d.mts +133 -0
- package/types/duneAPI.types.d.mts +9 -0
- package/types/ethereum-network.types.d.mts +142 -0
- package/types/external-action.types.d.mts +28 -0
- package/types/hinkal.stake.types.d.mts +11 -0
- package/types/hinkal.types.d.mts +150 -0
- package/types/hinkalTvl.types.d.mts +4 -0
- package/types/index.d.mts +27 -0
- package/types/kyc.types.d.mts +39 -0
- package/types/pendle.api.types.d.mts +233 -0
- package/types/pendle.types.d.mts +222 -0
- package/types/relayer.types.d.mts +25 -0
- package/types/remote-proof.types.d.mts +15 -0
- package/types/rewards.types.d.mts +230 -0
- package/types/slippage.types.d.mts +15 -0
- package/types/snark.types.d.mts +40 -0
- package/types/time.types.d.mts +31 -0
- package/types/token.types.d.mts +36 -0
- package/types/transactions.types.d.mts +55 -0
- package/webworker/performTaskWithWorker.d.mts +5 -0
- package/webworker/snarkjsWorker/snarkjsWorker.types.d.mts +14 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.d.mts +1 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.d.mts +10 -0
- package/webworker/utxoWorker/utxoWorker.types.d.mts +29 -0
- package/webworker/utxoWorker/utxoWorkerLauncher.d.mts +1 -0
- package/webworker/utxoWorker/utxoWorkerLogic.d.mts +8 -0
- package/webworker/viteWorkerURL.constant.d.mts +9 -0
- package/webworker/worker.registry.d.mts +10 -0
- package/webworker/worker.types.d.mts +33 -0
- package/webworker/workerErrorHandler.d.mts +1 -0
- package/webworker/workerFactory.d.mts +7 -0
- package/webworker/workerProxy.d.mts +40 -0
- package/webworker/zkProofWorker/zkProofWorker.types.d.mts +38 -0
- package/webworker/zkProofWorker/zkProofWorkerLauncher.d.mts +1 -0
- package/webworker/zkProofWorker/zkProofWorkerLogic.d.mts +8 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ExternalActionId } from './external-action.types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the Hinkal system.
|
|
4
|
+
*/
|
|
5
|
+
export type HinkalConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Path to the cache file used for storing temporary data.
|
|
8
|
+
* It should be a valid file path string.
|
|
9
|
+
*/
|
|
10
|
+
cacheFilePath?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Indicator to use caching on a file level.
|
|
13
|
+
* Node only.
|
|
14
|
+
*/
|
|
15
|
+
useFileCache?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Indicator controlling wether the proof should be constructed remotely in secure enclave.
|
|
18
|
+
*/
|
|
19
|
+
generateProofRemotely?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare enum EventType {
|
|
22
|
+
BalanceChange = "BalanceChange",
|
|
23
|
+
NetworkChange = "NetworkChange",
|
|
24
|
+
KycNeeded = "KycNeeded",
|
|
25
|
+
AccountChanged = "AccountChanged",
|
|
26
|
+
ShowConnect = "ShowConnect",
|
|
27
|
+
ShowNetworkPopup = "ShowNetworkPopup",
|
|
28
|
+
MerkleTreeUpdated = "MerkleTreeUpdated",
|
|
29
|
+
MerkleTreeResetStarted = "MerkleTreeResetStarted",
|
|
30
|
+
MerkleTreeResetFinished = "MerkleTreeResetFinished"
|
|
31
|
+
}
|
|
32
|
+
export declare enum IntegrationProvider {
|
|
33
|
+
UNISWAP = 1,
|
|
34
|
+
ODOS = 2,
|
|
35
|
+
ONEINCH = 3,
|
|
36
|
+
PENDLE = 4,
|
|
37
|
+
ALL = 5,
|
|
38
|
+
NONE = 6
|
|
39
|
+
}
|
|
40
|
+
export declare enum StakeProvider {
|
|
41
|
+
CurveAavePool = 0
|
|
42
|
+
}
|
|
43
|
+
export declare enum CurveAction {
|
|
44
|
+
Deposit = 0,
|
|
45
|
+
WithdrawInt = 11,// case of int
|
|
46
|
+
WithdrawUint = 12,// case of uint
|
|
47
|
+
WithdrawImbalance = 13,
|
|
48
|
+
Stake = 2,
|
|
49
|
+
Unstake = 3,
|
|
50
|
+
GetCRV = 4
|
|
51
|
+
}
|
|
52
|
+
export declare enum ConvexAction {
|
|
53
|
+
StakeLP = 0,
|
|
54
|
+
UnStakeLP = 1,
|
|
55
|
+
ClaimRewardsLP = 2
|
|
56
|
+
}
|
|
57
|
+
export declare enum BeefyAction {
|
|
58
|
+
Deposit = 0,
|
|
59
|
+
DepositRegular = 1,
|
|
60
|
+
DepositOneInchSingle = 2,
|
|
61
|
+
DepositOneInchUniswap = 3,
|
|
62
|
+
DepositOneInchSolidly = 4,
|
|
63
|
+
Withdraw = 5,
|
|
64
|
+
WithdrawRegular = 6,
|
|
65
|
+
WithdrawOneInchSingle = 7,
|
|
66
|
+
WithdrawOneInchUniswapAndSolidly = 8,
|
|
67
|
+
WithdrawBoth = 9,
|
|
68
|
+
Stake = 10,
|
|
69
|
+
Unstake = 11,
|
|
70
|
+
GetRewards = 12
|
|
71
|
+
}
|
|
72
|
+
export declare enum LidoVariant {
|
|
73
|
+
Ethereum = "Ethereum",
|
|
74
|
+
Polygon = "Polygon"
|
|
75
|
+
}
|
|
76
|
+
export declare enum LidoAction {
|
|
77
|
+
Stake = 0,
|
|
78
|
+
Request = 1,
|
|
79
|
+
Claim = 2
|
|
80
|
+
}
|
|
81
|
+
export declare enum PendleAction {
|
|
82
|
+
Deposit = 0,
|
|
83
|
+
Withdraw = 1,
|
|
84
|
+
SwapFromYt = 2,
|
|
85
|
+
SwapToYt = 3,
|
|
86
|
+
SwapPt = 4,
|
|
87
|
+
Mint = 5,
|
|
88
|
+
Redeem = 6,
|
|
89
|
+
Checkpoint = 7,
|
|
90
|
+
PoolRemove = 8
|
|
91
|
+
}
|
|
92
|
+
export declare enum PendleLPAction {
|
|
93
|
+
AddOrRemoveLiquidity = 0,
|
|
94
|
+
Checkpoint = 1,
|
|
95
|
+
Invalid = 99
|
|
96
|
+
}
|
|
97
|
+
export declare enum VolatileAction {
|
|
98
|
+
Persist = 0,
|
|
99
|
+
Deposit = 1,
|
|
100
|
+
Withdraw = 2,
|
|
101
|
+
Swap = 3
|
|
102
|
+
}
|
|
103
|
+
export declare enum HinkalStakeAction {
|
|
104
|
+
DepositOrStake = 0,
|
|
105
|
+
Unstake = 1
|
|
106
|
+
}
|
|
107
|
+
export type VolatileHelperData = {
|
|
108
|
+
action: VolatileAction;
|
|
109
|
+
isRelayerOff?: boolean;
|
|
110
|
+
recipientAddress?: string;
|
|
111
|
+
baseExternalActionMetadata?: string;
|
|
112
|
+
baseExternalActionId?: ExternalActionId;
|
|
113
|
+
};
|
|
114
|
+
export type ValidExternalAction = CurveAction | ConvexAction | BeefyAction | LidoAction | PendleAction | VolatileAction | PendleLPAction;
|
|
115
|
+
export declare enum INTERACTION {
|
|
116
|
+
WITHDRAW = "WITHDRAW",
|
|
117
|
+
SWAP = "SWAP",
|
|
118
|
+
CURVE_DEPOSIT = "CURVE_DEPOSIT",
|
|
119
|
+
CURVE_WITHDRAW = "CURVE_WITHDRAW",
|
|
120
|
+
CURVE_WITHDRAW_INBALANCED = "CURVE_WITHDRAW_INBALANCED",
|
|
121
|
+
STAKING = "STAKING",
|
|
122
|
+
UNSTAKING = "UNSTAKING",
|
|
123
|
+
CLAIMING = "CLAIMING",
|
|
124
|
+
BEEFY = "BEEFY",
|
|
125
|
+
BEEFY_STAKE = "BEEFY_STAKE",
|
|
126
|
+
BEEFY_UNSTAKE = "BEEFY_UNSTAKE",
|
|
127
|
+
BEEFY_GET_REWARDS = "BEEFY_GET_REWARDS",
|
|
128
|
+
LIDO_STAKE = "LIDO_STAKE",
|
|
129
|
+
LIDO_REQUEST = "LIDO_REQUEST",
|
|
130
|
+
LIDO_CLAIM = "LIDO_CLAIM",
|
|
131
|
+
PENDLE_TRANSACT = "PENDLE_TRANSACT",
|
|
132
|
+
PENDLE_YT_IN_SWAP = "PENDLE_YT_IN_SWAP",
|
|
133
|
+
PENDLE_YT_OUT_SWAP = "PENDLE_YT_OUT_SWAP",
|
|
134
|
+
PENDLE_PT_SWAP = "PENDLE_PT_SWAP",
|
|
135
|
+
PENDLE_MINT = "PENDLE_MINT",
|
|
136
|
+
PENDLE_REDEEM = "PENDLE_REDEEM",
|
|
137
|
+
PENDLE_CLAIM = "PENDLE_CLAIM",
|
|
138
|
+
PENDLE_LP = "PENDLE_LP",
|
|
139
|
+
PENDLE_LP_CLAIM = "PENDLE_LP_CLAIM",
|
|
140
|
+
VOLATILE_WITHDRAW = "VOLATILE_WITHDRAW",
|
|
141
|
+
VOLATILE_SWAP = "VOLATILE_SWAP",
|
|
142
|
+
EMPORIUM = "EMPORIUM",
|
|
143
|
+
NONE = "NONE"
|
|
144
|
+
}
|
|
145
|
+
export declare enum UserProgress {
|
|
146
|
+
NOT_STARTED = 0,
|
|
147
|
+
CONNECTED = 1,
|
|
148
|
+
KYC = 2,
|
|
149
|
+
COMPLETED = 3
|
|
150
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './API.types';
|
|
2
|
+
export * from './axelar.types';
|
|
3
|
+
export * from './beefy.types';
|
|
4
|
+
export * from './big-intable.types';
|
|
5
|
+
export * from './circom-data.types';
|
|
6
|
+
export * from './commitments.types';
|
|
7
|
+
export * from './IMultiThreadedUtxoUtils';
|
|
8
|
+
export * from './crypto.types';
|
|
9
|
+
export * from './ethereum-network.types';
|
|
10
|
+
export * from './external-action.types';
|
|
11
|
+
export * from './hinkal.types';
|
|
12
|
+
export * from './kyc.types';
|
|
13
|
+
export * from './relayer.types';
|
|
14
|
+
export * from './snark.types';
|
|
15
|
+
export * from './token.types';
|
|
16
|
+
export * from './slippage.types';
|
|
17
|
+
export * from './transactions.types';
|
|
18
|
+
export * from './time.types';
|
|
19
|
+
export * from './rewards.types';
|
|
20
|
+
export * from './pendle.types';
|
|
21
|
+
export * from './pendle.api.types';
|
|
22
|
+
export * from './curve.types';
|
|
23
|
+
export * from './hinkal.stake.types';
|
|
24
|
+
export * from './duneAPI.types';
|
|
25
|
+
export * from './admin.types';
|
|
26
|
+
export * from './ICacheDevice';
|
|
27
|
+
export * from './hinkalTvl.types';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare enum VERIFICATION_TYPE {
|
|
2
|
+
USER = "USER",
|
|
3
|
+
BUSINESS = "BUSINESS"
|
|
4
|
+
}
|
|
5
|
+
export declare const VerificationTypes: VERIFICATION_TYPE[];
|
|
6
|
+
export declare enum Passports {
|
|
7
|
+
AiPriseKyc = 0,
|
|
8
|
+
AiPriseKyb = 1,
|
|
9
|
+
BABPassport = 2,
|
|
10
|
+
GalxePassport = 3,
|
|
11
|
+
ZkMePassport = 4,
|
|
12
|
+
CoinbasePassport = 5,
|
|
13
|
+
AuthentoPassport = 6,
|
|
14
|
+
AuthentoPassportKyb = 7,
|
|
15
|
+
ReclaimCoinbasePassport = 8,
|
|
16
|
+
ReclaimBNBPassport = 9,
|
|
17
|
+
ReclaimOKXPassport = 10,
|
|
18
|
+
ReclaimGatePassport = 11,
|
|
19
|
+
ReclaimKucoinPassport = 12,
|
|
20
|
+
ReclaimMexcPassport = 13,
|
|
21
|
+
ReclaimHtxPassport = 14
|
|
22
|
+
}
|
|
23
|
+
export declare enum KycVerificationResult {
|
|
24
|
+
APPROVED = "APPROVED",// The user is verified. The verification process successfully completed.
|
|
25
|
+
DECLINED = "DECLINED",// The user is not verified. The verification process successfully completed.
|
|
26
|
+
REVIEW = "REVIEW",// The end user or business needs to be manually looked at. The verification process successfully completed.
|
|
27
|
+
UNKNOWN = "UNKNOWN"
|
|
28
|
+
}
|
|
29
|
+
export declare enum KycVerificationStatus {
|
|
30
|
+
COMPLETED = "COMPLETED",// The verification process successfully completed.
|
|
31
|
+
FAILED = "FAILED",// The verification process failed. status_reasons(explained below) should have more details.
|
|
32
|
+
PENDING = "PENDING",// The verification process is waiting for a third-party API to complete its processing.
|
|
33
|
+
RUNNING = "RUNNING",// The verification process is running.
|
|
34
|
+
NOT_STARTED = "NOT_STARTED"
|
|
35
|
+
}
|
|
36
|
+
export interface VerificationData {
|
|
37
|
+
verificationResult: KycVerificationResult;
|
|
38
|
+
verificationStatus: KycVerificationStatus;
|
|
39
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { PendleMarket, PendleSwapType } from './pendle.types';
|
|
2
|
+
import { ERC20Token } from './token.types';
|
|
3
|
+
export type PendleAPIMarket = {
|
|
4
|
+
id: string;
|
|
5
|
+
chainId: number;
|
|
6
|
+
address: string;
|
|
7
|
+
name: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
expiry: Date;
|
|
10
|
+
pt: PendleAPIAsset;
|
|
11
|
+
yt: PendleAPIAsset;
|
|
12
|
+
sy: PendleAPIAsset;
|
|
13
|
+
lp: PendleAPIAsset;
|
|
14
|
+
accountingAsset: PendleAPIAsset;
|
|
15
|
+
underlyingAsset: PendleAPIAsset;
|
|
16
|
+
basePricingAsset: PendleAPIAsset;
|
|
17
|
+
rewardTokens: PendleAPIAsset[] | undefined;
|
|
18
|
+
inputTokens: PendleAPIAsset[] | undefined;
|
|
19
|
+
outputTokens: PendleAPIAsset[] | undefined;
|
|
20
|
+
protocol: string;
|
|
21
|
+
underlyingPool: string;
|
|
22
|
+
simpleName: string;
|
|
23
|
+
simpleSymbol: string;
|
|
24
|
+
simpleIcon: string;
|
|
25
|
+
proName: string;
|
|
26
|
+
proSymbol: string;
|
|
27
|
+
proIcon: string;
|
|
28
|
+
farmName: string;
|
|
29
|
+
farmSymbol: string;
|
|
30
|
+
farmSimpleName: string;
|
|
31
|
+
farmSimpleSymbol: string;
|
|
32
|
+
farmSimpleIcon: string;
|
|
33
|
+
farmProName: string;
|
|
34
|
+
farmProSymbol: string;
|
|
35
|
+
farmProIcon: string;
|
|
36
|
+
assetRepresentation: string;
|
|
37
|
+
isWhitelistedPro: boolean;
|
|
38
|
+
isWhitelistedSimple: boolean;
|
|
39
|
+
votable: boolean;
|
|
40
|
+
isActive: boolean;
|
|
41
|
+
accentColor: string;
|
|
42
|
+
totalPt: number;
|
|
43
|
+
totalSy: number;
|
|
44
|
+
totalLp: number;
|
|
45
|
+
totalActiveSupply: number;
|
|
46
|
+
liquidity: {
|
|
47
|
+
usd: number;
|
|
48
|
+
acc: number;
|
|
49
|
+
};
|
|
50
|
+
tradingVolume: {
|
|
51
|
+
usd: number;
|
|
52
|
+
};
|
|
53
|
+
underlyingInterestApy: number;
|
|
54
|
+
underlyingRewardApy: number;
|
|
55
|
+
underlyingApy: number;
|
|
56
|
+
impliedApy: number;
|
|
57
|
+
ytFloatingApy: number;
|
|
58
|
+
ptDiscount: number;
|
|
59
|
+
swapFeeApy: number;
|
|
60
|
+
pendleApy: number;
|
|
61
|
+
arbApy: number;
|
|
62
|
+
aggregatedApy: number;
|
|
63
|
+
maxBoostedApy: number;
|
|
64
|
+
lpRewardApy: number;
|
|
65
|
+
voterApy: number;
|
|
66
|
+
estimatedDailyPoolRewards: {
|
|
67
|
+
asset: PendleAPIAsset;
|
|
68
|
+
amount: number;
|
|
69
|
+
}[];
|
|
70
|
+
dataUpdatedAt: Date;
|
|
71
|
+
liquidityChange24h: number;
|
|
72
|
+
tradingVolumeChange24h: number;
|
|
73
|
+
underlyingApyChange24h: number;
|
|
74
|
+
impliedApyChange24h: number;
|
|
75
|
+
ytFloatingApyChange24h: number;
|
|
76
|
+
categoryIds: [];
|
|
77
|
+
timestamp: Date;
|
|
78
|
+
scalarRoot: number;
|
|
79
|
+
initialAnchor: number;
|
|
80
|
+
};
|
|
81
|
+
export type PendleAPIAsset = {
|
|
82
|
+
id?: string;
|
|
83
|
+
chainId: number;
|
|
84
|
+
address: string;
|
|
85
|
+
name: string;
|
|
86
|
+
symbol: string;
|
|
87
|
+
decimals: number;
|
|
88
|
+
expiry: Date;
|
|
89
|
+
accentColor: string;
|
|
90
|
+
price: {
|
|
91
|
+
usd: number;
|
|
92
|
+
acc: number;
|
|
93
|
+
};
|
|
94
|
+
priceUpdatedAt: Date;
|
|
95
|
+
baseType: string;
|
|
96
|
+
types: string[];
|
|
97
|
+
protocol: string;
|
|
98
|
+
underlyingPool: string;
|
|
99
|
+
simpleName: string;
|
|
100
|
+
simpleSymbol: string;
|
|
101
|
+
simpleIcon: string;
|
|
102
|
+
proName: string;
|
|
103
|
+
proSymbol: string;
|
|
104
|
+
proIcon: string;
|
|
105
|
+
zappable: boolean;
|
|
106
|
+
};
|
|
107
|
+
export type PendleAPIResponse<T> = {
|
|
108
|
+
transaction: {
|
|
109
|
+
data: string;
|
|
110
|
+
to: string;
|
|
111
|
+
};
|
|
112
|
+
methodName: string;
|
|
113
|
+
data: T;
|
|
114
|
+
};
|
|
115
|
+
export type PendleAPISwapResponseData = {
|
|
116
|
+
/** when swapping for Yt */
|
|
117
|
+
amountYtOut?: string;
|
|
118
|
+
/** when swapping for Pt */
|
|
119
|
+
amountPtOut?: string;
|
|
120
|
+
/** when swapping Yt or Pt for Token */
|
|
121
|
+
amountTokenOut?: string;
|
|
122
|
+
amountSyFeeFromLimit: string;
|
|
123
|
+
amountSyFeeFromMarket: string;
|
|
124
|
+
priceImpact: number;
|
|
125
|
+
};
|
|
126
|
+
export type PendleAPIMintResponseData = {
|
|
127
|
+
amountPyOut?: string;
|
|
128
|
+
priceImpact: number;
|
|
129
|
+
};
|
|
130
|
+
export type PendleAPIRedeemResponseData = {
|
|
131
|
+
amountTokenOut?: string;
|
|
132
|
+
priceImpact: number;
|
|
133
|
+
};
|
|
134
|
+
export type PendleAPIError = {
|
|
135
|
+
message: string;
|
|
136
|
+
code: string;
|
|
137
|
+
issues: [
|
|
138
|
+
{
|
|
139
|
+
message: string;
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
};
|
|
143
|
+
export type CallApiPendleSwapParams = {
|
|
144
|
+
chainId: number;
|
|
145
|
+
receiverAddr: string;
|
|
146
|
+
market: PendleMarket;
|
|
147
|
+
tokenIn: ERC20Token;
|
|
148
|
+
tokenOut: ERC20Token;
|
|
149
|
+
amountTokenIn: string;
|
|
150
|
+
slippage: number;
|
|
151
|
+
syTokenInAddr?: string;
|
|
152
|
+
syTokenOutAddr?: string;
|
|
153
|
+
swapType?: PendleSwapType;
|
|
154
|
+
};
|
|
155
|
+
export type CallApiPendleMintParams = {
|
|
156
|
+
chainId: number;
|
|
157
|
+
receiverAddr: string;
|
|
158
|
+
ytAddress: string;
|
|
159
|
+
tokenIn: ERC20Token;
|
|
160
|
+
amountTokenIn: string;
|
|
161
|
+
syTokenInAddr?: string;
|
|
162
|
+
slippage: number;
|
|
163
|
+
};
|
|
164
|
+
export type CallApiPendleLiquidityCommonParams = {
|
|
165
|
+
chainId: number;
|
|
166
|
+
receiverAddr: string;
|
|
167
|
+
market: PendleMarket;
|
|
168
|
+
slippage: number;
|
|
169
|
+
};
|
|
170
|
+
export type CallApiPendleAddLiquiditySingleTokenParams = CallApiPendleLiquidityCommonParams & {
|
|
171
|
+
tokenIn: ERC20Token;
|
|
172
|
+
syTokenInAddr?: string;
|
|
173
|
+
amountTokenIn: bigint;
|
|
174
|
+
};
|
|
175
|
+
export type CallApiPendleAddLiquiditySingleSyParams = CallApiPendleLiquidityCommonParams & {
|
|
176
|
+
amountSyIn: bigint;
|
|
177
|
+
};
|
|
178
|
+
export type CallApiPendleAddLiquiditySinglePtParams = CallApiPendleLiquidityCommonParams & {
|
|
179
|
+
amountPtIn: bigint;
|
|
180
|
+
};
|
|
181
|
+
export type CallApiPendleAddLiquidityDualTokenAndPtParams = CallApiPendleLiquidityCommonParams & {
|
|
182
|
+
tokenIn: ERC20Token;
|
|
183
|
+
syTokenInAddr?: string;
|
|
184
|
+
amountTokenDesired: bigint;
|
|
185
|
+
amountPtDesired: bigint;
|
|
186
|
+
};
|
|
187
|
+
export type CallApiPendleAddLiquidityDualSyAndPtParams = CallApiPendleLiquidityCommonParams & {
|
|
188
|
+
amountSyDesired: bigint;
|
|
189
|
+
amountPtDesired: bigint;
|
|
190
|
+
};
|
|
191
|
+
export type CallApiPendleRemoveLiquidityCommonParams = CallApiPendleLiquidityCommonParams & {
|
|
192
|
+
amountLpToRemove: bigint;
|
|
193
|
+
};
|
|
194
|
+
export type CallApiPendleRemoveLiquidityTokenParams = CallApiPendleRemoveLiquidityCommonParams & {
|
|
195
|
+
tokenOut: ERC20Token;
|
|
196
|
+
syTokenOutAddr?: string;
|
|
197
|
+
};
|
|
198
|
+
export type CallApiPendleRedeemParams = {
|
|
199
|
+
chainId: number;
|
|
200
|
+
receiverAddr: string;
|
|
201
|
+
ytAddress: string;
|
|
202
|
+
tokenOut: ERC20Token;
|
|
203
|
+
amountTokenIn: string;
|
|
204
|
+
syTokenOutAddr?: string;
|
|
205
|
+
slippage: number;
|
|
206
|
+
};
|
|
207
|
+
export type PendleMarketTransactionsAPI = {
|
|
208
|
+
id: string;
|
|
209
|
+
chainId: number;
|
|
210
|
+
txHash: string;
|
|
211
|
+
blockNumber: number;
|
|
212
|
+
timestamp: string;
|
|
213
|
+
action: string;
|
|
214
|
+
origin: string;
|
|
215
|
+
market: PendleAPIMarket;
|
|
216
|
+
inputs: {
|
|
217
|
+
asset: PendleAPIAsset;
|
|
218
|
+
amount: number;
|
|
219
|
+
}[];
|
|
220
|
+
outputs: {
|
|
221
|
+
asset: PendleAPIAsset;
|
|
222
|
+
amount: number;
|
|
223
|
+
}[];
|
|
224
|
+
user: string;
|
|
225
|
+
valuation: {
|
|
226
|
+
usd: number;
|
|
227
|
+
acc: number;
|
|
228
|
+
};
|
|
229
|
+
implicitSwapFeeSy: number;
|
|
230
|
+
explicitSwapFeeSy: number;
|
|
231
|
+
impliedApy: number;
|
|
232
|
+
gasUsed: number;
|
|
233
|
+
};
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { PendleAction, PendleLPAction } from './hinkal.types';
|
|
2
|
+
export declare enum PendleTabs {
|
|
3
|
+
Trade = "TRADE",
|
|
4
|
+
Earn = "EARN"
|
|
5
|
+
}
|
|
6
|
+
export declare enum PendleTradeGeneralTabs {
|
|
7
|
+
Markets = "Market",
|
|
8
|
+
Pools = "Pools",
|
|
9
|
+
Dashboard = "Dashboard"
|
|
10
|
+
}
|
|
11
|
+
export declare enum PendleTradeTabs {
|
|
12
|
+
Swap = "Swap",
|
|
13
|
+
Mint = "Mint"
|
|
14
|
+
}
|
|
15
|
+
export declare enum PendlePoolTabs {
|
|
16
|
+
Zap = "Zap",
|
|
17
|
+
Manual = "Manual"
|
|
18
|
+
}
|
|
19
|
+
export declare enum PendlePoolZapTabs {
|
|
20
|
+
ZapIn = "Zap In",
|
|
21
|
+
ZapOut = "Zap Out"
|
|
22
|
+
}
|
|
23
|
+
export declare enum PendlePoolManualTabs {
|
|
24
|
+
AddLiquidity = "Add Liquidity",
|
|
25
|
+
RemoveLiquidity = "Remove Liquidity"
|
|
26
|
+
}
|
|
27
|
+
export declare enum PendleDashboardTabs {
|
|
28
|
+
YT = "YT",
|
|
29
|
+
LP = "LP"
|
|
30
|
+
}
|
|
31
|
+
export declare enum PendleEarnTabs {
|
|
32
|
+
Pool = "Pool",
|
|
33
|
+
Stake = "Stake"
|
|
34
|
+
}
|
|
35
|
+
export declare enum PendleChains {
|
|
36
|
+
Ethereum = "ethereum",
|
|
37
|
+
Arbitrum = "arbitrum",
|
|
38
|
+
BNB = "bnb",
|
|
39
|
+
Optimism = "optimism"
|
|
40
|
+
}
|
|
41
|
+
export declare enum PendleAssetType {
|
|
42
|
+
IB = "IB",
|
|
43
|
+
GENERIC = "GENERIC",
|
|
44
|
+
PENDLE_LP = "PENDLE_LP",
|
|
45
|
+
NATIVE = "NATIVE",
|
|
46
|
+
PT = "PT",
|
|
47
|
+
SY = "SY",
|
|
48
|
+
YT = "YT"
|
|
49
|
+
}
|
|
50
|
+
export declare enum PendleSwapType {
|
|
51
|
+
SwapExactTokenForYt = "SwapExactTokenForYt",
|
|
52
|
+
SwapExactTokenForPt = "SwapExactTokenForPt",
|
|
53
|
+
SwapExactYtForToken = "SwapExactYtForToken",
|
|
54
|
+
SwapExactPtForToken = "SwapExactPtForToken"
|
|
55
|
+
}
|
|
56
|
+
export type PendleAsset = {
|
|
57
|
+
id: string;
|
|
58
|
+
chainId: number;
|
|
59
|
+
address: string;
|
|
60
|
+
name: string;
|
|
61
|
+
proName: string;
|
|
62
|
+
symbol: string;
|
|
63
|
+
decimals: number;
|
|
64
|
+
icon: string;
|
|
65
|
+
baseAssetType: PendleAssetType;
|
|
66
|
+
assetTypes: PendleAssetType[];
|
|
67
|
+
expiry: Date;
|
|
68
|
+
price: {
|
|
69
|
+
usd: number;
|
|
70
|
+
acc: number;
|
|
71
|
+
};
|
|
72
|
+
priceUpdatedAt: Date;
|
|
73
|
+
protocol: string;
|
|
74
|
+
underlyingPool: string;
|
|
75
|
+
zappable: boolean;
|
|
76
|
+
};
|
|
77
|
+
export type PendleMarket = {
|
|
78
|
+
id: string;
|
|
79
|
+
address: string;
|
|
80
|
+
aggregatedApy: number;
|
|
81
|
+
chainId: number;
|
|
82
|
+
name: string;
|
|
83
|
+
symbol: string;
|
|
84
|
+
icon: string;
|
|
85
|
+
maturity: Date;
|
|
86
|
+
underlyingAPY: number;
|
|
87
|
+
impliedAPY: number;
|
|
88
|
+
lp: PendleAsset;
|
|
89
|
+
maxBoostedApy: number;
|
|
90
|
+
pt: PendleAsset;
|
|
91
|
+
sy: PendleAsset;
|
|
92
|
+
yt: PendleAsset;
|
|
93
|
+
underlyingAsset: PendleAsset;
|
|
94
|
+
basePricingAsset: PendleAsset;
|
|
95
|
+
rewardTokens: PendleAsset[] | [];
|
|
96
|
+
inputTokens: PendleAsset[] | [];
|
|
97
|
+
outputTokens: PendleAsset[] | [];
|
|
98
|
+
totalPt: number;
|
|
99
|
+
totalSy: number;
|
|
100
|
+
totalLp: number;
|
|
101
|
+
totalActiveSupply: number;
|
|
102
|
+
liquidity: {
|
|
103
|
+
usd: number;
|
|
104
|
+
acc: number;
|
|
105
|
+
};
|
|
106
|
+
tradingVolume: {
|
|
107
|
+
usd: number;
|
|
108
|
+
};
|
|
109
|
+
ytFloatingApy: number;
|
|
110
|
+
swapFeeApy: number;
|
|
111
|
+
pendleApy: number;
|
|
112
|
+
arbApy: number;
|
|
113
|
+
estimatedDailyPoolRewards: {
|
|
114
|
+
asset: PendleAsset;
|
|
115
|
+
amount: number;
|
|
116
|
+
}[];
|
|
117
|
+
liquidityChange24h: number;
|
|
118
|
+
tradingVolumeChange24h: number;
|
|
119
|
+
underlyingApyChange24h: number;
|
|
120
|
+
impliedApyChange24h: number;
|
|
121
|
+
ytFloatingApyChange24h: number;
|
|
122
|
+
accentColor: string;
|
|
123
|
+
};
|
|
124
|
+
export type PendleMarketAssetStatistics = {
|
|
125
|
+
liquidity: {
|
|
126
|
+
value: number;
|
|
127
|
+
change: number;
|
|
128
|
+
};
|
|
129
|
+
volume: {
|
|
130
|
+
value: number;
|
|
131
|
+
change: number;
|
|
132
|
+
};
|
|
133
|
+
underlyingAPY: {
|
|
134
|
+
value: number;
|
|
135
|
+
change: number;
|
|
136
|
+
};
|
|
137
|
+
fixedAPY: {
|
|
138
|
+
value: number;
|
|
139
|
+
change: number;
|
|
140
|
+
} | undefined;
|
|
141
|
+
impliedAPY: {
|
|
142
|
+
value: number;
|
|
143
|
+
change: number;
|
|
144
|
+
} | undefined;
|
|
145
|
+
longTermAPY: {
|
|
146
|
+
value: number;
|
|
147
|
+
change: number;
|
|
148
|
+
} | undefined;
|
|
149
|
+
};
|
|
150
|
+
export declare enum PendleMarketTransactionTypes {
|
|
151
|
+
mintPY = "MINT_PY",
|
|
152
|
+
redeemPY = "REDEEM_PY",
|
|
153
|
+
addLiquidity = "ADD_LIQUIDITY",
|
|
154
|
+
removeLiquidity = "REMOVE_LIQUIDITY",
|
|
155
|
+
swapPT = "SWAP_PT",
|
|
156
|
+
swapYT = "SWAP_YT",
|
|
157
|
+
swapPY = "SWAP_PY"
|
|
158
|
+
}
|
|
159
|
+
export type PendleMarketTransactions = {
|
|
160
|
+
type: PendleMarketTransactionTypes;
|
|
161
|
+
hash: string;
|
|
162
|
+
value: number;
|
|
163
|
+
tokensIn: {
|
|
164
|
+
token: PendleAsset | undefined;
|
|
165
|
+
amount: number;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
tokensOut: {
|
|
168
|
+
token: PendleAsset | undefined;
|
|
169
|
+
amount: number;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
time: Date;
|
|
172
|
+
};
|
|
173
|
+
export type PriceHistoricalData = {
|
|
174
|
+
time: string;
|
|
175
|
+
open: number;
|
|
176
|
+
high: number;
|
|
177
|
+
low: number;
|
|
178
|
+
close: number;
|
|
179
|
+
volume: number;
|
|
180
|
+
};
|
|
181
|
+
export type PendleAssetPriceHistoricalData = {
|
|
182
|
+
total: number;
|
|
183
|
+
currency: string;
|
|
184
|
+
timeFrame: string;
|
|
185
|
+
timestampStart: string;
|
|
186
|
+
timestampEnd: string;
|
|
187
|
+
results: PriceHistoricalData[] | undefined;
|
|
188
|
+
};
|
|
189
|
+
export type APYHistoricalData = {
|
|
190
|
+
timestamp: string;
|
|
191
|
+
underlyingApy: number;
|
|
192
|
+
impliedApy: number;
|
|
193
|
+
};
|
|
194
|
+
export type PendleMarketAPYHistoricalData = {
|
|
195
|
+
total: number;
|
|
196
|
+
timestampStart: string;
|
|
197
|
+
timestampEnd: string;
|
|
198
|
+
results: APYHistoricalData[] | undefined;
|
|
199
|
+
};
|
|
200
|
+
export type VolumeHistoricalData = {
|
|
201
|
+
time: string;
|
|
202
|
+
volume: number;
|
|
203
|
+
};
|
|
204
|
+
export type PendleMarketVolumeHistoricalData = {
|
|
205
|
+
total: number;
|
|
206
|
+
timestampStart: string;
|
|
207
|
+
timestampEnd: string;
|
|
208
|
+
results: VolumeHistoricalData[] | undefined;
|
|
209
|
+
};
|
|
210
|
+
export type PendleMarketDataKeyType = keyof PendleMarket;
|
|
211
|
+
export type PendleMetadata = {
|
|
212
|
+
pendleAction: PendleAction;
|
|
213
|
+
ytAddress: string;
|
|
214
|
+
userAddress?: string;
|
|
215
|
+
evmData?: string;
|
|
216
|
+
isRelayerOff?: boolean;
|
|
217
|
+
};
|
|
218
|
+
export type PendleLPMetadata = {
|
|
219
|
+
pendleLPAction: PendleLPAction;
|
|
220
|
+
lpAddress: string;
|
|
221
|
+
evmData: string;
|
|
222
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface RelayerTransaction {
|
|
2
|
+
to: string;
|
|
3
|
+
from: string;
|
|
4
|
+
contractAddress: string | null;
|
|
5
|
+
gasUsed: {
|
|
6
|
+
type: string;
|
|
7
|
+
hex: string;
|
|
8
|
+
};
|
|
9
|
+
logsBloom: string;
|
|
10
|
+
blockHash: string;
|
|
11
|
+
transactionHash: string;
|
|
12
|
+
blockNumber: number;
|
|
13
|
+
confirmations: number;
|
|
14
|
+
cumulativeGasUsed: {
|
|
15
|
+
type: string;
|
|
16
|
+
hex: string;
|
|
17
|
+
};
|
|
18
|
+
effectiveGasPrice: {
|
|
19
|
+
type: string;
|
|
20
|
+
hex: string;
|
|
21
|
+
};
|
|
22
|
+
status: number;
|
|
23
|
+
type: number;
|
|
24
|
+
byzantium: boolean;
|
|
25
|
+
}
|