Skip to main content

Reference / Modules / client / DirectoryClient

Class: DirectoryClient

client.DirectoryClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DirectoryClient(api, directoryEndpoint, axiosFactory, token?): DirectoryClient

Parameters

NameType
apiLogionNodeApiClass
directoryEndpointstring
axiosFactoryAxiosFactory
token?string

Returns

DirectoryClient

Defined in

packages/client/src/DirectoryClient.ts:19

Properties

api

Private api: LogionNodeApiClass

Defined in

packages/client/src/DirectoryClient.ts:36


authenticated

Private authenticated: boolean

Defined in

packages/client/src/DirectoryClient.ts:28


axios

Private axios: AxiosInstance

Defined in

packages/client/src/DirectoryClient.ts:34


axiosFactory

Private axiosFactory: AxiosFactory

Defined in

packages/client/src/DirectoryClient.ts:30


token

Private token: undefined | string

Defined in

packages/client/src/DirectoryClient.ts:32

Methods

createOrUpdate

createOrUpdate(legalOfficer): Promise<void>

Parameters

NameType
legalOfficerLegalOfficer

Returns

Promise<void>

Defined in

packages/client/src/DirectoryClient.ts:106


getHost

getHost(address, data): PalletLoAuthorityListLegalOfficerData

Parameters

NameType
addressstring
dataRecord<string, PalletLoAuthorityListLegalOfficerData>

Returns

PalletLoAuthorityListLegalOfficerData

Defined in

packages/client/src/DirectoryClient.ts:97


getHostData

getHostData(address, onchainMap): Object

Parameters

NameType
addressstring
onchainMapRecord<string, PalletLoAuthorityListLegalOfficerData>

Returns

Object

NameType
nodestring
nodeIdstring
region"Europe"

Defined in

packages/client/src/DirectoryClient.ts:79


getLegalOfficers

getLegalOfficers(): Promise<LegalOfficerClass[]>

Returns

Promise<LegalOfficerClass[]>

Defined in

packages/client/src/DirectoryClient.ts:38


toOffchainMap

toOffchainMap(array): Record<string, DirectoryLegalOfficer>

Parameters

NameType
arrayDirectoryLegalOfficer[]

Returns

Record<string, DirectoryLegalOfficer>

Defined in

packages/client/src/DirectoryClient.ts:65


toOnchainMap

toOnchainMap(array): Record<string, PalletLoAuthorityListLegalOfficerData>

Parameters

NameType
array[StorageKey<[AccountId32]>, Option<PalletLoAuthorityListLegalOfficerData>][]

Returns

Record<string, PalletLoAuthorityListLegalOfficerData>

Defined in

packages/client/src/DirectoryClient.ts:71