coin-op 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/coin-op/bit/multi_wallet.rb +5 -3
- data/lib/coin-op/bit/script.rb +12 -10
- data/lib/coin-op/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f45ce27e81850de8f674df80ec2f9e3ca0cf50b
|
4
|
+
data.tar.gz: 9a79c80c8d6b01b2fd384eee10fd017fe6229655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3086ad2a8d11b8f290c0077d070332fbf7901a49d6f29839e8fd279e0a120526c282e9ca3a73c63978b7a44677e463643c1e2809767b72c322e97d5797e2c626
|
7
|
+
data.tar.gz: a2e2e284c282cd2e61bd090e146be00794a89b2185f9449dfe8c80c48ccab9a890641ac3cb1fb90520d688645a9f9340bffd3bef1751ccc4736fe19f52681b48
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -251,13 +251,15 @@ module CoinOp::Bit
|
|
251
251
|
end
|
252
252
|
|
253
253
|
def address
|
254
|
-
|
254
|
+
script.address
|
255
255
|
end
|
256
256
|
|
257
|
-
|
257
|
+
def p2sh_address
|
258
|
+
script.p2sh_address
|
259
|
+
end
|
258
260
|
|
259
261
|
def p2sh_script
|
260
|
-
Script.new(:address => self.script.
|
262
|
+
Script.new(:address => self.script.address, network: network)
|
261
263
|
end
|
262
264
|
|
263
265
|
def signatures(value, names:)
|
data/lib/coin-op/bit/script.rb
CHANGED
@@ -104,27 +104,29 @@ module CoinOp::Bit
|
|
104
104
|
self.to_hash.to_json(*a)
|
105
105
|
end
|
106
106
|
|
107
|
-
def hash160
|
108
|
-
CoinOp.syncbit(@network[:name]) do
|
109
|
-
@native.get_hash160 || Bitcoin.hash160(@hex)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
107
|
# Generate the script that uses a P2SH address.
|
114
108
|
# Used for an Output's scriptPubKey value. Not much used, and
|
115
109
|
# can probably be removed, as I think it is equivalent to
|
116
|
-
# Script.new :address =>
|
110
|
+
# Script.new :address => some.address
|
117
111
|
def p2sh_script
|
118
|
-
CoinOp.syncbit(@network[:name]) do
|
119
|
-
self.class.new Bitcoin::Script.to_p2sh_script(
|
112
|
+
CoinOp.syncbit(@network[:name]) do
|
113
|
+
self.class.new Bitcoin::Script.to_p2sh_script(@native.get_hash160)
|
120
114
|
end
|
121
115
|
end
|
122
116
|
|
117
|
+
def hash160
|
118
|
+
CoinOp.syncbit(@network[:name]) { Bitcoin.hash160(@hex) }
|
119
|
+
end
|
120
|
+
|
123
121
|
def p2sh_address
|
124
122
|
Bitcoin.encode_address(self.hash160, Bitcoin::NETWORKS[@network[:name]][:p2sh_version])
|
125
123
|
end
|
126
124
|
|
127
|
-
|
125
|
+
def address
|
126
|
+
CoinOp.syncbit(@network[:name]) do
|
127
|
+
@native.get_address
|
128
|
+
end
|
129
|
+
end
|
128
130
|
|
129
131
|
# Generate a P2SH script_sig for the current script, using the
|
130
132
|
# supplied options, which will, in the case of a multisig input,
|
data/lib/coin-op/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coin-op
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew King
|
@@ -32,7 +32,7 @@ cert_chain:
|
|
32
32
|
tdc4VS7IlSRxlZ3dBOgiigy9GXpJ+7F831AqjxL39EPwdr7RguTNz+pi//RKaT/U
|
33
33
|
IlpVB+Xfk0vQdP7iYfjGxDzUf0FACMjsR95waJmadKW1Iy6STw2hwPhYIQz1Hu1A
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date: 2015-05-
|
35
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bitcoin-ruby
|
metadata.gz.sig
CHANGED
Binary file
|