Class TransactionConfirmationManager

Class to await for transaction confirmations in an optimised manner. It tracks a shared list of all pending transactions and fetches them in bulk in a shared RPC request whenever they have an "overlapping" polling interval. E.g. tx1 with an interval of 200ms and tx2 with an interval of 300ms (if sent at the same time) will be fetched together at at 600ms, 1200ms, 1800ms, etc.

Hierarchy

  • TransactionConfirmationManager

Constructors

Properties

connection: Connection
intervalId: Timeout = null
pendingConfirmations: Map<string, TransactionConfirmationRequest> = ...

Methods

  • Parameters

    • status: SignatureStatus
    • desiredConfirmationStatus: TransactionConfirmationStatus

    Returns boolean

  • Parameters

    • txSig: string
    • desiredConfirmationStatus: TransactionConfirmationStatus = ...
    • timeout: number = 30000
    • pollInterval: number = 1000
    • searchTransactionHistory: boolean = false

    Returns Promise<SignatureStatus>

  • Parameters

    • txSig: string
    • timeout: number = 30000
    • desiredConfirmationStatus: TransactionConfirmationStatus = ...

    Returns Promise<RpcResponseAndContext<SignatureResult>>

Generated using TypeDoc