Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Commit b11902d

Browse files
committed
ltc psbt (BIP174)
1 parent c41346b commit b11902d

15 files changed

+47
-45
lines changed

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
module github.com/btcsuite/btcutil
1+
module github.com/ltcsuite/ltcutil
22

33
go 1.13
44

55
require (
66
github.com/aead/siphash v1.0.1
7-
github.com/btcsuite/btcd v0.20.1-beta
87
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495
9-
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23
8+
github.com/kkdai/bstream v1.0.0
9+
github.com/ltcsuite/ltcd v0.20.1-beta
1010
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d
1111
)

go.sum

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg=
22
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
3-
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
4-
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
53
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
64
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
7-
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
85
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
96
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd h1:qdGvebPBDuYDPGi1WCPjy1tGyMpmDK8IEapSsszn7HE=
107
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
11-
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723 h1:ZA/jbKoGcVAnER6pCHPEkGdZOV7U1oLUedErBHCUMs0=
12-
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
8+
github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE=
9+
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
1310
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
1411
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
1512
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495 h1:6IyqGr3fnd0tM3YxipK27TUskaOVUjU2nG45yzwcQKY=
@@ -22,14 +19,17 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
2219
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
2320
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
2421
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
25-
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE=
26-
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
22+
github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8=
23+
github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA=
24+
github.com/ltcsuite/ltcd v0.20.1-beta h1:ka9ZwUG7oUPppl+7ptuh5VDxGD7TWEJXu/IOOOz1yfY=
25+
github.com/ltcsuite/ltcd v0.20.1-beta/go.mod h1:ZFQaYdYULIuTQiWqs7AUiHD2XhDFeeHW1IH+UYMdABU=
26+
github.com/ltcsuite/ltcutil v0.0.0-20191227053721-6bec450ea6ad h1:ZSvrs99WjvbTwJE1NzCi6OhpOHFRamjTf7lPgo1p20w=
27+
github.com/ltcsuite/ltcutil v0.0.0-20191227053721-6bec450ea6ad/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=
2728
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
2829
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
2930
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
3031
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
3132
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
32-
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
3333
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3434
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d h1:2+ZP7EfsZV7Vvmx3TIqSlSzATMkTAKqM14YGFPoSKjI=
3535
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

psbt/creator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package psbt
66

77
import (
8-
"github.com/btcsuite/btcd/wire"
8+
"github.com/ltcsuite/ltcd/wire"
99
)
1010

1111
// MinTxVersion is the lowest transaction version that we'll permit.

psbt/extractor.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ package psbt
1212
import (
1313
"bytes"
1414

15-
"github.com/btcsuite/btcd/txscript"
16-
"github.com/btcsuite/btcd/wire"
15+
"github.com/ltcsuite/ltcd/txscript"
16+
"github.com/ltcsuite/ltcd/wire"
1717
)
1818

1919
// Extract takes a finalized psbt.Packet and outputs a finalized transaction

psbt/finalizer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package psbt
1212
// multisig and no other custom script.
1313

1414
import (
15-
"github.com/btcsuite/btcd/txscript"
15+
"github.com/ltcsuite/ltcd/txscript"
1616
)
1717

1818
// isFinalized considers this input finalized if it contains at least one of

psbt/go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module github.com/btcsuite/btcutil/psbt
1+
module github.com/ltcsuite/ltcutil/psbt
22

33
go 1.13
44

55
require (
6-
github.com/btcsuite/btcd v0.20.1-beta
7-
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
86
github.com/davecgh/go-spew v1.1.1
7+
github.com/ltcsuite/ltcd v0.20.1-beta
8+
github.com/ltcsuite/ltcutil v0.0.0-20191227053721-6bec450ea6ad
99
)

psbt/go.sum

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
2-
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
3-
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
42
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
53
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
6-
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng=
7-
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
8-
github.com/btcsuite/btcutil v0.0.0-20191219182022-e17c9730c422 h1:EqnrgSSg0SFWRlEZLExgjtuUR/IPnuQ6qw6nwRda4Uk=
9-
github.com/btcsuite/btcutil v0.0.0-20191219182022-e17c9730c422/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
104
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
115
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
12-
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
6+
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
137
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
148
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
159
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -20,15 +14,23 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
2014
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
2115
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
2216
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
23-
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
17+
github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA=
18+
github.com/ltcsuite/ltcd v0.20.1-beta h1:ka9ZwUG7oUPppl+7ptuh5VDxGD7TWEJXu/IOOOz1yfY=
19+
github.com/ltcsuite/ltcd v0.20.1-beta/go.mod h1:ZFQaYdYULIuTQiWqs7AUiHD2XhDFeeHW1IH+UYMdABU=
20+
github.com/ltcsuite/ltcutil v0.0.0-20191227053721-6bec450ea6ad h1:ZSvrs99WjvbTwJE1NzCi6OhpOHFRamjTf7lPgo1p20w=
21+
github.com/ltcsuite/ltcutil v0.0.0-20191227053721-6bec450ea6ad/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=
2422
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
2523
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
2624
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
27-
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4to18W7R7imwAI/sWS9S8Q=
28-
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
25+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
26+
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d h1:2+ZP7EfsZV7Vvmx3TIqSlSzATMkTAKqM14YGFPoSKjI=
27+
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
2928
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
29+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
3030
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
3131
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
32+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
33+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3234
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
3335
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3436
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=

psbt/partial_input.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"io"
77
"sort"
88

9-
"github.com/btcsuite/btcd/txscript"
10-
"github.com/btcsuite/btcd/wire"
9+
"github.com/ltcsuite/ltcd/txscript"
10+
"github.com/ltcsuite/ltcd/wire"
1111
)
1212

1313
// PInput is a struct encapsulating all the data that can be attached to any

psbt/partial_output.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"io"
66
"sort"
77

8-
"github.com/btcsuite/btcd/wire"
8+
"github.com/ltcsuite/ltcd/wire"
99
)
1010

1111
// POutput is a struct encapsulating all the data that can be attached

psbt/partialsig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package psbt
33
import (
44
"bytes"
55

6-
"github.com/btcsuite/btcd/btcec"
6+
"github.com/ltcsuite/ltcd/btcec"
77
)
88

99
// PartialSig encapsulate a (BTC public key, ECDSA signature)

psbt/psbt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"io"
1616

17-
"github.com/btcsuite/btcd/wire"
17+
"github.com/ltcsuite/ltcd/wire"
1818
)
1919

2020
// psbtMagicLength is the length of the magic bytes used to signal the start of

psbt/psbt_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
"encoding/hex"
1212
"testing"
1313

14-
"github.com/btcsuite/btcd/chaincfg/chainhash"
15-
"github.com/btcsuite/btcd/txscript"
16-
"github.com/btcsuite/btcd/wire"
1714
"github.com/davecgh/go-spew/spew"
15+
"github.com/ltcsuite/ltcd/chaincfg/chainhash"
16+
"github.com/ltcsuite/ltcd/txscript"
17+
"github.com/ltcsuite/ltcd/wire"
1818
)
1919

2020
// Test vectors from:

psbt/signer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package psbt
1010
// is in the correct state.
1111

1212
import (
13-
"github.com/btcsuite/btcd/txscript"
13+
"github.com/ltcsuite/ltcd/txscript"
1414
)
1515

1616
// SignOutcome is a enum-like value that expresses the outcome of a call to the

psbt/updater.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
"bytes"
1515
"crypto/sha256"
1616

17-
"github.com/btcsuite/btcd/txscript"
18-
"github.com/btcsuite/btcd/wire"
19-
"github.com/btcsuite/btcutil"
17+
"github.com/ltcsuite/ltcd/txscript"
18+
"github.com/ltcsuite/ltcd/wire"
19+
"github.com/ltcsuite/ltcutil"
2020
)
2121

2222
// Updater encapsulates the role 'Updater' as specified in BIP174; it accepts
@@ -120,7 +120,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte,
120120
if pInput.RedeemScript != nil {
121121
outIndex := p.Upsbt.UnsignedTx.TxIn[inIndex].PreviousOutPoint.Index
122122
scriptPubKey := pInput.NonWitnessUtxo.TxOut[outIndex].PkScript
123-
scriptHash := btcutil.Hash160(pInput.RedeemScript)
123+
scriptHash := ltcutil.Hash160(pInput.RedeemScript)
124124

125125
scriptHashScript, err := txscript.NewScriptBuilder().
126126
AddOp(txscript.OP_HASH160).
@@ -141,7 +141,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte,
141141

142142
var script []byte
143143
if pInput.RedeemScript != nil {
144-
scriptHash := btcutil.Hash160(pInput.RedeemScript)
144+
scriptHash := ltcutil.Hash160(pInput.RedeemScript)
145145
scriptHashScript, err := txscript.NewScriptBuilder().
146146
AddOp(txscript.OP_HASH160).
147147
AddData(scriptHash).
@@ -181,7 +181,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte,
181181
}
182182
} else {
183183
// Otherwise, this is a p2wkh input.
184-
pubkeyHash := btcutil.Hash160(pubkey)
184+
pubkeyHash := ltcutil.Hash160(pubkey)
185185
pubkeyHashScript, err := txscript.NewScriptBuilder().
186186
AddOp(txscript.OP_0).
187187
AddData(pubkeyHash).

psbt/utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"io"
1212
"sort"
1313

14-
"github.com/btcsuite/btcd/txscript"
15-
"github.com/btcsuite/btcd/wire"
14+
"github.com/ltcsuite/ltcd/txscript"
15+
"github.com/ltcsuite/ltcd/wire"
1616
)
1717

1818
// writeTxWitness is a A utility function due to non-exported witness

0 commit comments

Comments
 (0)