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?What 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?

Prime joint compound before latex paint?

Is "plugging out" electronic devices an American expression?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

What is the offset in a seaplane's hull?

Are white and non-white police officers equally likely to kill black suspects?

Is there a familial term for apples and pears?

Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?

Is domain driven design an anti-SQL pattern?

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

aging parents with no investments

Is Social Media Science Fiction?

extract characters between two commas?

Is ipsum/ipsa/ipse a third person pronoun, or can it serve other functions?

Re-submission of rejected manuscript without informing co-authors

"listening to me about as much as you're listening to this pole here"

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Pristine Bit Checking

LWC and complex parameters

Was there ever an axiom rendered a theorem?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Could a US political party gain complete control over the government by removing checks & balances?

Ideas for 3rd eye abilities

Could Giant Ground Sloths have been a good pack animal for the ancient Mayans?

How to deal with fear of taking dependencies



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?


What 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 Mar 30 at 0:12









      nick carrawaynick carraway

      15910




      15910




















          1 Answer
          1






          active

          oldest

          votes


















          4














          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
            Mar 30 at 0:22












          • 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
            Mar 30 at 0:28






          • 1





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

            – Raghav Sood
            Mar 30 at 0:28











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

            – nick carraway
            Mar 30 at 1:42






          • 2





            @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

            – Raghav Sood
            Mar 30 at 8:26











          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









          4














          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
            Mar 30 at 0:22












          • 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
            Mar 30 at 0:28






          • 1





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

            – Raghav Sood
            Mar 30 at 0:28











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

            – nick carraway
            Mar 30 at 1:42






          • 2





            @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

            – Raghav Sood
            Mar 30 at 8:26















          4














          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
            Mar 30 at 0:22












          • 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
            Mar 30 at 0:28






          • 1





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

            – Raghav Sood
            Mar 30 at 0:28











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

            – nick carraway
            Mar 30 at 1:42






          • 2





            @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

            – Raghav Sood
            Mar 30 at 8:26













          4












          4








          4







          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 Mar 30 at 0:16









          Raghav SoodRaghav Sood

          7,70121127




          7,70121127












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

            – nick carraway
            Mar 30 at 0:22












          • 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
            Mar 30 at 0:28






          • 1





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

            – Raghav Sood
            Mar 30 at 0:28











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

            – nick carraway
            Mar 30 at 1:42






          • 2





            @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

            – Raghav Sood
            Mar 30 at 8:26

















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

            – nick carraway
            Mar 30 at 0:22












          • 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
            Mar 30 at 0:28






          • 1





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

            – Raghav Sood
            Mar 30 at 0:28











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

            – nick carraway
            Mar 30 at 1:42






          • 2





            @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

            – Raghav Sood
            Mar 30 at 8:26
















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

          – nick carraway
          Mar 30 at 0:22






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

          – nick carraway
          Mar 30 at 0:22














          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
          Mar 30 at 0:28





          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
          Mar 30 at 0:28




          1




          1





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

          – Raghav Sood
          Mar 30 at 0:28





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

          – Raghav Sood
          Mar 30 at 0:28













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

          – nick carraway
          Mar 30 at 1:42





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

          – nick carraway
          Mar 30 at 1:42




          2




          2





          @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

          – Raghav Sood
          Mar 30 at 8:26





          @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input.

          – Raghav Sood
          Mar 30 at 8:26

















          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

          Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

          Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

          Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ