diff --git a/coins/bitcoin/go.mod b/coins/bitcoin/go.mod index e23efc6..ad9b9b0 100644 --- a/coins/bitcoin/go.mod +++ b/coins/bitcoin/go.mod @@ -1,38 +1,41 @@ module github.com/okx/go-wallet-sdk/coins/bitcoin -go 1.19 +go 1.22 + +toolchain go1.22.4 require ( - github.com/btcsuite/btcd v0.23.4 - github.com/btcsuite/btcd/btcec/v2 v2.3.2 - github.com/btcsuite/btcd/btcutil v1.1.3 + github.com/btcsuite/btcd v0.24.2 + github.com/btcsuite/btcd/btcec/v2 v2.3.4 + github.com/btcsuite/btcd/btcutil v1.1.5 github.com/btcsuite/btcd/btcutil/psbt v1.1.8 - github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 - github.com/ethereum/go-ethereum v1.13.4 + github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 + github.com/ethereum/go-ethereum v1.14.11 github.com/okx/go-wallet-sdk/crypto v0.0.1 github.com/okx/go-wallet-sdk/util v0.0.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( - github.com/bits-and-blooms/bitset v1.7.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect github.com/btcsuite/btcutil v1.0.2 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect - github.com/ethereum/c-kzg-4844 v0.3.1 // indirect - github.com/go-stack/stack v1.8.1 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect + github.com/holiman/uint256 v1.3.1 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/supranational/blst v0.3.11 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect + github.com/supranational/blst v0.3.13 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/coins/bitcoin/message.go b/coins/bitcoin/message.go index 8cff6cb..f8b714f 100644 --- a/coins/bitcoin/message.go +++ b/coins/bitcoin/message.go @@ -534,10 +534,7 @@ func SignMessage(wif string, prefix, message string) (string, error) { if err != nil { return "", err } - sig, err := ecdsa.SignCompact(w.PrivKey, messageHash, true) - if err != nil { - return "", err - } + sig := ecdsa.SignCompact(w.PrivKey, messageHash, true) return base64.StdEncoding.EncodeToString(sig), nil }