Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7869

How do i get the 10 public keys where the amount is > 100

$
0
0
import { Connection, PublicKey, LAMPORTS_PER_SOL } from "@solana/web3.js";const publicKeyString = "Gjkud8j4qDLRyox4eMGC5QDWq9HoG5JTYpxRjLYepHyh";const mainnetBetaEndpoint = "https://api.mainnet-beta.solana.com";const connection = new Connection(mainnetBetaEndpoint);(async () => {  try {    const balance = await connection.getBalance(new PublicKey(publicKeyString));    console.log("SOL Balance:", balance / LAMPORTS_PER_SOL);  } catch (error) {    console.error("Error fetching balance:", error);  }})();

this is how i can get the total sol balance of the wallet with public keynow lets say i dont know the public key but i want to get the first(latest) 100 public key where sol blance is > 100


Viewing all articles
Browse latest Browse all 7869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>