BluxBlux

Send Transaction

Submit a signed transaction to the Stellar network using Blux.

The blux.sendTransaction() method submits a signed transaction to the Stellar network. Blux shows a confirmation modal to the user before submission, displaying the transaction details, estimated fee, and the submitting account.

Send transaction modal

Type

type IOptions = {
  network?: string;
};

const sendTransaction: (xdr: string, options?: IOptions);
ParameterTypeDescription
xdrstringBase64-encoded XDR string of the transaction
options.networkstringNetwork to submit on — omit to use the active network

Usage

import { blux } from "@bluxcc/core";

const sendTx = async () => {
  try {
    const result = await blux.sendTransaction(xdr);

    console.log("Transaction submitted");
    console.log(result);
  } catch (error) {
    console.error("Something went wrong!");
    console.log(error);
  }
};

To skip the confirmation modal and handle your own confirmation UI, set showWalletUIs: false in createConfig.

On this page