Skip to content

Commit

Permalink
[FABCN-414] Update TypeScript definition (#165)
Browse files Browse the repository at this point in the history
This patch updates the type defintion file for TypeScript to add classes
and interfaces related to the chaincode server feature.

Signed-off-by: Taku Shimosawa <taku.shimosawa@hal.hitachi.com>
  • Loading branch information
shimos authored Jun 15, 2020
1 parent dab4f39 commit 38a7123
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libraries/fabric-shim/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>;
}

export interface ChaincodeServerOpts {
ccid: string;
address: string;
tlsProps: ChaincodeServerTLSProperties;
}

export interface ChaincodeServerTLSProperties {
key: Buffer;
cert: Buffer;
clientCACerts: Buffer;
}

export class ClientIdentity implements IClientIdentity {
Expand Down

0 comments on commit 38a7123

Please sign in to comment.