Add NFT API nft_get_metadata_by_owner()
The database API currently provides a way of retrieving NFTs by owner, but does not provide a way to retrieve NFTs by issuer.
Since NFTs are issued through an issuance contract, which on Peerplays is modeled by the the nft_metadata_object, it seems what is really needed an API call that retrieves not NFT objects (1.31.x), but metadata objects (1.30.x), by owner account. The owner of a metadata object can be considered to be the issuer of NFTs linked to the metadata.
Exists:
vector<nft_object> nft_get_tokens_by_owner(const account_id_type owner) const;
In code here: (Declaration, Definition)
Desired:
vector<nft_metadata_object> nft_get_metadata_by_owner(const account_id_type owner) const;
Note: Although existing API call does not have lower-bound and limit parameters, these would probably be a good idea for both API functions. See Database API call nft_get_all_tokens() should h... (#458 - closed) for rationale.
Importance:
This will support several projects, including TradeHands Explorer, wherein it will allow inspecting user accounts and seeing NFT collections issued by the account, and PeerShare (currently being worked on by @Hiltos1), in which NFT metadata objects associated with an account are used as a documents database for unique applications including onboarding new users.