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

Make getApiV1BoxesP1 optionally return unconfirmed boxes #216

Open
MrStahlfelge opened this issue May 18, 2022 · 5 comments
Open

Make getApiV1BoxesP1 optionally return unconfirmed boxes #216

MrStahlfelge opened this issue May 18, 2022 · 5 comments
Assignees

Comments

@MrStahlfelge
Copy link
Member

getApiV1BoxesP1 returns box information, but there doesn't seem to be a way to make it return information for unconfirmed boxes. Only way to retrieve box information for unconfirmed boxes is to request the whole mempool, which is over the top when the box id is already known.
I suggest we add a includeMempool parameter to getApiV1BoxesP1 which, when set to true, also returns unconfirmed boxes when available for the given id.

@monyedavid
Copy link
Collaborator

the pr #214 does this also

@MrStahlfelge
Copy link
Member Author

Great :)

@MrStahlfelge
Copy link
Member Author

@monyedavid @oskin1 #214 is merged now, how can I access the unconfirmed boxes by id?

@oskin1
Copy link
Member

oskin1 commented Oct 13, 2022

@MrStahlfelge /api/v1/boxes/unspent/unconfirmed/byAddress/{add}

@oskin1 oskin1 closed this as completed Oct 13, 2022
@MrStahlfelge
Copy link
Member Author

This was is what was asked for. We needed an endpoint for unconfirmed boxes by id.

Additionally, I tested the endpoint and the behaviour is weird:

  • when there is no unconfirmed box, it returns confirmed boxes for the address
  • if there are unconfirmed boxes, it returns no confirmed boxes any more
  • if there are unconfirmed boxes for the address, it returns all boxes of the transactions, even the ones for other addresses

Last but not last, endpoint is not in API doc.

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

4 participants