Functions
assertIsLamports
assertIsLamports(
putativeLamports
):asserts putativeLamports is Lamports
Lamport values returned from the RPC API conform to the type Lamports. You can use a value of that type wherever a quantity of Lamports is expected.
Parameters
Parameter | Type |
---|---|
putativeLamports | bigint |
Returns
asserts putativeLamports is Lamports
Example
From time to time you might acquire a number that you expect to be a quantity of Lamports, from an untrusted network API or user input. To assert that such an arbitrary number is usable as a quantity of Lamports, use this function.