UNPKG

opensea-js

Version:

TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data

27 lines (26 loc) 1 kB
import { Fetcher } from "./fetcher"; import { GetCollectionsResponse, CollectionOrderByOption, GetTraitsResponse } from "./types"; import { Chain, OpenSeaCollection, OpenSeaCollectionStats } from "../types"; /** * Collection-related API operations */ export declare class CollectionsAPI { private fetcher; constructor(fetcher: Fetcher); /** * Fetch an OpenSea collection. */ getCollection(slug: string): Promise<OpenSeaCollection>; /** * Fetch a list of OpenSea collections. */ getCollections(orderBy?: CollectionOrderByOption, chain?: Chain, creatorUsername?: string, includeHidden?: boolean, limit?: number, next?: string): Promise<GetCollectionsResponse>; /** * Fetch stats for an OpenSea collection. */ getCollectionStats(slug: string): Promise<OpenSeaCollectionStats>; /** * Fetch all traits for a collection with their possible values and counts. */ getTraits(collectionSlug: string): Promise<GetTraitsResponse>; }