Skip to content

Commit

Permalink
add Mnemonic/Password
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin committed May 18, 2020
1 parent 955ee3e commit 423d03d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ import (
const IdentityTag = "Identity"
const PrivKeyTag = "PrivKey"
const MnemonicTag = "Mnemonic"
const Password = "Password"
const PrivKeySelector = IdentityTag + "." + PrivKeyTag
const MnemonicSelector = IdentityTag + "." + MnemonicTag
const PasswordSelector = IdentityTag + "." + Password

// Identity tracks the configuration of the local node's identity.
type Identity struct {
PeerID string
PrivKey string `json:",omitempty"`
Mnemonic string `json:",omitempty"`
Password string `json:",omitempty"`
}

// DecodePrivateKey is a helper to decode the users PrivateKey
Expand Down

0 comments on commit 423d03d

Please sign in to comment.