dropzone_ruby 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +28 -0
- data/bin/dropzone +1 -1
- data/lib/blockrio_ext.rb +1 -1
- data/lib/dropzone/command.rb +2 -2
- data/lib/dropzone/connection.rb +3 -2
- data/lib/dropzone/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: c19a6591e576becbce95eee6a238525d940238fc
|
4
|
+
data.tar.gz: 54b5e677b28bdd5825e19400f7c86c0f5b68f9fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48fe31ddabbd0ccb13dd7af857ad566d7da0c8c1ac54c1c7af6c6aca785018310cc6209918e1f9c1111698e890731b965e4cdcce2da87efb620056f5aa4e7869
|
7
|
+
data.tar.gz: 0e164617b26aa065bee6a266e45fec20c7e2e7490cbf781fb237fccc4348dc885205c935ae77ffd260292c01de07d46054fb1bbfc593adf18dd8233d6bfae189
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dropzone_ruby (0.1)
|
4
|
+
dropzone_ruby (0.1.1)
|
5
5
|
commander (~> 4.3)
|
6
6
|
counterparty_ruby (~> 1.2)
|
7
7
|
sequel (~> 4.21)
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
15
|
bitcoin-ruby (0.0.7)
|
16
|
-
commander (4.3.
|
16
|
+
commander (4.3.5)
|
17
17
|
highline (~> 1.7.2)
|
18
18
|
counterparty_ruby (1.2.0)
|
19
19
|
bitcoin-ruby
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
domain_name (0.5.24)
|
25
25
|
unf (>= 0.0.5, < 1.0.0)
|
26
26
|
ffi (1.9.10)
|
27
|
-
highline (1.7.
|
27
|
+
highline (1.7.3)
|
28
28
|
http-cookie (1.0.2)
|
29
29
|
domain_name (~> 0.5)
|
30
30
|
mime-types (2.6.1)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
rspec-support (~> 3.2.0)
|
50
50
|
rspec-support (3.2.2)
|
51
51
|
ruby-rc4 (0.1.5)
|
52
|
-
sequel (4.
|
52
|
+
sequel (4.25.0)
|
53
53
|
sham (1.1.0)
|
54
54
|
socksify (1.7.0)
|
55
55
|
sqlite3 (1.3.10)
|
data/README.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
Drop Zone [![Gem Version](https://badge.fury.io/rb/dropzone_ruby.svg)](http://badge.fury.io/rb/dropzone_ruby)
|
2
2
|
=================
|
3
|
+
Drop Zone is a Ruby command line client that facilitates trade and secure
|
4
|
+
messaging between buyers and sellers, using nothing but the Bitcoin network.
|
5
|
+
Testnet is used for communications. Mainnet is used for the storage of listings,
|
6
|
+
buyer profiles, and reputational events.
|
7
|
+
|
8
|
+
[White Paper](http://www.metzdowd.com/pipermail/cryptography/2015-March/025212.html)
|
9
|
+
|
10
|
+
[Rubygems](https://rubygems.org/gems/dropzone_ruby)
|
11
|
+
|
12
|
+
## Getting Started
|
13
|
+
|
14
|
+
With ruby 2.2.1 installed:
|
15
|
+
|
16
|
+
$ gem install dropzone_ruby
|
17
|
+
|
18
|
+
Find a list of commands with:
|
19
|
+
|
20
|
+
$ dropzone help
|
21
|
+
|
22
|
+
Fund a testnet key with tBTC or a mainnet key with BTC
|
23
|
+
|
24
|
+
Create a seller or buyer profile
|
25
|
+
|
26
|
+
## Author's Manifesto
|
3
27
|
![Drop Zone](dropzone-screenshot.jpg)
|
4
28
|
|
5
29
|
To whom it may concern,
|
@@ -60,3 +84,7 @@ __quia omnis qui se exaltat humiliabitur et qui se humiliat exaltabitur__
|
|
60
84
|
* The white paper expressed 8 digits of precision for the listing radius. This implementation instead uses 6 digits. If additional precision is later deemed necessary, a field can be added to the listing to accomodate enhanced precision
|
61
85
|
* The white paper expressed pkeys (addresses) as being encoded ints. These are instead encoded as variable length strings.
|
62
86
|
* The white paper expressed transaction ids as being encoded ints. These are instead encoded as variable length strings.
|
87
|
+
|
88
|
+
## Changelog
|
89
|
+
* v0.1.1 - Addressed bugs in Listing find and buyer profiles
|
90
|
+
* v0.1 - First Release
|
data/bin/dropzone
CHANGED
@@ -74,7 +74,7 @@ command 'balance' do |c|
|
|
74
74
|
|
75
75
|
c.syntax, c.summary, c.description =
|
76
76
|
'dropzone balance <addr>',
|
77
|
-
'Display the balance on the provided address, in Bitcoin',
|
77
|
+
'Display the balance on the provided address, in Bitcoin, not including unconfirmed txs',
|
78
78
|
multi(<<-eos)
|
79
79
|
Given the provided public key, display the Bitcoin balance remaining in
|
80
80
|
this account. Does not include unconfirmed transactions.
|
data/lib/blockrio_ext.rb
CHANGED
@@ -27,7 +27,7 @@ class BlockrIo
|
|
27
27
|
# Ideally, this would work: json_get('block', 'txs', number.to_s)['data']['txs']
|
28
28
|
def getblock(number)
|
29
29
|
block_hash = getblockinfo(number)['hash']
|
30
|
-
|
30
|
+
|
31
31
|
resp = RestClient::Resource.new( [ 'https://blockchain.info', 'block-index',
|
32
32
|
block_hash ].join('/')+'?format=json' ).get(content_type: 'json')
|
33
33
|
|
data/lib/dropzone/command.rb
CHANGED
@@ -302,7 +302,7 @@ class DropZoneCommand
|
|
302
302
|
raise "missing one or more of: latitude, longitude, or radius." if (
|
303
303
|
via_location.any? && !via_location.all? )
|
304
304
|
|
305
|
-
start_at = params[:start_at].to_i
|
305
|
+
start_at = params[:start_at] ? params[:start_at].to_i : connection.block_height
|
306
306
|
|
307
307
|
finder_method = (via_location.all?) ?
|
308
308
|
[ :find_in_radius, start_at, block_depth, *via_location] :
|
@@ -473,7 +473,7 @@ class DropZoneCommand
|
|
473
473
|
sentence_splitter = /(.{1,#{data_width}})( +|$\n?)|(.{1,#{data_width}})/m
|
474
474
|
v.scan(sentence_splitter).each_with_index.collect{|l,i|
|
475
475
|
"| %-#{content_width}s |" % [
|
476
|
-
("%-#{widest_key}s: %s" % [(i == 0) ? k : '',l.first]) ]
|
476
|
+
("%-#{widest_key}s: %s" % [(i == 0) ? k : '',l.first||l.last]) ]
|
477
477
|
}
|
478
478
|
else
|
479
479
|
"| %-#{content_width}s |" % ["%-#{widest_key}s: %s" % [k,v]]
|
data/lib/dropzone/connection.rb
CHANGED
@@ -57,7 +57,8 @@ module Dropzone
|
|
57
57
|
|
58
58
|
(msg && msg.valid?) ? msg : nil
|
59
59
|
rescue Counterparty::TxDecode::InvalidOutput,
|
60
|
-
Counterparty::TxDecode::MultisigUnsupported
|
60
|
+
Counterparty::TxDecode::MultisigUnsupported,
|
61
|
+
Counterparty::TxDecode::UndefinedBehavior
|
61
62
|
next
|
62
63
|
end
|
63
64
|
}.compact
|
@@ -283,7 +284,7 @@ module Dropzone
|
|
283
284
|
break if allocated >= amount
|
284
285
|
}
|
285
286
|
|
286
|
-
raise WalletFundsTooLowOrNoUTXOs if allocated < amount
|
287
|
+
raise WalletFundsTooLowOrNoUTXOs, "Wallet Funds are too low, or no UTXOs are available. Try again in the next confirmation, and/or fund this wallet with more BTC/tBTC and UTXOs" if allocated < amount
|
287
288
|
|
288
289
|
utxos
|
289
290
|
end
|
data/lib/dropzone/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropzone_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miracle Max
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: counterparty_ruby
|