Giter Site home page Giter Site logo

Comments (6)

chappjc avatar chappjc commented on May 27, 2024 2

Glad that worked. Be sure to use secp256k1/v4 module though.

from dcrd.

chappjc avatar chappjc commented on May 27, 2024

The following code is not in production yet, but perhaps this is of help: https://github.com/decred/dcrdex/blob/0c75bd4ef78a0cde38eb558dd20b1ffe2a655683/client/asset/eth/eth.go#L828-L844

If SignCompact was used to make the signature referencing the uncompressed public keys (the false bool), as would be done with ethereum's crypto.Sign, I believe it should work.

from dcrd.

davecgh avatar davecgh commented on May 27, 2024

I'll take a look at this here in a bit. If you don't mind answering the following, it should be enough to get the ball rolling:

  1. Which version of the module are you using (e.g github.com/decred/dcrd/dcrec/[email protected], @v4.0.1, etc)?
  2. Would you provide a couple of sig/hash/pubkey triples that are not producing the expected results?

from dcrd.

fxfactorial avatar fxfactorial commented on May 27, 2024

@chappjc thank you, will look

@davecgh thank you, go get just picked it up as it, so in my .mod, .sum have

go.mod
	github.com/decred/dcrd/dcrec/secp256k1 v1.0.3 // indirect
	github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 // indirect
go.sum
github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/dcrec/secp256k1 v1.0.3 h1:u4XpHqlscRolxPxt2YHrFBDVZYY1AK+KMV02H1r+HmU=
github.com/decred/dcrd/dcrec/secp256k1 v1.0.3/go.mod h1:eCL8H4MYYjRvsw2TuANvEOcVMFbmi9rt/6hJUWU5wlU=
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=

sure will collect some samples and post another comment with them

(thank you quick replies)

from dcrd.

chappjc avatar chappjc commented on May 27, 2024

Also, are you aware that go-ethereum/crypto has a no-cgo version if you build with CGO_ENABLED=0?

from dcrd.

fxfactorial avatar fxfactorial commented on May 27, 2024

Also, are you aware that go-ethereum/crypto has a no-cgo version if you build with CGO_ENABLED=0?

No, wasn't aware thank you. Also, I tried your code sample and it works great. Thank you, can close issue

from dcrd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.