Skip to main content

Reference / Modules / client / AuthenticationClient

Class: AuthenticationClient

client.AuthenticationClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AuthenticationClient(api, directoryEndpoint, legalOfficers, axiosFactory): AuthenticationClient

Parameters

NameType
apiLogionNodeApiClass
directoryEndpointstring
legalOfficersLegalOfficerClass[]
axiosFactoryAxiosFactory

Returns

AuthenticationClient

Defined in

packages/client/src/AuthenticationClient.ts:21

Properties

api

Private api: LogionNodeApiClass

Defined in

packages/client/src/AuthenticationClient.ts:28


axiosFactory

Private axiosFactory: AxiosFactory

Defined in

packages/client/src/AuthenticationClient.ts:34


directoryEndpoint

Private directoryEndpoint: string

Defined in

packages/client/src/AuthenticationClient.ts:30


legalOfficers

Private legalOfficers: LegalOfficerClass[]

Defined in

packages/client/src/AuthenticationClient.ts:32

Methods

authenticate

authenticate(addresses, signer): Promise<AccountTokens>

Parameters

NameType
addressesValidAccountId[]
signerRawSigner

Returns

Promise<AccountTokens>

Defined in

packages/client/src/AuthenticationClient.ts:36


authenticateWithAxios

authenticateWithAxios(axios, validAccountIds, signer): Promise<AccountTokens>

Parameters

NameType
axiosAxiosInstance
validAccountIdsValidAccountId[]
signerRawSigner

Returns

Promise<AccountTokens>

Defined in

packages/client/src/AuthenticationClient.ts:61


buildAccountTokens

buildAccountTokens(authenticatedAddresses): AccountTokens

Parameters

NameType
authenticatedAddressesAuthenticationResponse

Returns

AccountTokens

Defined in

packages/client/src/AuthenticationClient.ts:91


doWithDirectoryOrFirstAvailableNode

doWithDirectoryOrFirstAvailableNode<T>(axiosConsumer): Promise<T>

Type parameters

Name
T

Parameters

NameType
axiosConsumer(axios: AxiosInstance) => Promise<T>

Returns

Promise<T>

Defined in

packages/client/src/AuthenticationClient.ts:40


doWithFirstAvailableNode

doWithFirstAvailableNode<T>(axiosConsumer): Promise<T>

Type parameters

Name
T

Parameters

NameType
axiosConsumer(axios: AxiosInstance) => Promise<T>

Returns

Promise<T>

Defined in

packages/client/src/AuthenticationClient.ts:48


refresh

refresh(accountTokens): Promise<AccountTokens>

Parameters

NameType
accountTokensAccountTokens

Returns

Promise<AccountTokens>

Defined in

packages/client/src/AuthenticationClient.ts:102