onchain 2.20 → 2.21
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/block_chain.rb +4 -0
- data/lib/onchain/providers/insight_api.rb +3 -1
- 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: 8f42f94260c7e0da94dcd840bbc4f9f334bc3bad
|
4
|
+
data.tar.gz: b221c236b5a8305bb95685bda1c73121a3a8274e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58bca0431780be922cbfdec9f9732a10352efbd5964d542277a23f26d8e6cf1da66f329679f59919f3f062f48092c913014da09c054114e679ca41084602e3cc
|
7
|
+
data.tar.gz: ae835a4f5a52ef6e91185d97c932e65b9b7a88b446dbdde3cf093c480229137b5b0295010e029ba66c7040edbb30c08f79c368e35a9127bae6c529ff4330a511
|
data/lib/onchain/block_chain.rb
CHANGED
@@ -68,7 +68,7 @@ class OnChain::BlockChain
|
|
68
68
|
|
69
69
|
def insight_send_tx(tx_hex, network = :bitcoin)
|
70
70
|
|
71
|
-
uri = URI.parse(get_url(network) + "tx/
|
71
|
+
uri = URI.parse(get_url(network) + "tx/send")
|
72
72
|
http = Net::HTTP.new(uri.host, uri.port)
|
73
73
|
|
74
74
|
request = Net::HTTP::Post.new(uri.request_uri)
|
@@ -81,6 +81,8 @@ class OnChain::BlockChain
|
|
81
81
|
stat = 'Unknown'
|
82
82
|
tx_hash = res["txid"]
|
83
83
|
|
84
|
+
puts 'Call insight_send_tx ' + tx_hex.to_s
|
85
|
+
|
84
86
|
ret = "{\"status\":\"#{stat}\",\"data\":\"#{tx_hash}\",\"code\":200,\"message\":\"#{mess}\"}"
|
85
87
|
return JSON.parse(ret)
|
86
88
|
end
|