Wednesday, September 10, 2025
HomeBitcointaproot - non-mandatory-script-verify-flag (Invalid Schnorr signature)

taproot – non-mandatory-script-verify-flag (Invalid Schnorr signature)

I am making an attempt to inscribe a Switch of BRC-20 ship an quantity of Bitcoin from and to a single deal with. Would this doable?

Sure you possibly can pay from an deal with again to the identical deal with, although clearly it’s good to make an allowance for a price, so the returned quantity is much less otherwise you want an additional enter to cowl the price.

This isn’t what’s implied by the error message. It isn’t the supply of your drawback creating a sound Schnorr signature.


    const script = [
        pubkey.toString("hex"),
        "OP_CHECKSIG",
        "OP_0",
        "OP_IF",
        toHexString(ec.encode("ord")),
        "01",
        toHexString(mimetype),
        "OP_0",
        toHexString(content),
        "OP_ENDIF",
    ].be a part of(" ");
    const leafScript = bitcoin.script.fromASM(script);

I am unfamiliar with this Javascript .fromASM operate. Presumably it provides the suitable opcodes for the implicit knowledge pushes? For instance the pubkey.toString("hex"), has to ultimately be prefixed with opcode 0x20 because the opcode for pushing 32-bytes. I would verify what .fromASM produces.

I am additionally puzzled by ec.encode("ord") – it appears to be changing a UTF-8 string to UTF-8 until your supply is definitely in some encoding that isn’t a superset of 7-bit ASCII.


My understanding of the community encoding of the related script is at Methods to differentiate between BTC transactions and BRC20 transactions on a blockchain?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments