Skip to content

Commit

Permalink
SLIP-0044 Coin ID 5555& BIP-0044 HD wallet path
Browse files Browse the repository at this point in the history
  • Loading branch information
Codegnosis committed Dec 10, 2019
1 parent 3c2c220 commit d0734f6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ Official golang implementation of Unification Mainchain. Built using [Cosmos SDK
[![Go Report Card](https://goreportcard.com/badge/github.com/unification-com/mainchain-cosmos)](https://goreportcard.com/report/github.com/unification-com/mainchain-cosmos)
[![Join the chat at https://gitter.im/unification-com/mainchain](https://badges.gitter.im/unification-com/mainchain.svg)](https://gitter.im/unification-com/mainchain?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## HD Wallet Path

BIP-0044 Path for our HD Wallets is as follows:

`44'/5555'/0'/0`

SLIP-0044 Coin ID is `5555`

## Build

Compile `und` and `undcli` binaries and output to ./build
Expand Down
2 changes: 2 additions & 0 deletions cmd/und/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func main() {
config.SetBech32PrefixForAccount(undtypes.Bech32PrefixAccAddr, undtypes.Bech32PrefixAccPub)
config.SetBech32PrefixForValidator(undtypes.Bech32PrefixValAddr, undtypes.Bech32PrefixValPub)
config.SetBech32PrefixForConsensusNode(undtypes.Bech32PrefixConsAddr, undtypes.Bech32PrefixConsPub)
config.SetCoinType(undtypes.CoinType)
config.SetFullFundraiserPath(undtypes.HdWalletPath)
config.Seal()

ctx := server.NewDefaultContext()
Expand Down
2 changes: 2 additions & 0 deletions cmd/undcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func main() {
config.SetBech32PrefixForAccount(undtypes.Bech32PrefixAccAddr, undtypes.Bech32PrefixAccPub)
config.SetBech32PrefixForValidator(undtypes.Bech32PrefixValAddr, undtypes.Bech32PrefixValPub)
config.SetBech32PrefixForConsensusNode(undtypes.Bech32PrefixConsAddr, undtypes.Bech32PrefixConsPub)
config.SetCoinType(undtypes.CoinType)
config.SetFullFundraiserPath(undtypes.HdWalletPath)
config.Seal()

rootCmd := &cobra.Command{
Expand Down
5 changes: 4 additions & 1 deletion types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const (
Bech32MainPrefix = "und"

// Atom in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
CoinType = 50005
CoinType = 5555

// Implementations of HD wallets for UND Mainchain should use the wallet path 44'/5555'/0'/0
HdWalletPath = "44'/5555'/0'/0/0"

// PrefixAccount is the prefix for account keys
PrefixAccount = "acc"
Expand Down

0 comments on commit d0734f6

Please sign in to comment.