JS API Reference
Class: Yagna
utils/yagna/yagna.Yagna
Table of contents
Constructors
Properties
Methods
- getApi
- connect
- end
- getVersion
- createApi
- getApiConfig
- getApiUrl
- errorHandler
- addErrorHandler
- removeErrorHandler
Constructors
constructor
• new Yagna(options?
): Yagna
Parameters
Name | Type |
---|---|
options? | YagnaOptions |
Returns
Defined in
Properties
apiKey
• Protected
Readonly
apiKey: string
Defined in
apiBaseUrl
• Protected
Readonly
apiBaseUrl: string
Defined in
Methods
getApi
▸ getApi(): YagnaApi
Returns
Defined in
connect
▸ connect(): Promise
<IdentityModel
>
Returns
Promise
<IdentityModel
>
Defined in
end
▸ end(): Promise
<void
>
Returns
Promise
<void
>
Defined in
getVersion
▸ getVersion(): Promise
<string
>
Returns
Promise
<string
>
Defined in
createApi
▸ createApi(): YagnaApi
Returns
Defined in
getApiConfig
▸ getApiConfig(): Configuration
Returns
Configuration
Defined in
getApiUrl
▸ getApiUrl(apiName?
): string
Parameters
Name | Type |
---|---|
apiName? | string |
Returns
string
Defined in
errorHandler
▸ errorHandler(error
): Promise
<Error
>
Parameters
Name | Type |
---|---|
error | Error |
Returns
Promise
<Error
>
Defined in
addErrorHandler
▸ addErrorHandler(api
): number
Parameters
Name | Type |
---|---|
api | YagnaApi |
Returns
number
Defined in
removeErrorHandler
▸ removeErrorHandler(api
): void
Parameters
Name | Type |
---|---|
api | YagnaApi |
Returns
void