HFFP / brc20-example

brc20 ord inscription
13 stars 7 forks source link

Error while deploying transaction #1

Open RectangleSun opened 11 months ago

RectangleSun commented 11 months ago

Hello, I am a new BTC developer. I am still learning how to interact with the BTC network. I used your project and got an error when deploying signature transactions. Can you help me answer it?

Error: sendrawtransaction RPC error: {"code":-26,"message":"non-mandatory-script-verify-flag (Witness program hash mismatch)"}

This is an error reported in a broadcast transaction.

chirag9899 commented 11 months ago

i also got same error idk why

HFFP commented 11 months ago

if i want inscribe text / image ... any else

 // step 1:  get inscribeAdress by pubkey & inscriptionInfo 
     const {address, tpubkey, cblock, tapleaf, script} = getInscribeAddress(pubkey, inscription, network)

// step 2: send some coin to inscribeAdress and sign
     const sig = Signer.taproot.sign(seckey, txdata, 0, {extension: tapleaf})
     txdata.vin[0].witness = [sig, script, cblock]

// step 3: use inscribeAdress to inscribe

inscriptionMint this is a complete process

zhanshaoqian commented 10 months ago

if i want inscribe text / image ... any else

 // step 1:  get inscribeAdress by pubkey & inscriptionInfo 
     const {address, tpubkey, cblock, tapleaf, script} = getInscribeAddress(pubkey, inscription, network)

// step 2: send some coin to inscribeAdress and sign
     const sig = Signer.taproot.sign(seckey, txdata, 0, {extension: tapleaf})
     txdata.vin[0].witness = [sig, script, cblock]

// step 3: use inscribeAdress to inscribe

inscriptionMint this is a complete process

Still got an error: {"code":-26,"message":"non-mandatory-script-verify-flag (Witness program hash mismatch)"}