Signs a Bitcoin transaction with wallet keys.
Method Signature
async signTransaction(
txHex: string,
keyType?: string
): Promise<string>
Parameters
The transaction hex to sign
Key type to use: "identity", "deposit", or "auto-detect" (default: "auto-detect")
Returns
The signed transaction hex
Example
// Auto-detect key type
const signedTx = await wallet.signTransaction("02000000...");
// Use specific key type
const signedWithIdentity = await wallet.signTransaction(
"02000000...",
"identity"
);
console.log("Signed transaction:", signedWithIdentity);