Reference / Modules / client / DirectoryClient
Class: DirectoryClient
client.DirectoryClient
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new DirectoryClient(api
, directoryEndpoint
, axiosFactory
, token?
): DirectoryClient
Parameters
Name | Type |
---|---|
api | LogionNodeApiClass |
directoryEndpoint | string |
axiosFactory | AxiosFactory |
token? | string |
Returns
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
Name | Type |
---|---|
legalOfficer | LegalOfficer |
Returns
Promise
<void
>
Defined in
packages/client/src/DirectoryClient.ts:106
getHost
▸ getHost(address
, data
): PalletLoAuthorityListLegalOfficerData
Parameters
Name | Type |
---|---|
address | string |
data | Record <string , PalletLoAuthorityListLegalOfficerData > |
Returns
PalletLoAuthorityListLegalOfficerData
Defined in
packages/client/src/DirectoryClient.ts:97
getHostData
▸ getHostData(address
, onchainMap
): Object
Parameters
Name | Type |
---|---|
address | string |
onchainMap | Record <string , PalletLoAuthorityListLegalOfficerData > |
Returns
Object
Name | Type |
---|---|
node | string |
nodeId | string |
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
Name | Type |
---|---|
array | DirectoryLegalOfficer [] |
Returns
Record
<string
, DirectoryLegalOfficer
>
Defined in
packages/client/src/DirectoryClient.ts:65
toOnchainMap
▸ toOnchainMap(array
): Record
<string
, PalletLoAuthorityListLegalOfficerData
>
Parameters
Name | Type |
---|---|
array | [StorageKey <[AccountId32 ]>, Option <PalletLoAuthorityListLegalOfficerData >][] |
Returns
Record
<string
, PalletLoAuthorityListLegalOfficerData
>