pochette 0.3.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/lib/pochette.rb +8 -3
- data/lib/pochette/backends/bitcoin_core.rb +1 -0
- data/lib/pochette/{transaction_builder.rb → base_transaction_builder.rb} +2 -2
- data/lib/pochette/{trezor_transaction_builder.rb → base_trezor_transaction_builder.rb} +1 -1
- data/lib/pochette/bch_transaction_builder.rb +5 -0
- data/lib/pochette/bch_trezor_transaction_builder.rb +5 -0
- data/lib/pochette/btc_transaction_builder.rb +5 -0
- data/lib/pochette/btc_trezor_transaction_builder.rb +5 -0
- data/lib/pochette/version.rb +1 -1
- data/pochette.gemspec +1 -1
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 412f3859492060cc2b719b82b5659cda8d6faf9d
|
4
|
+
data.tar.gz: e1ea1221d3a0c9a51aeb1983fc1595496cde9160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7df16a0caf5037655d3b1d59b83cf632a8e4409373d4a890d794b623c8144ac012483302509ad9d661e0b536dc47b1ce9ab4a794173644d6dabac7e6ab14f56b
|
7
|
+
data.tar.gz: 13d603c7272d962eb4987634c5567fb0c8c260a1fbbfd0acb3047639de96286adbbb6494e4c8855c1f3fc9a37535e608107be7dd8954d4d58e84c3754da97770
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.3
|
data/lib/pochette.rb
CHANGED
@@ -10,7 +10,8 @@ C = Contracts
|
|
10
10
|
module Pochette
|
11
11
|
include Contracts::Core
|
12
12
|
|
13
|
-
mattr_accessor :
|
13
|
+
mattr_accessor :btc_backend
|
14
|
+
mattr_accessor :bch_backend
|
14
15
|
|
15
16
|
Contract C::Bool => C::Bool
|
16
17
|
def self.testnet=(v)
|
@@ -39,5 +40,9 @@ require "pochette/backends/base"
|
|
39
40
|
require "pochette/backends/bitcoin_core"
|
40
41
|
require "pochette/backends/blockchain_info"
|
41
42
|
require "pochette/backends/trendy"
|
42
|
-
require "pochette/
|
43
|
-
require "pochette/
|
43
|
+
require "pochette/base_transaction_builder"
|
44
|
+
require "pochette/btc_transaction_builder"
|
45
|
+
require "pochette/bch_transaction_builder"
|
46
|
+
require "pochette/base_trezor_transaction_builder"
|
47
|
+
require "pochette/btc_trezor_transaction_builder"
|
48
|
+
require "pochette/bch_trezor_transaction_builder"
|
@@ -20,6 +20,7 @@ class Pochette::Backends::BitcoinCore < Pochette::Backends::Base
|
|
20
20
|
|
21
21
|
result = []
|
22
22
|
client.listsinceblock(block_hash, 1, true)[:transactions].each do |t|
|
23
|
+
next if t.has_key?(:trusted) && !t[:trusted]
|
23
24
|
next unless t[:category] == 'receive'
|
24
25
|
next unless addresses.include?(t[:address])
|
25
26
|
senders = []
|
@@ -3,13 +3,13 @@
|
|
3
3
|
# Instantiating will perform all the given queries, you'll be left with a
|
4
4
|
# TransactionBuilder object that is either valid? or not, and if valid
|
5
5
|
# you can query the results via to_hash.
|
6
|
-
class Pochette::
|
6
|
+
class Pochette::BaseTransactionBuilder
|
7
7
|
include Contracts::Core
|
8
8
|
|
9
9
|
# Backend can be set globally, or independently for each class and instance.
|
10
10
|
class_attribute :backend
|
11
11
|
def self.backend
|
12
|
-
|
12
|
+
raise NotImplementedError
|
13
13
|
end
|
14
14
|
|
15
15
|
cattr_accessor(:dust_size){ 546 }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Same as TransactionBuilder but outputs a transaction hash with all the
|
2
2
|
# required data to create and sign a transaction using a BitcoinTrezor.
|
3
|
-
class Pochette::
|
3
|
+
class Pochette::BaseTrezorTransactionBuilder < Pochette::BaseTransactionBuilder
|
4
4
|
|
5
5
|
Contract ({
|
6
6
|
:bip32_addresses => C::ArrayOf[C::Or[
|
data/lib/pochette/version.rb
CHANGED
data/pochette.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
spec.add_dependency "activesupport", "~> 4.2"
|
24
24
|
spec.add_dependency "bitcoin_rpc", "~> 0.1.1"
|
25
|
-
spec.add_dependency "bitcoin-ruby", "~> 0.0.
|
25
|
+
spec.add_dependency "bitcoin-ruby", "~> 0.0.13"
|
26
26
|
spec.add_dependency "money-tree", "~> 0.9.0"
|
27
27
|
spec.add_dependency "contracts", "~> 0.12.0"
|
28
28
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pochette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nubis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.0.
|
48
|
+
version: 0.0.13
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.0.
|
55
|
+
version: 0.0.13
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: money-tree
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,7 @@ extra_rdoc_files: []
|
|
164
164
|
files:
|
165
165
|
- ".gitignore"
|
166
166
|
- ".rspec"
|
167
|
+
- ".ruby-version"
|
167
168
|
- ".travis.yml"
|
168
169
|
- CODE_OF_CONDUCT.md
|
169
170
|
- Gemfile
|
@@ -177,8 +178,12 @@ files:
|
|
177
178
|
- lib/pochette/backends/bitcoin_core.rb
|
178
179
|
- lib/pochette/backends/blockchain_info.rb
|
179
180
|
- lib/pochette/backends/trendy.rb
|
180
|
-
- lib/pochette/
|
181
|
-
- lib/pochette/
|
181
|
+
- lib/pochette/base_transaction_builder.rb
|
182
|
+
- lib/pochette/base_trezor_transaction_builder.rb
|
183
|
+
- lib/pochette/bch_transaction_builder.rb
|
184
|
+
- lib/pochette/bch_trezor_transaction_builder.rb
|
185
|
+
- lib/pochette/btc_transaction_builder.rb
|
186
|
+
- lib/pochette/btc_trezor_transaction_builder.rb
|
182
187
|
- lib/pochette/version.rb
|
183
188
|
- pochette.gemspec
|
184
189
|
homepage: http://github.com/bitex-la/pochette
|
@@ -201,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
206
|
version: '0'
|
202
207
|
requirements: []
|
203
208
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.
|
209
|
+
rubygems_version: 2.5.2
|
205
210
|
signing_key:
|
206
211
|
specification_version: 4
|
207
212
|
summary: Pochette is a Bitcoin Wallet for developers
|