Skip to main content

index/interfaces/CalculateBuyAmountOptions.md

Options for calculating buy amount

Properties​

PropertyTypeDescription
amountstringAmount to spend or buy
currentSupply?stringCurrent token supply (optional - only used for local mode, auto-fetched if missing)
mode?"local" | "external"Calculation mode override (optional - defaults to SDK's calculateAmountMode). 'local' = Client-side bonding curve (instant, no network calls) 'external' = Network calls to GalaChain (slower, always fresh)
tokenNamestringToken name
type"native" | "exact"Calculation type