btcsuite / btcutil

Provides bitcoin-specific convenience functions and types
477 stars 410 forks source link

HD keys created from seeds are always instatiated with MainNet version #65

Closed cjepson closed 8 years ago

cjepson commented 8 years ago

The NewMaster function only creates a new HD key with the MainNet version parameters. The function should alternatively take a network parameter as an argument and allows using other network parameters.

davecgh commented 8 years ago

You can set the network on the returned *ExtendedKey with the SetNet method, but I agree that it would be more intuitive and less error prone if he NewMaster function required the network to be specified. I'll submit a PR making that change shortly.