In the bitcoin scripting language, how can I access other outputs of the transaction? Or how else can I limit how the coins may be spent? The Next CEO of Stack OverflowWhat is opcode 252?Is there any way to send an output to a script which can then only be sent to one of two addresses?Can Bitcoin scripting be used for double spending attacks?Is there any way to make an UTXO that cannot be spent until a certain block #?Is there a maximum size of a scriptSig/scriptPubKey?PUSHDATA4 unnecessary?(Script) Is it possible to create a transaction that is spendable to only one address?How to automatically reveal the secret after some tine in a hash locked transactionCan a transaction have a single 0-value OP_RETURN as its only output?What’s the opcode sequence for doing the reverse of Multisig?

To not tell, not take, and not want

Can we say or write : "No, it'sn't"?

Which tube will fit a -(700 x 25c) wheel?

How do I transpose the 1st and -1th levels of an arbitrarily nested array?

Rotate a column

Why do we use the plural of movies in this phrase "We went to the movies last night."?

How powerful is the invisibility granted by the Gloom Stalker ranger's Umbral Sight feature?

Make solar eclipses exceedingly rare, but still have new moons

Is it ever safe to open a suspicious html file (e.g. email attachment)?

Can you replace a racial trait cantrip when leveling up?

Anatomically Correct Strange Women In Ponds Distributing Swords

Received an invoice from my ex-employer billing me for training; how to handle?

Can I equip Skullclamp on a creature I am sacrificing?

In excess I'm lethal

What benefits would be gained by using human laborers instead of drones in deep sea mining?

Are there any unintended negative consequences to allowing PCs to gain multiple levels at once in a short milestone-XP game?

What does convergence in distribution "in the Gromov–Hausdorff" sense mean?

If/When UK leaves the EU, can a future goverment conduct a referendum to join the EU?

Why am I allowed to create multiple unique pointers from a single object?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Is micro rebar a better way to reinforce concrete than rebar?

Inappropriate reference requests from Journal reviewers

Why does the UK parliament need a vote on the political declaration?

Sending manuscript to multiple publishers



In the bitcoin scripting language, how can I access other outputs of the transaction? Or how else can I limit how the coins may be spent?



The Next CEO of Stack OverflowWhat is opcode 252?Is there any way to send an output to a script which can then only be sent to one of two addresses?Can Bitcoin scripting be used for double spending attacks?Is there any way to make an UTXO that cannot be spent until a certain block #?Is there a maximum size of a scriptSig/scriptPubKey?PUSHDATA4 unnecessary?(Script) Is it possible to create a transaction that is spendable to only one address?How to automatically reveal the secret after some tine in a hash locked transactionCan a transaction have a single 0-value OP_RETURN as its only output?What’s the opcode sequence for doing the reverse of Multisig?










1















Is there any way to add an opcode to a UTXO that prevents how the coins are spent?



For example, in order to to spend the output, a person must send X number of bitcoin to Y address within the accompanying transaction.










share|improve this question


























    1















    Is there any way to add an opcode to a UTXO that prevents how the coins are spent?



    For example, in order to to spend the output, a person must send X number of bitcoin to Y address within the accompanying transaction.










    share|improve this question
























      1












      1








      1








      Is there any way to add an opcode to a UTXO that prevents how the coins are spent?



      For example, in order to to spend the output, a person must send X number of bitcoin to Y address within the accompanying transaction.










      share|improve this question














      Is there any way to add an opcode to a UTXO that prevents how the coins are spent?



      For example, in order to to spend the output, a person must send X number of bitcoin to Y address within the accompanying transaction.







      script op-return






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      nick carrawaynick carraway

      1549




      1549




















          1 Answer
          1






          active

          oldest

          votes


















          2














          There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.






          share|improve this answer























          • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

            – nick carraway
            2 hours ago












          • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

            – Raghav Sood
            2 hours ago






          • 1





            The coins can still be sent anywhere, there is no restriction on the destination

            – Raghav Sood
            2 hours ago











          • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

            – nick carraway
            1 hour ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "308"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f85723%2fin-the-bitcoin-scripting-language-how-can-i-access-other-outputs-of-the-transac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.






          share|improve this answer























          • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

            – nick carraway
            2 hours ago












          • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

            – Raghav Sood
            2 hours ago






          • 1





            The coins can still be sent anywhere, there is no restriction on the destination

            – Raghav Sood
            2 hours ago











          • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

            – nick carraway
            1 hour ago















          2














          There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.






          share|improve this answer























          • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

            – nick carraway
            2 hours ago












          • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

            – Raghav Sood
            2 hours ago






          • 1





            The coins can still be sent anywhere, there is no restriction on the destination

            – Raghav Sood
            2 hours ago











          • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

            – nick carraway
            1 hour ago













          2












          2








          2







          There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.






          share|improve this answer













          There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Raghav SoodRaghav Sood

          7,57121127




          7,57121127












          • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

            – nick carraway
            2 hours ago












          • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

            – Raghav Sood
            2 hours ago






          • 1





            The coins can still be sent anywhere, there is no restriction on the destination

            – Raghav Sood
            2 hours ago











          • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

            – nick carraway
            1 hour ago

















          • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

            – nick carraway
            2 hours ago












          • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

            – Raghav Sood
            2 hours ago






          • 1





            The coins can still be sent anywhere, there is no restriction on the destination

            – Raghav Sood
            2 hours ago











          • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

            – nick carraway
            1 hour ago
















          Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

          – nick carraway
          2 hours ago






          Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script

          – nick carraway
          2 hours ago














          No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

          – Raghav Sood
          2 hours ago





          No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack

          – Raghav Sood
          2 hours ago




          1




          1





          The coins can still be sent anywhere, there is no restriction on the destination

          – Raghav Sood
          2 hours ago





          The coins can still be sent anywhere, there is no restriction on the destination

          – Raghav Sood
          2 hours ago













          Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

          – nick carraway
          1 hour ago





          Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script

          – nick carraway
          1 hour ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Bitcoin Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f85723%2fin-the-bitcoin-scripting-language-how-can-i-access-other-outputs-of-the-transac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

          2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

          Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?