Skip to content

Commit ed9743a

Browse files
committed
feat: implement slip44 HD path coin type
1 parent 7ff75e1 commit ed9743a

File tree

1 file changed

+5
-0
lines changed
  • packages/cosmic-swingset/app

1 file changed

+5
-0
lines changed

packages/cosmic-swingset/app/app.go

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ const (
5050
// Bech32MainPrefix defines the Bech32 prefix used by all types
5151
Bech32MainPrefix = "agoric"
5252

53+
// CoinType is used in the slip44 HD key derivation path.
54+
// https://github.com/satoshilabs/slips/blob/master/slip-0044.md
55+
CoinType = 564
56+
5357
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
5458
Bech32PrefixAccAddr = Bech32MainPrefix
5559
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
@@ -166,6 +170,7 @@ type AgoricApp struct {
166170

167171
// SetConfigDefaults sets the appropriate parameters for the Agoric chain.
168172
func SetConfigDefaults(config *sdk.Config) {
173+
config.SetCoinType(CoinType)
169174
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub)
170175
config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub)
171176
config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub)

0 commit comments

Comments
 (0)