Sha256: 32063129c944ca12082d44c3fdb6afb4c74f44ba6d88047e1e0c38dd0baf8e97
Contents?: true
Size: 496 Bytes
Versions: 9
Compression:
Stored size: 496 Bytes
Contents
# encoding: ascii-8bit module Bitcoin module Protocol class ScriptWitness # witness stack attr_reader :stack def initialize @stack = [] end # check empty def empty? stack.empty? end # output script in raw binary format def to_payload payload = Bitcoin::Protocol.pack_var_int(stack.size) payload << stack.map{|e| Bitcoin::Protocol.pack_var_int(e.bytesize) << e }.join end end end end
Version data entries
9 entries across 9 versions & 2 rubygems