Sha256: 4075fddeac33e0cfd1b2a9d57a67acb8b9d3a1dfb4d1637ea976ada021322780

Contents?: true

Size: 578 Bytes

Versions: 38

Compression:

Stored size: 578 Bytes

Contents

module Bitcoin
  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(Bitcoin.unpack_var_string(payload).first.bth)
      end

      def to_payload
        Bitcoin.pack_var_string(element.htb)
      end

    end

  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bitcoinrb-1.7.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.6.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.5.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.4.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.3.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.2.1 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.2.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.1.1 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.1.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-1.0.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.9.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.8.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.7.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.6.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.5.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.4.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.3.2 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.3.1 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.3.0 lib/bitcoin/message/filter_add.rb
bitcoinrb-0.2.9 lib/bitcoin/message/filter_add.rb