Documentation ¶
Index ¶
- Variables
- func ConvertPeerIDToPublicKey(keyGen crypto.KeyGenerator, pid core.PeerID) (crypto.PublicKey, error)
- func ConvertPrivateKeyToLibp2pPrivateKey(privateKey crypto.PrivateKey) (libp2pCrypto.PrivKey, error)
- func ConvertPublicKeyToPeerID(pk crypto.PublicKey) (core.PeerID, error)
- func NewIdentityGenerator() *identityGenerator
- func NewP2PSignerWrapper(args ArgsP2pSignerWrapper) (*p2pSignerWrapper, error)
- type ArgsP2pSignerWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilKeyGenerator = errors.New("nil key generator")
ErrNilKeyGenerator signals that a nil key generator was provided
View Source
var ErrNilPrivateKey = errors.New("nil private key")
ErrNilPrivateKey signals that a nil private key was provided
View Source
var ErrNilPublicKey = errors.New("nil public key")
ErrNilPublicKey signals that a nil public key was provided
View Source
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that a nil single signer was provided
Functions ¶
func ConvertPeerIDToPublicKey ¶
func ConvertPeerIDToPublicKey(keyGen crypto.KeyGenerator, pid core.PeerID) (crypto.PublicKey, error)
ConvertPeerIDToPublicKey will convert core peer id to common public key
func ConvertPrivateKeyToLibp2pPrivateKey ¶
func ConvertPrivateKeyToLibp2pPrivateKey(privateKey crypto.PrivateKey) (libp2pCrypto.PrivKey, error)
ConvertPrivateKeyToLibp2pPrivateKey will convert common private key to libp2p private key
func ConvertPublicKeyToPeerID ¶
ConvertPublicKeyToPeerID will convert a public key to core.PeerID
func NewIdentityGenerator ¶
func NewIdentityGenerator() *identityGenerator
NewIdentityGenerator creates a new identity generator
func NewP2PSignerWrapper ¶
func NewP2PSignerWrapper(args ArgsP2pSignerWrapper) (*p2pSignerWrapper, error)
NewP2PSignerWrapper creates a new p2pSigner instance
Types ¶
type ArgsP2pSignerWrapper ¶
type ArgsP2pSignerWrapper struct { PrivateKey crypto.PrivateKey Signer crypto.SingleSigner KeyGen crypto.KeyGenerator }
ArgsP2pSignerWrapper defines the arguments needed to create a p2p signer wrapper
Click to show internal directories.
Click to hide internal directories.