signPsbt
Request parameters
Description
import {
request,
BitcoinNetworkType,
RpcErrorCode,
} from "sats-connect";
try {
const response = await request('signPsbt', {
psbt: psbtBase64,
signInputs: {
"1ef9...Jn1r": [0],
"bc1p...ra4w": [1,2],
},
});
// if the transaction is ready to broadcast and you want to broadcast
// it yourself at this point, then remember to finalize the inputs in
// the returned PSBT before broadcasting
if (response.status === "success") {
// handle success response
} else {
if (response.error.code === RpcErrorCode.USER_REJECTION) {
// handle user request cancelation
} else {
// handle error
}
}
} catch (err) {
console.log(err);
}
Property
Description
Last updated
