Class: Registry
Controls the connections to the registry
Constructors
constructor
• new Registry(orbit
, identityManager
, ipfs
, registryConfig
, connectionManager
)
Parameters
Name | Type |
---|---|
orbit | Orbit |
identityManager | IdentityManager |
ipfs | IPFS |
registryConfig | RegistryConfig |
connectionManager | ConnectionManager |
Defined in
Properties
connectionManager
• connectionManager: ConnectionManager
Defined in
identityManager
• identityManager: IdentityManager
Defined in
ipfs
• ipfs: IPFS
Defined in
orbit
• orbit: Orbit
Defined in
registryConfig
• registryConfig: RegistryConfig
Defined in
Methods
addChain
▸ addChain(name
, symbol
, chainId
): Promise
<default
<RegistryEntry
>>
Add new chain to the registry, this must be done by someone with adequate permissions.
Parameters
Name | Type | Description |
---|---|---|
name | string | Chain name, example: Ethereum |
symbol | string | Chain symbol, example: ETH |
chainId | number | Chain ID for chain, this provides guidance for signing |
Returns
Promise
<default
<RegistryEntry
>>
New listed chain db connection
Defined in
bootstrap
▸ bootstrap(environment?
, version?
): Promise
<default
<RegistryEntry
>>
Parameters
Name | Type |
---|---|
environment | string |
version | number |
Returns
Promise
<default
<RegistryEntry
>>
Defined in
get
▸ get(id?
): Promise
<RegistryEntry
[]>
Parameters
Name | Type | Description |
---|---|---|
id? | string | Chain ID for the targeted registry |
Returns
Promise
<RegistryEntry
[]>
Array of supported chains and their associated strategies store address
Defined in
getChain
▸ getChain(chainId
): Promise
<RegistryEntry
>
Get chain details from the registry
throws
Error if chain is not found
Parameters
Name | Type | Description |
---|---|---|
chainId | number | Chain ID for the chain |
Returns
Promise
<RegistryEntry
>
Chain details
Defined in
getChains
▸ getChains(): Promise
<RegistryEntry
[]>
Returns all supported chains
throws
Error if no chains are found
Returns
Promise
<RegistryEntry
[]>
Array of supported chains
Defined in
getConnection
▸ getConnection(): Promise
<default
<RegistryEntry
>>
Returns
Promise
<default
<RegistryEntry
>>
Defined in
getStrategiesRegistry
▸ getStrategiesRegistry(strategies
): Promise
<StrategyRegistry
>
Return the StrategyRegistry class wrapper around a specific strategy registry
Parameters
Name | Type | Description |
---|---|---|
strategies | string | Store address associated with the strategy registry |
Returns
Promise
<StrategyRegistry
>
Wrapper class for strategy registry
Defined in
register
▸ register(entry
): Promise
<RegistryEntry
>
Parameters
Name | Type |
---|---|
entry | Pick <RegistryEntry , "_id" | "name" > |
Returns
Promise
<RegistryEntry
>