Documentation ¶
Index ¶
Constants ¶
View Source
const PrivateKeyStoreKey = "key"
View Source
const PublicKeyStoreKey = "pub"
Variables ¶
View Source
var (
ErrKeyPairNotFound = errors.New("No key pair found in the local db.")
)
Functions ¶
Types ¶
type GenerateKeyFromMnemonicOpts ¶ added in v0.0.13
type GenerateKeyFromMnemonicOpts func(o *generateKeyFromMnemonicOpts)
func WithMnemonic ¶ added in v0.0.13
func WithMnemonic(mnemonic string) GenerateKeyFromMnemonicOpts
func WithOverride ¶ added in v0.0.13
func WithOverride() GenerateKeyFromMnemonicOpts
func WithPassword ¶ added in v0.0.13
func WithPassword(password string) GenerateKeyFromMnemonicOpts
type Keychain ¶
type Keychain interface { GenerateKeyPair() (pub []byte, priv []byte, err error) GenerateKeyFromMnemonic(...GenerateKeyFromMnemonicOpts) (mnemonic string, err error) GetStoredKeyPairInLibP2PFormat() (crypto.PrivKey, crypto.PubKey, error) GetStoredPublicKey() (crypto.PubKey, error) GetStoredMnemonic() (string, error) GetManagedThreadKey(threadKeyName string) (thread.Key, error) GenerateKeyPairWithForce() (pub []byte, priv []byte, err error) Sign([]byte) ([]byte, error) ImportExistingKeyPair(priv crypto.PrivKey, mnemonic string) error DeleteKeypair() error }
Click to show internal directories.
Click to hide internal directories.