trufflesuite / truffle-hdwallet-provider

HD Wallet-enabled Web3 provider
MIT License
400 stars 167 forks source link

Make dpath configurable #69

Closed alepc253 closed 5 years ago

alepc253 commented 6 years ago

truffle-hdwallet-provider is hardcoded to derive only Ethereum addresses. Other networks, RSK for example, derive their addresses using different dpaths. This PR adds a new parameter networkId to the provider constructor (with ethereum 60 as default) and uses it to make dpath configurable.

benjamincburns commented 5 years ago

Hi @alepc253 unfortunately the term networkId has significance in the context of multi-network Ethereum and it would be very easy for users to mistake this field as the ID of the network to which they're connecting (as returned by the net_version RPC call). Instead I think it's a better approach to let the user define the entire HD path rather than this portion of it.

64 achieves that goal, so I think I'll merge that one instead.

That said, thanks so much for contributing!