Sha256: 1324ce848b3418e5749ef949baa4324499aeecbc628daf691f55b63c9cf87c1d

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

module Tapyrus
  module Message

    # filteradd message
    # https://bitcoin.org/en/developer-reference#filteradd
    class FilterAdd < Base

      COMMAND = 'filteradd'

      # element must be sent in the byte order they would use when appearing in a raw transaction;
      attr_accessor :element

      def initialize(element)
        @element = element
      end

      def self.parse_from_payload(payload)
        new(Tapyrus.unpack_var_string(payload).first.bth)
      end

      def to_payload
        Tapyrus.pack_var_string(element.htb)
      end

    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tapyrus-0.2.7 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.6 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.5 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.4 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.3 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.2 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.1 lib/tapyrus/message/filter_add.rb
tapyrus-0.2.0 lib/tapyrus/message/filter_add.rb
tapyrus-0.1.0 lib/tapyrus/message/filter_add.rb