@gala-chain/client ∙ API
API > FabloRestClient
Class: FabloRestClient
Contents
- Extends
- Constructors
- new FabloRestClient(builder, restApiUrl, contractConfig, credentials, token, orgMsp)
- Properties
- builder
- contractConfig
- credentials
- orgMsp
- restApiUrl
- token
- userId
- Methods
- disconnect()
- evaluateTransaction()
- extendAPI()
- forUser()
- isReady()
- post()
- submitTransaction()
- enroll()
- getContractApis()
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
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
>
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
>>
Overrides
ChainClient
.evaluateTransaction
Source
rest-api/FabloRestClient.ts:86
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):FabloRestClient
&T
Type parameters
▪ T extends object
Parameters
▪ apiHandlerFn: (_
) => T
Inherited from
Source
forUser()
forUser(
userId
,secret
?):ChainClient
Parameters
▪ userId: string
▪ secret?: string
Overrides
Source
rest-api/FabloRestClient.ts:127
isReady()
isReady():
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
>>
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
>>
Overrides
Source
rest-api/FabloRestClient.ts:76
enroll()
static
enroll(restApiUrl
,userId
,secret
):Promise
\<string
>
Parameters
▪ restApiUrl: string
▪ userId: string
▪ secret: string
Source
rest-api/FabloRestClient.ts:115
getContractApis()
static
getContractApis(token
,restApiUrl
,restApiConfig
):Promise
\<SetContractApiParams
[]>
Parameters
▪ token: string
▪ restApiUrl: string
▪ restApiConfig: RestApiConfig