Variable: CALCULATION\_MODES
Gala Launchpad SDK 9.0.0-rc.5 / index / CALCULATION_MODES
Variable: CALCULATION_MODES
constCALCULATION_MODES:object
Defined in: packages/launchpad-sdk/dist/constants/enums.d.ts:78
Calculation mode constants for amount calculations
Type Declaration
EXTERNAL
readonlyEXTERNAL:"external"
Network-based calculation via GalaChain (slower, always fresh)
LOCAL
readonlyLOCAL:"local"
Client-side bonding curve calculation (instant, no network calls)
Example
import { CALCULATION_MODES } from '@gala-chain/launchpad-sdk';
// Use local mode for instant calculations
await sdk.calculateBuyAmount({
tokenName: 'anime',
amount: '100',
type: 'exact',
mode: CALCULATION_MODES.LOCAL
});
// Use external mode for network-based calculations
await sdk.calculateBuyAmount({
tokenName: 'anime',
amount: '100',
type: 'exact',
mode: CALCULATION_MODES.EXTERNAL
});