From 468cdf2d1153cd30874929949b9fe92d4be4b2d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:33:56 +0000 Subject: [PATCH 1/2] Bump golang.org/x/crypto Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210921155107-089bfa567519 to 0.17.0. - [Commits](https://github.com/golang/crypto/commits/v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 943d12e..343e65c 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,6 @@ go 1.12 require ( github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 - golang.org/x/text v0.3.8 + golang.org/x/crypto v0.17.0 + golang.org/x/text v0.14.0 ) diff --git a/go.sum b/go.sum index 4021c6a..a53c8d7 100644 --- a/go.sum +++ b/go.sum @@ -8,29 +8,43 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 31be58538eb244ca0bf840fa734af4578b6a8842 Mon Sep 17 00:00:00 2001 From: joeqian Date: Tue, 10 Sep 2024 18:52:19 +0800 Subject: [PATCH 2/2] sort imports in wallet pkg --- go.mod | 4 ++-- go.sum | 8 ++++++++ wallet/account_test.go | 6 ++++-- wallet/keys/keyPair.go | 23 +++++++++++++++-------- wallet/keys/keyPair_test.go | 3 ++- wallet/keys/nep2.go | 4 +++- wallet/keys/publicKey.go | 7 ++++--- wallet/keys/publicKey_test.go | 4 ++-- wallet/wallet.go | 3 ++- wallet/walletHelper.go | 5 +++-- wallet/walletHelper_test.go | 8 +++++--- wallet/wallet_test.go | 6 ++++-- 12 files changed, 54 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 343e65c..b4d4bde 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,6 @@ go 1.12 require ( github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.17.0 - golang.org/x/text v0.14.0 + golang.org/x/crypto v0.23.0 + golang.org/x/text v0.15.0 ) diff --git a/go.sum b/go.sum index a53c8d7..07c1afa 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -18,6 +20,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -29,11 +32,15 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -41,6 +48,7 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/wallet/account_test.go b/wallet/account_test.go index dc105f9..e26058b 100644 --- a/wallet/account_test.go +++ b/wallet/account_test.go @@ -1,9 +1,11 @@ package wallet import ( - "github.com/joeqian10/neo-gogogo/wallet/keys" - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" + + "github.com/joeqian10/neo-gogogo/wallet/keys" ) func TestNewAccount(t *testing.T) { diff --git a/wallet/keys/keyPair.go b/wallet/keys/keyPair.go index b16dcc8..eb89389 100644 --- a/wallet/keys/keyPair.go +++ b/wallet/keys/keyPair.go @@ -6,16 +6,17 @@ import ( "crypto/rand" "crypto/sha256" "fmt" + "math/big" + "github.com/joeqian10/neo-gogogo/crypto" "github.com/joeqian10/neo-gogogo/helper" - "math/big" ) type KeyPairSlice []*KeyPair -func (kps KeyPairSlice) Len() int { return len(kps)} -func (kps KeyPairSlice) Less(i, j int) bool { return kps[i].PublicKey.Compare(kps[j].PublicKey) == -1} -func (kps KeyPairSlice) Swap(i, j int) { kps[i], kps[j] = kps[j], kps[i]} +func (kps KeyPairSlice) Len() int { return len(kps) } +func (kps KeyPairSlice) Less(i, j int) bool { return kps[i].PublicKey.Compare(kps[j].PublicKey) == -1 } +func (kps KeyPairSlice) Swap(i, j int) { kps[i], kps[j] = kps[j], kps[i] } type KeyPair struct { PrivateKey []byte @@ -140,12 +141,18 @@ func VerifySignature(message []byte, signature []byte, p *PublicKey) bool { func VerifyMultiSig(message []byte, signatures [][]byte, pubKeys []*PublicKey) bool { m := len(signatures) n := len(pubKeys) - if m==0 || n==0 || m>n {return false} + if m == 0 || n == 0 || m > n { + return false + } var success bool = true for i, j := 0, 0; success && i < m && j < n; { - if VerifySignature(message, signatures[i], pubKeys[j]) {i++} + if VerifySignature(message, signatures[i], pubKeys[j]) { + i++ + } j++ - if m-i > n-j {success=false} + if m-i > n-j { + success = false + } } return success -} \ No newline at end of file +} diff --git a/wallet/keys/keyPair_test.go b/wallet/keys/keyPair_test.go index 68d4136..e0d7f9d 100644 --- a/wallet/keys/keyPair_test.go +++ b/wallet/keys/keyPair_test.go @@ -1,8 +1,9 @@ package keys import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestExportWIF(t *testing.T) { diff --git a/wallet/keys/nep2.go b/wallet/keys/nep2.go index fc16274..b3f615d 100644 --- a/wallet/keys/nep2.go +++ b/wallet/keys/nep2.go @@ -4,9 +4,11 @@ import ( "bytes" "errors" "fmt" - . "github.com/joeqian10/neo-gogogo/crypto" + "golang.org/x/crypto/scrypt" "golang.org/x/text/unicode/norm" + + . "github.com/joeqian10/neo-gogogo/crypto" ) // NEP-2 standard implementation for encrypting and decrypting private keys. diff --git a/wallet/keys/publicKey.go b/wallet/keys/publicKey.go index b7509b7..87987bf 100644 --- a/wallet/keys/publicKey.go +++ b/wallet/keys/publicKey.go @@ -7,12 +7,13 @@ import ( "encoding/binary" "encoding/hex" "fmt" - "github.com/joeqian10/neo-gogogo/crypto" - "github.com/joeqian10/neo-gogogo/helper" - "github.com/joeqian10/neo-gogogo/sc" "io" "math/big" "sort" + + "github.com/joeqian10/neo-gogogo/crypto" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/joeqian10/neo-gogogo/sc" ) // PublicKeys is a list of public keys. diff --git a/wallet/keys/publicKey_test.go b/wallet/keys/publicKey_test.go index 4eaff87..cd3e9c0 100644 --- a/wallet/keys/publicKey_test.go +++ b/wallet/keys/publicKey_test.go @@ -2,8 +2,9 @@ package keys import ( "encoding/hex" - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestString(t *testing.T) { @@ -25,7 +26,6 @@ func TestCreateMultiSigRedeemScript(t *testing.T) { privateKey3, _ := hex.DecodeString(KeyCases[2].PrivateKey) privateKey4, _ := hex.DecodeString(KeyCases[3].PrivateKey) - keyPair1, _ := NewKeyPair(privateKey1) keyPair2, _ := NewKeyPair(privateKey2) keyPair3, _ := NewKeyPair(privateKey3) diff --git a/wallet/wallet.go b/wallet/wallet.go index 4c0b937..060035c 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -3,8 +3,9 @@ package wallet import ( "encoding/json" "fmt" - "github.com/joeqian10/neo-gogogo/wallet/keys" "os" + + "github.com/joeqian10/neo-gogogo/wallet/keys" ) const ( diff --git a/wallet/walletHelper.go b/wallet/walletHelper.go index 3cf429d..e3bc304 100644 --- a/wallet/walletHelper.go +++ b/wallet/walletHelper.go @@ -2,11 +2,12 @@ package wallet import ( "fmt" + "math/big" + "strconv" + "github.com/joeqian10/neo-gogogo/helper" "github.com/joeqian10/neo-gogogo/sc" "github.com/joeqian10/neo-gogogo/tx" - "math/big" - "strconv" ) type WalletHelper struct { diff --git a/wallet/walletHelper_test.go b/wallet/walletHelper_test.go index 9cf1fe4..fd7de34 100644 --- a/wallet/walletHelper_test.go +++ b/wallet/walletHelper_test.go @@ -1,13 +1,15 @@ package wallet import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/joeqian10/neo-gogogo/helper" "github.com/joeqian10/neo-gogogo/rpc" "github.com/joeqian10/neo-gogogo/rpc/models" "github.com/joeqian10/neo-gogogo/tx" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "testing" ) func TestNewWalletHelper(t *testing.T) { diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index 464cc25..26876b6 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -1,10 +1,12 @@ package wallet import ( - "github.com/joeqian10/neo-gogogo/wallet/keys" - "github.com/stretchr/testify/assert" "io/ioutil" "testing" + + "github.com/stretchr/testify/assert" + + "github.com/joeqian10/neo-gogogo/wallet/keys" ) func TestNewWalletFromFile(t *testing.T) {