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.
Type
type IOptions = {
network?: string;
};
const sendTransaction: (xdr: string, options?: IOptions);| Parameter | Type | Description |
|---|---|---|
xdr | string | Base64-encoded XDR string of the transaction |
options.network | string | Network 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.