# finalizeTransactionSigning

The `finalizeTransactionSigning` method adds signatures to a Bitcoin PSBT and finalizes it for broadcasting to the network.

## Usage

```ts twoslash
// [!include ~/snippets/code/chains.ts]
// ---cut---
const { transaction, hashesToSign } =
  await btcChain.prepareTransactionForSigning({
    from: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
    to: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4',
    value: '0.001', // 0.001 BTC
    publicKey: '0235a3...',
  })
// ---cut---
import { RSVSignature } from 'signet.js'

const rsvSignatures: RSVSignature[] = [
  {
    r: '123...',
    s: '123...',
    v: 27,
  },
]

const signedTx = btcChain.finalizeTransactionSigning({
  transaction,
  rsvSignatures,
})
```

## Parameters

| Parameter       | Type                     | Description                                                |
| --------------- | ------------------------ | ---------------------------------------------------------- |
| `transaction`   | `BTCUnsignedTransaction` | The unsigned PSBT returned by prepareTransactionForSigning |
| `rsvSignatures` | `RSVSignature[]`         | Array of RSV signatures from the MPC network               |

## Returns

| Type     | Description                                                             |
| -------- | ----------------------------------------------------------------------- |
| `string` | The serialized signed transaction in hex format, ready for broadcasting |
