How does Phantom or Solcan know the stake accounts?

I asked a question earlier how one was able to list the stake accounts tied to a wallet address. But I guess no body knows the answer to this so I am wondering how Phantom and Solscan is able to pull this data? How is the wallet address tied to the stake accounts? There must be a simple CLI call to view the stake accounts. Does anybody know?

1 Like

Everything that talks to the Solana blockchain works by communicating through the Solana JSON RPC API, whether that’s the CLI, or a webapp like Phantom or Solflare.

But sometimes the logic for things are wrapped up in smart contracts and you have to know the program ID of the smart contract to communicate with and the format of the accounts that that contract creates so that you can query and understand them.

I haven’t investigated how stake accounts work specifically yet, but if I get the chance I’ll look around and see if I can figure out how it’s done.

This is what I assumed but then there must be a simple connection between a wallet account and the staking accounts associated with it so it can easily query this data and show the results like how Phantom and Solscan is able to show this. Maybe this association is only viewable by JSON RPC?

no the wallets do not stake, you must use the website to use phantom wallet with it, but it is linked in the Solana Validators | web page after you click on any validator you like, then there is a link to and there you will connect your wallet and stake to that validator via the website.

But its better to use a stake pool and you will see the stake pools listed at the top of the website.

You can stake directly in Phantom and I believe Solflare as well, but this topic is about listing stake accounts, not actually staking.

1 Like

yes of course its about listing staking, so I failed to explain myself completely as I had intended to imply that by using a stake pool and thus staking in that pool only, then you have a list of your stakes. and if you use multiple pools, you still have easy access to your stake lists. otherwise you need a spreadsheet to record all the stakes and that is not realistic for folks to have to do as this poster is right to complain about. but the inherent design of the block chain lends to not having easy way to list stake. the phantom wallet certainly does not allow the user to have a summary of stakes.