• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

Spending one-OP-code-long scripts

Moussa by Moussa
May 20, 2025
in Bitcoin
0
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


One simple example is an OP_TRUE (0x51) script which decoded by bitcoin-cli on any testnet (incl. signet) network says following:

Related articles

Bitcoin Whales Accumulate $7.4 Billion In BTC

Bitcoin Whales Accumulate $7.4 Billion In BTC

November 27, 2026

Spain Lets AML Unit Freeze Crypto Accounts Without A Judge

November 27, 2026
$ bitcoin-cli -testnet4 decodescript 51
{
  "asm": "1",
  "desc": "raw(51)#8lvh9jxk",
  "type": "nonstandard",
  "p2sh": "2ND8PB9RrfCaAcjfjP1Y6nAgFd9zWHYX4DN",
  "segwit": {
    "asm": "0 4ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
    "desc": "addr(tb1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqaqh7jw)#gtc05zpf",
    "hex": "00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260",
    "address": "tb1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqaqh7jw",
    "type": "witness_v0_scripthash",
    "p2sh-segwit": "2N3i4C56DiqfpdcAJsAdZd2xYpCQMRAroye"
  }
}

It can be spent by using 02 0151 as a script length and scriptsig. This is how it looks in a full raw hex transaction present on Testnet4:

VERSION: 02000000
INPUTS: 01
 2221fab941cdb15ed1cc9dbd7511f55fec5044821a5053034b066bcc38d91bf5 01000000 02 0151 fdffffff
OUTPUTS: 01
 ff02000000000000 04 51024e73
LOCKTIME: 15700000

The transaction can be easily reconstructed from this readable hex format into a long one-line hex string on a *NIX terminal just by using tr -d ' [A-Z]:\n-' | grep ., i.e. removing any spaces, upper-case letters, colons, newlines and hyphens.

Spending the same from P2WSH or P2SH-Segwit address is very similar, just instead of adding to scriptsig one would use the input’s witness instead.

I know how to spend from scripts that use just one op-code when it is from range 51 – 61 (hex), but I have no idea how to spend (or even if it is possible at all to do it) in this way from addresses belonging to 00, 4f, 63 (OP_IF) and many others with higher-number op-codes where addresses for them exist. Some like 62 are giving this output so it is very easy to not even try:

{
  "asm": "OP_VER",
  "desc": "raw(62)#ttuhp9rg",
  "type": "nonstandard"
}

Is it possible to spend from addresses belonging to the other (see above) scripts only-one op-code (or one octet) long*? How?

* For example from 2NDNfojz7c4GS1RKxqUHKm8mk5URLskt65L



Source link

Share76Tweet47

Related Posts

Bitcoin Whales Accumulate $7.4 Billion In BTC

Bitcoin Whales Accumulate $7.4 Billion In BTC

by Moussa
November 27, 2026
0

Key takeaways Balances in Bitcoin addresses holding 1,000 to 10,000 BTC rose by 121,117 BTC from September 30 to November...

Spain Lets AML Unit Freeze Crypto Accounts Without A Judge

by Moussa
November 27, 2026
0

Spain has given its financial intelligence unit the power to freeze crypto accounts on its own authority, without first getting...

Prediction Markets Paint a Brutal Year-End Price Picture for XRP Holders

Prediction Markets Paint a Brutal Year-End Price Picture for XRP Holders

by Moussa
November 27, 2026
0

Key TakeawaysXRP traded at $0.9738 on Nov. 27, more than 73% below its July 2025 record high.Polymarket bettors assign a...

Bitcoin ETFs Bleed Record Cash as Stablecoins Shrink

Bitcoin ETFs Bleed Record Cash as Stablecoins Shrink

by Moussa
November 27, 2026
0

U.S. spot bitcoin ETFs lost a net $5.39 billion this month through Nov. 25, the largest monthly outflow since the...

BTC News: $7B Bitcoin Options Expiry Aftermath – What Happens Next?

BTC News: $7B Bitcoin Options Expiry Aftermath – What Happens Next?

by Moussa
November 27, 2026
0

Bitcoin barely reacted after $7 billion in Deribit options expired; in contrast, BTC is now trading at $61,700 with a...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdHlwZSUzRCUyMnRleHQlMjIlMjBuYW1lJTNEJTIybm4lMjIlMjBpZCUzRCUyMnRucC0xJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1lbWFpbCUyMiUzRSUzQ2xhYmVsJTIwZm9yJTNEJTIydG5wLTIlMjIlM0VFbWFpbCUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1lbWFpbCUyMiUyMHR5cGUlM0QlMjJlbWFpbCUyMiUyMG5hbWUlM0QlMjJuZSUyMiUyMGlkJTNEJTIydG5wLTIlMjIlMjB2YWx1ZSUzRCUyMiUyMiUyMHJlcXVpcmVkJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJ0bnAtZmllbGQlMjB0bnAtcHJpdmFjeS1maWVsZCUyMiUzRSUzQ2xhYmVsJTNFJTNDaW5wdXQlMjB0eXBlJTNEJTIyY2hlY2tib3glMjIlMjBuYW1lJTNEJTIybnklMjIlMjByZXF1aXJlZCUyMGNsYXNzJTNEJTIydG5wLXByaXZhY3klMjIlM0UlQzIlQTBCeSUyMGNvbnRpbnVpbmclMkMlMjB5b3UlMjBhY2NlcHQlMjB0aGUlMjBwcml2YWN5JTIwcG9saWN5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News