Skip to content

@gala-chain/clientAPI


API > FabloRestClient

Class: FabloRestClient

Contents

Extends

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

rest-api/FabloRestClient.ts:53

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


credentials

private readonly credentials: RestApiAdminCredentials

Source

rest-api/FabloRestClient.ts:57


orgMsp

readonly orgMsp: string

Inherited from

ChainClient.orgMsp

Source

generic/ChainClient.ts:31


restApiUrl

private readonly restApiUrl: Promise\<string>

Source

rest-api/FabloRestClient.ts:51


token

private token: Promise\<string>

Source

rest-api/FabloRestClient.ts:58


userId

readonly userId: string

Inherited from

ChainClient.userId

Source

generic/ChainClient.ts:29

Methods

disconnect()

disconnect(): Promise\<void>

Overrides

ChainClient.disconnect

Source

rest-api/FabloRestClient.ts:71


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/FabloRestClient.ts:86


extendAPI()

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

Type parameters

T extends object

Parameters

apiHandlerFn: (_) => T

Inherited from

ChainClient.extendAPI

Source

generic/ChainClient.ts:65


forUser()

forUser(userId, secret?): ChainClient

Parameters

userId: string

secret?: string

Overrides

ChainClient.forUser

Source

rest-api/FabloRestClient.ts:127


isReady()

isReady(): Promise\<true>

Source

rest-api/FabloRestClient.ts:65


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

rest-api/FabloRestClient.ts:96


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/FabloRestClient.ts:76


enroll()

static enroll(restApiUrl, userId, secret): Promise\<string>

Parameters

restApiUrl: string

userId: string

secret: string

Source

rest-api/FabloRestClient.ts:115


getContractApis()

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

Parameters

token: string

restApiUrl: string

restApiConfig: RestApiConfig

Source

rest-api/FabloRestClient.ts:134