non-mandatory-script-verify-flag (Invalid Schnorr signature)
non-mandatory-script-verify-flag (Invalid Schnorr signature)
Loading saved threads...
LikKee 沥祺 Richie · External communityPost link
External question — Bitcoin Stack Exchange
Author: LikKee 沥祺 Richie
Original post: https://bitcoin.stackexchange.com/questions/120971
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I try to put this into a Psbt:
Alice make payment to purchase an amount of BRC-20 from Bob
Bob request to inscribe a transfer of BRC-20 by using Burner account
Burner inscribe the transfer of BRC-20 and transfer to Bob
Bob transfer the BRC-20 to Alice
Bob create the Psbt and Burner account, and signed. Then send to Alice to make payment and sign.
Alice topup on price to cover all following transaction's network fee.
Issues facing now is how to get the required input utxo params from previous output?
Is this possible btw with bitcoinjs-lib or any recommend library?
Quote
Report
RedGrittyBrick · External communityPost link
External answer — Bitcoin Stack Exchange
Author: RedGrittyBrick
Original post: https://bitcoin.stackexchange.com/a/120983
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I'm trying to
inscribe a Transfer of BRC-20
send an amount of Bitcoin
from and to a single address. Would this possible?
Yes you can pay from an address back to the same address, though obviously you need to make an allowance for a fee, so the returned amount is less or you need an extra input to cover the fee.
This is not what is implied by the error message. It is not the source of your problem creating a valid 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",
].join(" ");
const leafScript = bitcoin.script.fromASM(script);
I'm unfamiliar with this Javascript
.fromASM
function. Presumably it adds the appropriate opcodes for the implicit data pushes? For example the
pubkey.toString("hex"),
has to eventually be prefixed with opcode
0x20
as the opcode for pushing 32-bytes. I'd check what
.fromASM
produces.
I'm also puzzled by
ec.encode("ord")
- it seems to be converting a UTF-8 string to UTF-8 unless your source is actually in some encoding that is not a superset of 7-bit ASCII.
My understanding of the network encoding of the relevant script is at
How to differentiate between BTC transactions and BRC20 transactions on a blockchain?
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Bitcoin Stack Exchange Author: LikKee 沥祺 Richie Source score (net votes, not local likes): 1 Original post: https://bitcoin.stackexchange.com/questions/120971 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I try to put this into a Psbt: Alice make payment to purchase an amount of BRC-20 from Bob Bob request to inscribe a transfer of BRC-20 by using Burner account Burner inscribe the transfer of BRC-20 and transfer to Bob Bob transfer the BRC-20 to Alice Bob create the Psbt and Burner account, and signed. Then send to Alice to make payment and sign. Alice topup on price to cover all following transaction's network fee. Issues facing now is how to get the required input utxo params from previous output? Is this possible btw with bitcoinjs-lib or any recommend library?
Checking account access…