UNPKG

@kamino-finance/klend-sdk

Version:

Typescript SDK for interacting with the Kamino Lending (klend) protocol

18 lines 868 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StakePoolType = void 0; exports.mapStakedSolMintToPool = mapStakedSolMintToPool; const standardStakePool_1 = require("./standardStakePool"); var StakePoolType; (function (StakePoolType) { StakePoolType[StakePoolType["Standard"] = 0] = "Standard"; })(StakePoolType || (exports.StakePoolType = StakePoolType = {})); async function mapStakedSolMintToPool(rpc, mint) { // We cannot know which pool the mint corresponds to, so we fetch them program by program const maybeStandardPoolAndKey = await (0, standardStakePool_1.maybeGetStakedPoolByMint)(rpc, mint); if (maybeStandardPoolAndKey) { return [...maybeStandardPoolAndKey, StakePoolType.Standard]; } throw new Error(`Cannot map mint ${mint} to staked sol pool`); } //# sourceMappingURL=stakePool.js.map