Versions in this module Expand all Collapse all v0 v0.10.0 May 7, 2021 Changes in this version + var ErrKeyAndIDMismatch = fmt.Errorf("public key does not match identifier") + func IDFromPrivKey(pk crypto.PrivKey) (string, error) + func IDFromPubKey(pubKey crypto.PubKey) (string, error) + type Book interface + AddPrivKey func(ID, ic.PrivKey) error + AddPubKey func(ID, ic.PubKey) error + IDsWithKeys func() []ID + PrivKey func(ID) ic.PrivKey + PubKey func(ID) ic.PubKey + type CryptoGenerator interface + GenerateEmptyIpfsRepo func(repoPath, cfgPath string) error + GenerateNickname func(peerID string) string + GeneratePrivateKeyAndPeerID func() (string, string) + type CryptoSource struct + func NewCryptoSource() *CryptoSource + func (g *CryptoSource) GenerateEmptyIpfsRepo(repoPath, configPath string) error + func (g *CryptoSource) GenerateNickname(peerID string) string + func (g *CryptoSource) GeneratePrivateKeyAndPeerID() (privKey, peerID string) + type ID = peer.ID + func DecodeID(s string) (ID, error) + type Store interface + func NewLocalStore(filename string) (Store, error) + func NewMemStore() (Store, error) + func NewStore(cfg *config.Config) (Store, error)