yours-org / yours-wallet

A non-custodial and open-source wallet for BSV and 1Sat Ordinals.
Other
63 stars 51 forks source link

Not able to create valid signature using getSignatures method #253

Closed untitledlt closed 3 weeks ago

untitledlt commented 1 month ago

I am trying to create an unsigned transaction using @bsv/sdk lib and later sign it using Yours wallet. No matter how I try, I am not able to produce valid signature to unlock utxo. I tried doing this on testnet and mainnet. Here's the parsed signature from whatsonchain.com (note [error] at the end):

"scriptSig": {
  "asm": "45022100b4a4cd3da500c325f445ea3eae25c1365a7a59f1501ab51a78dca27f5841e7d602202ae8e1680a295d7247fe OP_UNKNOWN197 OP_UNKNOWN208 OP_BASE OP_0NOTEQUAL OP_UNKNOWN240 OP_14 OP_UNKNOWN239 OP_UNKNOWN243 OP_UNKNOWN246 OP_ROLL OP_16 [error]",
  "hex": "3045022100b4a4cd3da500c325f445ea3eae25c1365a7a59f1501ab51a78dca27f5841e7d602202ae8e1680a295d7247fec5d05092f05eeff3f67a6045d9493dd032a8fc90c1fd41",
  "isTruncated": false
            },

I have created a minimal React project to show how I do that: https://github.com/untitledlt/yours-wallet-test/blob/main/src/App.tsx

Please guide me what I am doing wrong here. Thanks!

untitledlt commented 1 month ago

sigRequests:

[{ 
 "prevTxid":"0bd6f3bcde2604ded1564f171c5902a549f8480394821b40a683303283a1624a",
  "outputIndex":1,
  "inputIndex":0,
  "satoshis":99822,
  "address":"1Lokk79RmDdD5weTgZbFbGxW3M4NwTiSFC"
}]
shruggr commented 1 month ago

Need to include script

shruggr commented 1 month ago

The output script for the input you are signing

danwag06 commented 3 weeks ago

This was resolved as user error