Skip to main content

Class: SteerProtocolSDK

Steer Protocol SDK and Node Operator

Constructors

constructor

new SteerProtocolSDK(ipfsConfig, identityConfig, networkConfig, registryConfig, userInterfaceConfig?)

Creates an instance of the Steer Protocol SDK

Parameters

NameTypeDescription
ipfsConfigOptionsOptions Config for IPFS client
identityConfigIdentityManagerConfigIdentity manager that provides the current identity of the user of the protocol
networkConfigNetworkConfigNetwork config for ethers
registryConfigRegistryConfigNetwork config for Steer Protocol, the global registry address is provided through this config.
userInterfaceConfigUserInterfaceConfigNetwork config for Steer Protocol, the global registry address is provided through this config.

Defined in

src/classes/sdk.ts:41

Properties

connectionManager

connectionManager: ConnectionManager

Defined in

src/classes/sdk.ts:26


connectionStatistics

connectionStatistics: ConnectionStatistics

Defined in

src/classes/sdk.ts:24


events

events: SteerEventEmitter

Defined in

src/classes/sdk.ts:23


identityManager

identityManager: IdentityManager

Defined in

src/classes/sdk.ts:19


ipfs

ipfs: IPFS

Defined in

src/classes/sdk.ts:17


ipfsConfig

ipfsConfig: Options

Defined in

src/classes/sdk.ts:18


logger

logger: Logger

Defined in

src/classes/sdk.ts:29


networkConfig

networkConfig: NetworkConfig

Defined in

src/classes/sdk.ts:25


orbit

orbit: Orbit

Defined in

src/classes/sdk.ts:21


registry

registry: Registry

Defined in

src/classes/sdk.ts:22


registryConfig

registryConfig: RegistryConfig

Defined in

src/classes/sdk.ts:27


userInterface

Optional userInterface: UserInterface

Defined in

src/classes/sdk.ts:28


userInterfaceConfig

userInterfaceConfig: UserInterfaceConfig

Defined in

src/classes/sdk.ts:30


wallet

wallet: Wallet

Defined in

src/classes/sdk.ts:20

Methods

handleForcedExit

Private handleForcedExit(): void

Provides a process.on hook for SIGINT which will ask the IPFS and Orbit instance to close their connections

Returns

void

Defined in

src/classes/sdk.ts:158


initialize

initialize(): Promise<void>

Initialize performs all async required setup steps. This includes required library instances as well as the initial connection to the registry address. The node IPFS, orbit, identity, and peer connections are performed within this call. Once a proper connection to the network is established, initialize will resolve it's promise.

Returns

Promise<void>

Defined in

src/classes/sdk.ts:77


start

start(): Promise<void>

Start sequence for the node

Returns

Promise<void>

Defined in

src/classes/sdk.ts:120


stop

stop(exit?): Promise<void>

Shutdown sequence for the node

Parameters

NameTypeDefault value
exitbooleantrue

Returns

Promise<void>

Defined in

src/classes/sdk.ts:127