Skip to content

@gala-chain/testAPI


API > MockedChaincodeClient

Class: MockedChaincodeClient

Contents

Extends

  • ChainClient

Constructors

new MockedChaincodeClient(builder, chaincode, contractConfig, orgMsp, userId)

new MockedChaincodeClient(builder, chaincode, contractConfig, orgMsp, userId): MockedChaincodeClient

Parameters

builder: MockedChaincodeClientBuilder

chaincode: Promise\<TestChaincode>

contractConfig: ContractConfig

orgMsp: string

userId: string

Overrides

ChainClient.constructor

Source

chain-test/src/e2e/MockedChaincodeClient.ts:98

Properties

builder

readonly builder: Promise\<ChainClientBuilder>

Inherited from

ChainClient.builder

Source

chain-client/src/generic/ChainClient.ts:28


chaincode

private readonly chaincode: Promise\<TestChaincode>

Source

chain-test/src/e2e/MockedChaincodeClient.ts:94


contractConfig

readonly contractConfig: ContractConfig

Inherited from

ChainClient.contractConfig

Source

chain-client/src/generic/ChainClient.ts:30


customBuilder

private readonly customBuilder: MockedChaincodeClientBuilder

Source

chain-test/src/e2e/MockedChaincodeClient.ts:96


orgMsp

readonly orgMsp: string

Inherited from

ChainClient.orgMsp

Source

chain-client/src/generic/ChainClient.ts:31


transactionDelayMs

private transactionDelayMs: number

Source

chain-test/src/e2e/MockedChaincodeClient.ts:95


userId

readonly userId: string

Inherited from

ChainClient.userId

Source

chain-client/src/generic/ChainClient.ts:29

Methods

disconnect()

disconnect(): Promise\<void>

Overrides

ChainClient.disconnect

Source

chain-test/src/e2e/MockedChaincodeClient.ts:167


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

chain-test/src/e2e/MockedChaincodeClient.ts:129


extendAPI()

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

Type parameters

T extends object

Parameters

apiHandlerFn: (_) => T

Inherited from

ChainClient.extendAPI

Source

chain-client/src/generic/ChainClient.ts:65


forUser()

forUser(userId, secret?): ChainClient

Parameters

userId: string

secret?: string

Overrides

ChainClient.forUser

Source

chain-test/src/e2e/MockedChaincodeClient.ts:157


getParameters()

private getParameters\<T>(method, dtoOrResp?, resp?): object

Type parameters

T

Parameters

method: string

dtoOrResp?: Record\<string, unknown> | ChainCallDTO | ClassType\<Inferred\<T>>

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

Returns

args

args: string[]

fullMethod

fullMethod: string

responseClass

responseClass: ClassType\<Inferred\<T>>

Source

chain-test/src/e2e/MockedChaincodeClient.ts:141


optionalDelay()

private optionalDelay(): Promise\<void>

Source

chain-test/src/e2e/MockedChaincodeClient.ts:111


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

chain-test/src/e2e/MockedChaincodeClient.ts:117


withTransactionDelay()

withTransactionDelay(transactionDelayMs): MockedChaincodeClient

Parameters

transactionDelayMs: number

Source

chain-test/src/e2e/MockedChaincodeClient.ts:171