openassets-ruby 0.1.2 → 0.1.3

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: ead0fb7292a8d56c01d8894f5bc693e05ae0f8fe
4
- data.tar.gz: 4ffbc89805cfc72986233c5cdb1e34ea38bb3186
3
+ metadata.gz: e0eaaa8534a56f07b4c978704728bd12c7c9a9fb
4
+ data.tar.gz: 79de745bf7f838e122780ffcf71ab6ada8c1bb15
5
5
  SHA512:
6
- metadata.gz: 8ca8fd248203727d065c00bb7c90d177bd3b4b31bd6fec3e85752ee0580fdc034db18e7baad20e644b0aa3fbaa98b29e6f81095067f50fa8a136f1ffe3e729ac
7
- data.tar.gz: d6bad60c27e19fc8c2094fcfa889f001d470954e749c408115b2ec6d16a55591768e3919806a7ccbaeecbb69220d90583f220a789a517b8aa00954e3691a524c
6
+ metadata.gz: de391a3bd688f1f137035f76137a2bbeca849b391761309f9d029fb389879a18fd4089357b677153dc829f58360c5cfa36831d18228e5c562e730b5aea6f5e5a
7
+ data.tar.gz: 113ecc06ae0872c566e87fae32d0b421925f411fb3f1d9c2d36c40ac1a31faa76285292013f58a598fcfde5f83ae766ef9a319fdd45b39de6ecfa4986db4137a
@@ -51,7 +51,8 @@ module OpenAssets
51
51
  'amount' => satoshi_to_coin(out.output.value),
52
52
  'confirmations' => out.confirmations,
53
53
  'asset_id' => out.output.asset_id,
54
- 'asset_quantity' => out.output.asset_quantity.to_s
54
+ 'account' => out.output.account,
55
+ 'asset_quantity' => out.output.asset_quantity.to_s,
55
56
  }
56
57
  }
57
58
  oa_address.empty? ? result : result.select{|r|oa_address.include?(r['oa_address'])}
@@ -78,7 +79,8 @@ module OpenAssets
78
79
  'address' => btc_address,
79
80
  'oa_address' => btc_address.nil? ? nil : address_to_oa_address(btc_address),
80
81
  'value' => satoshi_to_coin(v.inject(0) { |sum, o|sum + o.value}),
81
- 'assets' => assets
82
+ 'assets' => assets,
83
+ 'account' => v[0].account
82
84
  }
83
85
  }
84
86
  address.nil? ? result : result.select{|r|r['oa_address'] == address}
@@ -130,6 +132,7 @@ module OpenAssets
130
132
  unspent = provider.list_unspent(addresses)
131
133
  result = unspent.map{|item|
132
134
  output_result = get_output(item['txid'], item['vout'])
135
+ output_result.account = item['account']
133
136
  output = OpenAssets::Transaction::SpendableOutput.new(
134
137
  OpenAssets::Transaction::OutPoint.new(item['txid'], item['vout']), output_result)
135
138
  output.confirmations = item['confirmations']
@@ -9,6 +9,8 @@ module OpenAssets
9
9
  attr_accessor :asset_quantity
10
10
  attr_accessor :output_type
11
11
 
12
+ attr_accessor :account
13
+
12
14
  # @param [Integer] value The satoshi value of the output.
13
15
  # @param [Bitcoin::Script] script The script controlling redemption of the output.
14
16
  # @param [String] asset_id The asset ID of the output.
@@ -1,3 +1,3 @@
1
1
  module OpenAssets
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.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.1.2
4
+ version: 0.1.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-08-10 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitcoin-ruby