keoken 0.2.4 → 0.2.5

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
  SHA256:
3
- metadata.gz: 7a7c32a366f87a8929066deee5bd40e9ed33f6a3c58a746295bc9c59f603d473
4
- data.tar.gz: bbfc6b28c6522bfaf5f0b62a9b9c5e941e9e9feb37eb6f800dcd9eb58b7abfb7
3
+ metadata.gz: b4ea5523c0fd45ac39e9be7833c277408f65d3eb7a9404bbaa0cd5669f27d289
4
+ data.tar.gz: acf24ac884bd5045d625be738969124ac6e7baeccb63ae0dee40a3bd044c299f
5
5
  SHA512:
6
- metadata.gz: a7e09c4c7e34c84d4efc58092fd7959305783ec32bdfd5928b11a5c349c0a946856c60a8eac69df68ecdd0699f9e853f21418f5ab3b60f3a225bc753f84841cf
7
- data.tar.gz: 57b74eed8af540d63877acec29cd2f837aa96de5c9c523a1438d00c7e0e8f1a9ff1a8dd74b2c0072048059f37dfeb184056d68790fdf0527289802d31bfb362d
6
+ metadata.gz: c00f1d0c01500fd9aa3a38e6029609f3320c91df74515b98fc9b78b4c0139d0b301b6318007e6e8b9da6398237c4e6e1cc463e05045fc0e7e492ed309e4fc290
7
+ data.tar.gz: 712d295795631f21fa1d201271685b5b781b089a1eb3e4248606512746ee410c5e59bf7cb5eb08136f4ac39d850ec37724be7d080ae22f7907f924a92f8b7977
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'cashaddress', '~> 0.1.0', git: 'https://github.com/werner/cashaddress-ruby'
data/Gemfile.lock CHANGED
@@ -1,7 +1,13 @@
1
+ GIT
2
+ remote: https://github.com/werner/cashaddress-ruby
3
+ revision: f4759db43b9d0657e8533256712017dd13a0bc16
4
+ specs:
5
+ cashaddress (0.1.0)
6
+
1
7
  PATH
2
8
  remote: .
3
9
  specs:
4
- keoken (0.2.3)
10
+ keoken (0.2.4)
5
11
  bitcoin-ruby (~> 0.0.18)
6
12
 
7
13
  GEM
@@ -43,6 +49,7 @@ PLATFORMS
43
49
  DEPENDENCIES
44
50
  bundler (~> 1.11)
45
51
  byebug (~> 10)
52
+ cashaddress (~> 0.1.0)!
46
53
  ffi (~> 1.9)
47
54
  keoken!
48
55
  rake (~> 12)
@@ -40,7 +40,7 @@ module Keoken
40
40
 
41
41
  def create(inputs, path, address, output_amount, script)
42
42
  {
43
- inputs:
43
+ inputs:
44
44
  inputs.map do |input|
45
45
  {
46
46
  address_n: path,
@@ -51,7 +51,7 @@ module Keoken
51
51
  end,
52
52
  outputs: [
53
53
  {
54
- address: address,
54
+ address: Cashaddress.from_legacy(address),
55
55
  amount: output_amount,
56
56
  script_type: 'PAYTOADDRESS'
57
57
  },
@@ -66,7 +66,7 @@ module Keoken
66
66
 
67
67
  def send(inputs, path, output_amount, address, output_amount_to_addr2, addr2, script)
68
68
  {
69
- inputs:
69
+ inputs:
70
70
  inputs.map do |input|
71
71
  {
72
72
  address_n: path,
@@ -77,12 +77,12 @@ module Keoken
77
77
  end,
78
78
  outputs: [
79
79
  {
80
- address: address,
80
+ address: Cashaddress.from_legacy(address),
81
81
  amount: output_amount,
82
82
  script_type: 'PAYTOADDRESS'
83
83
  },
84
84
  {
85
- address: addr2,
85
+ address: Cashaddress.from_legacy(addr2),
86
86
  amount: output_amount_to_addr2,
87
87
  script_type: 'PAYTOADDRESS'
88
88
  },
@@ -1,3 +1,3 @@
1
1
  module Keoken
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
data/lib/keoken.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'bitcoin'
2
+ require 'cashaddress'
2
3
 
3
4
  require 'keoken/errors/id_not_found'
4
5
  require 'keoken/errors/name_not_found'
data/spec/keoken_spec.rb CHANGED
@@ -217,7 +217,7 @@ describe Keoken do
217
217
  outputs:
218
218
  [
219
219
  {
220
- address: '17wrMVCa9EJUVVEC3c5CZZanjT1NtWU2mX',
220
+ address: 'bitcoincash:qpxrq63y6kz2wphm2nfsh6z23yvjmz7avcc5wsgruw',
221
221
  amount: 8757229,
222
222
  script_type: 'PAYTOADDRESS'
223
223
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keoken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bitex