miguelmota / go-ethereum-hdwallet

Ethereum HD Wallet derivations in Go (golang)

Home Page:https://github.com/miguelmota/go-ethereum-hdwallet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown account error

Dmdv opened this issue · comments

commented

Following this example to sign transaction have unknown account error

https://github.com/miguelmota/go-ethereum-hdwallet/blob/master/example/sign.go

The example code is working for me

$ go run example/sign.go
(*types.Transaction)(0xc00007a6c0)({
 inner: (*types.LegacyTx)(0xc00007a660)({
  Nonce: (uint64) 0,
  GasPrice: (*big.Int)(0xc0000c7ce0)(21000000000),
  Gas: (uint64) 21000,
  To: (*common.Address)(0xc0000e2240)((len=20 cap=20) 0x0000000000000000000000000000000000000000),
  Value: (*big.Int)(0xc0000c7cc0)(1000000000000000000),
  Data: ([]uint8) <nil>,
  V: (*big.Int)(0xc0000c7ca0)(27),
  R: (*big.Int)(0xc0000c7c60)(34405166580762396054881948095668280144114812929766777744840143175291345694076),
  S: (*big.Int)(0xc0000c7c80)(35876182893985365337785111608140175101791577417143941897988905965773505549184)
 }),
 time: (time.Time) 2022-07-04 13:45:41.917536722 -0700 PDT m=+0.029605455,
 hash: (atomic.Value) {
  v: (interface {}) <nil>
 },
 size: (atomic.Value) {
  v: (interface {}) <nil>
 },
 from: (atomic.Value) {
  v: (types.sigCache) {
   signer: (types.HomesteadSigner) {
    FrontierSigner: (types.FrontierSigner) {
    }
   },
   from: (common.Address) (len=20 cap=20) 0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947
  }
 }
})

is there any additional code you're using that you can share?