miguelmota / go-ethereum-hdwallet Goto Github PK
View Code? Open in Web Editor NEWEthereum HD Wallet derivations in Go (golang)
Home Page: https://github.com/miguelmota/go-ethereum-hdwallet
License: MIT License
Ethereum HD Wallet derivations in Go (golang)
Home Page: https://github.com/miguelmota/go-ethereum-hdwallet
License: MIT License
Hello! The go.sum file of the repo has a lot of unused packages, importing the code also brings all of them. It would be great if you fixed it. Thanks
Hello @miguelmota
I think this awesome library will benefit having optional password in seed calculation.
This is smth I need in my code anyway, so I could open a PR here as well if you would like.
I'm thinking of extending this function:
go-ethereum-hdwallet/hdwallet.go
Line 495 in dca85a9
e.g. to keep backward compatibility
func NewSeedFromMnemonic(mnemonic string, passOpt ...string) ([]byte, error) {
if mnemonic == "" {
return nil, errors.New("mnemonic is required")
}
var password = ""
if len(passOpt) > 0 {
password = passOpt[0]
}
return bip39.NewSeedWithErrorChecking(mnemonic, password)
}
What do you think?
In my go.mod
, I depend on github.com/btcsuite/btcd v0.23.4
. Perhaps this is a problem?
$ go mod tidy
go: finding module for package github.com/miguelmota/go-ethereum-hdwallet
go: found github.com/miguelmota/go-ethereum-hdwallet in github.com/miguelmota/go-ethereum-hdwallet v0.1.2
go: finding module for package github.com/btcsuite/btcd/btcec
go: github.com/dove-foundation/dove/bird/inttest tested by
github.com/dove-foundation/dove/bird/inttest.test imports
github.com/miguelmota/go-ethereum-hdwallet imports
github.com/btcsuite/btcutil/hdkeychain imports
github.com/btcsuite/btcd/btcec: module github.com/btcsuite/btcd@latest found (v0.23.4), but does not contain package github.com/btcsuite/btcd/btcec
how get balance from wallet ?
After my last MR (#13) was merged, i noticed that Wallet
does not fulfill the accounts.Wallet
interface from geth anymore.
This was not indented but slipped under the radar.
I will prepare another MR to fix it. The baseFee is not even used for signing but to verify the signature, which can also be done without it.
So my next MR (#16) will effectively revert #13, get rid of the AsMessage
function by using Sender
instead and add a type assertion.
Sorry for the inconvenience ๐
I love this package, but I want to use it to sign token transfers as well. Which, as I understand it means that I have to us: types.SignTx(tx, types.NewEIP155Signer(chainID), privateKey)
. I can PR this package, but I am unsure how you would want this implemented. THis is less than DRY, but my thought is:
// SignTxEIP155 implements accounts.Wallet, which allows the account to sign an ERC-20 transaction.
func (w *Wallet) SignTxEIP155(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) {
w.stateLock.RLock() // Comms have own mutex, this is for the state fields
defer w.stateLock.RUnlock()
// Make sure the requested account is contained within
path, ok := w.paths[account.Address]
if !ok {
return nil, accounts.ErrUnknownAccount
}
privateKey, err := w.derivePrivateKey(path)
if err != nil {
return nil, err
}
// Sign the transaction and verify the sender to avoid hardware fault surprises
signedTx, err := types.SignTx(tx, types.NewEIP155Signer(chainID), privateKey)
if err != nil {
return nil, err
}
msg, err := signedTx.AsMessage(types.NewEIP155Signer(chainID))
if err != nil {
return nil, err
}
sender := msg.From()
if sender != account.Address {
return nil, fmt.Errorf("signer mismatch: expected %s, got %s", account.Address.Hex(), sender.Hex())
}
return signedTx, nil
}
Thoughts?
why the module name is defined as module github.com/immutability-io/go-ethereum-hdwallet
in your go.mod ? I think it should be module github.com/miguelmota/go-ethereum-hdwallet
`
$ go get github.com/miguelmota/go-ethereum-hdwallet
go: github.com/miguelmota/go-ethereum-hdwallet imports
github.com/btcsuite/btcutil/hdkeychain imports
github.com/btcsuite/btcd/btcec: cannot find module providing package github.com/btcsuite/btcd/btcec
`
Im getting an error while installing:
robert@Roberts-MacBook-Air gocourse % go get -u github.com/miguelmota/go-ethereum-hdwallet
github.com/miguelmota/go-ethereum-hdwallet
../src/github.com/miguelmota/go-ethereum-hdwallet/hdwallet.go:494:17: key.Child undefined (type *hdkeychain.ExtendedKey has no field or method Child)
This is my mnemonic:foot virtual paddle notice elbow lock analyst electric broom tell wheel office
I found hdwallet derived diffrent privatekey use path "m/44'/2'/0'/0/0" with java version and other standard wallet
Messes up my other functions with go-ethereum, had to remove reference to this package to sort out, Any thought on how to fix this ?
I am using go-ethereum for few other functions, The moment i remove this solves the issue.
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000004.o: In function `secp256k1GoPanicIllegal':
/tmp/go-build/_cgo_export.c:22: multiple definition of `secp256k1GoPanicIllegal'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000000.o:/tmp/go-build/_cgo_export.c:22: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000004.o: In function `secp256k1GoPanicError':
/tmp/go-build/_cgo_export.c:39: multiple definition of `secp256k1GoPanicError'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000000.o:/tmp/go-build/_cgo_export.c:39: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_create':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:58: multiple definition of `secp256k1_context_create'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:58: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_clone':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:83: multiple definition of `secp256k1_context_clone'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:83: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_destroy':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:92: multiple definition of `secp256k1_context_destroy'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:92: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_set_illegal_callback':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:103: multiple definition of `secp256k1_context_set_illegal_callback'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:103: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_set_error_callback':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:111: multiple definition of `secp256k1_context_set_error_callback'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:111: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_parse':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:150: multiple definition of `secp256k1_ec_pubkey_parse'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:150: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_serialize':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:165: multiple definition of `secp256k1_ec_pubkey_serialize'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:165: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_signature_parse_der':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:212: multiple definition of `secp256k1_ecdsa_signature_parse_der'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:212: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_signature_parse_compact':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:228: multiple definition of `secp256k1_ecdsa_signature_parse_compact'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:228: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_signature_serialize_der':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:249: multiple definition of `secp256k1_ecdsa_signature_serialize_der'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:249: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_signature_serialize_compact':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:261: multiple definition of `secp256k1_ecdsa_signature_serialize_compact'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:261: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_signature_normalize':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:274: multiple definition of `secp256k1_ecdsa_signature_normalize'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:274: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_verify':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:293: multiple definition of `secp256k1_ecdsa_verify'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:293: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_sign':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:345: multiple definition of `secp256k1_ecdsa_sign'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:345: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_seckey_verify':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:391: multiple definition of `secp256k1_ec_seckey_verify'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:391: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_create':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:404: multiple definition of `secp256k1_ec_pubkey_create'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:404: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_privkey_tweak_add':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:427: multiple definition of `secp256k1_ec_privkey_tweak_add'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:427: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_tweak_add':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:450: multiple definition of `secp256k1_ec_pubkey_tweak_add'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:450: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_privkey_tweak_mul':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:474: multiple definition of `secp256k1_ec_privkey_tweak_mul'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:474: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_tweak_mul':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:496: multiple definition of `secp256k1_ec_pubkey_tweak_mul'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:496: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_context_randomize':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:520: multiple definition of `secp256k1_context_randomize'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:520: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ec_pubkey_combine':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:527: multiple definition of `secp256k1_ec_pubkey_combine'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/secp256k1.c:527: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_recoverable_signature_parse_compact':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:38: multiple definition of `secp256k1_ecdsa_recoverable_signature_parse_compact'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:38: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_recoverable_signature_serialize_compact':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:60: multiple definition of `secp256k1_ecdsa_recoverable_signature_serialize_compact'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:60: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_recoverable_signature_convert':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:74: multiple definition of `secp256k1_ecdsa_recoverable_signature_convert'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:74: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_sign_recoverable':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:123: multiple definition of `secp256k1_ecdsa_sign_recoverable'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:123: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ecdsa_recover':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:170: multiple definition of `secp256k1_ecdsa_recover'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h:170: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_ext_scalar_mul':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/ext.h:113: multiple definition of `secp256k1_ext_scalar_mul'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/ext.h:101: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_fe_normalize_weak':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:121: multiple definition of `secp256k1_nonce_function_default'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:121: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_fe_normalize_weak':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:113: multiple definition of `secp256k1_nonce_function_rfc6979'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:113: first defined here
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000007.o: In function `secp256k1_fe_normalize_var':
C:/Users/MyXMachine/src/github.com/miguelmota/go-ethereum-hdwallet/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:139: multiple definition of `CURVE_B'
C:\Users\MyXMachine\AppData\Local\Temp\go-link-637321475\000003.o:C:/Users/MyXMachine/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h:139: first defined here
collect2.exe: error: ld returned 1 exit status```
Thanks,
TheeCodeDragon
The wallet seems to be missing the following methods. Using go-ethereum 1.9
I just stumbled on these your GitHub repo I was looking for a program that will help me convert my compressed Bitcoin private key to address and check the balance. Could you please help me update or create a python program that will help me convert my compressed private key to address and check the balance. The reason I needed this was to scan through a massive private key txt file and see if I can find my missing 6 characters private key. Please help me if I recover the wallet I will donate some BTC to you. Thanks
Returns
{"jsonrpc":"2.0","id":2,"error":{"code":-32000,"message":"invalid sender"}}
curl --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xe4808504e3b2920082520894cee1854e7c2df037c9a499915161f7c4fd37f89d8080808080"],"id":2}' -H "Content-Type: application/json" -X POST http://IPHERE
some linker issue under MacOS
$ go run example.go
# command-line-arguments
/usr/local/Cellar/go/1.10.1/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
duplicate symbol _secp256k1GoPanicError in:
github.com/btcsuite/btcd/chaincfg
like go btc implementation
it cause a huge binary after compile , could it apply a prune dependencies to the slightest ?
Following this example to sign transaction have unknown account
error
https://github.com/miguelmota/go-ethereum-hdwallet/blob/master/example/sign.go
Hi,
When I run go get -u ./...
in my project, I go the following error:
../../go/pkg/mod/github.com/miguelmota/[email protected]/hdwallet.go:254:32: not enough arguments in call to signedTx.AsMessage
have (types.EIP155Signer)
want (types.Signer, *big.Int)
../../go/pkg/mod/github.com/miguelmota/[email protected]/hdwallet.go:289:32: not enough arguments in call to signedTx.AsMessage
have (types.HomesteadSigner)
want (types.Signer, *big.Int)
is there any reason for my package that I got the error?
wallet, err := hdwallet.NewFromMnemonic("real town addict extend shoot name disagree vital turn live can tip")
if err != nil {
return "", err
}
path := hdwallet.MustParseDerivationPath("m/44'/60'/0'/0/0")
account, err := wallet.Derive(path, false)
if err != nil {
return "", err
}
keyHex, err := wallet.PrivateKeyHex(account)
if err != nil {
return "", err
}
return keyHex, nil
got c64f0b3e510d03adef3f057d1814bdc8a7f904caafa6928550fc10670dcff031
wanted c29cd818232f40614691a58c9afcbd5518b539cb135d73b1d9e26d5f5f5dcbbe (https://iancoleman.io/bip39/)
Hi, thanks for your library. I had a question regarding the FixIssue172 implementation
Here:
go-ethereum-hdwallet/hdwallet.go
Lines 507 to 511 in ca8871b
As it is now you use the DeriveNonStandard by default, which is deprecated according to
Again, forgive me if I am missing something
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.