If you send a coin to a wallet, how does it know that it exists?

This question was asked at chia_network.public on Keybase.

1 Like

You create the coin with the puzzle hash that directly corresponds to their wallet address, then the wallet constantly syncs with the network and looks for coins with that puzzle hash that it can spend.


This is the entire job of a wallet. It has to know how to look for the coins that it considers under its purview as well as how to send them in a way that other wallets will be able to detect it.

Some wallets just look for puzzle hashes, others look through puzzles and solutions to find a spend that would have gone to them, and there is also an optional third argument to create coin which is a list of “memos”, the first of which is a “hint” which is indexed by the full node (if it’s 32 bytes) and can therefore be used to get a wallet’s attention.