@gala-chain/client • Readme | API
@gala-chain/client / HFClient
Class: HFClient
Extends
Constructors
new HFClient(resolvedBuilder, userId, contractConfig, createContractPromise)
new HFClient(
resolvedBuilder
,userId
,contractConfig
,createContractPromise
):HFClient
Parameters
• resolvedBuilder: HFClientBuilder
• userId: string
• contractConfig: ContractConfig
• createContractPromise
Returns
Overrides
Source
Properties
builder
readonly
builder:Promise
\<ChainClientBuilder
>
Inherited from
Source
contractConfig
readonly
contractConfig:ContractConfig
Inherited from
Source
contractPromise
private
contractPromise:undefined
|Promise
\<object
>
Source
createContractPromise()
private
readonly
createContractPromise: (userId
) =>Promise
\<object
>
Parameters
• userId: string
Returns
Promise
\<object
>
contract
contract:
Contract
gateway
gateway:
Gateway
network
network:
Network
Source
orgMsp
readonly
orgMsp:string
Inherited from
Source
resolvedBuilder
private
resolvedBuilder:HFClientBuilder
Source
userId
readonly
userId:string
Inherited from
Source
Accessors
contract
get
contract():Promise
\<Contract
>
Returns
Promise
\<Contract
>
Source
Methods
disconnect()
disconnect():
Promise
\<void
>
Returns
Promise
\<void
>
Overrides
Source
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
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):HFClient
&T
Type parameters
• T extends object
Parameters
• apiHandlerFn
Returns
HFClient
& T
Inherited from
Source
forUser()
forUser(
userId
):ChainClient
Parameters
• userId: string
Returns
Overrides
Source
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
>>