audiusproject / fetch-nft Goto Github PK
View Code? Open in Web Editor NEWπΌππ A utility to fetch and easily display Ethereum & Solana NFTs in a common format given any wallet
Home Page: https://fetch-nft.audius.org
License: Other
πΌππ A utility to fetch and easily display Ethereum & Solana NFTs in a common format given any wallet
Home Page: https://fetch-nft.audius.org
License: Other
Solana Address doesn't yield NFT listings on OpenSea.
See: Solana OpenSea Data
Yet, for Ethereum Address it yields a list of NFTS:
See: Etheruem OpenSea Data
Where is data being pulled from for the Solana example address: GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY
According to error message: Can't resolve 'encoding'
for npm package.
see below code:
// USING NEXTJS@13
// ./src/app/page.tsx
import React, { useEffect, useState } from "react";
import Image from "next/image";
import { FetchNFTClient } from "@audius/fetch-nft";
import NFT from "./NFT";
// FETCH - TESTING OUT FETCH API
async function getPuppers() {
const response = await fetch("https://dog.ceo/api/breeds/image/random", {
cache: "no-cache",
});
const data = await response.json();
return data;
}
// NFT
// upon checking Opensea the address: GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY
// doesn't yield anything.
// Where is this data being pulled from?
// GETTING ISSUES WITH API
async function getSolanaCollectibles() {
// Initialize fetch client
const fetchClient = new FetchNFTClient();
// Fetching Solana collectibles for the given wallets
return fetchClient
.getSolanaCollectibles(["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"])
.then(({ res }) => {
return res;
});
}
// TESTING OUT OPENSEA API since Fetch-API is causing issues for setup
async function getEthereumCollectibles() {
const sdk = require("api")("@opensea/v2.0#1nqh2zlnvr1o4h");
sdk.auth("04c8ae776ac44b4cabebbed161dfbc8c");
sdk.server("https://api.opensea.io");
return await sdk
.list_nfts_by_account({
chain: "ethereum",
address: "0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9",
})
.then(({ data }) => {
return data;
})
.catch((err) => console.error(err));
}
export default async function Home() {
const dogs = await getPuppers();
console.log(dogs);
let ethAssets;
const getEthData = await getEthereumCollectibles().then((res) => {
ethAssets = res; // get base object
console.log("WORKING DATA:", ethAssets);
console.log("DATA 1:", ethAssets.nfts[0]);
});
let solAssets;
const getSolData = await getSolanaCollectibles().then((res) => {
solAssets = res; // get base object
console.log("WORKING DATA:", solAssets);
});
return (
<div>
<h1>Audius Data</h1>
<NFT data={ethAssets.nfts} />
<h1>Doggos Data</h1>
<Image
src={dogs.message}
width={500}
height={500}
alt="doggos"
priority
/>
</div>
);
}
β ./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/@solana/web3.js/lib/index.cjs.js
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
β ./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/isomorphic-fetch/fetch-npm-node.js
./node_modules/api/dist/cache.js
./node_modules/api/dist/index.js
./src/app/page.tsx
Expected to see Solana data upon running npm run dev
.
{
"name": "audius-nft",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@audius/fetch-nft": "^0.1.8",
"@solana/spl-token": "^0.1.8",
"@solana/web3.js": "^1.87.2",
"module-alias": "^2.2.3",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
}
}
OS: MacOS 13.4 - Ventura
NextJS: 13
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
Upon running the file, I receive an error stating:
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
...
As well as
...
(node:47001) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 22 terminated listeners added to [Fetch]. Use emitter.setMaxListeners() to increase limit
It seems that the fetch request is able to return information about
β
Solana based assets: GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY, and not
β Ethereum based assets: 0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9
like in the example.
It is expected to get the JSON data from the Ethereum based asset, just like the Solana based asset.
Run the following installation commands above. The reason is that I am testing out the fetching aspect as a utility file, which will be imported into the main project.
node fetchNft.ts
The code is as follows:
const { FetchNFTClient } = require("@audius/fetch-nft");
// Initialize fetch client
const fetchClient = new FetchNFTClient();
// Fetching all collectibles for the given wallets
fetchClient
.getCollectibles({
ethWallets: ["0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9"],
solWallets: ["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"],
})
.then((res) => console.log(res));
The error in the terminal is as follows:
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
at JSON.parse (<anonymous>)
at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
at successSteps (node:internal/deps/undici/undici:6636:27)
at node:internal/deps/undici/undici:1236:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) https://api.opensea.io/api/v1/events?account_address=0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9&limit=300&event_type=transfer&only_opensea=false
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
at JSON.parse (<anonymous>)
at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
at successSteps (node:internal/deps/undici/undici:6636:27)
at node:internal/deps/undici/undici:1236:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) https://api.opensea.io/api/v1/events?account_address=0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9&limit=300&event_type=created&only_opensea=false
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
at JSON.parse (<anonymous>)
at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
at successSteps (node:internal/deps/undici/undici:6636:27)
at node:internal/deps/undici/undici:1236:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) https://api.opensea.io/api/v1/assets?owner=0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9&limit=50
{
ethCollectibles: {},
solCollectibles: {
GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY: [ [Object], [Object], [Object], [Object] ]
}
}
(node:47001) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 22 terminated listeners added to [Fetch]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
It is expected to get the JSON data from the Ethereum based asset, just like the Solana based asset.
OS: MacOS 13.4 - Ventura
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
Perhaps the query for Ethereum requires an OpenSea configuration. It is not clear from the documentation.
Upon omitting the Ethereum based request, the information is retrieved:
{
ethCollectibles: {},
solCollectibles: {
GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY: [ [Object], [Object], [Object], [Object] ]
}
}
(node:48876) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 22 terminated listeners added to [Fetch]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
using the code:
const { FetchNFTClient } = require("@audius/fetch-nft");
// Initialize fetch client
const fetchClient = new FetchNFTClient();
// Fetching all collectibles for the given wallets
fetchClient
.getCollectibles({
// ethWallets: ["0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9"], --- OMITTED
solWallets: ["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"],
})
.then((res) => console.log(res));
The error seems to only come from getting the Ethereum asset.
Is there a way to fetch the metadata attributes of an NFT as well?
Like this Solana NFT would return:
"attributes":[
{"trait_type":"Background","value":"Red"},
{"trait_type":"Fur / Skin","value":"Brown / Peach"},
{"trait_type":"Head","value":"No Traits"},
{"trait_type":"Mouth","value":"Pizza"},
{"trait_type":"Teeth","value":"Wooden Tooth"},
{"trait_type":"Clothing","value":"Striped T-Shirt"},
{"trait_type":"Eyewear","value":"Aviator Glasses"}
]
It is not clear which API end point to choose from. Upon using: https://api.opensea.io/api/v2/chain/ethereum/account/
from https://docs.opensea.io/reference/list_nfts_by_account
const { FetchNFTClient } = require("@audius/fetch-nft");
const API_KEY = "SOME KEY";
// Open Sea Config
const openSeaConfig = {
// is this the correct end point? It was taken from OpenSea docs, yet it does not resolve.
apiEndpoint: "https://api.opensea.io/api/v2/chain/ethereum/account/",
apiKey: API_KEY,
assetLimit: 100,
eventLimit: 300,
};
// Initialize fetch client with configs
const fetchClient = new FetchNFTClient({ openSeaConfig });
/*
// Fetching all collectibles for the given wallets
const solAssets = fetchClient
.getCollectibles({
solWallets: ["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"],
})
.then((res) => console.log(JSON.stringify(res, null, 2)));
*/
// Fetching Ethereum collectibles for the given wallets
fetchClient
.getEthereumCollectibles(["0x5a8443f456f490dceead0922b0cc89afd598cec9"])
.then((res) => console.log(res))
.then(() => console.log("--------------"));
After running the script
node fetchNft.ts
nothing is returned:
{}
--------------
See above
It is expected to get the JSON data from the Ethereum based asset, just like the Solana based asset.
OS: MacOS 13.4 - Ventura
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
When using the OpenSea API from the following website, the correct NFTs are returned:
https://docs.opensea.io/reference/list_nfts_by_account
This install works fine:
npm install @solana/spl-token @solana/web3.js
However, upon running this installation script:
npm install @audius/fetch-nft
The following error occurs:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @solana/[email protected]
npm ERR! node_modules/@solana/spl-token
npm ERR! @solana/spl-token@"^0.3.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @solana/spl-token@"^0.1.8" from @audius/[email protected]
npm ERR! node_modules/@audius/fetch-nft
npm ERR! @audius/fetch-nft@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/USERNAME/.npm/_logs/2023-10-23T16_41_47_441Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/USERNAME/.npm/_logs/2023-10-23T16_41_47_441Z-debug-0.log
Run the following installation commands above.
The @audius/fetch-nft
installs normally without any issue.
OS: MacOS 13.4 - Ventura
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
npm install @solana/spl-token@^0.1.8 @solana/web3.js
Used version spl-token@^0.1.8.
Then ...
@audius/fetch-nft
fetchClient.getSolanaCollectibles()
as described in the docs does not work and results in the error
error: Module not found: Can't resolve 'encoding' in '/Users/USER/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Instead, had to use fetchClient.getSolanaCollectibles(["ADDRESS"])
.
see below code:
src/app/page.tsx
import React, { useEffect, useState } from "react";
import Image from "next/image";
import { FetchNFTClient } from "@audius/fetch-nft";
import NFT from "./NFT";
// FETCH test data
async function getPuppers() {
const response = await fetch("https://dog.ceo/api/breeds/image/random", {
cache: "no-cache",
});
const data = await response.json();
return data;
}
// NFT
// upon checking Opensea the address: GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY
// doesn't yield anything.
// Where is this data being pulled from?
async function getSolanaCollectibles() {
// Initialize fetch client
const fetchClient = new FetchNFTClient();
// // Fetching Solana collectibles for the given wallets
return fetchClient
.getSolanaCollectibles(["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"])
.then(({ res }) => {
return res;
});
// return fetchClient
// .getCollectibles({
// solWallets: ["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"],
// })
// .then((res) => {
// return res;
// });
}
// TESTING OUT OPENSEA API since Fetch-API is causing issues for setup
async function getEthereumCollectibles() {
const sdk = require("api")("@opensea/v2.0#1nqh2zlnvr1o4h");
sdk.auth("04c8ae776ac44b4cabebbed161dfbc8c");
sdk.server("https://api.opensea.io");
return await sdk
.list_nfts_by_account({
chain: "ethereum",
address: "0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9",
})
.then(({ data }) => {
return data;
})
.catch((err) => console.error(err));
}
export default async function Home() {
const dogs = await getPuppers();
console.log(dogs);
let solAssets;
const getSolData = await getSolanaCollectibles().then((res) => {
// pluck out the Solana NFT data
solAssets = res; // get base object
console.log("WORKING DATA:", solAssets);
});
solAssets =
solAssets.solCollectibles["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"];
console.log("??????????:", solAssets);
let ethAssets;
const getEthData = await getEthereumCollectibles().then((res) => {
ethAssets = res; // get base object
console.log("WORKING DATA:", ethAssets);
console.log("DATA 1:", ethAssets.nfts);
});
return (
<div>
<h1>Audius Data</h1>
<h2>Ethereum Collectables</h2>
<NFT data={ethAssets.nfts} />
<h2>Solana Collectables</h2>
<NFT data={solAssets} />
<h1>Doggos Data</h1>
<Image
src={dogs.message}
width={500}
height={500}
alt="doggos"
priority
/>
</div>
);
}
Expected to see Solana data upon running npm run dev
. by using the fetchClient.getSolanaCollectibles()
package.json
{
"name": "audius-nft",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@audius/fetch-nft": "^0.1.8",
"@solana/spl-token": "^0.1.8",
"@solana/web3.js": "^1.87.2",
"api": "^6.1.1",
"module-alias": "^2.2.3",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
}
}
OS: MacOS 13.4 - Ventura
NextJS: 13
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
[email protected] / ReactJS@18 code does not work π€·.
Following the example from https://github.com/AudiusProject/fetch-nft/blob/main/examples/react-app/src/App.js.
It seems to be that the API endpoints are not clear.
Additionally, upon running, the @audius/fetch-nft/
module within node_modules
cannot be found.
However, the fetching for the Solana based assets using node
works correctly.
"use client"; // client component
import React, { useEffect, useState } from "react";
import Image from "next/image";
import { FetchNFTClient } from "@audius/fetch-nft";
// Solana Config
const solanaConfig = {
rpcEndpoint: "https://api.mainnet-beta.solana.com",
};
// Open Sea Config
const openSeaConfig = {
apiEndpoint:
"https://api.opensea.io/api/v2/chain/ethereum/account/0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9/nfts",
apiKey: "04c8ae776ac44b4cabebbed161dfbc8c",
assetLimit: 50,
eventLimit: 300,
};
// Initialize fetch client with configs
const fetchClient = new FetchNFTClient({ openSeaConfig, solanaConfig });
export default function Home() {
// get NFT
const [collectibles, setCollectibles] = useState(null);
useEffect(() => {
// Fetching all collectibles for the given wallets
fetchClient
.getCollectibles({
solWallets: ["GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"],
})
.then((res) => console.log(JSON.stringify(res, null, 2)));
}, []);
return (
<div className="App">
{/* <div className="Header">Eth Collectibles</div>
{collectibles?.ethCollectibles[
"0x5A8443f456f490dceeAD0922B0Cc89AFd598cec9"
].map((collectible) => (
<div className="Collectibles">
<div className="Name">{collectible.name}</div>
<img
className="Image"
src={collectible.frameUrl || collectible.gifUrl}
alt={collectible.name}
/>
</div>
))} */}
<div className="Header">Solana Collectibles</div>
{collectibles?.solCollectibles[
"GrWNH9qfwrvoCEoTm65hmnSh4z3CD96SfhtfQY6ZKUfY"
].map((collectible) => (
<div className="Collectibles">
<div className="Name">{collectible.name}</div>
<img
className="Image"
src={collectible.frameUrl || collectible.gifUrl}
alt={collectible.name}
/>
</div>
))}
</div>
);
}
warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
β ./node_modules/@audius/fetch-nft/dist/index.es.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.es.js
./src/app/page.tsx
./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/@solana/web3.js/lib/index.cjs.js
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
β ./node_modules/@audius/fetch-nft/dist/index.es.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.es.js
./src/app/page.tsx
./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/@solana/web3.js/lib/index.cjs.js
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
β ./node_modules/@audius/fetch-nft/dist/index.es.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.es.js
./src/app/page.tsx
./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/@solana/web3.js/lib/index.cjs.js
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
β ./node_modules/@audius/fetch-nft/dist/index.es.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.es.js
./src/app/page.tsx
./node_modules/@audius/fetch-nft/dist/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/@audius/fetch-nft/dist'
Import trace for requested module:
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/anthonyalbertorio/Desktop/audius-nft/audius-nft/node_modules/node-fetch/lib'
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/@solana/web3.js/lib/index.cjs.js
./node_modules/@audius/fetch-nft/dist/index.js
./src/app/page.tsx
β Compiling /favicon.ico/route ...
Expected to see output in ReactJS upon running npm run dev
.
{
"name": "audius-nft",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@audius/fetch-nft": "^0.1.8",
"@solana/spl-token": "^0.1.8",
"@solana/web3.js": "^1.87.2",
"module-alias": "^2.2.3",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
}
}
OS: MacOS 13.4 - Ventura
Node version: V20.5.0
Npm version: 9.8.1
Browser name and version: Chrome 118.0.5993.70
Hey Devs
Hope you all are doing great, I see in this project you have OpenSea assets API to get all the NFT's a user owns from wallet address. The question is does this API displays NFT's minted and then owned from other platforms like super rare, looks rare, etc. Basically OpenSea competitors?
Looking forward to hearing back from you thank you!
Best Regards
Udit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.