fbonds-core
Version:
Banx protocol sdk
23 lines (22 loc) • 1.04 kB
TypeScript
import { Bonds } from '../../idls/bonds';
import { BondOfferV3, BondingCurveType, LendingTokenType, UserVault } from '../types';
import { BN, Program, web3 } from '@coral-xyz/anchor';
type FetchOffersParams = {
program: Program<Bonds>;
market: web3.PublicKey;
bondingCurveType: BondingCurveType;
};
export declare function fetchTokenOffers({ program, market, bondingCurveType, }: FetchOffersParams): Promise<BondOfferV3[]>;
type FetchTokenPriceVsCollateral = {
connection: web3.Connection;
tokenTicker: string;
collateralTicker: string;
};
export declare function fetchTokenPriceVsCollateral({ connection, tokenTicker, collateralTicker, }: FetchTokenPriceVsCollateral): Promise<BN>;
export declare function fetchTokenDecimals(mint: web3.PublicKey, connection: web3.Connection): Promise<number>;
type FetchUserVaults = {
program: Program<Bonds>;
lendingTokenType: LendingTokenType;
};
export declare function fetchUserVaults({ program, lendingTokenType }: FetchUserVaults): Promise<UserVault[]>;
export {};