onchain 2.0.0 → 2.0.1
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 +5 -5
- 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: b740e1f51d14be09818b33a307726ebec3fc3d93
|
4
|
+
data.tar.gz: 3429715a0da57a49583f9cd08c8a4e915ee6e47e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87a1864ae69393ba376ddc14347160152bf5c0915807284e48ba740c4f98839f6289f48f9f08ddb7dddb5ec19bfef5e6088d25f1b5842ba0b982ca4ff6c8c33
|
7
|
+
data.tar.gz: 02739a8bbf237f95958060a9c5a5afc9f9c095a10740792af94211a3fd7863d4666fe3698d8b4ed0ac0f31d436ad2d9b8a5875c4684e957c41f3c89acd901a42
|
data/lib/onchain/transaction.rb
CHANGED
@@ -73,7 +73,7 @@ class OnChain::Transaction
|
|
73
73
|
if inputs_to_sign[index] == nil
|
74
74
|
inputs_to_sign[index] = {}
|
75
75
|
end
|
76
|
-
inputs_to_sign[index][OnChain.bin_to_hex(key)] = {
|
76
|
+
inputs_to_sign[index][OnChain.bin_to_hex(key)] = {'hash' => OnChain::bin_to_hex(hash)}
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -85,8 +85,8 @@ class OnChain::Transaction
|
|
85
85
|
#
|
86
86
|
# Signatures should be in the format
|
87
87
|
#
|
88
|
-
# [0]{034000.....' => {
|
89
|
-
# [0]{02fee.....' => {
|
88
|
+
# [0]{034000.....' => {'hash' => '345435345....', 'sig' => '435fgdf4553...'}}
|
89
|
+
# [0]{02fee.....' => {'hash' => '122133445....', 'sig' => '435fgdf4553...'}}
|
90
90
|
#
|
91
91
|
def sign_transaction(transaction_hex, sig_list)
|
92
92
|
|
@@ -102,10 +102,10 @@ class OnChain::Transaction
|
|
102
102
|
rscript.get_multisig_pubkeys.each do |key|
|
103
103
|
|
104
104
|
hkey = OnChain.bin_to_hex(key)
|
105
|
-
if sig_list[index][hkey] != nil and sig_list[index][hkey][
|
105
|
+
if sig_list[index][hkey] != nil and sig_list[index][hkey]['sig'] != nil
|
106
106
|
|
107
107
|
# Add the signature to the list.
|
108
|
-
sigs << OnChain.hex_to_bin(sig_list[index][hkey][
|
108
|
+
sigs << OnChain.hex_to_bin(sig_list[index][hkey]['sig'])
|
109
109
|
|
110
110
|
end
|
111
111
|
end
|