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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onchain/transaction.rb +4 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 068b59667873048f533710cb2e04cdaa7d1703c3
4
- data.tar.gz: 2f45540cbc3505d031fedb3dfce06318d14869ce
3
+ metadata.gz: 76a6f65d907e5cae3f94db2800fa0b56b76c2691
4
+ data.tar.gz: 22f3ca7cca6aa67bb74fa7ce73c0f7dde82ec061
5
5
  SHA512:
6
- metadata.gz: 66f5b3b0ca2bacf7e8169dcaf97d5c81a33348fb967a8cdb9eee57ab4ae2c9edba693d0029b40ae6bec29ef0990767f46e96568d073b42ef30271bc9fc316e35
7
- data.tar.gz: ff7e08551f0e199a654b8de6dd80289a1b5a8550310a63f53f937369a26f970134283c7743eb84f91351a505e5ed39a89bc649b9f6bf39b5de16498722b74353
6
+ metadata.gz: ceeb735c3fc276744b680b54f10fac7df6a63ac85d8c2585344381f566ed145600a09fcc64fc057318ccd11e286dc820f77c429671cd2e201fa90586e9689619
7
+ data.tar.gz: 902f6c708000154645138e1872d426a5a51c2e445537f1f7f52804a2c2d7a9d515f2fb9c930110fc7064b2497d3216df9fc6747282174da31fa6acb9b3207f2e
@@ -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 = Bitcoin::Script.to_pubkey_script(orig_addr)
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.is_pubkey?
54
- return [Bitcoin.hash160_to_address(script.get_pubkey)]
54
+ if script.is_hash160?
55
+ return [Bitcoin.hash160_to_address(script.get_hash160)]
55
56
  end
56
57
 
57
58
  pubs = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Purton