fbonds-core
Version:
Banx protocol sdk
57 lines (56 loc) • 2.02 kB
TypeScript
import { BanxAdventure, BanxAdventureSubscription, BanxAdventureSubscriptionSnapshot, BanxPointsMap, BanxStake, BanxTokenStake } from '../../../types';
import { web3 } from '@coral-xyz/anchor';
import { BN } from '@coral-xyz/anchor';
export interface AdventureOptions {
adventure: BanxAdventure;
adventureSubscription: BanxAdventureSubscription;
}
export declare const calculateRewardsFromSubscriptions: (args: {
subscriptuionStakeTokensAmount: BN;
subscriptionStakePartnerPointsAmount: BN;
adventureTokensPerPoints: BN;
adventureTotalTokensStaked: BN;
adventureTotalPartnerPoints: BN;
adventureRewardsToBeDistributed: BN;
}[]) => BN;
export declare const calculateAdventureRewards: (params: {
adventure: Array<BanxAdventure>;
subscription: BanxAdventureSubscription;
}) => BN;
export declare const calculateTokensForPlayerPoints: (playerPoints: number) => number;
export declare const calculatePlayerPointsForTokens: (tokens: BN) => number;
export declare const optimisticInitializeBanxTokenStake: (args: {
user: web3.PublicKey;
}) => {
banxTokensStake: BanxTokenStake;
};
export declare const optimisticInitializeBanxStake: (args: {
banxPointsMap: BanxPointsMap;
banxStakeKey: web3.PublicKey;
userKey: web3.PublicKey;
nftMint: web3.PublicKey;
collateralTokenAccount: web3.PublicKey;
}) => {
banxStake: BanxStake;
};
export declare enum AdventureStakeStatus {
None = 0,
Active = 1,
Upcoming = 2,
Claimed = 3
}
export interface AdventureStakeUserInfo {
partnerPointsStaked: BN;
tokensStaked: BN;
nftsStaked: BN;
rewardsClaimed: BN;
adventureStaus: AdventureStakeStatus;
}
export declare const getAdventureStakeUserInfo: (args: {
adventure: BanxAdventure;
subscription: BanxAdventureSubscription;
}) => AdventureStakeUserInfo;
export declare const getHistoryAdventureStakeUserInfo: (args: {
adventure: BanxAdventure;
snapshot: BanxAdventureSubscriptionSnapshot;
}) => AdventureStakeUserInfo;