Reference / Modules / client / AuthenticationClient
Class: AuthenticationClient
client.AuthenticationClient
Table of contents
Constructors
Properties
Methods
- authenticate
- authenticateWithAxios
- buildAccountTokens
- doWithDirectoryOrFirstAvailableNode
- doWithFirstAvailableNode
- refresh
Constructors
constructor
• new AuthenticationClient(api
, directoryEndpoint
, legalOfficers
, axiosFactory
): AuthenticationClient
Parameters
Name | Type |
---|---|
api | LogionNodeApiClass |
directoryEndpoint | string |
legalOfficers | LegalOfficerClass [] |
axiosFactory | AxiosFactory |
Returns
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
Name | Type |
---|---|
addresses | ValidAccountId [] |
signer | RawSigner |
Returns
Promise
<AccountTokens
>
Defined in
packages/client/src/AuthenticationClient.ts:36
authenticateWithAxios
▸ authenticateWithAxios(axios
, validAccountIds
, signer
): Promise
<AccountTokens
>
Parameters
Name | Type |
---|---|
axios | AxiosInstance |
validAccountIds | ValidAccountId [] |
signer | RawSigner |
Returns
Promise
<AccountTokens
>
Defined in
packages/client/src/AuthenticationClient.ts:61
buildAccountTokens
▸ buildAccountTokens(authenticatedAddresses
): AccountTokens
Parameters
Name | Type |
---|---|
authenticatedAddresses | AuthenticationResponse |
Returns
Defined in
packages/client/src/AuthenticationClient.ts:91
doWithDirectoryOrFirstAvailableNode
▸ doWithDirectoryOrFirstAvailableNode<T
>(axiosConsumer
): Promise
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
axiosConsumer | (axios : AxiosInstance ) => Promise <T > |
Returns
Promise
<T
>
Defined in
packages/client/src/AuthenticationClient.ts:48
refresh
▸ refresh(accountTokens
): Promise
<AccountTokens
>
Parameters
Name | Type |
---|---|
accountTokens | AccountTokens |
Returns
Promise
<AccountTokens
>