@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
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>
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()
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>>
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()
staticenroll(restApiUrl,userId,secret):Promise\<string>
Parameters
▪ restApiUrl: string
▪ userId: string
▪ secret: string
Source
rest-api/FabloRestClient.ts:115
getContractApis()
staticgetContractApis(token,restApiUrl,restApiConfig):Promise\<SetContractApiParams[]>
Parameters
▪ token: string
▪ restApiUrl: string
▪ restApiConfig: RestApiConfig