DynamicSDK.instance.bitcoin.buildPsbt constructs an unsigned PSBT without broadcasting it. Use it when you need to inspect, modify, batch, or co-sign a transaction before sending. See What is a PSBT? in the overview for context.
Example
Parameters
| Parameter | Type | Description |
|---|---|---|
walletId | String | The id of a wallet whose chain == 'BTC'. |
recipientAddress | String | Destination address. |
amount | String | Amount in satoshis, encoded as a string to preserve precision. |
feePriority | String? | Fee tier: 'high', 'medium', or 'low'. |
Returns
Future<String> — the unsigned PSBT, base64-encoded. Pass it to signPsbt to sign, then to sendRawTransaction to broadcast.