monero 0.0.12 → 0.0.14

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
  SHA256:
3
- metadata.gz: e9e8cc4121eff928d8b1c72f84f3af18dcc5d8cceab58fd8472fbb9a038c79a6
4
- data.tar.gz: d70534fb325c85d99a7ad217209b04584aa6d2bfe31854a88dcbf0285f835d68
3
+ metadata.gz: b0ebd51d18a5d70c2813e937dc3d205dc5761363443aa1f49808171005e95cf8
4
+ data.tar.gz: fe7d8324b545d31e6ee96f3adfd598c90ae9199a7afd43b1fc0e2b7070f6cee8
5
5
  SHA512:
6
- metadata.gz: 3f1c396f5d309f9b132caec7b0eed269714041f5a373ab679a1b5b32cf1e7bf3d999646bb0a53a47cf3e5c1f334bc52255808c1d236bfd32dbc68b4f461264d6
7
- data.tar.gz: 8ab32be640a75e40929f508e7e3ec4bd59b071a74f6d8ec5f2088417c1393f1c09f617771df9243c185d69b91480148d56ff384a224e5da47740a44b1e8c42df
6
+ metadata.gz: 4276dd0bf74f1309a6752f7451775540eac349c8c971ec48e3aabdc02cd62448b0b4c0a6ec91839b632618143c76c8f5f7a60b80f366892492d7a18c6f42570f
7
+ data.tar.gz: d653ae3dae93547f146b39ff94faf240cb9be5d27aa5883bfb24718a079f5b7ed5e6092e2787ce925ee7c3aa2f36ff02f45dd2b84cb5b91136018c9c1ca23c23
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- monero (0.0.0.11)
4
+ monero (0.0.13)
5
5
  money
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ attention: version 0.0.12 had critical changes to this gem that will break all previous functionality. please upgrade, changing your code is very easy!massive Refactoring
2
+
3
+
1
4
  # Monero Ruby Client
2
5
 
3
6
  Ruby client to connect and use [Monero Wallet RPC](https://getmonero.org/resources/developer-guides/wallet-rpc.html).
@@ -2,16 +2,16 @@ class MoneroRPC::Client
2
2
  include MoneroRPC::Wallet
3
3
  include MoneroRPC::Transfer
4
4
 
5
- attr_accessor :host, :port, :username, :password, :debug, :in_transfer_clazz, :out_transfer_clazz
5
+ attr_reader :host, :port, :username, :password, :debug, :in_transfer_clazz, :out_transfer_clazz
6
6
 
7
7
  def initialize(args= {})
8
- self.host = args.fetch(:host, MoneroRPC.config.host)
9
- self.port = args.fetch(:port, MoneroRPC.config.port)
10
- self.username = args.fetch(:username, MoneroRPC.config.username)
11
- self.password = args.fetch(:password, MoneroRPC.config.password)
12
- self.debug = args.fetch(:debug, MoneroRPC.config.debug)
13
- self.in_transfer_clazz = args.fetch(:in_transfer_clazz, MoneroRPC.config.in_transfer_clazz || "MoneroRPC::IncomingTransfer")
14
- self.out_transfer_clazz = args.fetch(:out_transfer_clazz, MoneroRPC.config.out_transfer_clazz || "MoneroRPC::OutgoingTransfer")
8
+ @host = args.fetch(:host, MoneroRPC.config.host)
9
+ @port = args.fetch(:port, MoneroRPC.config.port)
10
+ @username = args.fetch(:username, MoneroRPC.config.username)
11
+ @password = args.fetch(:password, MoneroRPC.config.password)
12
+ @debug = args.fetch(:debug, MoneroRPC.config.debug)
13
+ @in_transfer_clazz = args.fetch(:in_transfer_clazz, MoneroRPC.config.in_transfer_clazz || "MoneroRPC::IncomingTransfer")
14
+ @out_transfer_clazz = args.fetch(:out_transfer_clazz, MoneroRPC.config.out_transfer_clazz || "MoneroRPC::OutgoingTransfer")
15
15
  end
16
16
 
17
17
  def close!
@@ -1,3 +1,3 @@
1
1
  module MoneroRPC
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.14"
3
3
  end
@@ -13,6 +13,14 @@ module MoneroRPC::Wallet
13
13
  request("get_address", {account_index: account_index, address_index: address_index})["addresses"]
14
14
  end
15
15
 
16
+ def valid_address?(address)
17
+ begin
18
+ request("validate_address", {address: address}).fetch("valid")
19
+ rescue
20
+ false
21
+ end
22
+ end
23
+
16
24
  def getbalance
17
25
  request("getbalance")
18
26
  end
@@ -106,4 +106,11 @@ RSpec.describe MoneroRPC do
106
106
  expect(transfer['unsigned_txset']).to be_empty
107
107
  end
108
108
 
109
+ it "does not change configuration once instantiated" do
110
+ expect(monero_rpc).not_to respond_to(:host=)
111
+ expect(monero_rpc).not_to respond_to(:port=)
112
+ expect(monero_rpc).not_to respond_to(:username=)
113
+ expect(monero_rpc).not_to respond_to(:password=)
114
+ end
115
+
109
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Kretschmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler