Skip to content

@gala-chain/chaincodeAPI


API > GalaChainContext

Class: GalaChainContext

Contents

Extends

  • Context

Constructors

new GalaChainContext(config)

new GalaChainContext(config): GalaChainContext

Parameters

config: GalaChainContextConfig

Overrides

Context.constructor

Source

chaincode/src/types/GalaChainContext.ts:62

Properties

callingUserEthAddressValue

private callingUserEthAddressValue?: string

Source

chaincode/src/types/GalaChainContext.ts:50


callingUserRolesValue

private callingUserRolesValue?: string[]

Source

chaincode/src/types/GalaChainContext.ts:52


callingUserSignatureQuorumValue

private callingUserSignatureQuorumValue?: number

Source

chaincode/src/types/GalaChainContext.ts:54


callingUserSignedByKeysValue

private callingUserSignedByKeysValue?: string[]

Source

chaincode/src/types/GalaChainContext.ts:53


callingUserTonAddressValue

private callingUserTonAddressValue?: string

Source

chaincode/src/types/GalaChainContext.ts:51


callingUserValue

private callingUserValue?: UserAlias

Source

chaincode/src/types/GalaChainContext.ts:49


clientIdentity

clientIdentity: ClientIdentity

Inherited from

Context.clientIdentity

Source

node_modules/fabric-contract-api/types/index.d.ts:14


config

config: GalaChainContextConfig

Source

chaincode/src/types/GalaChainContext.ts:60


isDryRun

isDryRun: boolean = false

Source

chaincode/src/types/GalaChainContext.ts:59


loggerInstance

private loggerInstance?: GalaLoggerInstance

Source

chaincode/src/types/GalaChainContext.ts:57


logging

logging: object

Type declaration

getLogger

getLogger: (name?) => Logger

Parameters

name?: string

setLevel

setLevel: (level) => void

Parameters

level: string

Inherited from

Context.logging

Source

node_modules/fabric-contract-api/types/index.d.ts:15


operationCtxValue

private operationCtxValue?: OperationContext

Source

chaincode/src/types/GalaChainContext.ts:55


stub

stub: GalaChainStub

Overrides

Context.stub

Source

chaincode/src/types/GalaChainContext.ts:48


txUnixTimeValue

private txUnixTimeValue?: number

Source

chaincode/src/types/GalaChainContext.ts:56

Accessors

callingUser

get callingUser(): UserAlias

Source

chaincode/src/types/GalaChainContext.ts:74


callingUserData

set callingUserData(d): void

Parameters

d: object

d.alias?: UserAlias

d.ethAddress?: string

d.roles: string[]

d.signatureQuorum: number

d.signedByKeys: string[]

d.tonAddress?: string

Source

chaincode/src/types/GalaChainContext.ts:134


callingUserEthAddress

get callingUserEthAddress(): string

Source

chaincode/src/types/GalaChainContext.ts:84


callingUserProfile

get callingUserProfile(): UserProfile

Source

chaincode/src/types/GalaChainContext.ts:123


callingUserRoles

get callingUserRoles(): string[]

Source

chaincode/src/types/GalaChainContext.ts:98


callingUserSignatureQuorum

get callingUserSignatureQuorum(): number

Source

chaincode/src/types/GalaChainContext.ts:114


callingUserSignedByKeys

get callingUserSignedByKeys(): string[]

Source

chaincode/src/types/GalaChainContext.ts:105


callingUserTonAddress

get callingUserTonAddress(): string

Source

chaincode/src/types/GalaChainContext.ts:91


logger

get logger(): GalaLoggerInstance

Source

chaincode/src/types/GalaChainContext.ts:67


operationCtx

get operationCtx(): OperationContext

Source

chaincode/src/types/GalaChainContext.ts:169


txUnixTime

get txUnixTime(): number

Source

chaincode/src/types/GalaChainContext.ts:193

Methods

createReadOnlyContext()

createReadOnlyContext(index): GalaChainContext

Parameters

index: undefined | number

Returns

a new, empty context that uses the same chaincode stub as the current context, but with dry run set (disables writes and deletes).

Source

chaincode/src/types/GalaChainContext.ts:204


resetCallingUser()

resetCallingUser(): void

Source

chaincode/src/types/GalaChainContext.ts:160


setChaincodeStub()

setChaincodeStub(stub): void

Parameters

stub: ChaincodeStub

Source

chaincode/src/types/GalaChainContext.ts:211


setDryRunOnBehalfOf()

setDryRunOnBehalfOf(d): void

Parameters

d: object

d.alias: UserAlias

d.ethAddress?: string

d.roles: string[]

d.signatureQuorum: number

d.signedByKeys: string[]

d.tonAddress?: string

Source

chaincode/src/types/GalaChainContext.ts:176