Skip to main content

sendTx

Callable

  • sendTx(params: { chain?: blockchain; description?: string; tx: Transaction<false, true> | Transaction<true, true>; verbose?: boolean; wait?: boolean }): Promise<Mina.IncludedTransaction | Mina.PendingTransaction | Mina.RejectedTransaction | undefined>

  • The function sendTx sends a transaction, checks account updates, and waits for confirmation on the blockchain.


    Parameters

    • params: { chain?: blockchain; description?: string; tx: Transaction<false, true> | Transaction<true, true>; verbose?: boolean; wait?: boolean }

      The parameters object

      • optionalchain: blockchain

        The blockchain to send the transaction on

      • optionaldescription: string

        A description of the transaction

      • tx: Transaction<false, true> | Transaction<true, true>

        The transaction to send

      • optionalverbose: boolean

        Whether to log verbose information

      • optionalwait: boolean

        Whether to wait for the transaction to be included in a block

    Returns Promise<Mina.IncludedTransaction | Mina.PendingTransaction | Mina.RejectedTransaction | undefined>

    The sendTx function returns a Mina.IncludedTransaction, Mina.PendingTransaction, Mina.RejectedTransaction, or undefined if there was an error during the process.