lamportsToSol function

double lamportsToSol(
  1. BigInt lamports
)

Converts lamports to sol.

Implementation

double lamportsToSol(final BigInt lamports) {
  assert(
      lamports <= (BigInt.from(double.maxFinite) * lamportsPerSol.toBigInt()),
      'The lamports value $lamports overflows the max double value ${double.maxFinite}.');
  return lamports / lamportsPerSol.toBigInt();
}