addressVersion
and privKeyVersion
above and convert it into something we can use.Network
to hold our prefix information. We’re also defining our networks in a map
so that we can easily use them.GetNetworkParams
function for example:GetNetworkParams
function within any function that creates or imports keys. For example, if we wanted to create keys, we would use the following:map
in the above code? We’re saying that we want to create a Bitcoin WIF key as well as a public address for Bitcoin and print out both. Had we wanted to use a different cryptocurrency, we would have defined it differently in our map
variable.