UNPKG

opensea-js

Version:

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

82 lines (81 loc) 3.17 kB
import { OrdersQueryOptions, OrderV2, SerializedOrderV2, ProtocolData } from "./types"; import { Chain, OrderSide } from "../types"; export declare const DEFAULT_SEAPORT_CONTRACT_ADDRESS = "0x0000000000000068F116a894984e2DB1123eB395"; export declare const getPostCollectionOfferPayload: (collectionSlug: string, protocol_data: ProtocolData, traitType?: string, traitValue?: string, traits?: Array<{ type: string; value: string; }>) => { criteria: { collection: { slug: string; }; }; protocol_data: import("@opensea/seaport-js/lib/types").OrderWithCounter; protocol_address: string; }; export declare const getBuildCollectionOfferPayload: (offererAddress: string, quantity: number, collectionSlug: string, offerProtectionEnabled: boolean, traitType?: string, traitValue?: string, traits?: Array<{ type: string; value: string; }>) => { offerer: string; quantity: number; criteria: { collection: { slug: string; }; }; protocol_address: string; offer_protection_enabled: boolean; }; export declare const getFulfillmentDataPath: (side: OrderSide) => string; export declare const getFulfillListingPayload: (fulfillerAddress: string, order_hash: string, protocolAddress: string, chain: Chain, assetContractAddress?: string, tokenId?: string, unitsToFill?: string, recipientAddress?: string, includeOptionalCreatorFees?: boolean) => { listing: { hash: string; chain: Chain; protocol_address: string; }; fulfiller: { address: string; }; consideration?: { asset_contract_address: string; token_id: string; } | undefined; units_to_fill: string; recipient?: string | undefined; include_optional_creator_fees: boolean; }; export declare const getFulfillOfferPayload: (fulfillerAddress: string, order_hash: string, protocolAddress: string, chain: Chain, assetContractAddress?: string, tokenId?: string, unitsToFill?: string, includeOptionalCreatorFees?: boolean) => { offer: { hash: string; chain: Chain; protocol_address: string; }; fulfiller: { address: string; }; consideration?: { asset_contract_address: string; token_id: string; } | undefined; units_to_fill: string; include_optional_creator_fees: boolean; }; type OrdersQueryPathOptions = "protocol" | "side"; export declare const serializeOrdersQueryOptions: (options: Omit<OrdersQueryOptions, OrdersQueryPathOptions>) => { limit: number | undefined; cursor: string | undefined; payment_token_address: string | undefined; maker: string | undefined; taker: string | undefined; owner: string | undefined; listed_after: string | number | undefined; listed_before: string | number | undefined; token_ids: string[] | undefined; asset_contract_address: string | undefined; order_by: ("created_date" | "eth_price") | undefined; order_direction: ("asc" | "desc") | undefined; only_english: boolean | undefined; }; export declare const deserializeOrder: (order: SerializedOrderV2) => OrderV2; export {};