-
-
Save icostan/0029f5f5db19955ef4a6eb90a0c07875 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Output = Struct.new :value, :lock_script do | |
def serialize | |
script_hex = script_to_hex(lock_script) | |
long_to_hex(value) + byte_to_hex(hex_size(script_hex)) + script_hex | |
end | |
end | |
output_script = bitcoin_script '2N959B4qEPkce8jbzQC7EQaS6uaEBB9YTgQ' | |
output = Output.new 1_000_000, output_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment