All Projects β†’ AudiusProject β†’ fetch-nft

AudiusProject / fetch-nft

Licence: other
πŸ–ΌπŸŽ‘πŸŒ  A utility to fetch and easily display Ethereum & Solana NFTs in a common format given any wallet

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to fetch-nft

metaplex-cli
Command line interface for Solana Metaplex programs.
Stars: ✭ 16 (-80.72%)
Mutual labels:  nft, solana, metaplex
metaplex
A directory of what the Metaplex Foundation works on!
Stars: ✭ 3,233 (+3795.18%)
Mutual labels:  nft, solana, metaplex
metaboss
The Metaplex NFT-standard Swiss Army Knife tool.
Stars: ✭ 575 (+592.77%)
Mutual labels:  nft, solana, metaplex
opensea-sales-twitter-bot
A Twitter bot that tweets Opensea sales for a given collection 🐳
Stars: ✭ 120 (+44.58%)
Mutual labels:  web3, nft, opensea
NFT-Dapp-Boilerplate
A highly scalable NFT and DEFI boilerplate with pre added web3 and different wallets with a focus on performance and best practices
Stars: ✭ 51 (-38.55%)
Mutual labels:  web3, nft
opensea-scraper
Scrapes nft floor prices and additional information from opensea. Used for https://nftfloorprice.info
Stars: ✭ 129 (+55.42%)
Mutual labels:  nft, opensea
Artion-Server
Artion API Server
Stars: ✭ 26 (-68.67%)
Mutual labels:  web3, nft
Solnet
Solana's .NET SDK and integration library.
Stars: ✭ 252 (+203.61%)
Mutual labels:  web3, solana
opensea
python wrapper for opensea api
Stars: ✭ 38 (-54.22%)
Mutual labels:  nft, opensea
awesome-defi
Curated list of awesome DeFi protocols, dapps, wallets and other resources
Stars: ✭ 36 (-56.63%)
Mutual labels:  nft, solana
solana-nft-token-metadata-update
Node.js script to update NFT Token metadata on Solana Blockchain
Stars: ✭ 143 (+72.29%)
Mutual labels:  nft, solana
OpenLoginSdk
Pluggable auth infrastructure for Web3 wallets and dapps
Stars: ✭ 108 (+30.12%)
Mutual labels:  web3, solana
nftool
A suite of tools for NFT generative art.
Stars: ✭ 145 (+74.7%)
Mutual labels:  nft, opensea
nft-app
How to create your own NFT and mint NFT token
Stars: ✭ 145 (+74.7%)
Mutual labels:  web3, nft
solana-nft-monitor
Monitor Solana NFT projects using Github Actions + flatgithub.com
Stars: ✭ 31 (-62.65%)
Mutual labels:  nft, solana
opensea-images-downloader
Script to download all the images from an opensea collection using the OpenSea API
Stars: ✭ 42 (-49.4%)
Mutual labels:  nft, opensea
solana-mobile-wallet
πŸ’³ Non-custodial cross-platform wallet for Solana
Stars: ✭ 64 (-22.89%)
Mutual labels:  web3, solana
opensea automatic uploader
(Bypass reCAPTCHAs) A Selenium Python bot to automatically and bulky upload and list your NFTs on OpenSea (all metadata integrated - Ethereum and Polygon supported); reCAPTCHA solver & bypasser included.
Stars: ✭ 205 (+146.99%)
Mutual labels:  nft, opensea
arloader
Rust command line application and client for uploading files to Arweave.
Stars: ✭ 79 (-4.82%)
Mutual labels:  nft, solana
anchor-escrow
Escrow program implemented in Anchor
Stars: ✭ 142 (+71.08%)
Mutual labels:  web3, solana

@audius/fetch-nft

πŸ–ΌπŸŽ‘πŸŒ 

A utility to fetch and easily display Ethereum & Solana NFTs in a common format given any wallet.

built with ❀️ from the team @Audius.



Installation

# install peer dependencies if not already in your project
npm install @solana/spl-token @solana/web3.js

npm install @audius/fetch-nft

Basic Usage

import { FetchNFTClient } from '@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))

By default, fetch-nft uses the public Opensea API and the Solana mainnet RPC endpoint. To configure API keys and endpoints, see Usage With Configs.

Fetch Client

FetchNFTClient is the primary interface for using the library. When initializing the client, you may optionally pass in configs for the Open Sea and Solana clients used internally.

type OpenSeaClientProps = {
  apiEndpoint?: string
  apiKey?: string
  assetLimit?: number
  eventLimit?: number
}

type SolanaClientProps = {
  rpcEndpoint?: string
}

type FetchNFTClientProps = {
  openSeaConfig?: OpenSeaClientProps,
  solanaConfig?: SolanaClientProps
}

Main Functions

Getting Ethereum collectibles:

FetchNFTClient::getEthereumCollectibles(wallets: string[]) => Promise<CollectibleState>

Getting Solana collectibles:

FetchNFTClient::getSolanaCollectibles(wallets: string[]) => Promise<CollectibleState>

Getting all collectibles:

FetchNFTClient::getCollectibles({
  ethWallets?: string[],
  solWallets?: string[]
}) => Promise<{
  ethCollectibles: CollectibleState
  solCollectibles: CollectibleState
}>

Output Types

Collectible

type Collectible = {
  id: string
  tokenId: string
  name: string | null
  description: string | null
  mediaType: CollectibleMediaType
  frameUrl: string | null
  imageUrl: string | null
  gifUrl: string | null
  videoUrl: string | null
  threeDUrl: string | null
  isOwned: boolean
  dateCreated: string | null
  dateLastTransferred: string | null
  externalLink: string | null
  permaLink: string | null
  assetContractAddress: string | null
  chain: Chain
  wallet: string
}

CollectibleState

type CollectibleState = {
  [wallet: string]: Collectible[]
}

Usage with Configs

import { FetchNFTClient } from '@audius/fetch-nft'

// Open Sea Config
const openSeaConfig = {
    apiEndpoint: '...',
    apiKey: '...',
    assetLimit: 50,
    eventLimit: 300
}

// Solana Config
const solanaConfig = {
    rpcEndpoint: '...'
}

// Initialize fetch client with configs
const fetchClient = new FetchNFTClient({ openSeaConfig, solanaConfig })

// Fetching Ethereum collectibles for the given wallets
fetchClient.getEthereumCollectibles([...]).then(res => console.log(res))

// Fetching Solana collectibles for the given wallets
fetchClient.getSolanaCollectibles([...]).then(res => console.log(res))

For more examples, see the /examples directory

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].