Type alias WaitFunction

WaitFunction: ((type?: "byBlock" | "byTransactionId", timeout?: number) => Promise<{ blockId: string; blockNumber?: number }>)

Type declaration

    • (type?: "byBlock" | "byTransactionId", timeout?: number): Promise<{ blockId: string; blockNumber?: number }>
    • Function to wait for a transaction to be mined. This function comes as a response after sending a transaction. See Provider.sendTransaction

      Parameters

      • Optional type: "byBlock" | "byTransactionId"

        Type must be "byBlock" or "byTransactionId" (default). byBlock will query the blockchain to get blocks and search for the transaction there. byTransactionId will query the "transaction store" microservice to search the transaction by its id.

      • Optional timeout: number

        Timeout in milliseconds. By default it is 15000

      Returns Promise<{ blockId: string; blockNumber?: number }>

Generated using TypeDoc