me-foundation / msigner

msigner is an open source Bitcoin Ordinals Partially Signed Bitcoin Transactions (PSBT) signer library. It supports atomic swap of the inscription and provides a simple and secure way to structure Bitcoin transactions for marketplaces.
Apache License 2.0
225 stars 74 forks source link

InvalidArgumentError: Invalid signature - no finalScriptWitness #4

Open brianorwhatever opened 1 year ago

brianorwhatever commented 1 year ago

I can't get the sell psbt to verify.. the verify function spits out "InvalidArgumentError: Invalid signature - no finalScriptWitness" I'm not sure how to make the wallet (I'm using xverse) create this finalScriptWitness on the input.. any help would be appreciated

brianorwhatever commented 1 year ago

It seems to me like the creation of a PSBT in this library is using the inscription tx as the input whereas it should be the current utxo that is associated with the inscription. Is this codebase out of date from what ME is using in production?

nothing0012 commented 1 year ago

This library requires a fully running data store api that provides the fresh location utxo of the inscription.

https://github.com/magiceden-oss/msigner/blob/main/src/interfaces.ts#L21-L24

brianorwhatever commented 1 year ago

Hi @nothing0012, thanks for responding. Apologies, I should have been more explicit. I'm specifically talking about this input that is being used for the psbt https://github.com/magiceden-oss/msigner/blob/3de81d4aaac4d030b2fb2967d704a59070981777/src/signer.ts#L71

Shouldn't this tx hash be the current utxo holding the inscription instead of the inscription tx itself? Or is the ordItem.output the current utxo and I'm misunderstand that interface?