Skip to content

Commit

Permalink
Merge pull request #25 from phoreproject/BIP44_key_generation
Browse files Browse the repository at this point in the history
Bip44 key generation
  • Loading branch information
tohsnoom authored Jun 27, 2019
2 parents 9bbd2e7 + f7ecd6d commit 24a870e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/jsonapi_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const moderatorValidJSON = `{

const walletMneumonicJSONResponse = `{"mnemonic": "pulp open fabric travel possible slogan sense piano fog knock weird merge"}`

const walletAddressJSONResponse = `{"address": "PCNz5VN3ddp4EdfdiZBZhhxFRazuGwT3Wg"}`
const walletAddressJSONResponse = `{"address": "PUne5vo5PuMujpV6usfbJ7QSeKKUJaZ3g2"}`

//const walletBalanceJSONResponse = `{"confirmed": 0, "unconfirmed": 0, "height": 0}`

Expand Down
2 changes: 1 addition & 1 deletion api/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (notifier *smtpNotifier) notify(n repo.Notifier) error {
"To: %s",
"MIME-Version: 1.0",
"Content-Type: text/html; charset=UTF-8",
"Subject: [OpenBazaar] %s\r\n",
"Subject: [Phore Marketplace] %s\r\n",
"%s\r\n",
}, "\r\n")
head, body, ok := n.GetSMTPTitleAndBody()
Expand Down
4 changes: 2 additions & 2 deletions bitcoin/phored/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type RPCWallet struct {
// NewRPCWallet creates a new wallet given
func NewRPCWallet(mnemonic string, params *chaincfg.Params, repoPath string, DB wallet.Datastore, host string) (*RPCWallet, error) {
if mnemonic == "" {
ent, _ := b39.NewEntropy(128)
ent, _ := b39.NewEntropy(256)
mnemonic, _ = b39.NewMnemonic(ent)
}

Expand All @@ -88,7 +88,7 @@ func NewRPCWallet(mnemonic string, params *chaincfg.Params, repoPath string, DB
return nil, err
}

keyManager, err := spvwallet.NewKeyManager(DB.Keys(), params, mPrivKey)
keyManager, err := spvwallet.NewKeyManager(DB.Keys(), params, mPrivKey, wallet.Phore)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

var (
VERSION = "1.3.4"
VERSION = "2.0.0"
USERAGENT = "/Phore-Marketplace-go:" + VERSION + "/"
)

Expand Down
2 changes: 1 addition & 1 deletion repo/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func addConfigExtensions(repoRoot string) error {
}

func createMnemonic(newEntropy func(int) ([]byte, error), newMnemonic func([]byte) (string, error)) (string, error) {
entropy, err := newEntropy(128)
entropy, err := newEntropy(256)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion schema/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func CreateIdentityKey(mnemonic string) ([]byte, error) {

// NewMnemonic will return a randomly-generated BIP-39 compliant mnemonic
func NewMnemonic() (string, error) {
entropy, err := bip39.NewEntropy(128)
entropy, err := bip39.NewEntropy(256)
if err != nil {
return "", fmt.Errorf("creating entropy: %s", err.Error())
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/github.com/phoreproject/spvwallet/keys.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/phoreproject/spvwallet/wallet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/phoreproject/wallet-interface/datastore.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 24a870e

Please sign in to comment.