bitcoin-ruby 0.0.8 → 0.0.9
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/Gemfile.lock +1 -1
- data/lib/bitcoin.rb +4 -1
- data/lib/bitcoin/protocol/tx.rb +1 -1
- data/lib/bitcoin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac6c9d01c48a263a569a401541007093dbd82e33
|
4
|
+
data.tar.gz: a27f352d83e4a7958004d8d6ff1eee46d12656b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfcdaf331ed1a47de70e8557c7de2acdd04e255da1fb5ffbd787f83c4f84ba7963b122924e4a7c61f9e36a407dbcc57294ebf122a614afc9134f118b388811f0
|
7
|
+
data.tar.gz: c7909f9e27da531aa015701342559ec39a742c73171e3f8c8bc5de82f699d57c3be1318bce9f0b71caae24b5226d6f48d002cddcc32ed37bc33d5b430d98029e
|
data/Gemfile.lock
CHANGED
data/lib/bitcoin.rb
CHANGED
@@ -323,7 +323,7 @@ module Bitcoin
|
|
323
323
|
def bitcoin_signed_message_hash(message)
|
324
324
|
message = message.dup.force_encoding('binary')
|
325
325
|
|
326
|
-
magic =
|
326
|
+
magic = Bitcoin.network[:message_magic]
|
327
327
|
buf = Protocol.pack_var_int(magic.bytesize) + magic
|
328
328
|
buf << Protocol.pack_var_int(message.bytesize) + message
|
329
329
|
|
@@ -548,6 +548,7 @@ module Bitcoin
|
|
548
548
|
bitcoin: {
|
549
549
|
project: :bitcoin,
|
550
550
|
magic_head: "\xF9\xBE\xB4\xD9",
|
551
|
+
message_magic: "Bitcoin Signed Message:\n",
|
551
552
|
address_version: "00",
|
552
553
|
p2sh_version: "05",
|
553
554
|
privkey_version: "80",
|
@@ -652,6 +653,7 @@ module Bitcoin
|
|
652
653
|
NETWORKS[:litecoin] = NETWORKS[:bitcoin].merge({
|
653
654
|
project: :litecoin,
|
654
655
|
magic_head: "\xfb\xc0\xb6\xdb",
|
656
|
+
message_magic: "Litecoin Signed Message:\n",
|
655
657
|
address_version: "30",
|
656
658
|
p2sh_version: "05",
|
657
659
|
privkey_version: "b0",
|
@@ -724,6 +726,7 @@ module Bitcoin
|
|
724
726
|
NETWORKS[:dogecoin] = NETWORKS[:litecoin].merge({
|
725
727
|
project: :dogecoin,
|
726
728
|
magic_head: "\xc0\xc0\xc0\xc0",
|
729
|
+
message_magic: "Dogecoin Signed Message:\n",
|
727
730
|
address_version: "1e",
|
728
731
|
p2sh_version: "16",
|
729
732
|
privkey_version: "9e",
|
data/lib/bitcoin/protocol/tx.rb
CHANGED
@@ -261,7 +261,7 @@ module Bitcoin
|
|
261
261
|
ins .each{|input| tx.add_in TxIn.from_hash(input) }
|
262
262
|
outs.each{|output| tx.add_out TxOut.from_hash(output) }
|
263
263
|
tx.instance_eval{ @hash = hash_from_payload(@payload = to_payload) }
|
264
|
-
|
264
|
+
if h['hash'] && (h['hash'] != tx.hash)
|
265
265
|
raise "Tx hash mismatch! Claimed: #{h['hash']}, Actual: #{tx.hash}" if do_raise
|
266
266
|
end
|
267
267
|
tx
|
data/lib/bitcoin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitcoin-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a ruby library for interacting with the bitcoin protocol/network
|
14
14
|
email:
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
version: 1.3.6
|
246
246
|
requirements: []
|
247
247
|
rubyforge_project: bitcoin-ruby
|
248
|
-
rubygems_version: 2.
|
248
|
+
rubygems_version: 2.5.1
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: bitcoin utils and protocol in ruby
|