File tree Expand file tree Collapse file tree 6 files changed +16
-15
lines changed
Expand file tree Collapse file tree 6 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 11package coincodec
22
3+ import "github.com/wealdtech/go-slip44"
4+
35const (
46 hrpElrond = "erd"
57 ElrondKeyhashLength = 32
68)
79
810func init () {
9- // 508 slip44.ELROND
10- toBytesMap [508 ] = ElrondDecodeToBytes
11- toStringMap [508 ] = ElrondEncodeToString
11+ toBytesMap [slip44 .ELROND ] = ElrondDecodeToBytes
12+ toStringMap [slip44 .ELROND ] = ElrondEncodeToString
1213}
1314
1415// ElrondDecodeToBytes converts the input string to a byte array
Original file line number Diff line number Diff line change 44 "testing"
55
66 "github.com/pkg/errors"
7+ "github.com/wealdtech/go-slip44"
78)
89
910func TestElrondEncodeToBytes (t * testing.T ) {
@@ -61,8 +62,7 @@ func TestElrondEncodeToBytes(t *testing.T) {
6162 },
6263 }
6364
64- // 508 slip44.ELROND
65- RunTestsEncode (t , 508 , tests )
65+ RunTestsEncode (t , slip44 .ELROND , tests )
6666}
6767
6868func TestElrondDecodeToString (t * testing.T ) {
@@ -95,6 +95,5 @@ func TestElrondDecodeToString(t *testing.T) {
9595 },
9696 }
9797
98- // 508 slip44.ELROND
99- RunTestsDecode (t , 508 , tests )
98+ RunTestsDecode (t , slip44 .ELROND , tests )
10099}
Original file line number Diff line number Diff line change 66 "errors"
77 "strconv"
88
9+ "github.com/wealdtech/go-slip44"
910 "golang.org/x/crypto/blake2b"
1011)
1112
@@ -30,9 +31,8 @@ const (
3031)
3132
3233func init () {
33- // 461 slip44.FILECOIN
34- toBytesMap [461 ] = FilecoinDecodeToBytes
35- toStringMap [461 ] = FilecoinEncodeToString
34+ toBytesMap [slip44 .FILECOIN ] = FilecoinDecodeToBytes
35+ toStringMap [slip44 .FILECOIN ] = FilecoinEncodeToString
3636}
3737
3838// Attempts to get the type by ASCII.
Original file line number Diff line number Diff line change 44 "testing"
55
66 "github.com/pkg/errors"
7+ "github.com/wealdtech/go-slip44"
78)
89
910func TestFilecoinToBytes (t * testing.T ) {
@@ -205,8 +206,7 @@ func TestFilecoinToBytes(t *testing.T) {
205206 },
206207 }
207208
208- // 461 slip44.FILECOIN
209- RunTestsEncode (t , 461 , tests )
209+ RunTestsEncode (t , slip44 .FILECOIN , tests )
210210}
211211
212212func TestFilecoinToString (t * testing.T ) {
@@ -363,8 +363,7 @@ func TestFilecoinToString(t *testing.T) {
363363 },
364364 }
365365
366- // 461 slip44.FILECOIN
367- RunTestsDecode (t , 461 , tests )
366+ RunTestsDecode (t , slip44 .FILECOIN , tests )
368367}
369368
370369func TestFilecoinTypes (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ require (
88 github.com/cpacia/bchutil v0.0.0-20181003130114-b126f6a35b6c
99 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1
1010 github.com/pkg/errors v0.8.1
11- github.com/wealdtech/go-slip44 v1.0 .0
11+ github.com/wealdtech/go-slip44 v1.1 .0
1212 golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708
1313)
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
2929github.com/pkg/errors v0.8.1 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
3030github.com/wealdtech/go-slip44 v1.0.0 h1:g0Wi5EufdD/ULZ4hcZKQ3TGlA6FZhGTCkmVzYmf+7Is =
3131github.com/wealdtech/go-slip44 v1.0.0 /go.mod h1://S3V9M6iN1cCflLXMjJYciRPakCDubG9YpWVyW1AvM =
32+ github.com/wealdtech/go-slip44 v1.1.0 h1:vOA63sYUpRSFSskbpYC4/WH910bWf8xn46KAJY6XFgk =
33+ github.com/wealdtech/go-slip44 v1.1.0 /go.mod h1://S3V9M6iN1cCflLXMjJYciRPakCDubG9YpWVyW1AvM =
3234golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4to18W7R7imwAI/sWS9S8Q =
3335golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 /go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4 =
3436golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 /go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w =
You can’t perform that action at this time.
0 commit comments