Sha256: 8a42203b9f1ee202470038ed0618a987ed00cda96f37b361a151adae702f01fa

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module Bitcoin
  module Grpc
    module Api
      class ListUncoloredUnspent
        attr_reader :spv

        def initialize(spv)
          @spv = spv
        end

        def execute(request)
          height = spv.chain.latest_block.height
          utxos = spv.wallet.list_uncolored_unspent(
            account_name: request.account_name,
            current_block_height: height,
            min: request.min,
            max: request.max
          )
          Bitcoin::Grpc::ListUncoloredUnspentResponse.new(utxos: utxos)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bitcoinrb-grpc-0.1.9 lib/bitcoin/grpc/api/list_uncolored_unspent.rb
bitcoinrb-grpc-0.1.8 lib/bitcoin/grpc/api/list_uncolored_unspent.rb