This module contains a Switch Building helper.
Example:
let switch = SwitchBuilder.new().withRng(rng).withAddresses(multiaddress) # etc .build()
Imports
-
switch, peerid, peerinfo, stream/connection, multiaddress, crypto/crypto, transports/transport, transports/tcptransport, muxers/muxer, muxers/mplex/mplex, muxers/yamux/yamux, protocols/identify, protocols/secure/secure, protocols/secure/noise, protocols/rendezvous, protocols/connectivity/autonat/server, protocols/connectivity/relay/relay, protocols/connectivity/relay/client, protocols/connectivity/relay/rtransport, connmanager, upgrademngrs/muxedupgrade, observedaddrmanager, nameresolving/nameresolver, errors, utility, services/wildcardresolverservice
Types
SecureProtocol {.pure.} = enum Noise
- Source Edit
SwitchBuilder = ref object privKey: Option[PrivateKey] addresses: seq[MultiAddress] secureManagers: seq[SecureProtocol] muxers: seq[MuxerProvider] transports: seq[TransportProvider] rng: ref HmacDrbgContext maxConnections: int maxIn: int sendSignedPeerRecord: bool maxOut: int maxConnsPerPeer: int protoVersion: string agentVersion: string nameResolver: NameResolver peerStoreCapacity: Opt[int] autonat: bool circuitRelay: Relay rdv: RendezVous services: seq[Service] observedAddrManager: ObservedAddrManager enableWildcardResolver: bool
- Source Edit
TransportProvider {.public.} = proc (upgr: Upgrade): Transport {....gcsafe, raises: [].}
- Source Edit
Procs
proc new(T: type[SwitchBuilder]): T:type {.public, ...raises: [].}
- Creates a SwitchBuilder Source Edit
proc newStandardSwitch(privKey = none(PrivateKey); addrs: MultiAddress | seq[MultiAddress] = init(MultiAddress, "/ip4/127.0.0.1/tcp/0").expect( "valid address"); secureManagers: openArray[SecureProtocol] = [ SecureProtocol.Noise]; transportFlags: set[ServerFlags] = {}; rng = newRng(); inTimeout: Duration = 5.minutes; outTimeout: Duration = 5.minutes; maxConnections = MaxConnections; maxIn = -1; maxOut = -1; maxConnsPerPeer = MaxConnectionsPerPeer; nameResolver: NameResolver = nil; sendSignedPeerRecord = false; peerStoreCapacity = 1000): Switch {. ...raises: [LPError], public, ...raises: [].}
- Helper for common switch configurations. Source Edit
proc withAddress(b: SwitchBuilder; address: MultiAddress; enableWildcardResolver: bool = true): SwitchBuilder {.public, ...raises: [], tags: [].}
-
Set the listening address of the switch
Source Edit
Calling it multiple time will override the value proc withAddresses(b: SwitchBuilder; addresses: seq[MultiAddress]; enableWildcardResolver: bool = true): SwitchBuilder {.public, ...raises: [], tags: [].}
-
Set the listening addresses of the switch
Source Edit
Calling it multiple time will override the value proc withAgentVersion(b: SwitchBuilder; agentVersion: string): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withAutonat(b: SwitchBuilder): SwitchBuilder {....raises: [], tags: [].}
- Source Edit
proc withCircuitRelay(b: SwitchBuilder; r: Relay = Relay.new()): SwitchBuilder {. ...raises: [], tags: [].}
- Source Edit
proc withMaxConnections(b: SwitchBuilder; maxConnections: int): SwitchBuilder {. public, ...raises: [], tags: [].}
- Maximum concurrent connections of the switch. You should either use this, or withMaxIn & withMaxOut Source Edit
proc withMaxConnsPerPeer(b: SwitchBuilder; maxConnsPerPeer: int): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withMaxIn(b: SwitchBuilder; maxIn: int): SwitchBuilder {.public, ...raises: [], tags: [].}
- Maximum concurrent incoming connections. Should be used with withMaxOut Source Edit
proc withMaxOut(b: SwitchBuilder; maxOut: int): SwitchBuilder {.public, ...raises: [], tags: [].}
- Maximum concurrent outgoing connections. Should be used with withMaxIn Source Edit
proc withNameResolver(b: SwitchBuilder; nameResolver: NameResolver): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withNoise(b: SwitchBuilder): SwitchBuilder {.public, ...raises: [], tags: [].}
- Source Edit
proc withObservedAddrManager(b: SwitchBuilder; observedAddrManager: ObservedAddrManager): SwitchBuilder {. ...raises: [], tags: [].}
- Source Edit
proc withPeerStore(b: SwitchBuilder; capacity: int): SwitchBuilder {.public, ...raises: [], tags: [].}
- Source Edit
proc withPrivateKey(b: SwitchBuilder; privateKey: PrivateKey): SwitchBuilder {. public, ...raises: [], tags: [].}
- Set the private key of the switch. Will be used to generate a PeerId Source Edit
proc withProtoVersion(b: SwitchBuilder; protoVersion: string): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withRendezVous(b: SwitchBuilder; rdv: RendezVous = RendezVous.new()): SwitchBuilder {. ...raises: [], tags: [].}
- Source Edit
proc withRng(b: SwitchBuilder; rng: ref HmacDrbgContext): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withServices(b: SwitchBuilder; services: seq[Service]): SwitchBuilder {. ...raises: [], tags: [].}
- Source Edit
proc withSignedPeerRecord(b: SwitchBuilder; sendIt = true): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withTcpTransport(b: SwitchBuilder; flags: set[ServerFlags] = {}): SwitchBuilder {. public, ...raises: [], tags: [].}
- Source Edit
proc withTransport(b: SwitchBuilder; prov: TransportProvider): SwitchBuilder {. public, ...raises: [], tags: [].}
-
Use a custom transport
Example:
let switch = SwitchBuilder .new() .withTransport( proc(upgr: Upgrade): Transport = TcpTransport.new(flags, upgr) ) .build()
Source Edit
Exports
-
DNS_OR_IP, AlreadyExpectingConnectionError, removePeerEventHandler, shortLog, init, random, new, UDP_DNS, $, <=, MaxConnectionsPerPeer, ephemeral, close, Dial, decode, MaPatternOp, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, DialFailedError, ProtoHeader, ProtoFlags, handler=, getLen, handler, ECDHEScheme, shortLog, init, closed, addConnEventHandler, readVarint, toString, [], init, new, shuffle, random, new, VBuffer, Secret, peekVarint, payload, handshake, MaxConnections, $, validate, mapOr, dial, init, verify, MaError, secure, UpgradeFailedError, IdentityInvalidMsgError, maxInlineKeyLength, addHandler, TranscoderDNS, QUIC, DNSANY, withValue, getRequiredField, dial, supported, removeConnEventHandler, removePeerEventHandler, getWrapped, write, public, MAKind, safeConvert, getField, checkFieldNumber, valueOr, init, codec, getRepeatedField, matchPartial, addObservation, stop, push, getBytes, trackConnection, ==, init, readLp, ephemeral, TimeoutHandler, initVBuffer, start, atEof, PeerEventKind, getOutgoingSlot, peekSeq, SeqPeerBook, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, init, $, IP, protoAddress, QUIC_V1_IP, newRng, peekArray, ==, withValue, mount, SecureConn, checkValid, getPublicKey, CircuitRelay, decode, len, libp2p_failed_upgrades_incoming, extractPublicKey, mapAnd, maErr, UDP_IP, ConnManager, newLPStreamEOFError, selectMuxer, init, connCount, WebSockets, getBytes, DNSADDR, handler, ProtoBook, AddressMapper, IdentifyPushHandler, libp2p_pki_schemes, write, new, WSS, LPStream, QUIC_V1, getField, TCP_IP, selectMuxer, guessDialableAddr, writePacked, finish, handle, mac, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, dial, init, protoName, protoArgument, PeerEventHandler, LPProtoHandler, Secure, ==, toRawBytes, IdentifyPush, getStream, $, initProtoBuffer, init, maxIncomingStreams, ProtoBuffer, WSS_DNS, list, match, <, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, init, upgrade, UDP, ProtoVersionBook, Dialer, disconnect, TranscoderOnion, dial, StreamTracker, IdentifyNoPubKeyError, write, init, LPStreamResetError, isEmpty, writeArray, IdentityNoMatchError, new, release, LPStreamIncompleteError, connectedPeers, PeerId, LPStreamEOFError, write, maxIncomingStreams=, IP6, shortLog, new, initVBuffer, PKScheme, init, new, random, triggerConnEvent, triggerPeerEvents, init, connect, newSwitch, init, readOnce, TCP, PrivateKey, dropPeer, addPeerEventHandler, getBytes, start, write, init, &=, PeerInfoError, newLPStreamClosedError, random, write, compilesOr, close, trackMuxer, TranscoderIP4, init, $, initProtoBuffer, toException, DNS, init, Upgrade, UTP, goffset, HandlerHolder, PeerStore, >, SecureConnTrackerName, KeyPair, init, high, SPRBook, AgentBook, key, dial, cmp, SupportedWireTypes, formatItIMPL, formatItIMPL, initStream, formatItIMPL, Signature, contains, codec=, hash, exclIfIt, formatItIMPL, getStream, DigestSheme, IPFS, getField, shortLog, readOnce, init, init, exceptionToAssert, isEmpty, ConnEventKind, MultiAddress, ProtoScalar, shortLog, data, getWrapped, connect, contains, hex, expandItIMPL, protocols, bytes, DefaultMaxIncomingStreams, QUIC_DNS, HTTPS, UNIX, encode, TooManyConnectionsError, ConnectionSlot, getPtr, addTransport, IdentifyCodec, TLS_WS, sign, addHandler, storeMuxer, addConnEventHandler, formatItIMPL, PeerEvent, MaResult, ProtoField, connect, PeerBookChangeHandler, write, getStream, writeSeq, ConnEvent, &, DNS6, [], IpTransportProtocol, toOpenArray, init, [], IP4, TranscoderPort, isEnough, readMessage, addPeerEventHandler, init, >=, expectConnection, init, payloadDomain, update, $, start, withValue, handle, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, MultiStreamError, closeImpl, toBytes, protoArgument, secure, newLPStreamLimitError, write, Identify, keyOpenArray, match, parseFullAddress, $, dial, isEmpty, writeLp, decode, connectedPeers, new, getRequiredRepeatedField, connect, init, newLPStreamIncompleteError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, contains, init, getField, shortLog, DNS4, WS_IP, readArray, selectBest, P2PPattern, Connection, Envelope, connect, hasPublicKey, AddressBook, toException, isEnough, init, getConnections, Reliable, HTTP, addrs, hex, removeConnEventHandler, slotsAvailable, closeImpl, write, WS, AgentVersion, stretchKeys, init, MultistreamSelect, encode, LPProtocol, Matcher, readVarint, getField, getField, match, TcpOnion3, writeLPVarint, iv, DefaultConnectionTimeout, readLine, Eof, CryptoError, getField, hash, append, vsizeof, IdentifyPushCodec, WSS_IP, LPStreamConnDownError, PeerRecord, init, SupportedSchemes, getRepeatedField, getField, select, Unreliable, SupportedSchemesInt, random, checkFutures, init, handler=, LPError, identify, PeerBook, macOpenArray, init, validate, init, addTransport, ProtoVersion, protoCode, mapEq, getField, init, Onion3, stop, write, hash, select, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, new, write, EnvelopeError, IdentifyInfo, IdentifyError, addHandler, MaPattern, dial, encode, len, newLPStreamRemoteClosedError, TranscoderIP6Zone, MaPatResult, isConnected, Direction, QUIC_V1_DNS, InvalidVarintError, Switch, WebSockets_DNS, shortLog, items, ==, init, write, getBytes, write, dial, init, toBytes, finish, getMostObservedProtosAndPorts, run, QUIC_IP, init, ConcurrentUpgrades, tryDial, PublicKey, ConnEventHandler, WebSockets_IP, decodeMsg, writeLp, addTransport, getRawBytes, writePBVarint, ProtoFieldKind, readExactly, getRepeatedField, ProtoError, newLPStreamConnDownError, new, new, write, initStream, KeyBook, ivOpenArray, connect, closeWithEOF, LPStreamTrackerName, orError, new, ObservedAddrManager, getField, LPStreamRemoteClosedError, libp2p_failed_upgrades_outgoing, init, stop, MaInvalidAddress, select, LPStreamClosedError, RsaDefaultKeySize, getIncomingSlot, Service, write, toBytes, getOrder, TranscoderUnix, LastSeenBook, setup, SignedPeerRecord, tryDial, stop, join, writeVarint, formatItIMPL, exclIfIt, hash, shortLog, random, $, write, PeerId, ==, getField, <=, capLen, init, validate, init, match, <, getBytes, maxInlineKeyLength, write, withValue, safeConvert, shortLog, >=, withValue, public, shortLog, compilesOr, toBytes, match, valueOr, init, init, init, toOpt, init, withValue, hasPublicKey, >, hex, len, exceptionToAssert, cmp, extractPublicKey, shortLog, UDP_DNS, ephemeral, MaPatternOp, <=, shortLog, init, $, validate, init, TLS_WS, TranscoderDNS, ephemeral, getField, MAKind, getField, checkFieldNumber, getRepeatedField, getBytes, WebSockets, &, finish, peekSeq, fullAddrs, getProtoHeader, init, QUIC_V1_IP, withValue, getPublicKey, exceptionToAssert, new, DNSANY, DNSADDR, AddressMapper, WSS, init, toBytes, TCP_DNS, shortLog, encode, len, supported, init, ==, $, init, WSS_DNS, <, $, PeerInfo, TranscoderOnion, write, key, writeArray, PeerId, IP6, shortLog, payload, TCP, PrivateKey, getBytes, init, &=, init, $, getRawBytes, KeyPair, update, SupportedWireTypes, hash, init, DNS4, isEmpty, ProtoScalar, data, hash, HTTPS, QUIC_DNS, TranscoderIP6, encode, MaResult, DNS6, [], IpTransportProtocol, toOpenArray, TranscoderPort, isEnough, write, >=, init, payloadDomain, $, init, TranscoderOnion3, protoArgument, write, MaPattern, keyOpenArray, match, WebSockets_DNS, isEmpty, getRequiredRepeatedField, initProtoBuffer, init, init, getField, selectBest, getPtr, Envelope, init, Reliable, addrs, ProtoBuffer, match, getField, CryptoError, append, vsizeof, init, parseFullAddress, getRepeatedField, checkFutures, shuffle, validate, protoCode, getField, TranscoderP2P, sign, getBytes, encode, len, TranscoderIP6Zone, shortLog, items, getBytes, init, QUIC_IP, ProtoFieldKind, protoArgument, getField, readVarint, orError, MaInvalidAddress, writeVarint, getOrder, TranscoderUnix, SignedPeerRecord, DNS_OR_IP, init, decode, random, getProtoHeader, MaError, decode, matchPartial, WS_DNS, initVBuffer, ProtoFlags, ==, getLen, ECDHEScheme, init, [], random, Secret, peekVarint, random, mapOr, bytes, maxInlineKeyLength, QUIC, finish, withValue, getRequiredField, mac, WS_IP, public, write, valueOr, init, HTTP, initVBuffer, TcpOnion3, write, toOpt, payloadType, ProtoHeader, $, IP, protoAddress, newRng, checkValid, len, CircuitRelay, extractPublicKey, mapAnd, maErr, UDP_IP, init, ==, write, QUIC_V1, TCP_IP, writePacked, readSeq, capLen, protoName, toRawBytes, initProtoBuffer, toException, init, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, UDP, isEmpty, decode, initVBuffer, PKScheme, random, write, init, write, PeerInfoError, compilesOr, TranscoderIP4, initProtoBuffer, toException, DNS, init, init, goffset, >, init, high, toString, init, cmp, init, formatItIMPL, formatItIMPL, Signature, exclIfIt, toBytes, DigestSheme, IPFS, MultiAddress, hex, protocols, UNIX, LPError, init, init, ProtoField, toBytes, writeSeq, init, ==, [], IP4, safeConvert, getField, init, withValue, SignedPayload, toBytes, init, MAProtocol, getPackedRepeatedField, contains, libp2p_pki_schemes, readArray, P2PPattern, hasPublicKey, isEnough, hex, write, WS, stretchKeys, encode, init, init, getField, iv, getField, WSS_IP, peekArray, PeerRecord, SupportedSchemes, Unreliable, SupportedSchemesInt, random, macOpenArray, mapEq, Onion3, concat, AddressInfo, init, write, EnvelopeError, MaPatResult, QUIC_V1_DNS, write, write, UTP, verify, init, PublicKey, WebSockets_IP, VBuffer, writePBVarint, getRepeatedField, ProtoError, ivOpenArray, RsaDefaultKeySize, getField, write, DNS_OR_IP, shortLog, init, decode, random, UDP_DNS, $, <=, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, decode, MaxSizeError, ProtoHeader, ProtoFlags, getLen, ECDHEScheme, shortLog, init, closed, [], macOpenArray, random, init, VBuffer, Secret, peekVarint, random, $, validate, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, [], init, ephemeral, withValue, getRequiredField, getField, supported, WS_IP, safeConvert, public, MAKind, write, write, init, getField, checkFieldNumber, valueOr, init, getRepeatedField, matchPartial, libp2p_pki_schemes, getBytes, len, init, readLp, HTTP, initVBuffer, atEof, LPStreamTrackerName, peekSeq, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, init, IP, protoAddress, QUIC_V1_IP, newRng, DefaultConnectionTimeout, ==, withValue, checkValid, mac, getPublicKey, exceptionToAssert, WebSockets, CircuitRelay, extractPublicKey, mapAnd, new, maErr, UDP_IP, new, newLPStreamEOFError, init, DNSADDR, AddressMapper, init, write, PeerId, WSS, LPStream, QUIC_V1, TCP_IP, writePacked, init, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, capLen, protoName, ==, toRawBytes, mapOr, MaPattern, $, initProtoBuffer, init, ProtoBuffer, WSS_DNS, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, UDP, TranscoderOnion, StreamTracker, write, init, LPStreamResetError, isEmpty, writeArray, decode, LPStreamIncompleteError, [], LPStreamEOFError, IP6, shortLog, initVBuffer, PKScheme, finish, toString, payload, init, Connection, write, init, TCP, PrivateKey, getBytes, write, init, &=, PeerInfoError, newLPStreamClosedError, random, write, compilesOr, close, TranscoderIP4, init, initProtoBuffer, toException, DNS, finish, stretchKeys, UTP, goffset, readVarint, >, KeyPair, QUIC_V1_DNS, high, init, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, contains, exclIfIt, hash, formatItIMPL, toBytes, DigestSheme, IPFS, getField, readOnce, isEmpty, ProtoScalar, shortLog, data, hex, protocols, init, HTTPS, len, LPError, getPtr, write, TLS_WS, sign, encode, update, MaResult, init, ProtoField, init, toBytes, writeSeq, init, &, DNS6, IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, getBytes, getField, >=, payloadDomain, $, withValue, getRawBytes, LPStreamLimitError, TranscoderOnion3, SignedPayload, toBytes, protoArgument, newLPStreamLimitError, write, keyOpenArray, init, match, WebSockets_DNS, $, isEmpty, writeLp, getRequiredRepeatedField, newLPStreamIncompleteError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, init, getField, shortLog, DNS4, MultiAddress, getWrapped, readArray, selectBest, write, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, DNSANY, Reliable, addrs, hex, closeImpl, WS, encode, TimeoutHandler, getField, match, <, iv, readLine, Eof, CryptoError, getField, verify, append, vsizeof, parseFullAddress, WSS_IP, LPStreamConnDownError, peekArray, UNIX, PeerRecord, init, SupportedSchemes, getRepeatedField, getField, hash, Unreliable, SupportedSchemesInt, random, checkFutures, shuffle, init, validate, $, protoCode, mapEq, Onion3, write, TcpOnion3, hash, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, write, EnvelopeError, encode, len, newLPStreamRemoteClosedError, TranscoderIP6Zone, MaPatResult, Direction, init, InvalidVarintError, shortLog, items, ==, init, write, getBytes, write, readVarint, QUIC_DNS, key, QUIC_IP, init, PublicKey, WebSockets_IP, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, init, initStream, getField, ivOpenArray, closeWithEOF, orError, getField, LPStreamRemoteClosedError, MaInvalidAddress, LPStreamClosedError, RsaDefaultKeySize, write, getOrder, TranscoderUnix, SignedPeerRecord, join, writeVarint, DNS_OR_IP, exclIfIt, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, QUIC_DNS, LPError, isEnough, TranscoderIP6, encode, [], MaResult, init, ProtoField, peekVarint, getRequiredRepeatedField, mapOr, writeSeq, WebSockets_IP, &, DNS6, TLS_WS, [], IpTransportProtocol, QUIC, toOpenArray, IP4, TranscoderPort, withValue, safeConvert, getRequiredField, $, WS_IP, withValue, public, MAKind, getField, checkFieldNumber, TranscoderOnion3, getRepeatedField, matchPartial, protoArgument, match, data, WebSockets, $, isEmpty, HTTP, initVBuffer, finish, VBuffer, init, TcpOnion3, initProtoBuffer, MAProtocol, peekSeq, getPackedRepeatedField, toOpt, getProtoHeader, ProtoHeader, IP, getField, protoAddress, DNS4, QUIC_V1_IP, readArray, getPtr, withValue, P2PPattern, CircuitRelay, contains, isEnough, Reliable, len, WS, exceptionToAssert, mapAnd, maErr, UDP_IP, DNSANY, DNSADDR, append, write, WSS_IP, peekArray, WSS, readSeq, QUIC_V1, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, checkFutures, TCP_DNS, capLen, init, protoName, protoArgument, validate, mapEq, Onion3, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, concat, TranscoderP2P, toException, ProtoBuffer, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, len, UDP, MaPatResult, TranscoderOnion, QUIC_V1_DNS, write, init, shortLog, items, isEmpty, writeArray, write, WebSockets_DNS, init, UTP, [], IP6, shortLog, ProtoFlags, QUIC_IP, finish, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, toException, DNS, write, TranscoderUnix, high, toString, writeVarint, SupportedWireTypes, Signature, exclIfIt, shortLog, toBytes, DigestSheme, ephemeral, init, toRawBytes, sign, SupportedSchemesInt, ECDHEScheme, macOpenArray, Secret, $, write, init, selectBest, init, ephemeral, withValue, safeConvert, init, init, withValue, public, init, getField, valueOr, init, toBytes, random, init, getBytes, getBytes, toOpt, init, newRng, withValue, getPublicKey, init, random, init, exceptionToAssert, init, init, init, getField, iv, CryptoError, ==, verify, init, key, SupportedSchemes, RsaDefaultKeySize, toBytes, capLen, shuffle, supported, write, ==, libp2p_pki_schemes, random, getRawBytes, random, keyOpenArray, CryptoResult, stretchKeys, init, write, init, shortLog, init, PublicKey, mac, shortLog, PKScheme, init, PrivateKey, getBytes, ivOpenArray, write, compilesOr, orError, $, write, goffset, getOrder, KeyPair, toException, toException, checkFutures, LPError