openassets-ruby 0.2.7 → 0.2.8
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/openassets/provider/bitcoin_core_provider.rb +21 -0
- data/lib/openassets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e14dae510bd326f2eebfd68bb8c340c357bd784
|
|
4
|
+
data.tar.gz: b47b056dd41870261c220ceebb54a1e93552f244
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61d27c133aa5469a76f1e021b261fcbcc0f43b05d63501a0db0dae4050ab00237d8edd01ff8598ed8412880aef3a9bcfa2c270a53b871ca1e1e31be18f2e6f46
|
|
7
|
+
data.tar.gz: c95fa4b8b7761e5c30a0d50d73c7a84df18d3f6eb729d63c5729096a775988d528377be9347dae557aa6b8567ffa9fe6f684777a905852a937256e961b5e6330
|
|
@@ -6,6 +6,22 @@ module OpenAssets
|
|
|
6
6
|
# The implementation of BlockChain provider using Bitcoin Core.
|
|
7
7
|
class BitcoinCoreProvider < BlockChainProviderBase
|
|
8
8
|
|
|
9
|
+
RPC_API = [
|
|
10
|
+
:addmultisigaddress, :addnode, :backupwallet, :createmultisig, :createrawtransaction, :decoderawtransaction,
|
|
11
|
+
:decodescript, :dumpprivkey, :dumpwallet, :encryptwallet, :estimatefee, :estimatepriority, :generate,
|
|
12
|
+
:getaccountaddress, :getaccount, :getaddednodeinfo, :getaddressesbyaccount, :getbalance, :getbestblockhash,
|
|
13
|
+
:getblock, :getblockchaininfo, :getblockcount, :getblockhash, :getchaintips, :getconnectioncount, :getdifficulty,
|
|
14
|
+
:getgenerate, :gethashespersec, :getinfo, :getmempoolinfo, :getmininginfo, :getnettotals, :getnetworkhashps,
|
|
15
|
+
:getnetworkinfo, :getnewaddress, :getpeerinfo, :getrawchangeaddress, :getrawmempool, :getrawtransaction,
|
|
16
|
+
:getreceivedbyaccount, :getreceivedbyaddress, :gettransaction, :gettxout, :gettxoutproof, :gettxoutsetinfo,
|
|
17
|
+
:getunconfirmedbalance, :getwalletinfo, :getwork, :help, :importaddress, :importprivkey, :importwallet,
|
|
18
|
+
:keypoolrefill, :listaccounts, :listaddressgroupings, :listlockunspent, :listreceivedbyaccount, :listreceivedbyaddress,
|
|
19
|
+
:listsinceblock, :listtransactions, :listunspent, :lockunspent, :move, :ping, :prioritisetransaction, :sendfrom,
|
|
20
|
+
:sendmany, :sendrawtransaction, :sendtoaddress, :setaccount, :setgenerate, :settxfee, :signmessage, :signrawtransaction,
|
|
21
|
+
:stop, :submitblock, :validateaddress, :verifychain, :verifymessage, :verifytxoutproof, :walletlock, :walletpassphrase,
|
|
22
|
+
:walletpassphrasechange
|
|
23
|
+
]
|
|
24
|
+
|
|
9
25
|
attr_reader :config
|
|
10
26
|
|
|
11
27
|
def initialize(config)
|
|
@@ -48,6 +64,11 @@ module OpenAssets
|
|
|
48
64
|
request('sendrawtransaction', tx)
|
|
49
65
|
end
|
|
50
66
|
|
|
67
|
+
def method_missing(method, *params)
|
|
68
|
+
super unless RPC_API.include?(method)
|
|
69
|
+
request(method, *params)
|
|
70
|
+
end
|
|
71
|
+
|
|
51
72
|
private
|
|
52
73
|
# Convert decode tx string to Bitcion::Protocol::Tx
|
|
53
74
|
def decode_tx_to_btc_tx(tx)
|
data/lib/openassets/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openassets-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- azuchi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-01-
|
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bitcoin-ruby
|