Socket
Socket
Sign inDemoInstall

nft-parser

Package Overview
Dependencies
11
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.2.0

2

package.json
{
"name": "nft-parser",
"version": "0.1.7",
"version": "0.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,1 +0,111 @@

# nft-parser
<center>
# XP Network NFT-Parser
</center>
### Work In Progress / Alpha Stage Library
<br/>
Parsing steps:
<br/>
- [x] [1. Installing the library](#1-install-the-libraries-required-for-the-project)
- [x] [2. Importing the dependencies](#2-import-the-dependencies)
- [x] [3. Get parsed nft object with metadata](#3-get-parsed-nft-object-with-metadata)
<hr/><br/>
<center>
## To parse NFTs metadata, follow the steps below:
</center>
<br/>
Make sure [nodejs](https://nodejs.org/en/download/) is installed on your machine.<br/>
<br/>
### 1. Install the libraries required for the project:
<br/>
```bash
yarn add nft-parser
```
OR
```bash
npm i --save nft-parser
```
To import the latest version of nft-parser library:
```bash
yarn add "git+https://github.com/xp-network/nft-parser#bleeding-edge"
```
<br/>
### 2. Import the dependencies<br/><br/>
```javascript
import { nftGeneralParser } from "nft-parser/dist/src/index";
```
<hr/><br/>
### 3. Get parsed nft object with metadata
### 3.1 Example of getting parsed nft object with metadata for nft received from [xp.network](https://www.npmjs.com/package/xp.network/) nft-indexer
### NFT
```json
{
"uri": "https://nft.xp.network/w/30536082382037290147901655651",
"native": {
"chainId": "12",
"tokenId": "30536082382037290147901655651",
"owner": "0xb6C8748115d23Eb1c6d59Cb83eAe051b56ef75c7",
"contract": "0x0D41c70E20587c2ec1cea9c4A3d394eC63C4bfbe",
"symbol": "RMBB",
"name": "Rocket Monsters Bear Battalion",
"uri": "https://nft.xp.network/w/30536082382037290147901655651",
"contractType": "ERC721"
},
"collectionIdent": "0x0D41c70E20587c2ec1cea9c4A3d394eC63C4bfbe"
}
```
### Address - wallet address your dApp connected to
```javascript
const parsedObject = await nftGeneralParser(NFT, Address);
```
### Returned parsed object
```typescript
interface NFT {
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract: string;
collectionIdent: string;
native: any;
metaData: {
whitelisted: boolean;
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
}
```

@@ -8,174 +8,341 @@ import BigNumber from "bignumber.js";

interface NFT {
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract: string;
collectionIdent: string;
native: any;
metaData: {
whitelisted: boolean;
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract: string;
collectionIdent: string;
native: any;
metaData: {
whitelisted: boolean;
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
}
export const DEFAULT = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const headers = await (await axios(uri)).headers;
try {
const headers = await (await axios(uri)).headers;
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: format === "mp4" ? "" : uri,
imageFormat: format,
animation_url: format === "png" ? "" : uri,
//animation_url_format: "mp4",
},
};
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: format.includes("json")
? uri.replace(".json", ".png")
: format.includes("png")
? uri
: format.includes("mp4")
? ""
: "",
imageFormat: "png",
animation_url: format.includes("png")
? ""
: format.includes("json")
? uri.replace(".json", ".mp4")
: format.includes("mp4")
? uri
: "",
return nft;
} catch (error) {
console.error(error);
return nft;
}
animation_url_format: "mp4",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const AERMES = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: "",
imageFormat: "",
animation_url: uri,
animation_url_format: "mp4",
},
};
try {
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: "",
imageFormat: "",
animation_url: uri,
animation_url_format: "mp4",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const DRIFTERS = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: uri.replace(".json", ".png"),
imageFormat: "png",
},
};
try {
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: uri.replace(".json", ".png"),
imageFormat: "png",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const APOPHIS = async (
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: uri.replace(".json", ".png"),
imageFormat: "png",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const INNOVATOR = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(uri);
try {
const { data } = await axios(uri);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
name: data.name,
},
};
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const MEDUSA = async (
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(uri);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: "png",
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const ORC = async (
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(proxy + uri);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: uri.replace(".json", ".png"),
imageFormat: "png",
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const WrappedXPNET = async (
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(proxy + uri);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -12,86 +12,89 @@ import { stringify } from "querystring";

interface NFT {
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract: string;
collectionIdent: string;
native: any;
metaData: {
whitelisted: boolean;
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract: string;
collectionIdent: string;
native: any;
metaData: {
whitelisted: boolean;
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
}
export const setupURI = (uri: string): string => {
if (uri) {
if (uri.includes("https://ipfs.io")) {
return uri;
} else if (uri.includes("ipfs://")) {
return "https://ipfs.io/" + uri.replace(":/", "");
} else if (uri.includes("https://ipfs.io")) {
return uri;
} else if (
uri.includes("data:image/") ||
uri.includes("data:application/")
) {
return uri;
} else {
return uri.replace("http://", "https://");
}
if (uri) {
if (uri.includes("https://ipfs.io")) {
return uri;
} else if (uri.includes("ipfs://")) {
return "https://ipfs.io/" + uri.replace(":/", "");
} else if (uri.includes("https://ipfs.io")) {
return uri;
} else if (
uri.includes("data:image/") ||
uri.includes("data:application/")
) {
return uri;
} else {
return uri;
return uri.replace("http://", "https://");
}
} else {
return uri;
}
};
export const Default = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = setupURI(uri);
if (!baseUrl) return nft;
const url = `${proxy}${setupURI(baseUrl)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -102,163 +105,163 @@

export const ART_NFT_MATIC = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${data.image}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
attributes: data.attributes,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${data.image}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
attributes: data.attributes,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0xa8a079ea48dc846899bdb542f3728dbc6758fdfa
export const EtherHead = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x6e1ecc59f4005d0f2707ab7a0a8cecbaba41c11e
export const AngelOfAether = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "jpg",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "jpg",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0xe5b3903ffb3a00e91c75e25a4bd6616d3171e45e
export const Legend = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -268,84 +271,84 @@ // ! 0xee6d7e31ea2095df9b2f89ec15111d3de5cd39af

export const AlphaBettyDoodle = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const Mabstronauts = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: `https://ipfs.io/ipfs/${data.image}`,
imageFormat: "png",
name: data.name,
symbol: data.symbol,
description: data.description,
contractType: "erc1155",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: `https://ipfs.io/ipfs/${data.image}`,
imageFormat: "png",
name: data.name,
symbol: data.symbol,
description: data.description,
contractType: "erc1155",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -355,626 +358,626 @@

export const RocketMonsters = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.direction,
attributes: data.attributes,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.direction,
attributes: data.attributes,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0xDcAA2b071c1851D8Da43f85a34a5A57d4Fa93A1A
export const TheBlackMagic = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
// debugger;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
const imageFormats = ["gif", "jpg", "jpeg", "png", "svg", "webp"];
let nestedImage;
try {
const response = await axios(url);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const headers = imgResp.headers["content-type"];
let formats;
let mimeType;
let format;
if (headers.slice(headers.lastIndexOf("/") + 1) === "json") {
nestedImage = true;
} else if (
imageFormats.some(
(f) => f === headers.slice(headers.lastIndexOf("/") + 1)
)
) {
nestedImage = false;
}
if (nestedImage) {
formats = imgResp.data.formats;
mimeType = imgResp.data.formats[0].mimeType;
} else {
format = headers.slice(headers.lastIndexOf("/") + 1);
}
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: nestedImage
? setupURI(imgResp.data.formats[0].uri)
: setupURI(data.image),
imageFormat: nestedImage
? mimeType.slice(mimeType.lastIndexOf("/") + 1)
: format,
name: imgResp.data.name || data.name,
description: imgResp.data.description || data.description,
symbol: imgResp.data.symbol || data.symbols,
attributes: data.attributes || imgResp.data.attributes,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
// debugger;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
const imageFormats = ["gif", "jpg", "jpeg", "png", "svg", "webp"];
let nestedImage;
try {
const response = await axios(url);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const headers = imgResp.headers["content-type"];
let formats;
let mimeType;
let format;
if (headers.slice(headers.lastIndexOf("/") + 1) === "json") {
nestedImage = true;
} else if (
imageFormats.some(
(f) => f === headers.slice(headers.lastIndexOf("/") + 1)
)
) {
nestedImage = false;
}
if (nestedImage) {
formats = imgResp.data.formats;
mimeType = imgResp.data.formats[0].mimeType;
} else {
format = headers.slice(headers.lastIndexOf("/") + 1);
}
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: nestedImage
? setupURI(imgResp.data.formats[0].uri)
: setupURI(data.image),
imageFormat: nestedImage
? mimeType.slice(mimeType.lastIndexOf("/") + 1)
: format,
name: imgResp.data.name || data.name,
description: imgResp.data.description || data.description,
symbol: imgResp.data.symbol || data.symbols,
attributes: data.attributes || imgResp.data.attributes,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x4c1900270dbf0c1e6a9c984aef9a18a7cb9ab1cc
export const CartelPunks = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x36f8f51f65fe200311f709b797baf4e193dd0b0d
export const TreatNFT = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const newUrl = `${proxy}https://treatdao.com/api/nft/${tokenId}`;
try {
const response = await axios(newUrl);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUrl,
contract,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const newUrl = `${proxy}https://treatdao.com/api/nft/${tokenId}`;
try {
const response = await axios(newUrl);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUrl,
contract,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x2c83eaf6e460c673d92477a7c49eb4ecd04e1216
export const IdoDirt = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const newUrl = `${proxy}https://treatdao.com/api/nft/${tokenId}`;
try {
const response = await axios(newUrl);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUrl,
contract,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const newUrl = `${proxy}https://treatdao.com/api/nft/${tokenId}`;
try {
const response = await axios(newUrl);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUrl,
contract,
metaData: {
whitelisted,
image: data.image,
imageFormat: format,
name: data.name,
attributes: data.attributes,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x691bd0f2f5a145fcf297cf4be79095b66f002cbc
export const Awokensages = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.crosspunks.com/cars/meta/2/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.crosspunks.com/cars/meta/2/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x7f3495cf2d05db6e9e52cdf989bced71e786725c
export const Technomaniacs = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.crosspunks.com/cars/meta/1/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.crosspunks.com/cars/meta/1/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp.headers["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
attributes: data.attributes,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0xe7f8ccda432239dcb418e94d625bc2fe6350f6bb
export const ArcadeEdition = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.alturanft.com/meta/arcade-edition/${tokenId}`;
try {
const response = await axios(newUri);
const { data } = response;
const mimeType = data.mime;
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.alturanft.com/meta/arcade-edition/${tokenId}`;
try {
const response = await axios(newUri);
const { data } = response;
const mimeType = data.mime;
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x56d93767467c54bd86578666904087c4f16cdb7f
export const Founders_Cabinet = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.alturanft.com/meta/chain-cade-founders-edition/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const mimeType = data.mime;
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://api.alturanft.com/meta/chain-cade-founders-edition/${tokenId}`;
const baseUrl = uri;
try {
const response = await axios(newUri);
const { data } = response;
const mimeType = data.mime;
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x2d317ed6c2e3eb5c54ca7518ef19deee96c15c85
export const TTAV = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x7a7ca3b27760b52428d7a9d0a9f369ff31a2de94
export const BoredGUtterCats = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://ipfs.moralis.io:2053/ipfs/QmV4CkNpDsiF5hSaUCJZAndDo1gVM8zxTKMbpN8teyDoTv/${tokenId}.json`;
try {
const { data } = await axios(newUri);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const newUri = `https://ipfs.moralis.io:2053/ipfs/QmV4CkNpDsiF5hSaUCJZAndDo1gVM8zxTKMbpN8teyDoTv/${tokenId}.json`;
try {
const { data } = await axios(newUri);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
collectionIdent,
owner: account,
uri: newUri,
contract,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
name: data.name,
description: data.description,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x2FeEE2Cc7fB32bD48AB22080e2C680f5390Ef426
export const IDoDirtPolygon = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
contractType: "erc721",
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0x2953399124f0cbb46d2cbacd8a89cf0599974963
export const ArsenalGame = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
animation_url: data.animation_url,
animation_url_format: "mp4",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
animation_url: data.animation_url,
animation_url_format: "mp4",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
// ! 0xc69ecd37122a9b5fd7e62bc229d478bb83063c9d
export const Mate = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp?.headers?.["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.animation_url),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
symbol: imgResp.data.symbol,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const imgResp = await axios(setupURI(data.image));
const mimeType = imgResp?.headers?.["content-type"];
const format = mimeType.slice(mimeType.lastIndexOf("/") + 1);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.animation_url),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
symbol: imgResp.data.symbol,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -984,49 +987,49 @@ // ! 0x8eaeaa3a67abfc7c141775234fc30c707e26cf49

export const ABCBears = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
animation_url: data.animation_url,
animation_url_format: "mp4",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
animation_url: data.animation_url,
animation_url_format: "mp4",
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1036,47 +1039,47 @@ // ! 0x51ecb52ebb85384679b108a9e6a017ae17754eef

export const TragicMonsters = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1086,47 +1089,47 @@ // ! 0xbede8ad4878e5ce441accce6a828ea7bc5be1ed0

export const SuperFatAcademy = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
if (!uri)
console.log(
"NFT with no uri collection: ",
collectionIdent,
"tokenId: ",
tokenId
);
const url = `${proxy}${setupURI(uri)}`;
try {
const { data } = await axios(url);
const { headers } = await axios(setupURI(data.image));
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1137,46 +1140,46 @@

export const ForgottenRunesComic = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const video = headers["content-type"].includes("video");
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: "",
imageFormat: "",
animation_url: setupURI(data.image),
animation_url_format: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const video = headers["content-type"].includes("video");
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: "",
imageFormat: "",
animation_url: setupURI(data.image),
animation_url_format: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1186,43 +1189,43 @@ // ! 0xd4c77e46b0266a7aca11083bcc86342f47bbdd04

export const LilDickie = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1232,43 +1235,43 @@ // ! 0x9304f22a5ab577119210d730e41755a6732e19f7

export const TheCheeks = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const { headers } = await axios(`${proxy}${setupURI(data.image)}`);
const format = headers["content-type"].slice(
headers["content-type"].lastIndexOf("/") + 1
);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: format,
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};

@@ -1278,96 +1281,333 @@ // ! 0x028faf7eab0d8abb4a2d784206bfa98979041ffc

export const InterestingCPeople = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: "png",
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const baseUrl = uri;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = await axios(url);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: setupURI(data.image),
imageFormat: "png",
attributes: data.attributes,
description: data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const Nagato = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<NFT> => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
const url = `${proxy}${setupURI(uri)}`;
const url = `${proxy}${setupURI(uri)}`;
try {
const response = (await pool.addRequest(url)) as AxiosResponse<
any,
any
>;
//const data = res.data || res
/*const response = await axios(url).catch(async (error: any) => {
//if (error?.request?.status === 429) {
const res = (await pool.addRequest(
error?.request?.responseURL
)) as AxiosResponse<any, any>;
return { data: res.data || res };
// }
//return {};
});*/
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data
? setupURI(data.image)
: `https://ipfs-nft-storage.com/ipfs/velasnagato/${tokenId}.png`,
imageFormat: "png",
attributes: data && data.attributes,
description: data && data.description,
name: data ? data.name : `Nagato #${tokenId}`,
},
};
return nft;
} catch (error) {
console.error(error);
try {
const response = (await pool.addRequest(url)) as AxiosResponse<any, any>;
return nft;
}
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data
? setupURI(data.image)
: `https://ipfs-nft-storage.com/ipfs/velasnagato/${tokenId}.png`,
imageFormat: "png",
attributes: data && data.attributes,
description: data && data.description,
name: data ? data.name : `Nagato #${tokenId}`,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const OpenSEA = async (
nft: any,
account: string,
whitelisted: boolean
) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const response = await axios(`${proxy}${uri.replace("0x{id}", tokenId)}`);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data.image,
imageFormat: "png",
attributes: data && data.attributes,
description: data && data.description,
animation_url: data.animation_url,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const OPENSTORE = async (
nft: any,
account: string,
whitelisted: boolean
) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const response = await axios(
`${proxy}${uri.replace(/:\d+/, "").replace(".moralis", "")}`
);
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data && setupURI(data.image_url),
imageFormat: "png",
description: data && data.description,
name: data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const MachineFi = async (
nft: any,
account: string,
whitelisted: boolean
) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const data = JSON.parse(uri);
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data && data.image,
imageFormat: "gif",
description: data && data.description,
name: data && data.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const TRSRNFT = async (
nft: any,
account: string,
whitelisted: boolean
) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(`${proxy}${uri}`).catch(() => ({
data: null,
}));
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data && data.data?.image,
imageFormat: "png",
description: data && data.data?.description,
name: data && data.data?.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
//WUBI
export const WUBI = async (nft: any, account: string, whitelisted: boolean) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const response = (await pool.addRequest(`${uri}`)) as AxiosResponse<
any,
any
>;
const { data } = response;
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data && setupURI(data?.image),
imageFormat: "png",
description: data && data?.description,
name: data && data?.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
export const WrappedXPNET = async (
nft: any,
account: string,
whitelisted: boolean
) => {
const {
native,
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
try {
const { data } = await axios(`${proxy}${uri}`).catch(() => ({
data: null,
}));
const nft: NFT = {
native,
chainId,
tokenId,
owner: account,
uri,
contract,
collectionIdent,
metaData: {
whitelisted,
image: data && data.data?.image,
imageFormat: "png",
description: data && data.data?.description,
name: data && data.data?.name,
},
};
return nft;
} catch (error) {
console.error(error);
return nft;
}
};
//"{"name": "MachineFi NFT", "description": "The MachineFi NFT.", "image": "https://machinefi.com/nft/image/6505"}"

@@ -9,305 +9,274 @@ import axios from "axios";

interface ParsedNFT {
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract?: string;
collectionIdent: string;
native: any;
metaData: {
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
chainId: string;
tokenId: string;
owner: string;
uri: string;
contract?: string;
collectionIdent: string;
native: any;
metaData: {
image: string;
imageFormat: string;
animation_url?: string;
animation_url_format?: string;
name?: string;
symbol?: string;
attributes?: any;
description?: string;
contractType?: string;
};
}
export const nftGeneralParser = async (
nft: any,
account: string,
whitelisted: boolean
nft: any,
account: string,
whitelisted: boolean
): Promise<ParsedNFT> => {
const {
native: { contract, tokenId, chainId },
const {
native: { contract, tokenId, chainId },
collectionIdent,
uri,
} = nft;
let parsed;
switch (chainId) {
case "4":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "6":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "7":
parsed = await evmParser(
collectionIdent,
uri,
} = nft;
let parsed;
switch (chainId) {
case "4":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "6":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "7":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "8":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "12":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "14":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "16":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "19":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "20":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "21":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "23":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "5":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "25":
parsed = await evmParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "2":
parsed = await elrondParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "15":
parsed = await algorandParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "9":
parsed = await tronParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
case "18":
parsed = await tezos.tezosParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
default:
return nft;
}
return parsed;
nft,
account,
whitelisted,
chainId
);
break;
case "8":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "12":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "14":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "16":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "19":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "20":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "21":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "23":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "5":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "25":
parsed = await evmParser(collectionIdent, nft, account, whitelisted);
break;
case "2":
parsed = await elrondParser(collectionIdent, nft, account, whitelisted);
break;
case "15":
parsed = await algorandParser(collectionIdent, nft, account, whitelisted);
break;
case "9":
parsed = await tronParser(collectionIdent, nft, account, whitelisted);
break;
case "18":
parsed = await tezos.tezosParser(
collectionIdent,
nft,
account,
whitelisted
);
break;
default:
return nft;
}
return parsed;
};
const evmParser = async (
collectionIdent: string,
nft: any,
account: string,
whitelisted: boolean
collectionIdent: string,
nft: any,
account: string,
whitelisted: boolean,
chainId?: string
) => {
let parsed;
switch (collectionIdent) {
case "0x0271c6853d4b2bdccd53aaf9edb66993e14d4cba":
parsed = await evm.ART_NFT_MATIC(nft, account, whitelisted);
break;
case "0x4508af04de4073b10a53ac416eb311f4a2ab9569":
parsed = await evm.ART_NFT_MATIC(nft, account, whitelisted);
break;
case "0xa8a079ea48dc846899bdb542f3728dbc6758fdfa":
parsed = await evm.EtherHead(nft, account, whitelisted);
break;
case "0x6e1ecc59f4005d0f2707ab7a0a8cecbaba41c11e":
parsed = await evm.AngelOfAether(nft, account, whitelisted);
break;
case "0xe5b3903ffb3a00e91c75e25a4bd6616d3171e45e":
parsed = await evm.Legend(nft, account, whitelisted);
break;
case "0xee6d7e31ea2095df9b2f89ec15111d3de5cd39af":
parsed = await evm.AlphaBettyDoodle(nft, account, whitelisted);
break;
case "0x65f1A1D6E65fb43672BD936858D69b88C0D2059e":
parsed = await evm.Mabstronauts(nft, account, whitelisted);
break;
case "0x0D41c70E20587c2ec1cea9c4A3d394eC63C4bfbe":
parsed = await evm.RocketMonsters(nft, account, whitelisted);
break;
case "0xDcAA2b071c1851D8Da43f85a34a5A57d4Fa93A1A":
parsed = await evm.TheBlackMagic(nft, account, whitelisted);
break;
case "0x4c1900270dbf0c1e6a9c984aef9a18a7cb9ab1cc":
parsed = await evm.CartelPunks(nft, account, whitelisted);
break;
case "0x36f8f51f65fe200311f709b797baf4e193dd0b0d":
parsed = await evm.TreatNFT(nft, account, whitelisted);
break;
case "0x2c83eaf6e460c673d92477a7c49eb4ecd04e1216":
parsed = await evm.IdoDirt(nft, account, whitelisted);
break;
case "0x691bd0f2f5a145fcf297cf4be79095b66f002cbc":
parsed = await evm.Awokensages(nft, account, whitelisted);
break;
case "0x7f3495cf2d05db6e9e52cdf989bced71e786725c":
parsed = await evm.Technomaniacs(nft, account, whitelisted);
break;
case "0xe7f8ccda432239dcb418e94d625bc2fe6350f6bb":
parsed = await evm.ArcadeEdition(nft, account, whitelisted);
break;
case "0x56d93767467c54bd86578666904087c4f16cdb7f":
parsed = await evm.Founders_Cabinet(nft, account, whitelisted);
break;
case "0x2d317ed6c2e3eb5c54ca7518ef19deee96c15c85":
parsed = await evm.TTAV(nft, account, whitelisted);
break;
case "0x7a7ca3b27760b52428d7a9d0a9f369ff31a2de94":
parsed = await evm.BoredGUtterCats(nft, account, whitelisted);
break;
case "0x2feee2cc7fb32bd48ab22080e2c680f5390ef426":
parsed = await evm.IDoDirtPolygon(nft, account, whitelisted);
break;
case "0x2953399124f0cbb46d2cbacd8a89cf0599974963":
parsed = await evm.ArsenalGame(nft, account, whitelisted);
break;
case "0xc69ecd37122a9b5fd7e62bc229d478bb83063c9d":
parsed = await evm.Mate(nft, account, whitelisted);
break;
case "0x8eaeaa3a67abfc7c141775234fc30c707e26cf49":
parsed = await evm.ABCBears(nft, account, whitelisted);
break;
case "0x51ecb52ebb85384679b108a9e6a017ae17754eef":
parsed = await evm.TragicMonsters(nft, account, whitelisted);
break;
case "0xbede8ad4878e5ce441accce6a828ea7bc5be1ed0":
parsed = await evm.SuperFatAcademy(nft, account, whitelisted);
break;
case "0xb94c3fd0016888bab09dbc229f9397294e828a54":
parsed = await evm.ForgottenRunesComic(nft, account, whitelisted);
break;
case "0xd4c77e46b0266a7aca11083bcc86342f47bbdd04":
parsed = await evm.LilDickie(nft, account, whitelisted);
break;
case "0x9304f22a5ab577119210d730e41755a6732e19f7":
parsed = await evm.TheCheeks(nft, account, whitelisted);
break;
default:
parsed = await evm.Default(nft, account, whitelisted);
break;
}
let parsed;
switch (collectionIdent) {
case "0x0271c6853d4b2bdccd53aaf9edb66993e14d4cba":
parsed = await evm.ART_NFT_MATIC(nft, account, whitelisted);
break;
case "0x4508af04de4073b10a53ac416eb311f4a2ab9569":
parsed = await evm.ART_NFT_MATIC(nft, account, whitelisted);
break;
case "0xa8a079ea48dc846899bdb542f3728dbc6758fdfa":
parsed = await evm.EtherHead(nft, account, whitelisted);
break;
case "0x6e1ecc59f4005d0f2707ab7a0a8cecbaba41c11e":
parsed = await evm.AngelOfAether(nft, account, whitelisted);
break;
case "0xe5b3903ffb3a00e91c75e25a4bd6616d3171e45e":
parsed = await evm.Legend(nft, account, whitelisted);
break;
case "0xee6d7e31ea2095df9b2f89ec15111d3de5cd39af":
parsed = await evm.AlphaBettyDoodle(nft, account, whitelisted);
break;
case "0x65f1A1D6E65fb43672BD936858D69b88C0D2059e":
parsed = await evm.Mabstronauts(nft, account, whitelisted);
break;
case "0x0D41c70E20587c2ec1cea9c4A3d394eC63C4bfbe":
parsed = await evm.RocketMonsters(nft, account, whitelisted);
break;
case "0xDcAA2b071c1851D8Da43f85a34a5A57d4Fa93A1A":
parsed = await evm.TheBlackMagic(nft, account, whitelisted);
break;
case "0x4c1900270dbf0c1e6a9c984aef9a18a7cb9ab1cc":
parsed = await evm.CartelPunks(nft, account, whitelisted);
break;
case "0x36f8f51f65fe200311f709b797baf4e193dd0b0d":
parsed = await evm.TreatNFT(nft, account, whitelisted);
break;
case "0x2c83eaf6e460c673d92477a7c49eb4ecd04e1216":
parsed = await evm.IdoDirt(nft, account, whitelisted);
break;
case "0x691bd0f2f5a145fcf297cf4be79095b66f002cbc":
parsed = await evm.Awokensages(nft, account, whitelisted);
break;
case "0x7f3495cf2d05db6e9e52cdf989bced71e786725c":
parsed = await evm.Technomaniacs(nft, account, whitelisted);
break;
case "0xe7f8ccda432239dcb418e94d625bc2fe6350f6bb":
parsed = await evm.ArcadeEdition(nft, account, whitelisted);
break;
case "0x56d93767467c54bd86578666904087c4f16cdb7f":
parsed = await evm.Founders_Cabinet(nft, account, whitelisted);
break;
case "0x2d317ed6c2e3eb5c54ca7518ef19deee96c15c85":
parsed = await evm.TTAV(nft, account, whitelisted);
break;
case "0x7a7ca3b27760b52428d7a9d0a9f369ff31a2de94":
parsed = await evm.BoredGUtterCats(nft, account, whitelisted);
break;
case "0x2feee2cc7fb32bd48ab22080e2c680f5390ef426":
parsed = await evm.IDoDirtPolygon(nft, account, whitelisted);
break;
case "0x2953399124f0cbb46d2cbacd8a89cf0599974963":
parsed = chainId
? await evm.OPENSTORE(nft, account, whitelisted)
: await evm.ArsenalGame(nft, account, whitelisted);
break;
case "0xc69ecd37122a9b5fd7e62bc229d478bb83063c9d":
parsed = await evm.Mate(nft, account, whitelisted);
break;
case "0x8eaeaa3a67abfc7c141775234fc30c707e26cf49":
parsed = await evm.ABCBears(nft, account, whitelisted);
break;
case "0x51ecb52ebb85384679b108a9e6a017ae17754eef":
parsed = await evm.TragicMonsters(nft, account, whitelisted);
break;
case "0xbede8ad4878e5ce441accce6a828ea7bc5be1ed0":
parsed = await evm.SuperFatAcademy(nft, account, whitelisted);
break;
case "0xb94c3fd0016888bab09dbc229f9397294e828a54":
parsed = await evm.ForgottenRunesComic(nft, account, whitelisted);
break;
case "0xd4c77e46b0266a7aca11083bcc86342f47bbdd04":
parsed = await evm.LilDickie(nft, account, whitelisted);
break;
case "0x9304f22a5ab577119210d730e41755a6732e19f7":
parsed = await evm.TheCheeks(nft, account, whitelisted);
break;
case "0x817c63be246dcfb5f218091baa581949b6796bdb":
parsed = await evm.Nagato(nft, account, whitelisted);
break;
case "0x495f947276749ce646f68ac8c248420045cb7b5e":
parsed = await evm.OpenSEA(nft, account, whitelisted);
break;
case "0x0c5ab026d74c451376a4798342a685a0e99a5bee":
parsed = await evm.MachineFi(nft, account, whitelisted);
break;
case "0xc254a8d4ef5f825fd31561bdc69551ed2b8db134":
parsed = await evm.WrappedXPNET(nft, account, whitelisted);
break;
return parsed;
case "0xca4f6b3f9e45e2484913bcc46667f1bb6db72906":
parsed = await evm.TRSRNFT(nft, account, whitelisted);
break;
case "0xeA380Be04a398d93030E4Bff15cBC87f6B35b5ae":
parsed = await evm.WUBI(nft, account, whitelisted);
break;
default:
parsed = await evm.Default(nft, account, whitelisted);
break;
}
return parsed;
};
const elrondParser = async (
collectionIdent: string,
nft: any,
account: string,
whitelisted: boolean
collectionIdent: string,
nft: any,
account: string,
whitelisted: boolean
) => {
let parsed;
switch (collectionIdent) {
case "AERMES-ac9886": {
parsed = await elrd.AERMES(nft, account, whitelisted);
break;
}
case "DRIFTERS-efd96c": {
parsed = await elrd.DRIFTERS(nft, account, whitelisted);
break;
}
let parsed;
switch (collectionIdent) {
case "AERMES-ac9886": {
parsed = await elrd.AERMES(nft, account, whitelisted);
break;
}
case "DRIFTERS-efd96c": {
parsed = await elrd.DRIFTERS(nft, account, whitelisted);
break;
}
case "NIFTYREX-d8c812": {
parsed = await elrd.DRIFTERS(nft, account, whitelisted);
break;
}
case "NIFTYREX-d8c812": {
parsed = await elrd.DRIFTERS(nft, account, whitelisted);
break;
}
case "INNOVATOR-fca3a7": {
parsed = await elrd.INNOVATOR(nft, account, whitelisted);
break;
}
case "INNOVATOR-fca3a7": {
parsed = await elrd.INNOVATOR(nft, account, whitelisted);
break;
}
default:
parsed = await elrd.DEFAULT(nft, account, whitelisted);
break;
case "CGPASS-73ac68": {
parsed = await elrd.MEDUSA(nft, account, whitelisted);
break;
}
return parsed;
case "ORC-ef544d": {
parsed = await elrd.ORC(nft, account, whitelisted);
break;
}
case "STRAYCATS-b079a7": {
parsed = await elrd.WrappedXPNET(nft, account, whitelisted);
break;
}
case "TAKANNE-3db244": {
parsed = await elrd.APOPHIS(nft, account, whitelisted);
break;
}
default:
parsed = await elrd.DEFAULT(nft, account, whitelisted);
break;
}
return parsed;
};

@@ -7,4 +7,4 @@ {

"forceConsistentCasingInFileNames": true,
"outDir": "../bridge-interface/node_modules/nft-parser/dist",
//"outDir": "./dist",
//"outDir": "../bridge-interface/node_modules/nft-parser/dist",
"outDir": "./dist",
"strict": true,

@@ -11,0 +11,0 @@ "skipLibCheck": true,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc