Skip to content

Instantly share code, notes, and snippets.

View werner's full-sized avatar
🏠
Working from home

Werner Echezuría werner

🏠
Working from home
View GitHub Profile
@werner
werner / p2sh_p2wpkh.rb
Last active January 7, 2019 20:56 — forked from pierrenoizat/p2sh_p2wpkh.rb
Generate Segwit P2SH-P2WPKH address, create tx spending from it. with xpub
require 'btcruby'
require 'bitcoin'
require 'bech32'
require './segwit_addr'
require 'active_support'
require 'active_support/core_ext'
require 'ffi'
# Computation of P2SH-P2WPKH address
Rails as it has never been before :)
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring.
Note: Some of them are collected from different online resources/posts/blogs with some tweaks.