Using https://docs.phantom.app/solana/integrating-phantomWhen I havebuild a working Solana Phantom Wallet Extensionwallet integration (onusing localhost
/devnet
these docs)
It is working in that I have a localhost
site which can request 0.1 SOL from the user to be sent to on a fixed wallet address and (as long aspage, it doesn't include the user acceptsbackend in the whole transaction) funds get sent and it completes with no issue at all.
But.. howHow does the backend hear about that transaction?
Obviously I could just send the user's "processing" transaction hash to the server, store them in a list behind the scenes, periodically check that list for hashes which have cleared on Block Explorer etc etc
But lets say The back of house is not signing and sending the page crashes immediately after Phantom transaction submits, or the internet cuts out, or the user tampers with the outgoing network packet.. the transaction hashfront is now lost/untrustworthy.
The user has 'spent money' and our backend has no system to reconcile ifSo the payment ever even happenedfrontend would have to send signatures to.. my backend?
What is the proper approach for a server to recieve a transaction hash. DoHow could I use an RPC node to babysit a wallet, and watchtrust the users packet? What if it for correctly-sized paymentsfails to deliver?
It would be nice What if @solana/web3.js
would knock on a backdoor onthe user spams my server with false signatures to let me know that these transactions were coming through. Does itvalidate?
I feel like I am missing a piece of the puzzle here..