UNPKG

@mimicry/kaleidoscope

Version:

Kaleidoscope is an NPM package that conveniently aggregates responses from multiple NFT data providers.

92 lines (91 loc) 2.27 kB
import { Decimal } from 'decimal.js'; import { Chain, ConsensusFilter, ConsensusMethod, CurrencySymbol } from './enums'; export declare type Amount = { atomic: bigint; decimal: Decimal; }; export declare type ApiConfig = { key: string; host: string; }; export declare type ConsensusMechanism = { filter: ConsensusFilter; method: ConsensusMethod; }; export declare type CurrencyInfo = { symbol: CurrencySymbol; name: string; decimals: number; }; export declare type ContractPointer = { chain?: Chain; address: string; }; export declare type DataProviders = { [key: string]: any; }; export declare type Value = { currencyInfo: CurrencyInfo; amount: Amount; }; export declare type NFTCollectionMetadata = { contract: ContractPointer; name: string; description: string; collectionSize: number; ownerCount: number; symbol?: string; onSaleCount?: number; createdAt?: string; openseaVerificationStatus?: boolean; openseaSlug?: string; contractType?: string; images: { thumbnail: string; banner?: string; samples?: string[]; }; urls: { explorer: string; website?: string; discord?: string; twitter?: string; }; stats?: { currencyInfo?: CurrencyInfo; marketCap?: Amount; floor?: { h24?: Amount; h24Change?: Decimal; d7?: Amount; d7Change?: Decimal; d30?: Amount; d30Change?: Decimal; }; volume?: { h24?: Amount; h24Change?: Decimal; d7?: Amount; d7Change?: Decimal; d30?: Amount; d30Change?: Decimal; }; }; }; export declare type NFTCollectionSale = { timestamp: string; blockNumber: number; tokenId: string; price: Amount; buyer: string; seller: string; transactionHash: string; exchange: string; bundleSale: boolean; }; export declare type NFTCollectionSales = { contract: ContractPointer; currencyInfo: CurrencyInfo; numSales: number; sales: NFTCollectionSale[]; };