Reputation: 604
I am trying to listen for transactions for an account, I need to know when a transaction is received and get the hash of that transaction.
I am using Solana's json rpc api on https://api.testnet.solana.com
What I tried so far:
blockSubscribe: is unstable and disabled by default.
accountSubscribe: this will send the account balance but not the transaction.
logsSubscribe: tried passing account address as mentions but didn't work.
Upvotes: 0
Views: 4171
Reputation: 196
You need to use getConfirmedSignaturesForAddress2 then use getConfirmedTransaction to get the actual transaction.
Upvotes: 3