Class: StrategyRegistry
Provides utility functions wrapped around a strategy registry store
Constructors
constructor
• new StrategyRegistry(connection
, ipfs
, identityManager
)
Parameters
Name | Type | Description |
---|---|---|
connection | default <StrategyEntry > | DbStore connection |
ipfs | IPFS | IPFS instance |
identityManager | IdentityManager | IdentityManager instance |
Defined in
src/classes/strategy-registry.ts:23
Properties
connection
• Private
connection: default
<StrategyEntry
>
Defined in
src/classes/strategy-registry.ts:14
identityManager
• Private
identityManager: IdentityManager
Defined in
src/classes/strategy-registry.ts:16
ipfs
• Private
ipfs: IPFS
Defined in
src/classes/strategy-registry.ts:15
Methods
get
▸ get(id
): Promise
<StrategyEntry
>
Get a strategy by its id
throws
Error if the strategy is not found
Parameters
Name | Type | Description |
---|---|---|
id | string | The id of the strategy to get |
Returns
Promise
<StrategyEntry
>
The strategy details
Defined in
src/classes/strategy-registry.ts:89
list
▸ list(): Promise
<Strategy
[]>
List all strategies in the connected registry
throws
Error if the registry is not connected
Returns
Promise
<Strategy
[]>
An array of strategy details
Defined in
src/classes/strategy-registry.ts:101
register
▸ register(strategy
): Promise
<string
>
Registry a strategy
Parameters
Name | Type | Description |
---|---|---|
strategy | StrategyEntry | The strategy details to register |
Returns
Promise
<string
>
The strategy details
Defined in
src/classes/strategy-registry.ts:34
uploadBundle
▸ Private
uploadBundle(bundleLocation
): Promise
<string
>
Parameters
Name | Type | Description |
---|---|---|
bundleLocation | string | File location for the bundle |
Returns
Promise
<string
>