Skip to content

useSendBTCTransactions ​

Sends a batch of MIDL transactions. Expects serializedTransactions to be an array of signed serialized MIDL transactions and btcTransaction to be a signed Bitcoin transaction hex.

Import ​

ts
import { useSendBTCTransactions } from "@midl/executor-react";

Example ​

ts
const { sendBTCTransactions } = useSendBTCTransactions();
sendBTCTransactions({ serializedTransactions, btcTransaction });

Parameters ​

NameTypeDescription
mutationobject (optional)Mutation options for React Query.

Returns ​

NameTypeDescription
sendBTCTransactions(variables: SendBTCTransactionsParameter) => voidMutation function to send BTC transactions.
sendBTCTransactionsAsync(variables: SendBTCTransactionsParameter) => Promise<SendBTCTransactionsReturnType>Async mutation function.
...restobjectAdditional mutation state from React Query.

SendBTCTransactionsParameter ​

NameTypeDescription
serializedTransactionsarrayArray of signed serialized MIDL transactions.
btcTransactionstringSigned Bitcoin transaction hex.

Released under the MIT License