onchain 2.11 → 2.12
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 +11 -0
- data/lib/onchain/providers/blockchaininfo_api.rb +0 -12
- 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: ce567b41960ed48b8522da199ec5e54a14728464
|
4
|
+
data.tar.gz: aa6b26e696229a0ab68bd8c7192c227e01053207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67dc3675d14b0f92b2e37cb5586eb81d07c06c2cb2755806b25f130fa12cd13f9fd86de3a69cef51a9c4578422f6ad4691db76d76739f6da08a225656a418cb7
|
7
|
+
data.tar.gz: 8bee778795273d7ce344ac3f541dd1df74ce0f79fb64dac87cd628bded807a5dbfdaa6c61f65376e9c5d3fc259ff1eaeba363b258d47a4f4d3640bb5068943d6
|
data/lib/onchain/block_chain.rb
CHANGED
@@ -59,6 +59,17 @@ class OnChain::BlockChain
|
|
59
59
|
end
|
60
60
|
|
61
61
|
end
|
62
|
+
|
63
|
+
def get_history_for_addresses(addresses, network = :bitcoin)
|
64
|
+
history = []
|
65
|
+
addresses.each do |address|
|
66
|
+
res = address_history(address, network)
|
67
|
+
res.each do |r|
|
68
|
+
history << r
|
69
|
+
end
|
70
|
+
end
|
71
|
+
return history
|
72
|
+
end
|
62
73
|
|
63
74
|
# Given a list of addresses, return those
|
64
75
|
# that don't have balances in the cahce.
|
@@ -1,17 +1,5 @@
|
|
1
1
|
class OnChain::BlockChain
|
2
2
|
class << self
|
3
|
-
|
4
|
-
|
5
|
-
def blockinfo_get_history_for_addresses(addresses, network = :testnet3)
|
6
|
-
history = []
|
7
|
-
addresses.each do |address|
|
8
|
-
res = blockinfo_address_history(address)
|
9
|
-
res.each do |r|
|
10
|
-
history << r
|
11
|
-
end
|
12
|
-
end
|
13
|
-
return history
|
14
|
-
end
|
15
3
|
|
16
4
|
def blockinfo_address_history(address)
|
17
5
|
|