openassets-ruby 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openassets/api.rb +6 -5
- data/lib/openassets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968712076a098a23505ce0d7ff821a7a036a2d21
|
4
|
+
data.tar.gz: a5684fbd7b573a1b252130b0ac1021565ca39334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ac8c4bd2b63917189962a0238a22e0099844e9dad180072847ba4156b258be23f3f4b4a2e26f403e9b39c1c2cb647d8cf5811735b4a2417044b5fd078164d78
|
7
|
+
data.tar.gz: 095dddd7b51414be61b50cb357c2a3e9e91e14940232d990bb3d568c39c03be6ad6031b259b8a6dd3a9c2cc00f41093c0b6b6dc458bedf7b147575dd1337027e
|
data/lib/openassets/api.rb
CHANGED
@@ -38,11 +38,12 @@ module OpenAssets
|
|
38
38
|
end
|
39
39
|
|
40
40
|
# get UTXO for colored coins.
|
41
|
-
# @param [Array]
|
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(
|
44
|
-
|
45
|
-
|
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
|
-
|
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.
|
data/lib/openassets/version.rb
CHANGED
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.
|
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
|
+
date: 2015-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitcoin-ruby
|