Class AuctionHouseClient

This is a client for the Auction House module.

It enables us to interact with the Auction House program in order to create and update Auction House to configure a marketplace as well to allow users to list, bid and execute sales.

You may access this client via the auctionHouse() method of your Metaplex instance.

const auctionHouseClient = metaplex.auctionHouse();

Example

You can create a new Auction House with minimum input like so. By default, the current identity of the Metaplex instance will be the authority of the Auction House.

const { auctionHouse } = await metaplex
.auctionHouse()
.create({
sellerFeeBasisPoints: 500, // 5% royalties
};

See

AuctionHouse The AuctionHouse model

Hierarchy

  • AuctionHouseClient

Constructors

Properties

metaplex: Metaplex

Methods

  • Finds an Auction House by its address.

    const nft = await metaplex
    .auctionHouse()
    .findByAddress({ address };

    Parameters

    Returns Promise<Readonly<{
        model: "auctionHouse";
        address: Pda;
        creatorAddress: PublicKey;
        authorityAddress: PublicKey;
        treasuryMint: Mint;
        feeAccountAddress: Pda;
        treasuryAccountAddress: Pda;
        feeWithdrawalDestinationAddress: PublicKey;
        treasuryWithdrawalDestinationAddress: PublicKey;
        sellerFeeBasisPoints: number;
        requiresSignOff: boolean;
        canChangeSalePrice: boolean;
        isNative: boolean;
        scopes: AuthorityScope[];
    } & {
        hasAuctioneer: false;
    }> | Readonly<{
        model: "auctionHouse";
        address: Pda;
        creatorAddress: PublicKey;
        authorityAddress: PublicKey;
        treasuryMint: Mint;
        feeAccountAddress: Pda;
        treasuryAccountAddress: Pda;
        feeWithdrawalDestinationAddress: PublicKey;
        treasuryWithdrawalDestinationAddress: PublicKey;
        sellerFeeBasisPoints: number;
        requiresSignOff: boolean;
        canChangeSalePrice: boolean;
        isNative: boolean;
        scopes: AuthorityScope[];
    } & {
        hasAuctioneer: true;
        auctioneer: {
            address: PublicKey;
            authority: PublicKey;
        };
    }>>

  • Finds an Auction House by its creator and treasury mint.

    const nft = await metaplex
    .auctionHouse()
    .findByCreatorAndMint({ creator, treasuryMint };

    Parameters

    Returns Promise<Readonly<{
        model: "auctionHouse";
        address: Pda;
        creatorAddress: PublicKey;
        authorityAddress: PublicKey;
        treasuryMint: Mint;
        feeAccountAddress: Pda;
        treasuryAccountAddress: Pda;
        feeWithdrawalDestinationAddress: PublicKey;
        treasuryWithdrawalDestinationAddress: PublicKey;
        sellerFeeBasisPoints: number;
        requiresSignOff: boolean;
        canChangeSalePrice: boolean;
        isNative: boolean;
        scopes: AuthorityScope[];
    } & {
        hasAuctioneer: false;
    }> | Readonly<{
        model: "auctionHouse";
        address: Pda;
        creatorAddress: PublicKey;
        authorityAddress: PublicKey;
        treasuryMint: Mint;
        feeAccountAddress: Pda;
        treasuryAccountAddress: Pda;
        feeWithdrawalDestinationAddress: PublicKey;
        treasuryWithdrawalDestinationAddress: PublicKey;
        sellerFeeBasisPoints: number;
        requiresSignOff: boolean;
        canChangeSalePrice: boolean;
        isNative: boolean;
        scopes: AuthorityScope[];
    } & {
        hasAuctioneer: true;
        auctioneer: {
            address: PublicKey;
            authority: PublicKey;
        };
    }>>

  • Finds Purchases by multiple criteria. You can use any combination of keys. Supports only 3 criteria at the same time including the required auctionHouse attribute.

    // Find all purchases in an Auction House.
    const purchases = await metaplex
    .auctionHouse()
    .findPurchases({ auctionHouse });

    // Find purchases by buyer and mint.
    const purchases = await metaplex
    .auctionHouse()
    .findPurchases({ auctionHouse, buyer, mint });

    // Find purchases by metadata.
    const purchases = await metaplex
    .auctionHouse()
    .findPurchases({ auctionHouse, metadata });

    // Find purchases by seller and buyer.
    const purchases = await metaplex
    .auctionHouse()
    .findPurchases({ auctionHouse, seller, buyer });

    Parameters

    Returns Promise<FindPurchasesOutput>

Generated using TypeDoc