Skip to content

Instantly share code, notes, and snippets.

@icostan
Created November 14, 2018 08:09
Show Gist options
  • Save icostan/4bedb6c9b63bce6f92dea64316e6736b to your computer and use it in GitHub Desktop.
Save icostan/4bedb6c9b63bce6f92dea64316e6736b to your computer and use it in GitHub Desktop.
private_key = 0x79020296790075fc8e36835e045c513df8b20d3b3b9dbff4d043be84ae488f8d
public_key = '03996c918f74f0a6f1aeed99ebd81ab8eed8df99bc96fc082b20839259d332bad1'
lock_script = bitcoin_script 'n1C8nsmi4sc4hMBGgVZrnhxeFtk1sTbMZ4'
tx_hex = transaction.sign private_key, public_key, lock_script
puts "TX hash: #{transaction.hash}"
puts "TX hex: #{tx_hex}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment