Skip to content

@gala-chain/clientAPI


API > RestApiClient

Class: RestApiClient

Contents

Extends

Constructors

new RestApiClient(builder, restApiUrl, contractConfig, orgMsp)

new RestApiClient(builder, restApiUrl, contractConfig, orgMsp): RestApiClient

Parameters

builder: Promise\<ChainClientBuilder>

restApiUrl: string

contractConfig: ContractConfig

orgMsp: string

Overrides

ChainClient.constructor

Source

rest-api/RestApiClient.ts:51

Properties

builder

readonly builder: Promise\<ChainClientBuilder>

Inherited from

ChainClient.builder

Source

generic/ChainClient.ts:28


contractConfig

readonly contractConfig: ContractConfig

Inherited from

ChainClient.contractConfig

Source

generic/ChainClient.ts:30


orgMsp

readonly orgMsp: string

Inherited from

ChainClient.orgMsp

Source

generic/ChainClient.ts:31


restApiUrl

private readonly restApiUrl: Promise\<string>

Source

rest-api/RestApiClient.ts:49


userId

readonly userId: string

Inherited from

ChainClient.userId

Source

generic/ChainClient.ts:29

Methods

disconnect()

disconnect(): Promise\<void>

Overrides

ChainClient.disconnect

Source

rest-api/RestApiClient.ts:66


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/RestApiClient.ts:81


extendAPI()

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

Type parameters

T extends object

Parameters

apiHandlerFn: (_) => T

Inherited from

ChainClient.extendAPI

Source

generic/ChainClient.ts:65


forUser()

forUser(userId): ChainClient

Parameters

userId: string

Overrides

ChainClient.forUser

Source

rest-api/RestApiClient.ts:106


isReady()

isReady(): Promise\<true>

Source

rest-api/RestApiClient.ts:61


post()

post\<T>(path, dtoOrResp?, resp?): Promise\<GalaChainResponse\<T>>

Type parameters

T

Parameters

path: string

dtoOrResp?: ChainCallDTO | ClassType\<Inferred\<T>>

resp?: ClassType\<Inferred\<T>>

Source

rest-api/RestApiClient.ts:91


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

rest-api/RestApiClient.ts:71


getContractApis()

static getContractApis(credentials, restApiUrl, restApiConfig): Promise\<SetContractApiParams[]>

Parameters

credentials: RestApiAdminCredentials

restApiUrl: string

restApiConfig: RestApiConfig

Source

rest-api/RestApiClient.ts:111