coinable 0.0.0
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +8 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/coinable.gemspec +24 -0
- data/lib/coinable.rb +355 -0
- data/lib/coinable/version.rb +3 -0
- metadata +99 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 257de0bfd6f4001b15d042ec2fa7b8115b2d07ca
|
4
|
+
data.tar.gz: 12cfaa573ab0dda4ea696a1489134953508665bb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3624563f0669fe338d347f9e7f45b3f17cdecada176d76f77e628049e8464ed1868e6c3ff0f90d23668745f31635ce261747ae87f04c8e5ff8de5e27b46b6a66
|
7
|
+
data.tar.gz: 2eefea29a9d4a2e9e7816031f017331f274f175404c8e0ce4ea4289d1d8bfb8f9649050bf4918756a8d6c4ce9b1ffde6dc03cf1f46acf18312bccbbdfc57a3eb
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 dmxhZGp1c2hh
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Coinable
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/coinable`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'coinable'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install coinable
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dmxhZGp1c2hh/coinable.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'coinable'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require 'pry'
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/coinable.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'coinable/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'coinable'
|
8
|
+
spec.version = Coinable::VERSION
|
9
|
+
spec.author = 'Vlad D'
|
10
|
+
spec.email = 'dmxhZGp1c2hh@yandex.ru'
|
11
|
+
|
12
|
+
spec.summary = 'Communicate with Bitcoin, Litecoin, Emercoin and other Altcoin JSON RPC the Ruby way'
|
13
|
+
spec.homepage = 'https://github.com/dmxhZGp1c2hh/coinable'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = 'exe'
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
24
|
+
end
|
data/lib/coinable.rb
ADDED
@@ -0,0 +1,355 @@
|
|
1
|
+
require 'coinable/version'
|
2
|
+
|
3
|
+
module Coinable
|
4
|
+
attr_writer :host, :port, :user, :password
|
5
|
+
|
6
|
+
def host
|
7
|
+
@host || 'localhost'
|
8
|
+
end
|
9
|
+
|
10
|
+
def port
|
11
|
+
@port || 8543
|
12
|
+
end
|
13
|
+
|
14
|
+
def user
|
15
|
+
@user || 'rpcuser'
|
16
|
+
end
|
17
|
+
|
18
|
+
def password
|
19
|
+
@password || 'rpcpassword'
|
20
|
+
end
|
21
|
+
|
22
|
+
def configure
|
23
|
+
yield self
|
24
|
+
end
|
25
|
+
|
26
|
+
# addmultisigaddress
|
27
|
+
def add_multisig_address
|
28
|
+
raise NotImplementedError
|
29
|
+
end
|
30
|
+
|
31
|
+
# addnode
|
32
|
+
def add_node
|
33
|
+
raise NotImplementedError
|
34
|
+
end
|
35
|
+
|
36
|
+
# backupwallet
|
37
|
+
def backup_wallet
|
38
|
+
raise NotImplementedError
|
39
|
+
end
|
40
|
+
|
41
|
+
# createmultisig
|
42
|
+
def create_multisig
|
43
|
+
raise NotImplementedError
|
44
|
+
end
|
45
|
+
|
46
|
+
# createrawtransaction
|
47
|
+
def create_raw_transaction
|
48
|
+
raise NotImplementedError
|
49
|
+
end
|
50
|
+
|
51
|
+
# decoderawtransaction
|
52
|
+
def decode_raw_transaction
|
53
|
+
raise NotImplementedError
|
54
|
+
end
|
55
|
+
|
56
|
+
# dumpprivkey
|
57
|
+
def dump_priv_key
|
58
|
+
raise NotImplementedError
|
59
|
+
end
|
60
|
+
|
61
|
+
# encryptwallet
|
62
|
+
def encrypt_wallet
|
63
|
+
raise NotImplementedError
|
64
|
+
end
|
65
|
+
|
66
|
+
# getaccount
|
67
|
+
def account
|
68
|
+
raise NotImplementedError
|
69
|
+
end
|
70
|
+
|
71
|
+
# getaccountaddress
|
72
|
+
def account_address
|
73
|
+
raise NotImplementedError
|
74
|
+
end
|
75
|
+
|
76
|
+
# getaddednodeinfo
|
77
|
+
def added_node_info
|
78
|
+
raise NotImplementedError
|
79
|
+
end
|
80
|
+
|
81
|
+
# getaddressesbyaccount
|
82
|
+
def addresses_by_account
|
83
|
+
raise NotImplementedError
|
84
|
+
end
|
85
|
+
|
86
|
+
# getbalance
|
87
|
+
def balance
|
88
|
+
raise NotImplementedError
|
89
|
+
end
|
90
|
+
|
91
|
+
# getbestblockhash
|
92
|
+
def best_block_hash
|
93
|
+
raise NotImplementedError
|
94
|
+
end
|
95
|
+
|
96
|
+
# getblock
|
97
|
+
def block
|
98
|
+
raise NotImplementedError
|
99
|
+
end
|
100
|
+
|
101
|
+
# getblockcount
|
102
|
+
def block_count
|
103
|
+
raise NotImplementedError
|
104
|
+
end
|
105
|
+
|
106
|
+
# getblockhash
|
107
|
+
def block_hash
|
108
|
+
raise NotImplementedError
|
109
|
+
end
|
110
|
+
|
111
|
+
# getblocknumber
|
112
|
+
def block_number
|
113
|
+
raise NotImplementedError
|
114
|
+
end
|
115
|
+
|
116
|
+
# getblocktemplate
|
117
|
+
def block_template
|
118
|
+
raise NotImplementedError
|
119
|
+
end
|
120
|
+
|
121
|
+
# getconnectioncount
|
122
|
+
def connection_count
|
123
|
+
raise NotImplementedError
|
124
|
+
end
|
125
|
+
|
126
|
+
# getdifficulty
|
127
|
+
def difficulty
|
128
|
+
raise NotImplementedError
|
129
|
+
end
|
130
|
+
|
131
|
+
# getgenerate
|
132
|
+
def generate
|
133
|
+
raise NotImplementedError
|
134
|
+
end
|
135
|
+
|
136
|
+
# gethashespersec
|
137
|
+
def hashes_per_sec
|
138
|
+
raise NotImplementedError
|
139
|
+
end
|
140
|
+
|
141
|
+
# getinfo
|
142
|
+
def info
|
143
|
+
raise NotImplementedError
|
144
|
+
end
|
145
|
+
|
146
|
+
# getmemorypool
|
147
|
+
def memory_pool
|
148
|
+
raise NotImplementedError
|
149
|
+
end
|
150
|
+
|
151
|
+
# getmininginfo
|
152
|
+
def mining_info
|
153
|
+
raise NotImplementedError
|
154
|
+
end
|
155
|
+
|
156
|
+
# getnewaddress
|
157
|
+
def new_address
|
158
|
+
raise NotImplementedError
|
159
|
+
end
|
160
|
+
|
161
|
+
# getpeerinfo
|
162
|
+
def peer_info
|
163
|
+
raise NotImplementedError
|
164
|
+
end
|
165
|
+
|
166
|
+
# getrawchangeaddress
|
167
|
+
def raw_change_address
|
168
|
+
raise NotImplementedError
|
169
|
+
end
|
170
|
+
|
171
|
+
# getrawmempool
|
172
|
+
def raw_mem_pool
|
173
|
+
raise NotImplementedError
|
174
|
+
end
|
175
|
+
|
176
|
+
# getrawtransaction
|
177
|
+
def raw_transaction
|
178
|
+
raise NotImplementedError
|
179
|
+
end
|
180
|
+
|
181
|
+
# getreceivedbyaccount
|
182
|
+
def received_by_account
|
183
|
+
raise NotImplementedError
|
184
|
+
end
|
185
|
+
|
186
|
+
# getreceivedbyaddress
|
187
|
+
def received_by_address
|
188
|
+
raise NotImplementedError
|
189
|
+
end
|
190
|
+
|
191
|
+
# gettransaction
|
192
|
+
def transaction
|
193
|
+
raise NotImplementedError
|
194
|
+
end
|
195
|
+
|
196
|
+
# gettxout
|
197
|
+
def tx_out
|
198
|
+
raise NotImplementedError
|
199
|
+
end
|
200
|
+
|
201
|
+
# gettxoutsetinfo
|
202
|
+
def tx_out_set_info
|
203
|
+
raise NotImplementedError
|
204
|
+
end
|
205
|
+
|
206
|
+
# getwork
|
207
|
+
def work
|
208
|
+
raise NotImplementedError
|
209
|
+
end
|
210
|
+
|
211
|
+
# help
|
212
|
+
def help
|
213
|
+
raise NotImplementedError
|
214
|
+
end
|
215
|
+
|
216
|
+
# importprivkey
|
217
|
+
def import_priv_key
|
218
|
+
raise NotImplementedError
|
219
|
+
end
|
220
|
+
|
221
|
+
# keypoolrefill
|
222
|
+
def keypool_refill
|
223
|
+
raise NotImplementedError
|
224
|
+
end
|
225
|
+
|
226
|
+
# listaccounts
|
227
|
+
def list_accounts
|
228
|
+
raise NotImplementedError
|
229
|
+
end
|
230
|
+
|
231
|
+
# listaddressgroupings
|
232
|
+
def list_address_groupings
|
233
|
+
raise NotImplementedError
|
234
|
+
end
|
235
|
+
|
236
|
+
# listreceivedbyaccount
|
237
|
+
def list_received_by_account
|
238
|
+
raise NotImplementedError
|
239
|
+
end
|
240
|
+
|
241
|
+
# listreceivedbyaddress
|
242
|
+
def list_received_by_address
|
243
|
+
raise NotImplementedError
|
244
|
+
end
|
245
|
+
|
246
|
+
# listsinceblock
|
247
|
+
def list_since_block
|
248
|
+
raise NotImplementedError
|
249
|
+
end
|
250
|
+
|
251
|
+
# listtransactions
|
252
|
+
def list_transactions
|
253
|
+
raise NotImplementedError
|
254
|
+
end
|
255
|
+
|
256
|
+
# listunspent
|
257
|
+
def list_unspent
|
258
|
+
raise NotImplementedError
|
259
|
+
end
|
260
|
+
|
261
|
+
# listlockunspent
|
262
|
+
def list_lock_unspent
|
263
|
+
raise NotImplementedError
|
264
|
+
end
|
265
|
+
|
266
|
+
# lockunspent
|
267
|
+
def lock_unspent
|
268
|
+
raise NotImplementedError
|
269
|
+
end
|
270
|
+
|
271
|
+
# move
|
272
|
+
def move
|
273
|
+
raise NotImplementedError
|
274
|
+
end
|
275
|
+
|
276
|
+
# sendfrom
|
277
|
+
def send_from
|
278
|
+
raise NotImplementedError
|
279
|
+
end
|
280
|
+
|
281
|
+
# sendmany
|
282
|
+
def send_many
|
283
|
+
raise NotImplementedError
|
284
|
+
end
|
285
|
+
|
286
|
+
# sendrawtransaction
|
287
|
+
def send_raw_transaction
|
288
|
+
raise NotImplementedError
|
289
|
+
end
|
290
|
+
|
291
|
+
# sendtoaddress
|
292
|
+
def send_to_address
|
293
|
+
raise NotImplementedError
|
294
|
+
end
|
295
|
+
|
296
|
+
# setaccount
|
297
|
+
def account=(_)
|
298
|
+
raise NotImplementedError
|
299
|
+
end
|
300
|
+
|
301
|
+
# setgenerate
|
302
|
+
def generate=(_)
|
303
|
+
raise NotImplementedError
|
304
|
+
end
|
305
|
+
|
306
|
+
# settxfee
|
307
|
+
def tx_fee=(_)
|
308
|
+
raise NotImplementedError
|
309
|
+
end
|
310
|
+
|
311
|
+
# signmessage
|
312
|
+
def sign_message
|
313
|
+
raise NotImplementedError
|
314
|
+
end
|
315
|
+
|
316
|
+
# signrawtransaction
|
317
|
+
def sign_raw_transaction
|
318
|
+
raise NotImplementedError
|
319
|
+
end
|
320
|
+
|
321
|
+
# stop
|
322
|
+
def stop
|
323
|
+
raise NotImplementedError
|
324
|
+
end
|
325
|
+
|
326
|
+
# submitblock
|
327
|
+
def submit_block
|
328
|
+
raise NotImplementedError
|
329
|
+
end
|
330
|
+
|
331
|
+
# validateaddress
|
332
|
+
def validate_address
|
333
|
+
raise NotImplementedError
|
334
|
+
end
|
335
|
+
|
336
|
+
# verifymessage
|
337
|
+
def verify_message
|
338
|
+
raise NotImplementedError
|
339
|
+
end
|
340
|
+
|
341
|
+
# walletlock
|
342
|
+
def wallet_lock
|
343
|
+
raise NotImplementedError
|
344
|
+
end
|
345
|
+
|
346
|
+
# walletpassphrase
|
347
|
+
def wallet_passphrase
|
348
|
+
raise NotImplementedError
|
349
|
+
end
|
350
|
+
|
351
|
+
# walletpassphrasechange
|
352
|
+
def wallet_passphrase_change
|
353
|
+
raise NotImplementedError
|
354
|
+
end
|
355
|
+
end
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: coinable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vlad D
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description:
|
56
|
+
email: dmxhZGp1c2hh@yandex.ru
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- ".gitignore"
|
62
|
+
- ".rspec"
|
63
|
+
- ".rubocop.yml"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/console
|
70
|
+
- bin/setup
|
71
|
+
- coinable.gemspec
|
72
|
+
- lib/coinable.rb
|
73
|
+
- lib/coinable/version.rb
|
74
|
+
homepage: https://github.com/dmxhZGp1c2hh/coinable
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.5.1
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Communicate with Bitcoin, Litecoin, Emercoin and other Altcoin JSON RPC the
|
98
|
+
Ruby way
|
99
|
+
test_files: []
|