onchain 2.1.2 → 2.1.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 +4 -4
- data/lib/onchain/transaction.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a6f65d907e5cae3f94db2800fa0b56b76c2691
|
4
|
+
data.tar.gz: 22f3ca7cca6aa67bb74fa7ce73c0f7dde82ec061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceeb735c3fc276744b680b54f10fac7df6a63ac85d8c2585344381f566ed145600a09fcc64fc057318ccd11e286dc820f77c429671cd2e201fa90586e9689619
|
7
|
+
data.tar.gz: 902f6c708000154645138e1872d426a5a51c2e445537f1f7f52804a2c2d7a9d515f2fb9c930110fc7064b2497d3216df9fc6747282174da31fa6acb9b3207f2e
|
data/lib/onchain/transaction.rb
CHANGED
@@ -15,7 +15,8 @@ class OnChain::Transaction
|
|
15
15
|
unspents.each_with_index do |spent, index|
|
16
16
|
|
17
17
|
txin = Bitcoin::Protocol::TxIn.new([ spent[0] ].pack('H*').reverse, spent[1])
|
18
|
-
txin.script_sig =
|
18
|
+
txin.script_sig = OnChain.hex_to_bin(spent[2])
|
19
|
+
|
19
20
|
tx.add_in(txin)
|
20
21
|
end
|
21
22
|
|
@@ -50,8 +51,8 @@ class OnChain::Transaction
|
|
50
51
|
|
51
52
|
def get_public_keys_from_script(script)
|
52
53
|
|
53
|
-
if script.
|
54
|
-
return [Bitcoin.hash160_to_address(script.
|
54
|
+
if script.is_hash160?
|
55
|
+
return [Bitcoin.hash160_to_address(script.get_hash160)]
|
55
56
|
end
|
56
57
|
|
57
58
|
pubs = []
|