openassets-ruby 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ba830cb6156258e0adc278a7a520cdb5bfe1423
4
- data.tar.gz: 6eaa0d97aa767d1aa3fbf08099e6a6dcd78df7fa
3
+ metadata.gz: be63c63a3bfe0780a804ba00d816147129783e9a
4
+ data.tar.gz: 3d54a151c15b709b83b1db2f81fdad42c9b618c2
5
5
  SHA512:
6
- metadata.gz: 5caf4f4fa9f8941aa84ef5b8570b682eff9d47f6c0291833ef86df47588770b5f55f9d5cd800ac886c16d97873e7fa37176bd4b5fec7459a16023c749cfbbfe7
7
- data.tar.gz: 5e1225f806f20189d7707c2ff52d4ada3c80e8d4b17cc59e7a1a3da010e85c021191806c4e5f67a8e6a7a0f05fdb31c717996ba25d53f059901b66026c340c39
6
+ metadata.gz: cfe274b099f00dd77959109bc64b720dac4495e1a550c3e9097973022a4858091c84fdf950d762465e070e586f847c82c432ead9056f24ec70c966debd2b35e1
7
+ data.tar.gz: 9b112a24893f8b23294bc94afcefa9ec27bc8f45a0713e117e3d5f2be2942788491cbfeda85fe065798d43cf560574e9eaf3bf4dea117d73a9587cf5c7b173e2
@@ -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
- decode_tx = use_cache ? load_cached_tx(txid) : load_tx(txid)
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.
@@ -1,3 +1,3 @@
1
1
  module OpenAssets
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
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.3.6
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-21 00:00:00.000000000 Z
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.5
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.