signPsbt
Signs a Partially Signed Bitcoin Transaction (PSBT). PSBTs are used for more complex Bitcoin transactions that may require multiple signatures or advanced scripting.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
request.unsignedPsbtBase64 | string | The unsigned PSBT encoded in Base64 |
request.allowedSighash | number[] | Array of allowed signature hash types |
request.signature | Array (optional) | Array of signature configuration objects |
request.signature[].address | string | The address to sign with |
request.signature[].signingIndexes | number[] | The input indexes to sign |
request.signature[].disableAddressValidation | boolean (optional) | Disable address validation |
walletAccount | BitcoinWalletAccount | The wallet account to sign with |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<{ signedPsbt: string }> - A promise that resolves to an object containing the signed PSBT in Base64 format.
Errors
| Error | Description |
|---|---|
NotBitcoinProviderError | Thrown if the wallet account’s provider is not a Bitcoin provider |
Related functions
- signPsbts - Sign multiple PSBTs
- sendBitcoin - Send a simple Bitcoin transaction