unisat-wallet / dev-support

36 stars 18 forks source link

unisat wallet doesn't allow SIGHASH_SINGLE | ANYONECANPAY sign type. How do we sign a psbt for listing? #33

Open cloud6605 opened 6 months ago

cloud6605 commented 6 months ago

unisat wallet doesn't allow SIGHASH_SINGLE | ANYONECANPAY sign type. How do we sign a psbt for listing?

cloud6605 commented 6 months ago

image Your have to set "sighashTypes:[131]" to allow that.

cloud6605 commented 6 months ago

Hi,I set the sighashTpyes to 131,but I got some error. image

slient-coder commented 6 months ago

Please post your full code for calling the signPsbt, similar to the one below. unisat.signPsbt("xxx",{...})

muzi-lixia commented 6 months ago

unisat.signPsbts(['7000000000000xxxxx...'], [{ autoFinalized: false, toSignInputs: [ { index: 1, address: '0xxxxxxxxxx...', sighashTypes: [131] } ] }])

slient-coder commented 5 months ago

This seems to have no issues. The complete code is needed for operation reproduction.