• 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

Bitget Confirms $351.6M Hot Wallet Breach And Pauses Withdrawals

US Charges Man After Crypto Scam Wallets Received More Than $53M

September 26, 2026
Anthropic Loses Pentagon Fight Ahead of Anticipated $2 Trillion IPO

Anthropic Loses Pentagon Fight Ahead of Anticipated $2 Trillion IPO

September 26, 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

Bitget Confirms $351.6M Hot Wallet Breach And Pauses Withdrawals

US Charges Man After Crypto Scam Wallets Received More Than $53M

by Moussa
September 26, 2026
0

TL;DR U.S. prosecutors have charged a Vietnamese national with money laundering tied to alleged cryptocurrency “pig butchering” schemes. Prosecutors say...

Anthropic Loses Pentagon Fight Ahead of Anticipated $2 Trillion IPO

Anthropic Loses Pentagon Fight Ahead of Anticipated $2 Trillion IPO

by Moussa
September 26, 2026
0

Key TakeawaysA 2-1 appeals ruling allows the Pentagon to exclude Anthropic from defense work.Anthropic previously won a Pentagon agreement with...

SEC Market Structure Proposal Draws Tokenized Stock Attention

Uk Banks Complete First Live Tokenized Sterling Deposit Payments

by Moussa
September 26, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Major UK banks have completed the first...

Bitget Confirms $351.6M Hot Wallet Breach And Pauses Withdrawals

CleanSpark Closes $2.276B Debt Financing As Miner Builds For Its Next Expansion

by Moussa
September 26, 2026
0

TL;DR CleanSpark has completed the closing of $2.276 billion in senior secured notes. The Bitcoin miner says proceeds will support...

$93K BTC Is The Key Price Level For The Bull Market

$93K BTC Is The Key Price Level For The Bull Market

by Moussa
September 26, 2026
0

Is the Bitcoin bear market officially over? Katie Stockton, founder of Fairlead Strategies, breaks down the technical signals behind Bitcoin’s...

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]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdH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U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News