nifty-oss / asset

A lightweight standard for non-fungible assets.
Apache License 2.0
38 stars 8 forks source link

Feature request: get groups #51

Closed joefitter closed 7 months ago

joefitter commented 7 months ago

Not sure how possible this would be to build in to the GPA builder method, but the ability to fetch all groups would be very useful. Currently I need to fetch all deserialised assets and filter by the presence of the grouping extension, which will quickly become unfeasible as program accounts grow

febo commented 7 months ago

A way to do it with a GPA that does not require deserialising assets is to add a dataSlice to grab only the group pubkey of assets – the group offset is fixed on the account data. This will give you all the pubkeys of group assets (filter out the Pubkey::default() value since this is the value used when there is no group set).

But the most scalable solution will be using an indexer.

joefitter commented 7 months ago

Oh that's great, I'd assumed the slice would be in a variable position.

Yep need to get on to Helius and co