Skip to content

Commit

Permalink
feat: implement slip44 HD path coin type
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Oct 3, 2020
1 parent 7ff75e1 commit ed9743a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/cosmic-swingset/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const (
// Bech32MainPrefix defines the Bech32 prefix used by all types
Bech32MainPrefix = "agoric"

// CoinType is used in the slip44 HD key derivation path.
// https://github.com/satoshilabs/slips/blob/master/slip-0044.md
CoinType = 564

// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
Bech32PrefixAccAddr = Bech32MainPrefix
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
Expand Down Expand Up @@ -166,6 +170,7 @@ type AgoricApp struct {

// SetConfigDefaults sets the appropriate parameters for the Agoric chain.
func SetConfigDefaults(config *sdk.Config) {
config.SetCoinType(CoinType)
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub)
config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub)
config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub)
Expand Down

0 comments on commit ed9743a

Please sign in to comment.