Skip to content

signIntention

signIntention(config, client, intention, intentions, options): Promise<SignedTransaction>

Signs the intention with the given options. The intention is signed as a generic Bitcoin message.

Import

ts
import { signIntention } from "@midl/executor";

Example

ts
const signed = await signIntention(config, client, intention, intentions, { txId });

Parameters

NameTypeDescription
configConfigThe configuration object.
clientClientEVM client or provider.
intentionTransactionIntentionThe intention to sign.
intentionsTransactionIntention[]The list of intentions to sign (used for nonce calculation).
optionsSignIntentionOptionsThe options for signing.

SignIntentionOptions

NameTypeDescription
fromstring (optional)BTC address of the account to use for signing.
noncenumber (optional)Next nonce registered in EVM network.
txIdstringTransaction hash of the BTC transaction.
protocolSignMessageProtocol (optional)Protocol for signing the message.

Returns

Promise<SignedTransaction> — The signed EVM transaction object.

Released under the MIT License