Skip to content

useSignIntentions

Signs multiple transaction intentions.

Import

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

Example

ts
const { signIntentions } = useSignIntentions();
signIntentions({ txId });

Parameters

NameTypeDescription
configConfig (optional)Custom configuration to override the default.
storeMidlContextStore (optional)Custom store to override the default.
mutationUseMutationOptions (optional)Mutation options for React Query.
options.protocolSignMessageProtocol (optional)Protocol to use for signing the intentions.
options.fromstring (optional)BTC address used to sign the transactions.
options.noncenumber (optional)Starting nonce for the intentions.

Returns

NameTypeDescription
signIntentions(variables: SignIntentionsVariables) => voidFunction to sign transaction intentions in batch.
signIntentionsAsync(variables: SignIntentionsVariables) => Promise<SignIntentionsResponse>Async function to sign intentions.
intentionsTransactionIntention[] The current list of transaction intentions.
...restobjectAdditional mutation state from React Query.

SignIntentionsVariables

NameTypeDescription
txIdstringTransaction hash of the BTC transaction.
intentionsTransactionIntention[]Optional intentions to sign instead of those in the store.

Released under the MIT License