hedera-mirror-node icon indicating copy to clipboard operation
hedera-mirror-node copied to clipboard

HIP-336 NFT allowance REST API

Open steven-sheehy opened this issue 3 years ago • 13 comments

Problem

HIP-336 describes new APIs to approve and exercise allowances to a delegate account. An allowance grants a spender the right to transfer a predetermined amount of the payer's hbars or tokens to another account of the spender's choice. The mirror node should expose this data via its REST API.

Solution

Add a /api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/nfts as per the design doc.

Alternatives

No response

steven-sheehy avatar Jan 31 '22 18:01 steven-sheehy

i think we need to either include both approve and approveForAll on the token or move both to the account. But consistency seems like the right play here.

Ashe-Oro avatar Oct 06 '22 13:10 Ashe-Oro

This is still an issue as of 0.73.0.

We would like a simple way to list NFT allowances for an account that has used the approveTokenNftAllowance or approveTokenNftAllowanceAllSerials allowance transactions.

Currently, the only way to get this information is via the spender field on an nft and paginate through every NFT with a query such as:

https://testnet.mirrornode.hedera.com/api/v1/accounts/0.0.1792/nfts

This is still not 100% complete as the spender field doesn't get set when using approveTokenNftAllowanceAllSerials. So currently there is no way to check which NFTs have been affected by the "All Serial allowances" transaction. There is another issue open for that specific bug here.

justynspooner avatar Feb 06 '23 12:02 justynspooner

Good morning,

Yes, exactly. We need this, right now it's a bit frustrating and also If you use approveTokenNftAllowanceAllSerials you can't see anything... :(

AdrianKBL avatar Feb 06 '23 12:02 AdrianKBL

Hello, any updates? @SimiHunjan we keep having issues with this and we can't check the Allowance...

AdrianKBL avatar Jul 17 '23 07:07 AdrianKBL

hey @AdrianKBL ! Checked with the team and the current target is end of Q3/ early Q4.

SimiHunjan avatar Jul 20 '23 00:07 SimiHunjan

Okey thanks for the response.

AdrianKBL avatar Jul 26 '23 06:07 AdrianKBL

Good evening,

Any update @SimiHunjan? this is important for many reasons for KabilaApp.

AdrianKBL avatar Oct 09 '23 15:10 AdrianKBL

Hey Guys, Any updates on this, our UX needs this functionality on karateka.io.

vinaysingh8866 avatar Nov 01 '23 16:11 vinaysingh8866

Thanks for your feedback. We will be working on the design for this API and a few other allowance related APIs this sprint as part of https://github.com/hashgraph/hedera-mirror-node/issues/7143. We'll be creating a HIP soon and will appreciate your feedback on it once it's available. 🙏🏻

steven-sheehy avatar Nov 02 '23 16:11 steven-sheehy

Here is the HIP for the NFT allowance API. I would greatly appreciate any feedback.

mgoelswirlds avatar Jan 18 '24 09:01 mgoelswirlds

Thanks guys was waiting for this for long time, will add it next month and let you know if there's any feedback.

vinaysingh8866 avatar Jan 22 '24 05:01 vinaysingh8866

Is this API still not released ?

0xAnon0602 avatar Apr 23 '24 12:04 0xAnon0602

Is this API still not released ?

Not yet. We're taking this opportunity to tackle some technical debt and this will be our first REST API written in Java instead of JavaScript. So this effort is taking a bit longer than usual. That said, a beta version of this API will be available in 0.104 for you to try and provide any feedback.

steven-sheehy avatar May 01 '24 15:05 steven-sheehy

The mirror node's release 0.106.0 will include the /allowances/nfts endpoint. This implementation follows HIP-857. We invite you to explore this feature and its capabilities. Your feedback is valuable to us, and we would appreciate if you could share your experiences after using it.

mgoelswirlds avatar May 28 '24 14:05 mgoelswirlds