unisat-wallet / dev-support

14 stars 11 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 1 month ago

cloud6605 commented 1 month ago

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

cloud6605 commented 1 month ago

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

cloud6605 commented 1 month ago

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

huanniangstudio commented 1 month ago

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

muzi-lixia commented 1 month ago

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

huanniangstudio commented 2 weeks ago

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