Constructors
constructor
- new KeyPair(libp2pPeerId: PeerId): KeyPair
Properties
Libp2pPeerId
Libp2pPeerId: PeerId
Methods
signBytes
- signBytes(data: Uint8Array): Promise<Uint8Array>
Parameters
Returns Promise<Uint8Array>
toEd25519PrivateKey
- toEd25519PrivateKey(): Uint8Array
verify
- verify(data: Uint8Array, signature: Uint8Array): Promise<boolean>
Parameters
data: Uint8Array
signature: Uint8Array
Returns Promise<boolean>
Static fromEd25519SK
- fromEd25519SK(arr: Uint8Array): Promise<KeyPair>
Parameters
Returns Promise<KeyPair>
- Promise with the created KeyPair
Static randomEd25519
Returns Promise<KeyPair>
- Promise with the created KeyPair
Key pair in libp2p format. Used for backward compatibility with the current FluencePeer implementation