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
Types
SecureProtocol {.pure.} = enum Noise, Secio {....deprecated.}
- 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
- 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").tryGet(); 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): 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]): 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
-
newLPStreamWriteError, DNS_OR_IP, LPStreamError, AlreadyExpectingConnectionError, removePeerEventHandler, shortLog, random, UDP_DNS, $, <=, MaxConnectionsPerPeer, ephemeral, dial, decode, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, DialFailedError, decodeProposal, ProtoFlags, getLen, maxIncomingStreams, ECDHEScheme, shortLog, dial, init, closed, addConnEventHandler, [], readVarint, new, shuffle, random, init, VBuffer, Secret, peekVarint, random, handshake, MaxConnections, $, validate, mapOr, dial, MaError, secure, UpgradeFailedError, IdentityInvalidMsgError, maxInlineKeyLength, addHandler, TranscoderDNS, QUIC, init, ephemeral, withValue, getRequiredField, getField, DNSANY, dial, writeLp, removeConnEventHandler, getWrapped, isEnough, public, MAKind, write, init, getField, checkFieldNumber, valueOr, init, codec, getRepeatedField, matchPartial, addObservation, stop, libp2p_pki_schemes, push, readOnce, trackConnection, ==, init, readLp, getConnections, HTTP, initVBuffer, start, atEof, PeerEventKind, getOutgoingSlot, peekSeq, SeqPeerBook, toOpt, fullAddrs, payloadType, getProtoHeader, init, $, IP, protoAddress, newRng, peekArray, init, mount, SecureConn, checkValid, mac, getPublicKey, CircuitRelay, ProtoHeader, len, libp2p_failed_upgrades_incoming, extractPublicKey, mapAnd, new, UDP_IP, new, newLPStreamEOFError, selectMuxer, init, connCount, len, getBytes, DNSADDR, ProtoBook, AddressMapper, IdentifyPushHandler, init, write, new, WSS, LPStream, getField, TCP_IP, close, selectMuxer, writePacked, readVarint, handle, init, closeImpl, identify, toBytes, TCP_DNS, shortLog, encode, len, capLen, init, protoName, protoArgument, PeerEventHandler, LPProtoHandler, Secure, ==, toRawBytes, IdentifyPush, getStream, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, init, WSS_DNS, list, match, <, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, init, upgrade, UDP, ProtoVersionBook, Dialer, disconnect, TranscoderOnion, dial, StreamTracker, IdentifyNoPubKeyError, write, init, LPStreamResetError, isEmpty, writeArray, new, LPStreamIncompleteError, connectedPeers, PeerId, LPStreamEOFError, write, maxIncomingStreams=, IP6, shortLog, new, release, initVBuffer, PKScheme, key, new, payload, triggerConnEvent, triggerPeerEvents, init, connect, newSwitch, stretchKeys, write, TCP, PrivateKey, dropPeer, addPeerEventHandler, getBytes, start, newLPStreamIncorrectDefect, init, &=, PeerInfoError, verify, newLPStreamClosedError, random, write, compilesOr, toString, close, trackMuxer, TranscoderIP4, $, initProtoBuffer, toException, DNS, init, Upgrade, UTP, goffset, HandlerHolder, getRawBytes, >, SecureConnTrackerName, KeyPair, finish, init, high, SPRBook, PeerStore, update, Dial, cmp, SupportedWireTypes, AgentBook, formatItIMPL, formatItIMPL, initStream, formatItIMPL, Signature, contains, codec=, hash, formatItIMPL, getStream, DigestSheme, IPFS, getField, shortLog, exceptionToAssert, isEmpty, ConnEventKind, ProtoScalar, shortLog, getWrapped, LPStreamIncorrectDefect, hex, expandItIMPL, protocols, bytes, DefaultMaxIncomingStreams, HTTPS, UNIX, encode, tryAndWarn, TooManyConnectionsError, ConnectionSlot, getPtr, addTransport, readMessage, TLS_WS, sign, init, addHandler, storeMuxer, addConnEventHandler, formatItIMPL, dial, tryDial, PeerEvent, PublicKey, supported, MaResult, init, ProtoField, connect, PeerBookChangeHandler, connect, write, getStream, writeSeq, ConnEvent, init, &, DNS6, [], decode, IpTransportProtocol, toOpenArray, init, [], IP4, TranscoderPort, write, safeConvert, addPeerEventHandler, createExchange, >=, expectConnection, init, payloadDomain, $, start, withValue, handle, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, ProtoBuffer, Matcher, closeImpl, toBytes, protoArgument, secure, newLPStreamLimitError, readOnce, Identify, keyOpenArray, match, createProposal, WebSockets_DNS, $, dial, isEmpty, LPStreamReadError, connectedPeers, new, getRequiredRepeatedField, connect, init, newLPStreamIncompleteError, newLPStreamReadError, IdentifyCodec, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, contains, init, getField, shortLog, DNS4, MultiAddress, WS_IP, readArray, selectBest, data, P2PPattern, Connection, Envelope, connect, hasPublicKey, AddressBook, toException, contains, isEnough, init, Reliable, addrs, hex, removeConnEventHandler, slotsAvailable, closeImpl, write, write, WS, AgentVersion, MultistreamSelect, encode, LPProtocol, init, init, init, getField, match, LPStreamTrackerName, getField, writeLPVarint, iv, DefaultConnectionTimeout, readLine, Eof, CryptoError, getField, append, vsizeof, IdentifyPushCodec, WSS_IP, LPStreamConnDownError, PeerRecord, decodeExchange, SupportedSchemes, getRepeatedField, LPStreamWriteError, getField, select, Unreliable, SupportedSchemesInt, random, checkFutures, LPError, PeerBook, macOpenArray, init, validate, init, addTransport, ProtoVersion, protoCode, mapEq, init, removePeerEventHandler, Onion3, stop, getBytes, guessDialableAddr, select, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, new, init, write, EnvelopeError, readSeq, hash, IdentifyInfo, IdentifyError, addHandler, encode, WebSockets, newLPStreamRemoteClosedError, MaPatResult, isConnected, Direction, init, InvalidVarintError, Switch, parseFullAddress, shortLog, items, ==, init, write, getBytes, write, dial, init, toBytes, hash, TimeoutHandler, getMostObservedProtosAndPorts, run, ConcurrentUpgrades, ObservedAddrManager, ConnEventHandler, WebSockets_IP, decodeMsg, writeLp, addTransport, IdentityNoMatchError, writePBVarint, ProtoFieldKind, readExactly, getRepeatedField, decode, ProtoError, newLPStreamConnDownError, new, ConnManager, init, write, initStream, KeyBook, ivOpenArray, connect, closeWithEOF, TcpOnion3, orError, new, getField, LPStreamRemoteClosedError, setupStreamTracker, libp2p_failed_upgrades_outgoing, MultiStreamError, stop, MaInvalidAddress, select, LPStreamClosedError, RsaDefaultKeySize, getIncomingSlot, Service, write, toBytes, getOrder, TranscoderUnix, setup, SignedPeerRecord, tryDial, finish, stop, join, writeVarint, formatItIMPL, 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, hasPublicKey, >, hex, len, exceptionToAssert, cmp, extractPublicKey, ProtoHeader, shortLog, UDP_DNS, ephemeral, init, MaPatternOp, getProtoHeader, shortLog, init, $, validate, hash, init, TLS_WS, TranscoderDNS, init, ephemeral, getField, MAKind, getField, checkFieldNumber, getRepeatedField, getBytes, len, &, peekSeq, fullAddrs, <=, init, getPublicKey, exceptionToAssert, new, DNSANY, DNSADDR, AddressMapper, WSS, toBytes, TCP_DNS, shortLog, encode, len, supported, ==, TranscoderIP6Zone, $, 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, HTTPS, tryAndWarn, TranscoderIP6, encode, MaResult, DNS6, [], IpTransportProtocol, toOpenArray, TranscoderPort, isEnough, write, >=, init, payloadDomain, $, MaPattern, TranscoderOnion3, protoArgument, write, keyOpenArray, match, WebSockets_DNS, isEmpty, getRequiredRepeatedField, initProtoBuffer, init, init, getField, selectBest, getPtr, Envelope, init, finish, Reliable, addrs, stretchKeys, match, getField, CryptoError, append, vsizeof, parseFullAddress, init, getRepeatedField, checkFutures, shuffle, init, validate, protoCode, getField, TranscoderP2P, sign, getBytes, encode, WebSockets, shortLog, items, getBytes, init, ProtoFieldKind, protoArgument, getField, readVarint, orError, decodeExchange, MaInvalidAddress, writeVarint, getOrder, TranscoderUnix, SignedPeerRecord, DNS_OR_IP, decode, random, getProtoHeader, MaError, finish, matchPartial, WS_DNS, initVBuffer, ProtoFlags, ==, getLen, ECDHEScheme, init, [], random, Secret, peekVarint, random, mapOr, bytes, maxInlineKeyLength, QUIC, withValue, getRequiredField, mac, WS_IP, public, write, init, valueOr, init, HTTP, initVBuffer, TcpOnion3, write, toOpt, payloadType, decodeProposal, $, IP, protoAddress, newRng, checkValid, len, CircuitRelay, extractPublicKey, mapAnd, UDP_IP, init, ==, write, TCP_IP, writePacked, readSeq, capLen, protoName, toRawBytes, initProtoBuffer, toException, init, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, UDP, init, isEmpty, decode, initVBuffer, decode, PKScheme, random, write, init, write, PeerInfoError, compilesOr, TranscoderIP4, initProtoBuffer, toException, DNS, goffset, >, init, high, toString, init, cmp, init, formatItIMPL, formatItIMPL, Signature, toBytes, DigestSheme, IPFS, MultiAddress, hex, protocols, init, UNIX, init, ProtoField, toBytes, writeSeq, ==, init, [], IP4, safeConvert, getField, init, createExchange, withValue, SignedPayload, toBytes, init, MAProtocol, getPackedRepeatedField, contains, libp2p_pki_schemes, readArray, P2PPattern, hasPublicKey, isEnough, hex, write, WS, encode, init, getField, iv, getField, WSS_IP, peekArray, PeerRecord, SupportedSchemes, Unreliable, SupportedSchemesInt, random, LPError, macOpenArray, mapEq, Onion3, concat, AddressInfo, write, EnvelopeError, createProposal, MaPatResult, ProtoBuffer, init, init, write, write, UTP, verify, init, PublicKey, WebSockets_IP, VBuffer, writePBVarint, getRepeatedField, ProtoError, init, ivOpenArray, RsaDefaultKeySize, getField, write, newLPStreamWriteError, DNS_OR_IP, ProtoHeader, shortLog, init, random, UDP_DNS, $, <=, MaError, ephemeral, decode, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, ProtoFlags, getLen, ECDHEScheme, shortLog, init, init, closed, [], macOpenArray, random, init, VBuffer, Secret, peekVarint, random, $, validate, mapOr, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, [], key, ephemeral, withValue, getRequiredField, getField, init, writeLp, WS_IP, isEnough, public, MAKind, getBytes, write, DNSANY, getField, checkFieldNumber, valueOr, init, getRepeatedField, matchPartial, libp2p_pki_schemes, getBytes, len, readVarint, readLp, HTTP, initVBuffer, mac, atEof, TcpOnion3, peekSeq, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, init, IP, protoAddress, newRng, DefaultConnectionTimeout, ==, checkValid, getPublicKey, exceptionToAssert, decodeProposal, len, CircuitRelay, extractPublicKey, mapAnd, new, verify, UDP_IP, new, newLPStreamEOFError, init, write, ==, DNSADDR, AddressMapper, write, PeerId, WSS, LPStream, TCP_IP, close, hash, writePacked, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, init, protoName, toRawBytes, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, init, WSS_DNS, match, writeLPVarint, CryptoResult, WebSockets_DNS, ProtoResult, WebRTCDirect, init, init, UDP, TranscoderOnion, StreamTracker, write, LPStreamResetError, isEmpty, writeArray, LPStreamReadError, decode, LPStreamIncompleteError, [], LPStreamEOFError, IP6, shortLog, initVBuffer, decode, PKScheme, payload, init, init, Connection, write, init, TCP, PrivateKey, getBytes, write, &=, PeerInfoError, newLPStreamClosedError, random, compilesOr, TranscoderIP4, init, initProtoBuffer, toException, DNS, UTP, goffset, readVarint, >, KeyPair, init, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, contains, hash, formatItIMPL, toBytes, DigestSheme, IPFS, getField, readOnce, init, isEmpty, ProtoScalar, shortLog, data, LPStreamIncorrectDefect, hex, protocols, update, HTTPS, tryAndWarn, WebSockets, LPError, getPtr, write, TLS_WS, sign, finish, encode, MaResult, ProtoField, init, toBytes, writeSeq, init, &, DNS6, IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, write, newLPStreamIncorrectDefect, init, createExchange, >=, init, payloadDomain, $, MaPattern, withValue, getRawBytes, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, toBytes, protoArgument, newLPStreamLimitError, keyOpenArray, match, createProposal, parseFullAddress, $, isEmpty, supported, getRequiredRepeatedField, init, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, getField, shortLog, DNS4, getWrapped, readArray, selectBest, safeConvert, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, init, Reliable, addrs, hex, ProtoBuffer, closeImpl, write, WS, stretchKeys, encode, init, init, getField, match, getField, <, iv, readLine, Eof, CryptoError, getField, hash, append, vsizeof, init, parseFullAddress, WSS_IP, LPStreamConnDownError, peekArray, UNIX, PeerRecord, init, SupportedSchemes, getRepeatedField, LPStreamWriteError, getField, Unreliable, SupportedSchemesInt, random, checkFutures, shuffle, validate, $, protoCode, mapEq, Onion3, write, LPStreamTrackerName, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, write, EnvelopeError, encode, newLPStreamRemoteClosedError, MaPatResult, Direction, InvalidVarintError, shortLog, items, ==, init, write, getBytes, write, PublicKey, WebSockets_IP, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, write, initStream, getField, MultiAddress, finish, ivOpenArray, closeWithEOF, TimeoutHandler, orError, decodeExchange, getField, LPStreamRemoteClosedError, setupStreamTracker, MaInvalidAddress, LPStreamClosedError, RsaDefaultKeySize, write, getOrder, TranscoderUnix, SignedPeerRecord, join, writeVarint, DNS_OR_IP, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, 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, readArray, getPtr, isEnough, P2PPattern, CircuitRelay, contains, isEnough, Reliable, ProtoBuffer, len, WS, exceptionToAssert, mapAnd, UDP_IP, DNSANY, DNSADDR, append, write, WSS_IP, peekArray, WSS, readSeq, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, TCP_DNS, capLen, init, protoName, protoArgument, validate, mapEq, Onion3, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, concat, TranscoderP2P, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, len, UDP, MaPatResult, TranscoderOnion, write, init, shortLog, items, isEmpty, writeArray, write, WebSockets_DNS, init, UTP, [], IP6, shortLog, ProtoFlags, finish, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, DNS, write, TranscoderUnix, high, toString, writeVarint, SupportedWireTypes, Signature, shortLog, toBytes, DigestSheme, ephemeral, decodeProposal, init, getRawBytes, sign, SupportedSchemesInt, macOpenArray, Secret, $, write, init, selectBest, init, ECDHEScheme, ephemeral, withValue, safeConvert, init, createExchange, init, withValue, public, init, getField, valueOr, init, toBytes, random, createProposal, init, getBytes, write, toOpt, init, newRng, toRawBytes, 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, getBytes, random, keyOpenArray, CryptoResult, stretchKeys, init, init, shortLog, init, PublicKey, mac, shortLog, PKScheme, init, PrivateKey, getBytes, ivOpenArray, write, compilesOr, orError, decodeExchange, $, write, goffset, getOrder, KeyPair, toException, toException, tryAndWarn, checkFutures, LPError