Sha256: 6c33fc80d30b73f122b5bb0dfc009743b5d8d74bcf80b1ac98f3ade00582252c
Contents?: true
Size: 404 Bytes
Versions: 10
Compression:
Stored size: 404 Bytes
Contents
module Bitcoin # witness class ScriptWitness attr_reader :stack def initialize(stack = []) @stack = stack end def empty? stack.empty? end def to_payload p = Bitcoin.pack_var_int(stack.size) p << stack.map { |s| Bitcoin.pack_var_int(s.bytesize) << s }.join end def to_s stack.map{|s|s.bth}.join(' ') end end end
Version data entries
10 entries across 10 versions & 1 rubygems