Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • KeyPair

Index

Constructors

constructor

  • new KeyPair(libp2pPeerId: PeerId): KeyPair

Properties

Libp2pPeerId

Libp2pPeerId: PeerId

Key pair in libp2p format. Used for backward compatibility with the current FluencePeer implementation

Methods

signBytes

  • signBytes(data: Uint8Array): Promise<Uint8Array>

toB58String

  • toB58String(): string

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>
  • Generates new KeyPair from ed25519 private key represented as a 32 byte array

    Parameters

    • arr: Uint8Array

    Returns Promise<KeyPair>

    • Promise with the created KeyPair

Static randomEd25519

  • randomEd25519(): Promise<KeyPair>

Generated using TypeDoc