@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
readonlybuilder:Promise\<ChainClientBuilder>
Inherited from
Source
contractConfig
readonlycontractConfig:ContractConfig
Inherited from
Source
credentials
privatereadonlycredentials:RestApiAdminCredentials
Source
rest-api/FabloRestClient.ts:57
orgMsp
readonlyorgMsp:string
Inherited from
Source
restApiUrl
privatereadonlyrestApiUrl:Promise\<string>
Source
rest-api/FabloRestClient.ts:51
token
privatetoken:Promise\<string>
Source
rest-api/FabloRestClient.ts:58
userId
readonlyuserId: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()
privatepost\<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()
staticenroll(restApiUrl,userId,secret):Promise\<string>
Parameters
• restApiUrl: string
• userId: string
• secret: string
Returns
Promise\<string>
Source
rest-api/FabloRestClient.ts:117
getContractApis()
staticgetContractApis(token,restApiUrl,restApiConfig):Promise\<SetContractApiParams[]>
Parameters
• token: string
• restApiUrl: string
• restApiConfig: RestApiConfig
Returns
Promise\<SetContractApiParams[]>