@magiceden/magiceden-sdk
Version:
A TypeScript SDK for interacting with Magic Eden's API across multiple chains.
308 lines (307 loc) • 11.1 kB
TypeScript
import { z } from 'zod';
/**
* Parameters for taking an NFT offer
*/
export declare const BaseTakeItemOfferParamsSchema: z.ZodObject<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
}, {
token: string;
}>;
export declare const EvmTakeItemOfferParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, {
/**
* The number of tokens to sell
*/
quantity: z.ZodOptional<z.ZodNumber>;
/**
* The order ID to sell into
*/
orderId: z.ZodOptional<z.ZodString>;
}>, "strip", z.ZodTypeAny, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}>;
export declare const EvmMultipleTakeItemOfferParamsSchema: z.ZodObject<{
/**
* The EVM chain to take the item offer on
*/
chain: z.ZodEnum<[import("../../chains").Blockchain.ETHEREUM, import("../../chains").Blockchain.BASE, import("../../chains").Blockchain.POLYGON, import("../../chains").Blockchain.SEI, import("../../chains").Blockchain.ARBITRUM, import("../../chains").Blockchain.APECHAIN, import("../../chains").Blockchain.BERACHAIN, import("../../chains").Blockchain.MONAD_TESTNET, import("../../chains").Blockchain.BSC, import("../../chains").Blockchain.ABSTRACT]>;
/**
* The take item offer parameters
*/
items: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, {
/**
* The number of tokens to sell
*/
quantity: z.ZodOptional<z.ZodNumber>;
/**
* The order ID to sell into
*/
orderId: z.ZodOptional<z.ZodString>;
}>, "strip", z.ZodTypeAny, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
chain: import("../../chains").Blockchain.ETHEREUM | import("../../chains").Blockchain.POLYGON | import("../../chains").Blockchain.BASE | import("../../chains").Blockchain.SEI | import("../../chains").Blockchain.ARBITRUM | import("../../chains").Blockchain.APECHAIN | import("../../chains").Blockchain.BERACHAIN | import("../../chains").Blockchain.MONAD_TESTNET | import("../../chains").Blockchain.BSC | import("../../chains").Blockchain.ABSTRACT;
items: {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}[];
}, {
chain: import("../../chains").Blockchain.ETHEREUM | import("../../chains").Blockchain.POLYGON | import("../../chains").Blockchain.BASE | import("../../chains").Blockchain.SEI | import("../../chains").Blockchain.ARBITRUM | import("../../chains").Blockchain.APECHAIN | import("../../chains").Blockchain.BERACHAIN | import("../../chains").Blockchain.MONAD_TESTNET | import("../../chains").Blockchain.BSC | import("../../chains").Blockchain.ABSTRACT;
items: {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}[];
}>;
export declare const SolanaTakeItemOfferParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, {
/**
* The buyer's wallet address
*/
buyer: z.ZodString;
/**
* The original offer price
*/
price: z.ZodString;
/**
* The new price to accept
*/
newPrice: z.ZodString;
/**
* The auction house address
*
* @default AUCTION_HOUSE_ADDRESS (found in constants/solana/marketplace.ts)
*/
auctionHouseAddress: z.ZodOptional<z.ZodString>;
/**
* The buyer referral address
*/
buyerReferral: z.ZodOptional<z.ZodString>;
/**
* The seller referral address
*/
sellerReferral: z.ZodOptional<z.ZodString>;
/**
* The buyer expiry timestamp
*/
buyerExpiry: z.ZodOptional<z.ZodNumber>;
/**
* The seller expiry timestamp
*/
sellerExpiry: z.ZodOptional<z.ZodNumber>;
/**
* The priority fee in micro lamports
*/
prioFeeMicroLamports: z.ZodOptional<z.ZodNumber>;
/**
* The maximum priority fee in lamports
*/
maxPrioFeeLamports: z.ZodOptional<z.ZodNumber>;
/**
* The exact priority fee in lamports
*/
exactPrioFeeLamports: z.ZodOptional<z.ZodNumber>;
}>, "strip", z.ZodTypeAny, {
price: string;
token: string;
buyer: string;
newPrice: string;
auctionHouseAddress?: string | undefined;
sellerReferral?: string | undefined;
prioFeeMicroLamports?: number | undefined;
maxPrioFeeLamports?: number | undefined;
exactPrioFeeLamports?: number | undefined;
buyerReferral?: string | undefined;
buyerExpiry?: number | undefined;
sellerExpiry?: number | undefined;
}, {
price: string;
token: string;
buyer: string;
newPrice: string;
auctionHouseAddress?: string | undefined;
sellerReferral?: string | undefined;
prioFeeMicroLamports?: number | undefined;
maxPrioFeeLamports?: number | undefined;
exactPrioFeeLamports?: number | undefined;
buyerReferral?: string | undefined;
buyerExpiry?: number | undefined;
sellerExpiry?: number | undefined;
}>;
export type EvmTakeItemOfferParams = z.infer<typeof EvmMultipleTakeItemOfferParamsSchema>;
export type SolanaTakeItemOfferParams = z.infer<typeof SolanaTakeItemOfferParamsSchema>;
export declare const TakeItemOfferParams: z.ZodUnion<[z.ZodObject<{
/**
* The EVM chain to take the item offer on
*/
chain: z.ZodEnum<[import("../../chains").Blockchain.ETHEREUM, import("../../chains").Blockchain.BASE, import("../../chains").Blockchain.POLYGON, import("../../chains").Blockchain.SEI, import("../../chains").Blockchain.ARBITRUM, import("../../chains").Blockchain.APECHAIN, import("../../chains").Blockchain.BERACHAIN, import("../../chains").Blockchain.MONAD_TESTNET, import("../../chains").Blockchain.BSC, import("../../chains").Blockchain.ABSTRACT]>;
/**
* The take item offer parameters
*/
items: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, {
/**
* The number of tokens to sell
*/
quantity: z.ZodOptional<z.ZodNumber>;
/**
* The order ID to sell into
*/
orderId: z.ZodOptional<z.ZodString>;
}>, "strip", z.ZodTypeAny, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}, {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
chain: import("../../chains").Blockchain.ETHEREUM | import("../../chains").Blockchain.POLYGON | import("../../chains").Blockchain.BASE | import("../../chains").Blockchain.SEI | import("../../chains").Blockchain.ARBITRUM | import("../../chains").Blockchain.APECHAIN | import("../../chains").Blockchain.BERACHAIN | import("../../chains").Blockchain.MONAD_TESTNET | import("../../chains").Blockchain.BSC | import("../../chains").Blockchain.ABSTRACT;
items: {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}[];
}, {
chain: import("../../chains").Blockchain.ETHEREUM | import("../../chains").Blockchain.POLYGON | import("../../chains").Blockchain.BASE | import("../../chains").Blockchain.SEI | import("../../chains").Blockchain.ARBITRUM | import("../../chains").Blockchain.APECHAIN | import("../../chains").Blockchain.BERACHAIN | import("../../chains").Blockchain.MONAD_TESTNET | import("../../chains").Blockchain.BSC | import("../../chains").Blockchain.ABSTRACT;
items: {
token: string;
quantity?: number | undefined;
orderId?: string | undefined;
}[];
}>, z.ZodObject<z.objectUtil.extendShape<{
/**
* The NFT token
*
* - For EVM, the token is in the format of contractAddress:tokenId
* - For Solana, the token is the mint address
*/
token: z.ZodString;
}, {
/**
* The buyer's wallet address
*/
buyer: z.ZodString;
/**
* The original offer price
*/
price: z.ZodString;
/**
* The new price to accept
*/
newPrice: z.ZodString;
/**
* The auction house address
*
* @default AUCTION_HOUSE_ADDRESS (found in constants/solana/marketplace.ts)
*/
auctionHouseAddress: z.ZodOptional<z.ZodString>;
/**
* The buyer referral address
*/
buyerReferral: z.ZodOptional<z.ZodString>;
/**
* The seller referral address
*/
sellerReferral: z.ZodOptional<z.ZodString>;
/**
* The buyer expiry timestamp
*/
buyerExpiry: z.ZodOptional<z.ZodNumber>;
/**
* The seller expiry timestamp
*/
sellerExpiry: z.ZodOptional<z.ZodNumber>;
/**
* The priority fee in micro lamports
*/
prioFeeMicroLamports: z.ZodOptional<z.ZodNumber>;
/**
* The maximum priority fee in lamports
*/
maxPrioFeeLamports: z.ZodOptional<z.ZodNumber>;
/**
* The exact priority fee in lamports
*/
exactPrioFeeLamports: z.ZodOptional<z.ZodNumber>;
}>, "strip", z.ZodTypeAny, {
price: string;
token: string;
buyer: string;
newPrice: string;
auctionHouseAddress?: string | undefined;
sellerReferral?: string | undefined;
prioFeeMicroLamports?: number | undefined;
maxPrioFeeLamports?: number | undefined;
exactPrioFeeLamports?: number | undefined;
buyerReferral?: string | undefined;
buyerExpiry?: number | undefined;
sellerExpiry?: number | undefined;
}, {
price: string;
token: string;
buyer: string;
newPrice: string;
auctionHouseAddress?: string | undefined;
sellerReferral?: string | undefined;
prioFeeMicroLamports?: number | undefined;
maxPrioFeeLamports?: number | undefined;
exactPrioFeeLamports?: number | undefined;
buyerReferral?: string | undefined;
buyerExpiry?: number | undefined;
sellerExpiry?: number | undefined;
}>]>;
export type TakeItemOfferParams = z.infer<typeof TakeItemOfferParams>;