Created
July 8, 2019 00:37
-
-
Save shanev/8bf7971140ffa07442d53fcc8a563da2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ( | |
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address | |
Bech32PrefixAccAddr = "tru:" | |
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key | |
Bech32PrefixAccPub = "tru:pub" | |
// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address | |
Bech32PrefixValAddr = "tru:valoper" | |
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key | |
Bech32PrefixValPub = "tru:valoperpub" | |
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address | |
Bech32PrefixConsAddr = "tru:valcons" | |
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key | |
Bech32PrefixConsPub = "tru:valconspub" | |
) | |
func main() { | |
// ... | |
config := sdk.GetConfig() | |
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) | |
config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub) | |
config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub) | |
config.Seal() | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment