We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
post to get the list of banano NFTs an address owns.
example address ban_1jsdpfa46qh5u49t3mbhisngtqunj43zc1k9x73okk6syi54zkugy1psyer1
https://nft.coranos.cc/api?action=get_nft_owner_assets&owner=ban_1jsdpfa46qh5u49t3mbhisngtqunj43zc1k9x73okk6syi54zkugy1psyer1
response (no nfts):
{"success":true,"asset_owners":[]}
response (some nfts)
{ "success":true, "asset_owners": [ { "template":"QmbEFhEg7h4fuS34huLARat7KqSQutPfa55fjE8irBEq6G", } ] }
then get:
https://gateway.pinata.cloud/ipfs/${template}
response:
{ "title":"The Frogs and the Ox", "art_data_ipfs_cid":"QmPU4BG4Kxorz769xdrVTFxXSQxe6x6ofCyKoMxrNZfjxE" }
https://gateway.pinata.cloud/ipfs/${art_data_ipfs_cid}
and process it using the js:
const imageUrl = ipfsApiUrl + '/' + imageIpfsCid; const imageResponse = await fetch(imageUrl, { method: 'GET', headers: { 'content-type': 'image', }, }); const imageContentType = imageResponse.headers.get('content-type'); if (imageResponse.status === 200) { const imageBlob = await imageResponse.blob(); if (imageContentType == 'image/svg+xml') { const text = await imageBlob.text(); // html += text; const svg = `data:image/svg+xml;base64,${btoa(text)}`; html += `<object title="${imageIpfsCid}" style="width:30vmin;height30vmin;" type="image/svg+xml" data="${svg}"></object>`; } else if (imageContentType == 'image/png' || imageContentType == 'image/gif' || imageContentType == 'image/png') { const imageObjectUrl = URL.createObjectURL(imageBlob); html += `<img title="${imageIpfsCid}" style="width:30vmin;height30vmin;" src="${imageObjectUrl}"></img>`; } else { html += `Unsupported Content Type: ${imageContentType}`; } } else { html = 'error:' + imageResponse.status + ' ' + imageResponse.statusText; allowReload = 'true'; }
The text was updated successfully, but these errors were encountered:
Banfts has an API for this too: https://api.banfts.com/api/v1/account/ban_1o7ija3mdbmpzt8qfnck583tn99fiupgbyzxtbk5h4g6j57a7rawge6yzxqp/assets And an endpoint for the metadata: https://api.banfts.com/api/v1/assets/supply/526ADF062C5E9A93A56E1FAC890DD1CE7C61DC1970BDAEFA6054DD7B044A88B1
I'll have to double check the CORS stuff, but whitelisting bananostand shouldn't be a problem
Sorry, something went wrong.
No branches or pull requests
post to get the list of banano NFTs an address owns.
example address ban_1jsdpfa46qh5u49t3mbhisngtqunj43zc1k9x73okk6syi54zkugy1psyer1
https://nft.coranos.cc/api?action=get_nft_owner_assets&owner=ban_1jsdpfa46qh5u49t3mbhisngtqunj43zc1k9x73okk6syi54zkugy1psyer1
response (no nfts):
response (some nfts)
then get:
https://gateway.pinata.cloud/ipfs/${template}
response:
then get:
https://gateway.pinata.cloud/ipfs/${art_data_ipfs_cid}
and process it using the js:
The text was updated successfully, but these errors were encountered: