• Fetches all winning bids from an auction bucket.

    This async function retrieves the auction tree associated with a bucket and calculates the winning bids based on the bucket's clearing price and token allocation.

    Returns

    Promise resolving to an array of winning bids

    Throws

    Error if the auction tree is not found

    Example

    const auctionBucket = await fetchAuctionBucketV1(umi, bucketPda);
    const winners = await getAuctionWinners(umi, auctionBucket);
    console.log(`${winners.length} winning bids found`);

    Parameters

    • umi: Pick<Context, "rpc" | "eddsa" | "programs">

      Umi context containing RPC, programs, and eddsa for Solana interaction

    • auction: AuctionBucketV1

      The auction bucket containing clearing price and allocation info

    Returns Promise<TreeBid[]>

Generated using TypeDoc