Websockets. Normally, websockets is recommended than HTTP, because it's faster and can use Pub/Sub methods. If you want to use the PubSub API, websocket provider is the only choice. Conflux-rust's HTTP default port is
12537, websocket default port is
12535. They can be changed through config file.
urloption. If you want to use HTTP provider, then provide an HTTP URL:
window.confluxJSanymore, Dapp developers need to install
js-conflux-sdkby themselves and set
Confluxinstance's provider to Fluent provider.
networkIdof the selected network of Fluent, you can get it asynchronously like below.