@gala-chain/client ∙ API
API > RestApiClient
Class: RestApiClient
Contents
- Extends
- Constructors
- new RestApiClient(builder, restApiUrl, contractConfig, orgMsp)
- Properties
- builder
- contractConfig
- orgMsp
- restApiUrl
- userId
- Methods
- disconnect()
- evaluateTransaction()
- extendAPI()
- forUser()
- isReady()
- post()
- submitTransaction()
- getContractApis()
Extends
Constructors
new RestApiClient(builder, restApiUrl, contractConfig, orgMsp)
new RestApiClient(
builder
,restApiUrl
,contractConfig
,orgMsp
):RestApiClient
Parameters
▪ builder: Promise
\<ChainClientBuilder
>
▪ restApiUrl: string
▪ contractConfig: ContractConfig
▪ orgMsp: string
Overrides
Source
Properties
builder
readonly
builder:Promise
\<ChainClientBuilder
>
Inherited from
Source
contractConfig
readonly
contractConfig:ContractConfig
Inherited from
Source
orgMsp
readonly
orgMsp:string
Inherited from
Source
restApiUrl
private
readonly
restApiUrl:Promise
\<string
>
Source
userId
readonly
userId:string
Inherited from
Source
Methods
disconnect()
disconnect():
Promise
\<void
>
Overrides
Source
evaluateTransaction()
evaluateTransaction\<
T
>(method
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
▪ resp?: ClassType
\<Inferred
\<T
>>
Overrides
ChainClient
.evaluateTransaction
Source
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):RestApiClient
&T
Type parameters
▪ T extends object
Parameters
▪ apiHandlerFn: (_
) => T
Inherited from
Source
forUser()
forUser(
userId
):ChainClient
Parameters
▪ userId: string
Overrides
Source
isReady()
isReady():
Promise
\<true
>
Source
post()
post\<
T
>(path
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ path: string
▪ dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
▪ resp?: ClassType
\<Inferred
\<T
>>
Source
submitTransaction()
submitTransaction\<
T
>(method
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
▪ resp?: ClassType
\<Inferred
\<T
>>
Overrides
Source
getContractApis()
static
getContractApis(credentials
,restApiUrl
,restApiConfig
):Promise
\<SetContractApiParams
[]>
Parameters
▪ credentials: RestApiAdminCredentials
▪ restApiUrl: string
▪ restApiConfig: RestApiConfig