Skip to main content

Class: Registry

Controls the connections to the registry

Constructors

constructor

new Registry(orbit, identityManager, ipfs, registryConfig, connectionManager)

Parameters

NameType
orbitOrbit
identityManagerIdentityManager
ipfsIPFS
registryConfigRegistryConfig
connectionManagerConnectionManager

Defined in

src/classes/registry.ts:21

Properties

connectionManager

connectionManager: ConnectionManager

Defined in

src/classes/registry.ts:18


identityManager

identityManager: IdentityManager

Defined in

src/classes/registry.ts:17


ipfs

ipfs: IPFS

Defined in

src/classes/registry.ts:19


orbit

orbit: Orbit

Defined in

src/classes/registry.ts:16


registryConfig

registryConfig: RegistryConfig

Defined in

src/classes/registry.ts:15

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

NameTypeDescription
namestringChain name, example: Ethereum
symbolstringChain symbol, example: ETH
chainIdnumberChain ID for chain, this provides guidance for signing

Returns

Promise<default<RegistryEntry>>

New listed chain db connection

Defined in

src/classes/registry.ts:95


bootstrap

bootstrap(environment?, version?): Promise<default<RegistryEntry>>

Parameters

NameType
environmentstring
versionnumber

Returns

Promise<default<RegistryEntry>>

Defined in

src/classes/registry.ts:82


get

get(id?): Promise<RegistryEntry[]>

Parameters

NameTypeDescription
id?stringChain ID for the targeted registry

Returns

Promise<RegistryEntry[]>

Array of supported chains and their associated strategies store address

Defined in

src/classes/registry.ts:40


getChain

getChain(chainId): Promise<RegistryEntry>

Get chain details from the registry

throws Error if chain is not found

Parameters

NameTypeDescription
chainIdnumberChain ID for the chain

Returns

Promise<RegistryEntry>

Chain details

Defined in

src/classes/registry.ts:129


getChains

getChains(): Promise<RegistryEntry[]>

Returns all supported chains

throws Error if no chains are found

Returns

Promise<RegistryEntry[]>

Array of supported chains

Defined in

src/classes/registry.ts:145


getConnection

getConnection(): Promise<default<RegistryEntry>>

Returns

Promise<default<RegistryEntry>>

Defined in

src/classes/registry.ts:78


getStrategiesRegistry

getStrategiesRegistry(strategies): Promise<StrategyRegistry>

Return the StrategyRegistry class wrapper around a specific strategy registry

Parameters

NameTypeDescription
strategiesstringStore address associated with the strategy registry

Returns

Promise<StrategyRegistry>

Wrapper class for strategy registry

Defined in

src/classes/registry.ts:156


register

register(entry): Promise<RegistryEntry>

Parameters

NameType
entryPick<RegistryEntry, "_id" | "name">

Returns

Promise<RegistryEntry>

Defined in

src/classes/registry.ts:50