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
Name | Type |
---|---|
config | IdentityManagerConfig |
network | NetworkConfig |
ipfsConfig | Options |
Defined in
Properties
config
• config: IdentityManagerConfig
Defined in
identity
• identity: Identity
Defined in
ipfsConfig
• ipfsConfig: Options
Defined in
keystore
• keystore: Keystore
Defined in
network
• network: NetworkConfig
Defined in
provider
• provider: Provider
| Web3Provider
Defined in
type
• type: string
Defined in
wallet
• wallet: Wallet
Defined in
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
Name | Type |
---|---|
location | string |
Returns
Promise
<boolean
>
Defined in
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
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
Name | Type |
---|---|
location | string |
Returns
Promise
<string
>