@gala-chain/chaincode ∙ API
API > GalaChainContext
Class: GalaChainContext
Contents
- Extends
- Constructors
- new GalaChainContext(config)
- Properties
- callingUserEthAddressValue
- callingUserRolesValue
- callingUserSignatureQuorumValue
- callingUserSignedByKeysValue
- callingUserTonAddressValue
- callingUserValue
- clientIdentity
- config
- isDryRun
- loggerInstance
- logging
- operationCtxValue
- stub
- txUnixTimeValue
- Accessors
- callingUser
- callingUserData
- callingUserEthAddress
- callingUserProfile
- callingUserRoles
- callingUserSignatureQuorum
- callingUserSignedByKeys
- callingUserTonAddress
- logger
- operationCtx
- txUnixTime
- Methods
- createReadOnlyContext()
- resetCallingUser()
- setChaincodeStub()
- setDryRunOnBehalfOf()
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
privatecallingUserEthAddressValue?:string
Source
chaincode/src/types/GalaChainContext.ts:50
callingUserRolesValue
privatecallingUserRolesValue?:string[]
Source
chaincode/src/types/GalaChainContext.ts:52
callingUserSignatureQuorumValue
privatecallingUserSignatureQuorumValue?:number
Source
chaincode/src/types/GalaChainContext.ts:54
callingUserSignedByKeysValue
privatecallingUserSignedByKeysValue?:string[]
Source
chaincode/src/types/GalaChainContext.ts:53
callingUserTonAddressValue
privatecallingUserTonAddressValue?:string
Source
chaincode/src/types/GalaChainContext.ts:51
callingUserValue
privatecallingUserValue?: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
privateloggerInstance?: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
privateoperationCtxValue?:OperationContext
Source
chaincode/src/types/GalaChainContext.ts:55
stub
stub:
GalaChainStub
Overrides
Context.stub
Source
chaincode/src/types/GalaChainContext.ts:48
txUnixTimeValue
privatetxUnixTimeValue?:number
Source
chaincode/src/types/GalaChainContext.ts:56
Accessors
callingUser
getcallingUser():UserAlias
Source
chaincode/src/types/GalaChainContext.ts:74
callingUserData
setcallingUserData(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
getcallingUserEthAddress():string
Source
chaincode/src/types/GalaChainContext.ts:84
callingUserProfile
getcallingUserProfile():UserProfile
Source
chaincode/src/types/GalaChainContext.ts:123
callingUserRoles
getcallingUserRoles():string[]
Source
chaincode/src/types/GalaChainContext.ts:98
callingUserSignatureQuorum
getcallingUserSignatureQuorum():number
Source
chaincode/src/types/GalaChainContext.ts:114
callingUserSignedByKeys
getcallingUserSignedByKeys():string[]
Source
chaincode/src/types/GalaChainContext.ts:105
callingUserTonAddress
getcallingUserTonAddress():string
Source
chaincode/src/types/GalaChainContext.ts:91
logger
getlogger():GalaLoggerInstance
Source
chaincode/src/types/GalaChainContext.ts:67
operationCtx
getoperationCtx():OperationContext
Source
chaincode/src/types/GalaChainContext.ts:169
txUnixTime
gettxUnixTime():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