async public static Task<List<Dictionary<string, object>>> getRequestedNFTsAPI(
List<string> metaverseFilter,
List<string> typeFilter,
List<string> subtypeFilter,
int cursor = 0,
int amount = 100,
int chainId = 5
)
metaverseFilter: List<string>- Using for metaverse filter. Currently possible values are: decentranland, sandbox, somnium_space, cryptovoxels, fabwelt. Use empty array to get items from all metaverses.
typeFilter: List<string>- Using for asset type filter. Currently possible values are: AVATAR, WEARABLE, MISC. Use empty array to get items of all types.
subtypeFilter: List<string>- Using for asset subtype filter. Use empty array to get items of all types.
cursor: int - Start index of getStakes protocol`s function (as it uses pagination).
amount: int - Number of viewed indexes of getStakes protocol`s function (as it uses pagination).
chainId: int - Chain Id to be able to use it cross-chain.
async public static Task<List<Dictionary<string, object>>> getOwnedDerivatives(
List<string> metaverseFilter,
List<string> typeFilter,
List<string> subtypeFilter,
Dictionary<string, string> userProof,
int chainId = 5
)
metaverseFilter: List<string>- Using for metaverse filter. Currently possible values are: decentranland, sandbox, somnium_space, cryptovoxels, fabwelt. Use empty array to get items from all metaverses.
typeFilter: List<string>- Using for asset type filter. Currently possible values are: AVATAR, WEARABLE, MISC. Use empty array to get items of all types.
subtypeFilter: List<string>- Using for asset subtype filter. Use empty array to get items of all types.
userProof: Dictionary<string, string>- User Proof with walletAddress and signature.
chainId: int - Chain Id to be able to use it cross-chain.
Return value:
NFT["asset"]["animation_url"] contains an URI for its 3d model
If succeded:
[
{
contract: {
address: "0x4d49b4c5dbd23f56811cb1b753bc58db63809b55",
name: "Derivative of Derivative of Derivative of StyleProtocol Temps",
symbol: "SPTSPSPSP",
totalSupply: "2",
tokenType: "ERC721",
openSea: {
lastIngestedAt: "2023-03-28T09:57:15.000Z",
},
},
tokenId: "1",
tokenType: "ERC721",
title: "Derivative of Derivative of Derivative of Example3",
description:
"Style Protocol derivative from Derivative of Derivative of Example3 for SOMNIUM_SPACE\n\nhttps://www.protocol.style",
timeLastUpdated: "2023-03-28T14:35:43.144Z",
rawMetadata: {
name: "Derivative of Derivative of Derivative of Example3",
description:
"Style Protocol derivative from Derivative of Derivative of Example3 for SOMNIUM_SPACE\n\nhttps://www.protocol.style",
image:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
animation_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/0xb15175d683d88007e8121811122abd16895b7e2ad47aaa64d5883f38d0c57c434a695c6ef01526ca94a9dce6aa38221afd31d80a65468d00b62f672beab753c51b/0x67701e71f9412af1bcb2d77897f40139b6ccc073/yaku_test_anim.glb",
model_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/yaku_test_anim.glb",
image_url:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
},
tokenUri: {
gateway:
"https://ipfs.io/ipfs/QmP6nxCCiqKcb6SszKgNz3MmqQUgQK6vJdL5cWywMEPH1S",
raw: "ipfs://QmP6nxCCiqKcb6SszKgNz3MmqQUgQK6vJdL5cWywMEPH1S",
},
media: [
{
gateway:
"https://nft-cdn.alchemy.com/eth-goerli/0c21dde76fca76c4824d0cd8b3f90f0f",
thumbnail:
"https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-goerli/0c21dde76fca76c4824d0cd8b3f90f0f",
raw: "ipfs://bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
format: "png",
bytes: 31555,
},
],
balance: 1,
metadata: {
name: "Derivative of Derivative of Derivative of Example3",
description:
"Style Protocol derivative from Derivative of Derivative of Example3 for SOMNIUM_SPACE\n\nhttps://www.protocol.style",
image:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
animation_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/0xb15175d683d88007e8121811122abd16895b7e2ad47aaa64d5883f38d0c57c434a695c6ef01526ca94a9dce6aa38221afd31d80a65468d00b62f672beab753c51b/0x67701e71f9412af1bcb2d77897f40139b6ccc073/yaku_test_anim.glb",
model_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/yaku_test_anim.glb",
image_url:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
},
asset: {
name: "Derivative of Derivative of Derivative of Example3",
description:
"Style Protocol derivative from Derivative of Derivative of Example3 for SOMNIUM_SPACE\n\nhttps://www.protocol.style",
image:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
animation_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/0xb15175d683d88007e8121811122abd16895b7e2ad47aaa64d5883f38d0c57c434a695c6ef01526ca94a9dce6aa38221afd31d80a65468d00b62f672beab753c51b/0x67701e71f9412af1bcb2d77897f40139b6ccc073/yaku_test_anim.glb",
model_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/yaku_test_anim.glb",
image_url:
"https://ipfs.io/ipfs/bafybeigd7x5pfrpxtth7mthfbyvpepxhodsahvq46rfu2thtd2wpgpbaja/image.png",
},
threed_job_file_url:
"https://style-protocol-api.vercel.app/api/data/0x4D49B4C5DbD23f56811CB1B753BC58DB63809b55/0xb15175d683d88007e8121811122abd16895b7e2ad47aaa64d5883f38d0c57c434a695c6ef01526ca94a9dce6aa38221afd31d80a65468d00b62f672beab753c51b/0x67701e71f9412af1bcb2d77897f40139b6ccc073/yaku_test_anim.glb",
is_3djob: true,
metaverse: "SOMNIUM_SPACE",
type: "AVATAR",
subType: "",
source: {
tokenAddress: "0x793DEdf81DbEf444602d80c81bE1960A6b0aE4Fb",
tokenId: "0",
},
},
]
If failed:
null
Buy NFTs
Approve ERC20 tokens to protocol
How it looks like:
async public static Task<string> approveERC20(
Dictionary<string, object> NFT,
int chainId = 5
)
NFT: Dictionary<string, object> - Object with NFT data (element of array taken from fetch functions).
chainId: int - Chain Id to be able to use it cross-chain.
Return value:
If succeded:
"true"
If failed:
"<Error message>"
Buy requested NFTs
How it looks like:
async public static Task<string> buyAndMintItem(
Dictionary<string, object> NFT,
int chainId = 5
)
NFT: Dictionary<string, object> - Object with NFT data (element of array taken from fetch functions).
chainId: int - Chain Id to be able to use it cross-chain.
Return value:
If succeded:
"true"
If failed:
"<Error message>"
User Proof
Get User Proof
How it looks like:
async public static Task<Dictionary<string, string>> getUserProof()