diff --git a/libraries/fabric-shim/types/index.d.ts b/libraries/fabric-shim/types/index.d.ts index b11dee63..64749079 100644 --- a/libraries/fabric-shim/types/index.d.ts +++ b/libraries/fabric-shim/types/index.d.ts @@ -45,6 +45,24 @@ declare module 'fabric-shim' { static newLogger(name: string): Logger; static start(chaincode: ChaincodeInterface): any; static success(payload?: Uint8Array): ChaincodeResponse; + static server(chaincode: ChaincodeInterface, serverOpts: ChaincodeServerOpts): ChaincodeServer; + } + + export class ChaincodeServer { + constructor(chaincode: ChaincodeInterface, serverOpts: ChaincodeServerOpts); + start(): Promise; + } + + export interface ChaincodeServerOpts { + ccid: string; + address: string; + tlsProps: ChaincodeServerTLSProperties; + } + + export interface ChaincodeServerTLSProperties { + key: Buffer; + cert: Buffer; + clientCACerts: Buffer; } export class ClientIdentity implements IClientIdentity {