( connection: Connection, payer: Keypair )
| 28 | } |
| 29 | |
| 30 | export async function getBalance( |
| 31 | connection: Connection, |
| 32 | payer: Keypair |
| 33 | ): Promise<[number, number]> { |
| 34 | let lamports = await connection.getBalance(payer.publicKey); |
| 35 | const startingBalanceSOL = lamports / LAMPORTS_PER_SOL; |
| 36 | return [startingBalanceSOL, lamports]; |
| 37 | } |
| 38 | |
| 39 | export async function feesEstimate(connection: Connection, payer: Keypair): Promise<number> { |
| 40 | const { blockhash } = await connection.getLatestBlockhash(); |
no outgoing calls
no test coverage detected