Skip to content

Commit

Permalink
fix: reverting accidental manual change in generated code
Browse files Browse the repository at this point in the history
This must've slipped in during a recent refactor.

Fixes hyperledger-cacti#453

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Jan 6, 2021
1 parent 7206b85 commit 2612d4f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ICactusPlugin } from "../i-cactus-plugin";
import { ConsensusAlgorithmFamily } from "../../generated/openapi/typescript-axios/api";

/**
* Common interface to be implemented by plugins which are implementing the connection to ledgers.
Expand All @@ -21,4 +22,12 @@ export interface IPluginLedgerConnector<
* type of ledger this connectir is targeted at.
*/
transact(options?: TransactIn): Promise<TransactOut>;

/**
* Returns the family of algorithms in which the consensus algorithm used
* by the ledger (this connector is associated with) belongs in.
*
* @see {ConsensusAlgorithmFamily}
*/
getConsensusAlgorithmFamily(): Promise<ConsensusAlgorithmFamily>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ export interface Web3SigningCredentialPrivateKeyHex {
*/
export enum Web3SigningCredentialType {
CACTUSKEYCHAINREF = 'CACTUS_KEYCHAIN_REF',
GETHKEYCHAINPASSWORD = 'GETH_KEYCHAIN_PASSWORD',
PRIVATEKEYHEX = 'PRIVATE_KEY_HEX',
NONE = 'NONE'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ContractSendMethod } from "web3-eth-contract";
import { TransactionReceipt } from "web3-eth";

import {
ConsensusAlgorithmFamily,
IPluginLedgerConnector,
IWebServiceEndpoint,
IPluginWebService,
Expand Down Expand Up @@ -168,6 +169,12 @@ export class PluginLedgerConnectorBesu
return PluginAspect.LEDGER_CONNECTOR;
}

public async getConsensusAlgorithmFamily(): Promise<
ConsensusAlgorithmFamily
> {
return ConsensusAlgorithmFamily.AUTHORITY;
}

public async invokeContract(
req: InvokeContractV1Request
): Promise<InvokeContractV1Response> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { Optional } from "typescript-optional";

import {
ConsensusAlgorithmFamily,
IPluginLedgerConnector,
PluginAspect,
IPluginWebService,
Expand Down Expand Up @@ -116,6 +117,12 @@ export class PluginLedgerConnectorFabric
return Optional.empty();
}

public async getConsensusAlgorithmFamily(): Promise<
ConsensusAlgorithmFamily
> {
return ConsensusAlgorithmFamily.AUTHORITY;
}

/**
* FIXME: Implement this feature of the connector.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ContractSendMethod } from "web3-eth-contract";
import { TransactionReceipt } from "web3-eth";

import {
ConsensusAlgorithmFamily,
IPluginLedgerConnector,
IWebServiceEndpoint,
IPluginWebService,
Expand Down Expand Up @@ -152,6 +153,12 @@ export class PluginLedgerConnectorQuorum
return PluginAspect.LEDGER_CONNECTOR;
}

public async getConsensusAlgorithmFamily(): Promise<
ConsensusAlgorithmFamily
> {
return ConsensusAlgorithmFamily.AUTHORITY;
}

public async invokeContract(
req: InvokeContractV1Request
): Promise<InvokeContractV1Response> {
Expand Down

0 comments on commit 2612d4f

Please sign in to comment.