⚡Quick Start
Preparation
Use API
Fetch requested NFTs
GET
https://style-public-api.vercel.app/api/nfts/get-requested-nfts
Get requested (non-minted) NFTs' data to use it with buyAndMint
function of our protocol contract.
Request Body
cursor
integer
Start index of getStakes
protocol`s function (as it uses pagination)
amount
integer
Number of viewed indexes of getStakes
protocol`s function (as it uses pagination)
chainId
integer
Chain Id to be able to use it cross-chain
metaverseFilter
string | string[]
Using for metaverse filter. Any alone strings are converted to [string]
. Currently possible values are: decentranland
, sandbox
, somnium_space
, cryptovoxels, fabwelt
. Use empty array to get items from all metaverses.
typeFilter
string | string[]
Using for asset type filter. Any alone strings are converted to [string]
. Currently possible values are: AVATAR
, WEARABLE
, MISC
. Use empty array to get items of all types.
subtypeFilter
string | string[]
Using for asset subtype filter. Any alone strings are converted to [string]
. Use empty array to get items of all types.
endpoint*
string
Endpoint to fetch blockchain data
[
{
tokenAddress: '0xc36442b4a4522e871399cd717abdd847ab11fe88',
tokenId: 36639,
payment: {
value: { type: 'BigNumber', hex: '0x014d1120d7b1600000' },
stringValue: '24',
},
paymentToken: {
address: '0x48d373E2B7f0930DAEF4C51CA63711bdD9b5C5B0',
name: 'USD Circle',
symbol: 'USDC',
},
type: 'AVATAR',
subtype: 'Other',
tailorId: '632422280100cd8980997351',
jobId: '633dd5ae8e81caae508afad9',
uri: 'https://stylexchange.mypinata.cloud/ipfs/QmVab2rT96LjdqTWEaQihj4CDVvq9bbm7bgTxUZ5b8YeVt',
bidder: '0xb396aedb7e8eea5b29501f5dba173d82458c8e17',
signature:
'0x531fa0f96276037b14f61ebd2bf1702594e5ed9a67e6261e763e2163a63352d34e57d1e9d2ebee6255da18f313a873255842d4b8d391a2da63a5fe043fb5de2e1b',
environment: '0x67701e71F9412Af1BcB2D77897F40139B6Ccc073',
metaverseId: 0,
adminSignature:
'0x5a16fe5d80fa1c9a3a4400babfba2e298465eb04e429e9ea0e2e0d52cf33aea404143ffb77e03487adb56c6d048c6e6390a98da8333adb0dd1070b98fdba4a401c',
asset: {
name: 'Derivative from Uniswap - 0.3% - USDC/SP - MIN<>100050',
description:
'StyleXchange derivative from Uniswap - 0.3% - USDC/SP - MIN<>100050 for DECENTRALAND',
image:
'https://stylexchange.mypinata.cloud/ipfs/QmdE18pYr2RE8toGZVC8PJ87ryfZ2u1pL73wX6y4Ansuz6',
animation_url:
'https://stylexchange.mypinata.cloud/ipfs/bafkreidqpr3ixz5wahwmpuoqwdhlwsraju3tz2wbf3nnopo4uexxnafgpu',
},
cid: 'QmSTGGifjf669XWEFA7RxHkTGDNS23GLXjzyHKPFFuhBV8',
numberOfDerivatives: 5,
},
]
Take a look at how you might call this method using javascript
:
await fetch(
`https://style-public-api.vercel.app/api/nfts/get-requested-nfts?${new URLSearchParams(
{
endpoint: "your endpoint",
cursor: 0,
amount: 100,
chainId: 5,
metaverseFilter: '["decentraland", "sandbox"]',
typeFilter: '["AVATAR"]',
subtypeFilter: '["Other"]',
}
)}`
)
Last updated