-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This repository contains the code that powers the automatic XRPL image NFT metadata translation platform that you can use for free at api.universalnft.dev or host your own.
UniversalNFT.dev is a web platform that automatically translates pretty much any XRPL XLS-20 image NFT into one consistent response format.
You no longer have to deal with hundreds of different image NFT metadata schemas living on and off chain.
Instead, metadata always comes back from api.universalnft.dev like this
{
"nfTokenID": "000803E8CEC1EB1B331D8A55E39D451DE8E13F59CF5509D5FA17E45000000527",
"ownerAccount": "rPpMSFxzjqJ6AGgEZ8kgbQeeo6UJvUkVmb",
"imageUrl": "https://cloudflare-ipfs.com/ipfs/bafybeiewsupnlepoyqp7rgghjhkkfubdv45pli26phogyeisu5t3siav44/1670271940652.png",
"imageThumbnailCacheUrl": "https://api.universalnft.dev/v1.0/Image?file=000803E8CEC1EB1B331D8A55E39D451DE8E13F59CF5509D5FA17E45000000527.png",
"timestamp": "2024-02-10T17:08:04.6653210Z"
}
UniversalNFT.dev connects directly to the XRPL and loads the NFT data from the blockchain (where available), then it follows any hop to off-chain (usually IPFS) metadata and parses that metadata file to find the actual NFT image URL (IFPS or anything else).
Go to api.universalnft.dev and search for any XRPL NFT by NFTokenID and its owning public Wallet Address.
For example to load this NFT https://xpmarket.com/nfts/item/000803E8CEC1EB1B331D8A55E39D451DE8E13F59CF5509D5FA17E45000000527 we can search for it using
NFTokenID: 000803E8CEC1EB1B331D8A55E39D451DE8E13F59CF5509D5FA17E45000000527
Owner Wallet: rPpMSFxzjqJ6AGgEZ8kgbQeeo6UJvUkVmb
You can use OpenAPI (Swagger) and Swagger Codegen to create a client in pretty much any programming language. See https://swagger.io/tools/swagger-codegen/ for details as there is already a lot of documentation available on how to do this.
You can also integrate yourself using the REST API endpoints as shown in Swagger.
The free infrastructure provided at api.universalnft.dev is meant for development and testing use only. If you want to use it in production it is highly recommended that you host your own by following the setup instructions below as you will have much better performance.
The free hosted version has rate limits applied to incoming requests, as well as rate limits applied to outgoing XRPL cluster requests as to not overload the free XRPL cluster.
The free hosted version also has storage limits applied to the thumbnail image cache, so thumbnails will eventually be deleted automatically even if your application uses them. To recreate thumbnails you will have to call the /NFT endpoint again.
For maximum performance you should host your own Ripple node as well as your own UniversalNFT.dev server, then there are no limits!
Coming soon :)