Skip to content
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

getaddressdeltas and getaddressmempool are missing script #6215

Open
coolaj86 opened this issue Aug 14, 2024 · 1 comment
Open

getaddressdeltas and getaddressmempool are missing script #6215

coolaj86 opened this issue Aug 14, 2024 · 1 comment
Assignees

Comments

@coolaj86
Copy link

Related to dashpay/docs-core#40

Since getaddressuxtos is not reliable for realtime information (because it is not instantsend-aware), 'getaddressdeltas' must be used in conjunction with 'getaddressmempool' in order to get the correct uxtos.

However, neither 'getaddressdeltas' nor 'getaddressmempool' include script, which means that in order to use as a utxo for creating a transaction, the pkh has to be reproduced, which requires more wallet machinery in place, which leads to code that's more cumbersome when building a wallet.

Likewise, the deltas mempool fail to specify outputIndex vs inputIndex. This is workable since a negative satoshis value indicates inputIndex, otherwise it's outputIndex, but it would be nice if it were consistent to the delta type.

Example getaddressuxtos

https://trpc.digitalcash.dev/#?method=getaddressutxos&params=[{"addresses":["yQzps4ubfPzVdPUXNYAG9B6BvED1Jttaa8"]}]&submit

[
  {
    "address": "yQzps4ubfPzVdPUXNYAG9B6BvED1Jttaa8",
    "txid": "f9bee2ba45242c2f3c73e471a19fae5e967907a3eddf55282033a4c5d3e764fb",
    "outputIndex": 1,
    "satoshis": 144390000,
    "height": 1083179,
    "script": "76a91433531a4f36615c1fd00084eb460dff8176f5c36b88ac"
  }
]

Example getaddressdeltas

[
  {
    "address": "yQzps4ubfPzVdPUXNYAG9B6BvED1Jttaa8",
    "txid": "f9bee2ba45242c2f3c73e471a19fae5e967907a3eddf55282033a4c5d3e764fb",
    "index": 1,
    "satoshis": 144390000,
    "height": 1083179,
    "blockindex": 5
  }
]

Example getaddressmempool

I can't link to it because it's ephemeral data, but I believe it's exactly the same object as getaddressdeltas.

@coolaj86
Copy link
Author

Whoops, I meant to post this in https://github.com/dashpay/dash/issues. Perhaps someone with the power to do so can click on the Transfer button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants