forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core-api): common consortium interface
Signed-off-by: jordigiam <jordi.giron.amezcua@accenture.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/cactus-core-api/src/main/typescript/plugin/consortium/i-plugin-consortium.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ICactusPlugin } from "../i-cactus-plugin"; | ||
|
||
/** | ||
* Common interface to be implemented by plugins which are implementing the connection to ledgers. | ||
*/ | ||
export interface IPluginConsortium< | ||
GetNodeJwsIn, | ||
GetNodeJwsOut, | ||
GetConsortiumJwsIn, | ||
GetConsortiumJwsOut | ||
> extends ICactusPlugin { | ||
/** | ||
* Returns the JSON Web Signature of the consortium metadata, as issued by the | ||
* **current node** that the request has been issued to. | ||
* @param req The parameters of the request, if any. | ||
*/ | ||
getNodeJws(req?: GetNodeJwsIn): Promise<GetNodeJwsOut>; | ||
|
||
/** | ||
* Returns the JSON Web Signature of the consortium metadata, as issued by | ||
* **all the nodes in the consortium** that are known to be in the consortium | ||
* by this current node that the request has been issued to. | ||
* | ||
* @param req The parameters of the request, if any. | ||
*/ | ||
getConsortiumJws(req?: GetConsortiumJwsIn): Promise<GetConsortiumJwsOut>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters