openassets-ruby 0.3.6 → 0.3.7
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 +4 -4
- data/lib/openassets/api.rb +9 -2
- data/lib/openassets/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be63c63a3bfe0780a804ba00d816147129783e9a
|
4
|
+
data.tar.gz: 3d54a151c15b709b83b1db2f81fdad42c9b618c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfe274b099f00dd77959109bc64b720dac4495e1a550c3e9097973022a4858091c84fdf950d762465e070e586f847c82c432ead9056f24ec70c966debd2b35e1
|
7
|
+
data.tar.gz: 9b112a24893f8b23294bc94afcefa9ec27bc8f45a0713e117e3d5f2be2942788491cbfeda85fe065798d43cf560574e9eaf3bf4dea117d73a9587cf5c7b173e2
|
data/lib/openassets/api.rb
CHANGED
@@ -215,12 +215,19 @@ module OpenAssets
|
|
215
215
|
# @param[Boolean] use_cache If specified true use cache.(default value is false)
|
216
216
|
# @return[Array] Return array of the transaction output Hash with coloring information.
|
217
217
|
def get_outputs_from_txid(txid, use_cache = false)
|
218
|
-
|
219
|
-
tx = Bitcoin::Protocol::Tx.new(decode_tx.htb)
|
218
|
+
tx = get_tx(txid, use_cache)
|
220
219
|
outputs = get_color_outputs_from_tx(tx)
|
221
220
|
outputs.map.with_index{|out, i|out.to_hash.merge({'txid' => tx.hash, 'vout' => i})}
|
222
221
|
end
|
223
222
|
|
223
|
+
# Get tx. (This method returns plain Bitcoin::Protocol::Tx object, so it not contains open asset information.)
|
224
|
+
# @param[String] txid Transaction ID.
|
225
|
+
# @return[Bitcoin::Protocol::Tx] Return the Bitcoin::Protocol::Tx.
|
226
|
+
def get_tx(txid, use_cache = true)
|
227
|
+
decode_tx = use_cache ? load_cached_tx(txid) : load_tx(txid)
|
228
|
+
Bitcoin::Protocol::Tx.new(decode_tx.htb)
|
229
|
+
end
|
230
|
+
|
224
231
|
private
|
225
232
|
# @param [Array[OpenAssets::Protocol::TransactionOutput] inputs The outputs referenced by the inputs of the transaction.
|
226
233
|
# @param [Integer] marker_output_index The position of the marker output in the transaction.
|
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.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitcoin-ruby
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.4.
|
210
|
+
rubygems_version: 2.4.6
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: The implementation of the Open Assets Protocol for Ruby.
|