identity static method

Option identity(
  1. KeyPair keyPair
)

Configures libp2p to use the given identity (private key).

Implementation

static Option identity(KeyPair keyPair) {
  return (config) => config.withIdentity(keyPair);
}