@gala-chain/client ∙ API
API > ChainClient
Class: abstract
ChainClient
Contents
- Extended By
- Constructors
- new ChainClient(builder, userId, contractConfig, orgMsp)
- Properties
- builder
- contractConfig
- orgMsp
- userId
- Methods
abstract
disconnect()abstract
evaluateTransaction()- extendAPI()
abstract
forUser()abstract
submitTransaction()
Extended By
Constructors
new ChainClient(builder, userId, contractConfig, orgMsp)
protected
new ChainClient(builder
,userId
,contractConfig
,orgMsp
):ChainClient
Parameters
▪ builder: Promise
\<ChainClientBuilder
>
▪ userId: string
▪ contractConfig: ContractConfig
▪ orgMsp: string
Source
Properties
builder
readonly
builder:Promise
\<ChainClientBuilder
>
Source
contractConfig
readonly
contractConfig:ContractConfig
Source
orgMsp
readonly
orgMsp:string
Source
userId
readonly
userId:string
Source
Methods
abstract
disconnect()
abstract
disconnect():Promise
\<void
>
Source
abstract
evaluateTransaction()
evaluateTransaction(method)
abstract
evaluateTransaction(method
):Promise
\<GalaChainResponse
\<unknown
>>
Parameters
▪ method: string
Source
evaluateTransaction(method, dto)
abstract
evaluateTransaction(method
,dto
):Promise
\<GalaChainResponse
\<unknown
>>
Parameters
▪ method: string
▪ dto: ChainCallDTO
Source
evaluateTransaction(method, resp)
abstract
evaluateTransaction\<T
>(method
,resp
):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ resp: ClassType
\<Inferred
\<T
>>
Source
evaluateTransaction(method, dto, resp)
abstract
evaluateTransaction\<T
>(method
,dto
,resp
):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ dto: ChainCallDTO
▪ resp: ClassType
\<Inferred
\<T
>>
Source
extendAPI()
extendAPI\<
T
>(apiHandlerFn
):ChainClient
&T
Type parameters
▪ T extends object
Parameters
▪ apiHandlerFn: (_
) => T
Source
abstract
forUser()
abstract
forUser(userId
,secret
?):ChainClient
Parameters
▪ userId: string
▪ secret?: string
Source
abstract
submitTransaction()
submitTransaction(method)
abstract
submitTransaction(method
):Promise
\<GalaChainResponse
\<unknown
>>
Parameters
▪ method: string
Source
submitTransaction(method, dto)
abstract
submitTransaction(method
,dto
):Promise
\<GalaChainResponse
\<unknown
>>
Parameters
▪ method: string
▪ dto: ChainCallDTO
Source
submitTransaction(method, resp)
abstract
submitTransaction\<T
>(method
,resp
):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ resp: ClassType
\<Inferred
\<T
>>
Source
submitTransaction(method, dto, resp)
abstract
submitTransaction\<T
>(method
,dto
,resp
):Promise
\<GalaChainResponse
\<T
>>
Type parameters
▪ T
Parameters
▪ method: string
▪ dto: ChainCallDTO
▪ resp: ClassType
\<Inferred
\<T
>>