@gala-chain/client • Readme | API
@gala-chain/client / FabloRestClient
Class: FabloRestClient
Extends
Constructors
new FabloRestClient(builder, restApiUrl, contractConfig, credentials, token, orgMsp)
new FabloRestClient(
builder
,restApiUrl
,contractConfig
,credentials
,token
,orgMsp
):FabloRestClient
Parameters
• builder: Promise
\<ChainClientBuilder
>
• restApiUrl: string
• contractConfig: ContractConfig
• credentials: RestApiAdminCredentials
• token: Promise
\<string
>
• orgMsp: string
Returns
Overrides
Source
rest-api/FabloRestClient.ts:53
Properties
builder
readonly
builder:Promise
\<ChainClientBuilder
>
Inherited from
Source
contractConfig
readonly
contractConfig:ContractConfig
Inherited from
Source
credentials
private
readonly
credentials:RestApiAdminCredentials
Source
rest-api/FabloRestClient.ts:57
orgMsp
readonly
orgMsp:string
Inherited from
Source
restApiUrl
private
readonly
restApiUrl:Promise
\<string
>
Source
rest-api/FabloRestClient.ts:51
token
private
token:Promise
\<string
>
Source
rest-api/FabloRestClient.ts:58
userId
readonly
userId:string
Inherited from
Source
Methods
disconnect()
disconnect():
Promise
\<void
>
Returns
Promise
\<void
>
Overrides
Source
rest-api/FabloRestClient.ts:71
evaluateTransaction()
evaluateTransaction\<
T
>(method
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
• T
Parameters
• method: string
• dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
• resp?: ClassType
\<Inferred
\<T
>>
Returns
Promise
\<GalaChainResponse
\<T
>>
Overrides
ChainClient
.evaluateTransaction
Source
rest-api/FabloRestClient.ts:86
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):FabloRestClient
&T
Type parameters
• T extends object
Parameters
• apiHandlerFn
Returns
FabloRestClient
& T
Inherited from
Source
forUser()
forUser(
userId
,secret
?):ChainClient
Parameters
• userId: string
• secret?: string
Returns
Overrides
Source
rest-api/FabloRestClient.ts:129
isReady()
isReady():
Promise
\<true
>
Returns
Promise
\<true
>
Source
rest-api/FabloRestClient.ts:65
post()
private
post\<T
>(path
,methodName
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
• T
Parameters
• path: string
• methodName: string
• dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
• resp?: ClassType
\<Inferred
\<T
>>
Returns
Promise
\<GalaChainResponse
\<T
>>
Source
rest-api/FabloRestClient.ts:96
submitTransaction()
submitTransaction\<
T
>(method
,dtoOrResp
?,resp
?):Promise
\<GalaChainResponse
\<T
>>
Type parameters
• T
Parameters
• method: string
• dtoOrResp?: ChainCallDTO
| ClassType
\<Inferred
\<T
>>
• resp?: ClassType
\<Inferred
\<T
>>
Returns
Promise
\<GalaChainResponse
\<T
>>
Overrides
Source
rest-api/FabloRestClient.ts:76
enroll()
static
enroll(restApiUrl
,userId
,secret
):Promise
\<string
>
Parameters
• restApiUrl: string
• userId: string
• secret: string
Returns
Promise
\<string
>
Source
rest-api/FabloRestClient.ts:117
getContractApis()
static
getContractApis(token
,restApiUrl
,restApiConfig
):Promise
\<SetContractApiParams
[]>
Parameters
• token: string
• restApiUrl: string
• restApiConfig: RestApiConfig
Returns
Promise
\<SetContractApiParams
[]>