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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16d9ce30af79cfe0d705a9a47737ab364b43fc0b
4
- data.tar.gz: 37fab9a196d74a2c8a18677cc255f9ba2e6c03d7
3
+ metadata.gz: 412f3859492060cc2b719b82b5659cda8d6faf9d
4
+ data.tar.gz: e1ea1221d3a0c9a51aeb1983fc1595496cde9160
5
5
  SHA512:
6
- metadata.gz: 2fc1add8142489e00360bd8524a7be5de72c546a167c63b1d01ce977f4e1a5d6f61b4d2e84388adfc29888902d39dde36fdeacb66001f8a4a4645eadc9b07bb7
7
- data.tar.gz: bf5545f34bf4001ee78f9dd2ea5d95daba984c94cd7b92e76ae009a40bb993ef2178d73387e70dc26a5acbb284998b851c4925d475b803f7cc64e18a0883c2d5
6
+ metadata.gz: 7df16a0caf5037655d3b1d59b83cf632a8e4409373d4a890d794b623c8144ac012483302509ad9d661e0b536dc47b1ce9ab4a794173644d6dabac7e6ab14f56b
7
+ data.tar.gz: 13d603c7272d962eb4987634c5567fb0c8c260a1fbbfd0acb3047639de96286adbbb6494e4c8855c1f3fc9a37535e608107be7dd8954d4d58e84c3754da97770
@@ -0,0 +1 @@
1
+ 2.3.3
@@ -10,7 +10,8 @@ C = Contracts
10
10
  module Pochette
11
11
  include Contracts::Core
12
12
 
13
- mattr_accessor :backend
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/transaction_builder"
43
- require "pochette/trezor_transaction_builder"
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::TransactionBuilder
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
- @backend || Pochette.backend
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::TrezorTransactionBuilder < Pochette::TransactionBuilder
3
+ class Pochette::BaseTrezorTransactionBuilder < Pochette::BaseTransactionBuilder
4
4
 
5
5
  Contract ({
6
6
  :bip32_addresses => C::ArrayOf[C::Or[
@@ -0,0 +1,5 @@
1
+ class Pochette::BchTransactionBuilder < Pochette::BaseTransactionBuilder
2
+ def self.backend
3
+ @backend || Pochette.bch_backend
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Pochette::BchTrezorTransactionBuilder < Pochette::BaseTrezorTransactionBuilder
2
+ def self.backend
3
+ @backend || Pochette::BchTransactionBuilder.backend || Pochette.bch_backend
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Pochette::BtcTransactionBuilder < Pochette::BaseTransactionBuilder
2
+ def self.backend
3
+ @backend || Pochette.btc_backend
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Pochette::BtcTrezorTransactionBuilder < Pochette::BaseTrezorTransactionBuilder
2
+ def self.backend
3
+ @backend || Pochette::BtcTransactionBuilder.backend || Pochette.btc_backend
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Pochette
2
- VERSION = "0.3.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -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.7"
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.3.1
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: 2016-10-21 00:00:00.000000000 Z
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.7
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.7
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/transaction_builder.rb
181
- - lib/pochette/trezor_transaction_builder.rb
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.4.5
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