Skip to content

Commit

Permalink
[FABN-1407] Add PDC and EP types (#38)
Browse files Browse the repository at this point in the history
Add typings for a private data collection configuration
and endorsmeent policy to ChaincodeInstantiateUpgradeRequest.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I32f1789dbb96fecc88d03fcd841356d21fcb89e9
  • Loading branch information
Simon Stone authored and andrew-coleman committed Dec 2, 2019
1 parent 9e9ec9e commit 583e902
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions fabric-client/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,17 +568,35 @@ declare namespace Client { // tslint:disable-line:no-namespace

export type ChaincodeInstallRequestv1 = ChaincodePackageInstallRequest | ChaincodePathInstallRequest;

export interface CollectionConfig {
name: string;
policy: {
identities: any[];
policy: any;
};
requiredPeerCount: number;
maxPeerCount: number;
blockToLive?: number;
memberOnlyRead?: boolean;
}

export type CollectionsConfig = CollectionConfig[];

export interface EndorsementPolicy {
identities: any[];
policy: any;
}
export interface ChaincodeInstantiateUpgradeRequest {
targets?: Peer[] | string[];
chaincodeType?: ChaincodeType;
chaincodeId: string;
chaincodeVersion: string;
txId: TransactionId;
'collections-config'?: string;
'collections-config'?: string | CollectionsConfig;
transientMap?: TransientMap;
fcn?: string;
args?: string[];
'endorsement-policy'?: any;
'endorsement-policy'?: EndorsementPolicy;
}

export interface ChaincodeInvokeRequest {
Expand Down

0 comments on commit 583e902

Please sign in to comment.