New answers tagged

2

What does exactly cause the output containing OP_RETURN to be unspendable? Simply the fact that no input can possibly unlock coins which are encumbered with such an OP_RETURN-containing script. Whenever the script interpreter encounters an OP_RETURN instruction, it instantly aborts and cause the entire script to fail. However, OP_RETURN does more than make ...


1

Your link says Dependencies: bash, bitcoin-cli (v0.15 or newer), awk, bc, jq, sed. which means it runs on Linux (possibly also under WSL bash shell) you tagged your question wasabi and samouri - but those products probably don't support the necessary interface or platform, so I am unsure why you used those tags. You must be running a bitcoin-cli executable ...


0

Besides the Bitcoin Script editor you'll probably need an ECDSA generator. Here's a simple online tool to create priv/pub key-pairs and sign with them using the Bitcoin Curve (secp256k1) https://kjur.github.io/jsrsasign/sample/sample-ecdsa.html


0

Online script IDE for Bitcoin and Liquid: https://scriptwiz.app/


0

I don't understand how the OP_PUSH works - where does it push from and does it push it onto the top of the stack? I thought script operations read from the top of the stack so I'd read the top item and push it back onto the stack which does nothing? As I understand it, the script is separate from the stack. The script is read left to right and it's ...


0

For pushing numbers between 1-16, you should be using OP_1-OP_16. For pushing numbers larger than 16, you should be using OP_PUSH(OP_N/A). E.g: <5> push compiles to OP_5: 0x55 <17> push compiles to OP_PUSH1(0x11): 0x0111 <666> push compiles to OP_PUSH2(0x9a02): 0x029a02 OP_ADD pops two inputs and adds them together. So your ordering is ...


3

This is not something you can do at the protocol level, but you probably don't need it. Once you broadcast a transaction, each bitcoin node will hold it in its memory pool until the transaction is confirmed or until the node decides to drop it from its mempool. Nodes can drop your transaction when maximum mempool size is reached and transactions below a ...


1

There are currently 3 types of addresses defined, and each directly encodes a specific scriptPubKey. 1... addresses. These are P2PKH addresses. To construct their scriptPubKey, use Base58Check decoding, verify the first byte of the result is 0, and then construct the script OP_DUP OP_HASH160 <byte 1-21 of the Base58Check decode> OP_EQUALVERIFY ...


3

Yes, assuming James sends Bob two outputs with the following spending conditions: pk($bob) || (pk($alice) && older(10)) pk($bob) || (pk($carol) && older(10)) Bob can spend these UTXOs together in one transaction by unilaterally satisfying the first spending conditions just with his signatures. Once either of the two UTXOs has ten ...


3

People creating smart contracts on a cryptocurrency network are designing cryptographic protocols—frankly, it might be a good thing if not every JavaScript programmer takes a go at that. Bitcoin does not have a virtual machine, but there are Miniscript, Minsc, or Sapio as higher level languages that translate to script. Additionally, there is an on-going ...


Top 50 recent answers are included