openassets-ruby 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 162e453da0e910ff8ed1b9a6b18236b8ceb06c34
4
- data.tar.gz: 2c6da11a79ce5a7bacf9818f6698bbe76423588d
3
+ metadata.gz: 968712076a098a23505ce0d7ff821a7a036a2d21
4
+ data.tar.gz: a5684fbd7b573a1b252130b0ac1021565ca39334
5
5
  SHA512:
6
- metadata.gz: 09400c1d32f9349b61f5b682c7af2f39c82af361fe8aa549be3600f7e6a46bf29da7bd6117cf458560c8e9a6fcdc529403314e8eb4c40f1ce1642580ed506239
7
- data.tar.gz: e09e86b7d3ab64d94b09d0b3d956ad65d364ba1344a870824318b659b143b26c270e39143d7f195780e277468495baac0742f0821e5f3f2c70022871acdd7772
6
+ metadata.gz: 9ac8c4bd2b63917189962a0238a22e0099844e9dad180072847ba4156b258be23f3f4b4a2e26f403e9b39c1c2cb647d8cf5811735b4a2417044b5fd078164d78
7
+ data.tar.gz: 095dddd7b51414be61b50cb357c2a3e9e91e14940232d990bb3d568c39c03be6ad6031b259b8a6dd3a9c2cc00f41093c0b6b6dc458bedf7b147575dd1337027e
@@ -38,11 +38,12 @@ module OpenAssets
38
38
  end
39
39
 
40
40
  # get UTXO for colored coins.
41
- # @param [Array] oa_address Obtain the balance of this open assets address only, or all addresses if unspecified.
41
+ # @param [Array] oa_address_list Obtain the balance of this open assets address only, or all addresses if unspecified.
42
42
  # @return [Array] Return array of the unspent information Hash.
43
- def list_unspent(oa_address = [])
44
- outputs = get_unspent_outputs([])
45
- result = outputs.map {|out|
43
+ def list_unspent(oa_address_list = [])
44
+ btc_address_list = oa_address_list.map { |oa_address| oa_address_to_address(oa_address)}
45
+ outputs = get_unspent_outputs(btc_address_list)
46
+ result = outputs.map{|out|
46
47
  address = script_to_address(out.output.script)
47
48
  script = out.output.script.to_payload.bth
48
49
  {
@@ -60,7 +61,7 @@ module OpenAssets
60
61
  'asset_definition_url' => out.output.asset_definition_url
61
62
  }
62
63
  }
63
- oa_address.empty? ? result : result.select{|r|oa_address.include?(r['oa_address'])}
64
+ result
64
65
  end
65
66
 
66
67
  # Returns the balance in both bitcoin and colored coin assets for all of the addresses available in your Bitcoin Core wallet.
@@ -1,3 +1,3 @@
1
1
  module OpenAssets
2
- VERSION = "0.2.2"
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openassets-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - azuchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-20 00:00:00.000000000 Z
11
+ date: 2015-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitcoin-ruby