import { type ConnectionConfig } from "https://deno.land/x/smoldot@light-js-deno-v0.7.9/instance/bindings-smoldot-light.d.ts";
Configuration for a connection.
Properties
Multiaddress in string format that describes which node to try to connect to.
Note that this address shouldn't be trusted. The value in this field might have been chosen by a potentially malicious peer.
Callback called when the connection transitions from the Opening
to the Open
state.
Must only be called once per connection.
Callback called when the connection transitions to the Reset
state.
It it not called if Connection.reset
is manually called by the API user.
Callback called when a new substream has been opened.
This function must only be called for connections of type "multi-stream".
Callback called when a stream transitions to the Reset
state.
It it not called if Connection.resetStream
is manually called by the API user.
This function must only be called for connections of type "multi-stream".