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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c04f0268f5e83b4ee4160e4e77f009ae83c7f718
4
- data.tar.gz: 7424529ab78442b26a18498b92e7038f49d7c41d
3
+ metadata.gz: 6e14dae510bd326f2eebfd68bb8c340c357bd784
4
+ data.tar.gz: b47b056dd41870261c220ceebb54a1e93552f244
5
5
  SHA512:
6
- metadata.gz: 8355b3c57888d6f87b552b686b3a05e598a79cc4cd7d6a6cb1e71e4e7c01c6f5edabc7ed8c7521f289b9c4255cc7f2e954f52e388391ba656f9d3640e1e8bf37
7
- data.tar.gz: 5cc51df88f80bf2b5b3abda6b01136648ec33f9a0db17b06f249d3547f81b6a6786ed09884612c9a7803a58034817511c6131ce3872ba4ce0e258f736ff83940
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)
@@ -1,3 +1,3 @@
1
1
  module OpenAssets
2
- VERSION = '0.2.7'
2
+ VERSION = '0.2.8'
3
3
  end
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.7
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-13 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitcoin-ruby