Skip to content

Commit

Permalink
add index to address model
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Jun 30, 2020
1 parent 083e079 commit b1c8b31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bip44/hd.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func bip44(coin *Altcoin, start, qty int, pkb []byte) (*Account, error) {
Address: address.String(),
Pubkey: "0x" + hex.EncodeToString(pubk.SerializeCompressed()),
Privkey: "0x" + hex.EncodeToString(privk.Serialize()),
Index: i,
})

continue
Expand Down Expand Up @@ -125,6 +126,7 @@ func bip44(coin *Altcoin, start, qty int, pkb []byte) (*Account, error) {
Address: address.String(),
Pubkey: hex.EncodeToString(pubk.SerializeCompressed()),
Privkey: wif.String(),
Index: i,
})
}
return account, nil
Expand Down
1 change: 1 addition & 0 deletions bip44/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type Address struct {
Address string
Pubkey string
Privkey string
Index int
}

type Account struct {
Expand Down

0 comments on commit b1c8b31

Please sign in to comment.