Skip to content

@gala-chain/clientAPI


API > ChainClient

Class: abstract ChainClient

Contents

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

generic/ChainClient.ts:27

Properties

builder

readonly builder: Promise\<ChainClientBuilder>

Source

generic/ChainClient.ts:28


contractConfig

readonly contractConfig: ContractConfig

Source

generic/ChainClient.ts:30


orgMsp

readonly orgMsp: string

Source

generic/ChainClient.ts:31


userId

readonly userId: string

Source

generic/ChainClient.ts:29

Methods

abstract disconnect()

abstract disconnect(): Promise\<void>

Source

generic/ChainClient.ts:61


abstract evaluateTransaction()

evaluateTransaction(method)

abstract evaluateTransaction(method): Promise\<GalaChainResponse\<unknown>>

Parameters

method: string

Source

generic/ChainClient.ts:46

evaluateTransaction(method, dto)

abstract evaluateTransaction(method, dto): Promise\<GalaChainResponse\<unknown>>

Parameters

method: string

dto: ChainCallDTO

Source

generic/ChainClient.ts:48

evaluateTransaction(method, resp)

abstract evaluateTransaction\<T>(method, resp): Promise\<GalaChainResponse\<T>>

Type parameters

T

Parameters

method: string

resp: ClassType\<Inferred\<T>>

Source

generic/ChainClient.ts:50

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

generic/ChainClient.ts:55


extendAPI()

extendAPI\<T>(apiHandlerFn): ChainClient & T

Type parameters

T extends object

Parameters

apiHandlerFn: (_) => T

Source

generic/ChainClient.ts:65


abstract forUser()

abstract forUser(userId, secret?): ChainClient

Parameters

userId: string

secret?: string

Source

generic/ChainClient.ts:63


abstract submitTransaction()

submitTransaction(method)

abstract submitTransaction(method): Promise\<GalaChainResponse\<unknown>>

Parameters

method: string

Source

generic/ChainClient.ts:34

submitTransaction(method, dto)

abstract submitTransaction(method, dto): Promise\<GalaChainResponse\<unknown>>

Parameters

method: string

dto: ChainCallDTO

Source

generic/ChainClient.ts:36

submitTransaction(method, resp)

abstract submitTransaction\<T>(method, resp): Promise\<GalaChainResponse\<T>>

Type parameters

T

Parameters

method: string

resp: ClassType\<Inferred\<T>>

Source

generic/ChainClient.ts:38

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>>

Source

generic/ChainClient.ts:40