@cross-nft-marketplace/auction-house-nft-hooks
Version:
Generic react hooks for fetching cross-nft-marketplace auctions, nfts, and data on arbitary 721s. Powers nft-components.
64 lines (63 loc) • 1.97 kB
TypeScript
import { TokenShortFragment } from '../graph-queries/uniswap-types';
import { ReserveAuctionPartialFragment } from '../graph-queries/zora-graph-types';
import { CurrentReserveBid, PastReserveBid } from './AuctionInfoTypes';
export declare type MediaContentType = {
uri: string;
type: 'uri';
mimeType: string;
} | {
text: string;
type: 'text';
mimeType: string;
};
export declare type FetchGroupTypes = 'id' | 'creator' | 'owner';
export declare type ZoraFetchQueryType = 'creator' | 'owner' | 'creator' | 'collection';
declare type MetadataIsh = {
mimeType: string;
name: string;
description: string;
animation_url?: string;
image?: string;
};
export declare type MetadataResultType = {
metadata: MetadataIsh;
};
export declare type AuctionResultType = ReserveAuctionPartialFragment;
export declare type AuctionsResult = AuctionResultType[];
export declare enum KNOWN_CONTRACTS {
ZORA = "zora"
}
declare type ETHAddress = string;
export declare type NFTResultType = {
tokenId: string;
contract: {
address: string;
knownContract?: KNOWN_CONTRACTS;
name?: string;
symbol?: string;
image?: string;
};
owner: ETHAddress;
creator?: ETHAddress;
metadataURI: string;
};
export declare type GenericNFTResponseType = {
metadata: MetadataIsh;
};
export declare type ZoraMedia = {
metadataHash: string;
contentURI: string;
contentHash?: string;
creatorSharePercentage: number;
creatorBidShare: string;
createdAtTimestamp: string;
};
export declare type ReserveAuctionBidsWithCurrency = Omit<ReserveAuctionPartialFragment, 'previousBids' | 'currentBid' | 'reservePrice' | 'buyNowPrice'> & {
previousBids: PastReserveBid[];
currentBid?: CurrentReserveBid;
};
export declare type ChainCurrencyType = {
ethToUsd: string;
token: TokenShortFragment;
};
export {};