• Fetch a list of confirmed blocks between two slot numbers.

    Parameters

    • t: HttpTransport

      HTTP transport instance

    • startSlot: Slot

      Start slot (inclusive)

    • OptionalendSlot: Slot

      End slot (inclusive); omit to use the latest confirmed slot

    • commitment: Commitment = 'confirmed'

      Desired commitment level (default: "confirmed")

    • opts: CallOptions = {}

      Additional call options

    Returns Promise<Slot[]>

    Array of confirmed slot numbers in the range

    const slots = await getBlocks(transport, 100_000, 100_010);
    console.log(`Confirmed blocks: ${slots}`);

    1.0.0