Setup
The following guides describe interactive operations that can occur within the Elastos decentralized world, in addition to several ways to customize the Connectivity SDK according to your needs.

Connectivity SDK Setup

Setup the SDK

Start by installing the SDK for your platform.
Because the Connectivity SDK requires at least one connector to work with, we'll use the Elastos Essentials connector for this guide. For more information about this connector, refer to the [TODO: Elastos Essentials documentation].
Javascript
1
# Connectivity SDK
2
npm install @elastosfoundation/elastos-connectivity-sdk-js
3
4
# Use at least one connector
5
npm install @elastosfoundation/essentials-connector-client-browser
6
7
# Use the DID SDK as it's needed for most interactive operations
8
npm install @elastosfoundation/did-js-sdk
Copied!

Register at Least One Connector

Let's register the Elastos Essentials Connector as an initial example. You can choose to use one or more connectors in your application.
Typescript
1
import { connectivity } from "@elastosfoundation/elastos-connectivity-sdk-js";
2
3
let essentialsConnector = new EssentialsConnector();
4
5
// Let the connectivity SDK know that we are willing to use this connector.
6
connectivity.registerConnector(essentialsConnector);
Copied!
Note on using multiple connectors
In case multiple connectors are registered, interactive operations first prompt users to choose their preferred connector to execute the operation.