Skip to content

bx script decode

thecodefactory edited this page Oct 4, 2018 · 13 revisions

Decode a script to plain text tokens.

$ bx script-decode --help
Usage: bx script-decode [-h] [--config value] [--flags value] [BASE16]   

Info: Decode a script to plain text tokens.                              

Options (named):

-c [--config]        The path to the configuration settings file.        
-f [--flags]         The rule fork flags, defaults to all (4294967295).  
-h [--help]          Get a description and instructions for this command.

Arguments (positional):

BASE16               The Base16 script. If not specified the script is   
                     read from STDIN.

This command is helpful in interpreting scripts as they appear in the wire protocol.

See also script-encode.

Example 1

Bitcoin Wiki example

$ bx script-decode 76A91489ABCDEFABBAABBAABBAABBAABBAABBAABBAABBA88AC
dup hash160 [89abcdefabbaabbaabbaabbaabbaabbaabbaabba] equalverify checksig

Example 2

piped commands

$ bx script-encode "dup hash160 [89abcdefabbaabbaabbaabbaabbaabbaabbaabba] equalverify checksig" | bx script-decode
76a91489abcdefabbaabbaabbaabbaabbaabbaabbaabba88ac
dup hash160 [89abcdefabbaabbaabbaabbaabbaabbaabbaabba] equalverify checksig

BX Menu

Clone this wiki locally