-
-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dash InstantSend on xPub API #983
Comments
I did run into a somewhat similar issue #578 of getting Dash specific info. The solution I'm using at the moment is to make two api calls, one to endpoint Afterwards I make a second call to It's not really efficient and would be nice to be able to just do this with one call but I don't know how accommodating the upstream maintainers are to accepting PR for improving this situation. Would be wonderful if they did. |
@greatwolf /api/v2/utxo/<xpub_addr> does have an optional field called |
I might be misunderstanding the problem but when you make the request you provide the xpub as a parameter that forms the url. So that means all the transaction outputs in the json response returned by As far as telling apart which is the recipient and which is the change addr you just have to combine the Also, there's a |
Are you sure you're not confusing |
Forgot to note, there is a subtle detail. Make sure you use |
As far as summing the balances, you might not need to do it yourself. The |
Hey guys, I’m trying to do something and I need some help. I’m not quite sure how to approach this.
What I’m trying to do is to enable InstantSend in the TrustWallet. This is quite old and established Dash feature that enables near instant transactions in the blockchain that takes only 1-2s, but it still yet not implemented in all wallets. My intention is to complete it
InstantSend works by settling pending mempool transactions forcefully in the chain with the help of the masternode quorums. That means, that once transaction gives InstantSend status, it cannot be removed or rejected from the chain. Few years ago, there were a major network upgrade - all transactions are now InstantSend and it works several times faster.
I found out that Trust Wallet seems be using blockbook api for querying data in the app, and it’s using xPub blockbook api to show total confirmed balance, but it does not include InstantSend transactions.
Indeed, there is a tx-specific blockbook api, that shows the status of the InstantSend, but it shows that only per transaction, and not for xpub.
Blockbook xpub api call does have a list of txids (even unconfirmed), that you could possible look at with tx-specific, but you can’t match the correct output, because you don’t know what address exactly belongs to given xpub, so you can’t sum it. Alternatively, there is a tokens option in the api, that list all address transfers on this xpub, but unfortunately it shows it only for confirmed transactions.
So, to wrap everything up, I would like to get the total balance for the given xPub that also includes InstantSend transactions too. How can I make this possible? I’m eager to suggest all necessary changes via PR.
The text was updated successfully, but these errors were encountered: