• 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

$700 Million Frozen By DOJ Strike Force

$700 Million Frozen By DOJ Strike Force

April 25, 2026
Bitcoin Sentiment Warning: Social Media FOMO Spikes Again

Bitcoin Sentiment Warning: Social Media FOMO Spikes Again

April 25, 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

$700 Million Frozen By DOJ Strike Force

$700 Million Frozen By DOJ Strike Force

by Moussa
April 25, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure A US law enforcement task force seized...

Bitcoin Sentiment Warning: Social Media FOMO Spikes Again

Bitcoin Sentiment Warning: Social Media FOMO Spikes Again

by Moussa
April 25, 2026
0

Analytics firm Santiment has pointed out how bullish sentiment among social media users has seen a sharp spike alongside the...

Fed Pauses Rate Cuts As Bitcoin Steadies Near $90,000

DOJ Drops Criminal Probe Of Fed Chair Powell, Clearing Path For Warsh

by Moussa
April 25, 2026
0

The Department of Justice ended its criminal investigation into Federal Reserve Chair Jerome Powell on Friday, removing the last major...

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

colored coins – Is it possible to create a token on the Bitcoin blockchain?

by Moussa
April 24, 2026
0

Yes, that's what BRC-20 tokens (aka 'ordinals') are. It sort of jumped the shark though. It was popular for about...

Ethereum News: Rebound Looks Shaky as Warning Signs Retail Traders Should Watch

Ethereum News: Rebound Looks Shaky as Warning Signs Retail Traders Should Watch

by Moussa
April 24, 2026
0

In Ethereum news today, ETH USD is trading around $2,330, attempting a recovery after bouncing off the $2,250 support zone,...

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