Sha256: ec2cf34ca0c9176618a90b076ccc7eafb502955ebb6d7ae59b77566a74779675

Contents?: true

Size: 446 Bytes

Versions: 11

Compression:

Stored size: 446 Bytes

Contents

module OpenAssets
  module MarkerOutput
    # whether this output is marker output for open assets.
    def open_assets_marker?
      return false unless script_pubkey.op_return?
      !oa_payload.nil?
    end

    # get open asset payload.
    # @return [OpenAssets::Payload] open asset payload.
    def oa_payload
      return nil unless script_pubkey.op_return?
      Payload.parse_from_payload(script_pubkey.op_return_data)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tapyrus-0.3.5 lib/openassets/marker_output.rb
tapyrus-0.3.4 lib/openassets/marker_output.rb
tapyrus-0.3.3 lib/openassets/marker_output.rb
tapyrus-0.3.2 lib/openassets/marker_output.rb
tapyrus-0.3.1 lib/openassets/marker_output.rb
tapyrus-0.3.0 lib/openassets/marker_output.rb
tapyrus-0.2.13 lib/openassets/marker_output.rb
tapyrus-0.2.12 lib/openassets/marker_output.rb
tapyrus-0.2.10 lib/openassets/marker_output.rb
tapyrus-0.2.9 lib/openassets/marker_output.rb
tapyrus-0.2.8 lib/openassets/marker_output.rb