@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
ChainClient
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
ChainClient.constructor
Source
chain-client/src/rest-api/FabloRestClient.ts:63
Properties
builder
readonly
builder:Promise
\<ChainClientBuilder
>
Inherited from
ChainClient.builder
Source
chain-api/src/client/generic/ChainClient.ts:27
contractConfig
readonly
contractConfig:ContractConfig
Inherited from
ChainClient.contractConfig
Source
chain-api/src/client/generic/ChainClient.ts:29
credentials
private
readonly
credentials:RestApiAdminCredentials
Source
chain-client/src/rest-api/FabloRestClient.ts:67
orgMsp
readonly
orgMsp:string
Inherited from
ChainClient.orgMsp
Source
chain-api/src/client/generic/ChainClient.ts:30
restApiUrl
private
readonly
restApiUrl:Promise
\<string
>
Source
chain-client/src/rest-api/FabloRestClient.ts:61
token
private
token:Promise
\<string
>
Source
chain-client/src/rest-api/FabloRestClient.ts:68
userId
readonly
userId:string
Inherited from
ChainClient.userId
Source
chain-api/src/client/generic/ChainClient.ts:28
Methods
disconnect()
disconnect():
Promise
\<void
>
Overrides
ChainClient.disconnect
Source
chain-client/src/rest-api/FabloRestClient.ts:81
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
chain-client/src/rest-api/FabloRestClient.ts:96
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):FabloRestClient
&T
Type parameters
▪ T extends object
Parameters
▪ apiHandlerFn: (_
) => T
Inherited from
ChainClient.extendAPI
Source
chain-api/src/client/generic/ChainClient.ts:64
forUser()
forUser(
userId
,secret
?):ChainClient
Parameters
▪ userId: string
▪ secret?: string
Overrides
ChainClient.forUser
Source
chain-client/src/rest-api/FabloRestClient.ts:137
isReady()
isReady():
Promise
\<true
>
Source
chain-client/src/rest-api/FabloRestClient.ts:75
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
chain-client/src/rest-api/FabloRestClient.ts:106
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
ChainClient.submitTransaction
Source
chain-client/src/rest-api/FabloRestClient.ts:86
enroll()
static
enroll(restApiUrl
,userId
,secret
):Promise
\<string
>
Parameters
▪ restApiUrl: string
▪ userId: string
▪ secret: string
Source
chain-client/src/rest-api/FabloRestClient.ts:125
getContractApis()
static
getContractApis(token
,restApiUrl
,restApiConfig
):Promise
\<SetContractApiParams
[]>
Parameters
▪ token: string
▪ restApiUrl: string
▪ restApiConfig: RestApiConfig