• Finds all bids in the auction tree that meet or exceed the clearing price.

    Uses an in-order traversal of the AVL tree to efficiently collect qualifying bids. The function traverses from highest to lowest prices and stops when prices fall below the clearing price threshold.

    Returns

    Array of bids that meet or exceed the clearing price, sorted by price (highest first)

    Example

    const tree = await fetchAuctionAVLTreeV1(umi, treePda);
    const clearingPrice = lamportsToMicroLamports(1_000_000); // 0.001 SOL
    const qualifyingBids = findAuctionBids(tree, clearingPrice);

    Parameters

    • tree: AuctionAVLTreeV1

      The auction AVL tree containing all bids

    • clearingPriceULamports: bigint

      The minimum price in micro-lamports for a bid to qualify

    Returns TreeBid[]

Generated using TypeDoc