Interface: CalculateBuyAmountForGraduationOptions
Gala Launchpad SDK 9.0.0-rc.5 / index / CalculateBuyAmountForGraduationOptions
Interface: CalculateBuyAmountForGraduationOptions
Defined in: packages/launchpad-sdk/dist/types/options.dto.d.ts:169
Options for calculating buy amount for graduation
Graduation requires purchasing all remaining tokens in the pool. Performance optimization: provide currentSupply to avoid fetching pool details twice.
Example
import { CALCULATION_MODES } from '@gala-chain/launchpad-sdk';
// Basic usage (fetches pool details internally)
const cost = await sdk.calculateBuyAmountForGraduation({ tokenName: 'anime' });
// Performance-optimized (reuse fetched pool details)
const poolDetails = await sdk.fetchPoolDetailsForCalculation('anime');
const cost = await sdk.calculateBuyAmountForGraduation({
tokenName: 'anime',
calculateAmountMode: CALCULATION_MODES.LOCAL,
currentSupply: poolDetails.currentSupply
});
Properties
calculateAmountMode?
optionalcalculateAmountMode?:"local"|"external"
Defined in: packages/launchpad-sdk/dist/types/options.dto.d.ts:177
Calculation mode override (optional - defaults to SDK's calculateAmountMode). Use CALCULATION_MODES.LOCAL for instant client-side calculations. Use CALCULATION_MODES.EXTERNAL for network-based GalaChain calculations.
currentSupply?
optionalcurrentSupply?:string
Defined in: packages/launchpad-sdk/dist/types/options.dto.d.ts:179
Current token supply (optional - only used for local mode, auto-fetched if missing)
tokenName
tokenName:
string
Defined in: packages/launchpad-sdk/dist/types/options.dto.d.ts:171
Token name