opensea-js
Version:
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
32 lines (31 loc) • 1.27 kB
TypeScript
import { Fee, OpenSeaAccount, OpenSeaCollection, OpenSeaPaymentToken, RarityStrategy } from "../types";
/**
* Converts a collection JSON response to an OpenSeaCollection object.
* @param collection The raw collection JSON from the API
* @returns OpenSeaCollection object
*/
export declare const collectionFromJSON: (collection: any) => OpenSeaCollection;
/**
* Converts a rarity JSON response to a RarityStrategy object.
* @param rarity The raw rarity JSON from the API
* @returns RarityStrategy object or null
*/
export declare const rarityFromJSON: (rarity: any) => RarityStrategy | null;
/**
* Converts a payment token JSON response to an OpenSeaPaymentToken object.
* @param token The raw payment token JSON from the API
* @returns OpenSeaPaymentToken object
*/
export declare const paymentTokenFromJSON: (token: any) => OpenSeaPaymentToken;
/**
* Converts an account JSON response to an OpenSeaAccount object.
* @param account The raw account JSON from the API
* @returns OpenSeaAccount object
*/
export declare const accountFromJSON: (account: any) => OpenSeaAccount;
/**
* Converts a fee JSON response to a Fee object.
* @param fee The raw fee JSON from the API
* @returns Fee object
*/
export declare const feeFromJSON: (fee: any) => Fee;