Converts micro-SOL per token basis unit to SOL per whole token.
Takes a price in micro-SOL per smallest token unit and converts it to
SOL per whole token, accounting for token decimals.
Returns
The price in SOL per whole token
Example
// For a token with 6 decimals constmicroSolPerBasis = microLamports(500n); // Price per smallest unit constsolPerWholeToken = solPerToken(microSolPerBasis, 6); // Returns price in SOL for one whole token
Converts micro-SOL per token basis unit to SOL per whole token.
Takes a price in micro-SOL per smallest token unit and converts it to SOL per whole token, accounting for token decimals.
Returns
The price in SOL per whole token
Example