ipfs / go-ipfs-api

The go interface to ipfs's HTTP API
MIT License
455 stars 178 forks source link

When I run the example that in readme, I get the following error. #265

Closed jlguochn closed 2 years ago

jlguochn commented 2 years ago

When I run the example that in readme, I get the following error. Please how can i make it work. My go-libp2p-core version is v0.14.0.

$ go run main.go                         
# github.com/libp2p/go-libp2p-core/crypto
../../../libp2p/go-libp2p-core/crypto/secp256k1.go:21:35: too many arguments in call to btcec.NewPrivateKey
        have (*secp256k1.KoblitzCurve)
        want ()
../../../libp2p/go-libp2p-core/crypto/secp256k1.go:36:36: too many arguments in call to btcec.PrivKeyFromBytes
        have (*secp256k1.KoblitzCurve, []byte)
        want ([]byte)
../../../libp2p/go-libp2p-core/crypto/secp256k1.go:42:29: too many arguments in call to btcec.ParsePubKey
        have ([]byte, *secp256k1.KoblitzCurve)
        want ([]byte)
../../../libp2p/go-libp2p-core/crypto/secp256k1.go:73:36: (*secp256k1.PrivateKey)(k).Sign undefined (type *secp256k1.PrivateKey has no field or method Sign)
../../../libp2p/go-libp2p-core/crypto/secp256k1.go:108:14: undefined: btcec.ParseDERSignature
welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.