Skip to main content

Class: IdentityManager

Provides identity management for the Steer Protocol

Constructors

constructor

new IdentityManager(config, network, ipfsConfig)

Creates a new identity for the given wallet.

Parameters

NameType
configIdentityManagerConfig
networkNetworkConfig
ipfsConfigOptions

Defined in

src/classes/identity.ts:42

Properties

config

config: IdentityManagerConfig

Defined in

src/classes/identity.ts:28


identity

identity: Identity

Defined in

src/classes/identity.ts:27


ipfsConfig

ipfsConfig: Options

Defined in

src/classes/identity.ts:33


keystore

keystore: Keystore

Defined in

src/classes/identity.ts:29


network

network: NetworkConfig

Defined in

src/classes/identity.ts:32


provider

provider: Provider | Web3Provider

Defined in

src/classes/identity.ts:31


type

type: string

Defined in

src/classes/identity.ts:26


wallet

wallet: Wallet

Defined in

src/classes/identity.ts:30

Methods

fileExists

Private fileExists(location): Promise<boolean>

Utility method to help determines if the identity store exists.

TODO: Should utilize a general FS/Storage class

Parameters

NameType
locationstring

Returns

Promise<boolean>

Defined in

src/classes/identity.ts:175


initialize

initialize(): Promise<void>

Initializes the configured identity provider via the constructor. This is needed because the wallet generation/decryption is asynchrounous and therefore requires a way to wait till the bootstrap/loading process is complete

Returns

Promise<void>

Defined in

src/classes/identity.ts:80


prepIdentityStore

Private prepIdentityStore(location): Promise<string>

Create the identity store location. If the identity store does not exist, it will create the path recursively.

Parameters

NameType
locationstring

Returns

Promise<string>

Defined in

src/classes/identity.ts:161