pochette 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac3995ef5885c6804c5122045e8d8ed6a738e6d
|
4
|
+
data.tar.gz: 20cf6325242fbcb5336a6e9c60cf72a6d17f9d59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3cd3d8adc25a27d02f8745292e7a22a4573914956ab3c3d701a729d8a97861ca36ff30d3afa869b45abb3ac65ce5d9e4c8f71a5b7c01b7260d3f8c0663a464
|
7
|
+
data.tar.gz: dfbabba768e84d4900d71bb30d39942b166a059cf28b3131781d70893ee6bf04d83f0c78180aab3b8bd65763e7d5dc0b37440f1ac32ddfc56662309923e60c00
|
data/README.md
CHANGED
@@ -128,7 +128,7 @@ A hash with
|
|
128
128
|
<dt>outputs:</dt>
|
129
129
|
<dd>Array of [destination address, amount in satoshis]</dd>
|
130
130
|
<dt>inputs:</dt>
|
131
|
-
<dd>Array of [input address, utxo transaction hash, utxo position, amount]</dd>
|
131
|
+
<dd>Array of [input address, utxo transaction hash, utxo position, amount, scriptPubKey]</dd>
|
132
132
|
<dt>utxos_to_blacklist:</dt>
|
133
133
|
<dd>
|
134
134
|
Transaction inputs formatted to be used as utxo_blacklist on another
|
@@ -168,7 +168,8 @@ A hash with
|
|
168
168
|
[ "2NAHscN6XVqUPzBSJHC3fhkeF5SQVxiR9p9",
|
169
169
|
"956b30c3c4335f019dbee60c60d76994319473acac356f774c7858cd5c968e40",
|
170
170
|
1,
|
171
|
-
200000000
|
171
|
+
200000000,
|
172
|
+
'public_key_in_hex_format'
|
172
173
|
],
|
173
174
|
],
|
174
175
|
utxos_to_blacklist: [
|
@@ -299,7 +300,8 @@ A hash with
|
|
299
300
|
[ "2NAHscN6XVqUPzBSJHC3fhkeF5SQVxiR9p9",
|
300
301
|
"956b30c3c4335f019dbee60c60d76994319473acac356f774c7858cd5c968e40",
|
301
302
|
1,
|
302
|
-
200000000
|
303
|
+
200000000,
|
304
|
+
"script_pubkey"
|
303
305
|
],
|
304
306
|
],
|
305
307
|
trezor_inputs: [
|
@@ -472,19 +474,19 @@ Pochette::TransactionBuilder which is smart about selecting utxos.
|
|
472
474
|
]
|
473
475
|
>>> backend.list_unspent(addresses).should == [
|
474
476
|
["mjfa56Keq7PXRKgdPSDB6eWLp4aaAVcj6L",
|
475
|
-
"fb401691795a73e0160252c00af18327a15006fcdf877ccca0c116809669032e", 0, 500000],
|
477
|
+
"fb401691795a73e0160252c00af18327a15006fcdf877ccca0c116809669032e", 0, 500000, "script_pub_key"],
|
476
478
|
["mxYzRdJfPk8PcaKSsSzNkX85mMfNcr2CGr",
|
477
|
-
"250978b77fe1310d6c72239d9e9589d7ac3dc6edf1b2412806ace5104553da34", 1, 100000],
|
479
|
+
"250978b77fe1310d6c72239d9e9589d7ac3dc6edf1b2412806ace5104553da34", 1, 100000, "script_pub_key"],
|
478
480
|
["mvrDG7Ts6Mq9ejhZxdsQLjbScycVaktqsg",
|
479
|
-
"d9afd460b0a5e065fdd87bf97cb1843a29ea588c59daabd1609794e8166bb75f", 0, 500000],
|
481
|
+
"d9afd460b0a5e065fdd87bf97cb1843a29ea588c59daabd1609794e8166bb75f", 0, 500000, "script_pub_key"],
|
480
482
|
["mxYzRdJfPk8PcaKSsSzNkX85mMfNcr2CGr",
|
481
|
-
"5bd72a4aa7818f47ac8943e3e17519be00c46530760860e608d898d728b9d46e", 1, 100000],
|
483
|
+
"5bd72a4aa7818f47ac8943e3e17519be00c46530760860e608d898d728b9d46e", 1, 100000, "script_pub_key"],
|
482
484
|
["mwZE4QfzzriE7nsgHSWbgmtT7s6SDysYvP",
|
483
|
-
"b252037526ecb616ab5901552abb903f00bf73400a1fc49b5b5bd699b84bce77", 0, 500000],
|
485
|
+
"b252037526ecb616ab5901552abb903f00bf73400a1fc49b5b5bd699b84bce77", 0, 500000, "script_pub_key"],
|
484
486
|
["mjfa56Keq7PXRKgdPSDB6eWLp4aaAVcj6L",
|
485
|
-
"9142d7a8e96124a36db9708dd21afa4ac81f15a77bd85c06f16e808a4d700da2", 1, 100000],
|
487
|
+
"9142d7a8e96124a36db9708dd21afa4ac81f15a77bd85c06f16e808a4d700da2", 1, 100000, "script_pub_key"],
|
486
488
|
["mzbXim4u1Nq4J2kVggu471pZL3ahxNkmE9",
|
487
|
-
"ff768084764a05d1de72628432c0a4419538b2786089ec8ad009f6096bc69fe1", 0, 500000]
|
489
|
+
"ff768084764a05d1de72628432c0a4419538b2786089ec8ad009f6096bc69fe1", 0, 500000, "script_pub_key"]
|
488
490
|
]
|
489
491
|
```
|
490
492
|
|
@@ -74,7 +74,7 @@ class Pochette::Backends::BitcoinCore
|
|
74
74
|
def list_unspent(addresses)
|
75
75
|
return nil if addresses.empty?
|
76
76
|
client.listunspent(1, 99999999, addresses).collect do |u|
|
77
|
-
[u[:address], u[:txid], u[:vout], (u[:amount] * 1_0000_0000).to_i]
|
77
|
+
[u[:address], u[:txid], u[:vout], (u[:amount] * 1_0000_0000).to_i, u[:scriptPubKey]]
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -15,7 +15,7 @@ class Pochette::Backends::BlockchainInfo
|
|
15
15
|
json = get_json("unspent", {active: addresses.join('|'), format: 'json'})
|
16
16
|
json['unspent_outputs'].collect do |utxo|
|
17
17
|
address = Bitcoin::Script.new(utxo['script'].htb).get_address
|
18
|
-
[address, utxo['tx_hash_big_endian'], utxo['tx_output_n'].to_i, utxo['value']]
|
18
|
+
[address, utxo['tx_hash_big_endian'], utxo['tx_output_n'].to_i, utxo['value'], utxo['script']]
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -43,7 +43,7 @@ class Pochette::TransactionBuilder
|
|
43
43
|
:output_total => C::Num,
|
44
44
|
:fee => C::Num,
|
45
45
|
:outputs => C::ArrayOf[[String, C::Num]],
|
46
|
-
:inputs => C::ArrayOf[[String, String, Integer, C::Num]],
|
46
|
+
:inputs => C::ArrayOf[[String, String, Integer, C::Num, String]],
|
47
47
|
:utxos_to_blacklist => C::ArrayOf[[String, Integer]]
|
48
48
|
})]
|
49
49
|
def as_hash
|
@@ -26,7 +26,7 @@ class Pochette::TrezorTransactionBuilder < Pochette::TransactionBuilder
|
|
26
26
|
:output_total => C::Num,
|
27
27
|
:fee => C::Num,
|
28
28
|
:outputs => C::ArrayOf[[String, C::Num]],
|
29
|
-
:inputs => C::ArrayOf[[String, String, Integer, C::Num]],
|
29
|
+
:inputs => C::ArrayOf[[String, String, Integer, C::Num, String]],
|
30
30
|
:utxos_to_blacklist => C::ArrayOf[[String, Integer]],
|
31
31
|
:transactions => C::ArrayOf[Hash],
|
32
32
|
:trezor_inputs => C::ArrayOf[{
|
data/lib/pochette/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.9
|
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: 2015-
|
12
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|