
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
@bajerm/cactus-verifier-client
Advanced tools
Verifier cactus client library to communicate with validators through socket.io
@hyperledger/cactus-verifier-clientThis package provides Verifier and VerifierFactory components that can be used to communicate with compatible Cactus ledger connectors (validators) through single, unified interface.
| validatorType | cactus ledger connector plugin |
|---|---|
| BESU_1X BESU_2X | cactus-plugin-ledger-connector-besu |
| QUORUM_2X | cactus-test-plugin-ledger-connector-quorum |
| CORDA_4X | cactus-plugin-ledger-connector-corda |
| IROHA_1X | cactus-plugin-ledger-connector-iroha |
| legacy-socketio | cactus-plugin-ledger-connector-fabric-socketio cactus-plugin-ledger-connector-go-ethereum-socketio cactus-plugin-ledger-connector-sawtooth-socketio |
import {
VerifierFactory,
VerifierFactoryConfig,
} from "@hyperledger/cactus-verifier-client";
// Create VerifierFactory configuration that should describe all validators we want to connect to.
// This can be read from a file or typed manually, the config is a superset of cactus-cmd-socketio-server ledger plugin config.
const ledgerPluginInfo: VerifierFactoryConfig = [
{
validatorID: "some_legacy_connector", // required
validatorType: "legacy-socketio", // required - see table above for supported validator types
validatorURL: "https://localhost:9999", // legacy-socketio specific config
validatorKeyPath: "./keysUr7d10R.crt", // legacy-socketio specific config
ledgerInfo: { // optional
ledgerAbstract: "My legacy Ledger",
},
apiInfo: [], // optional
},
{
validatorID: "besu_openapi_connector", // required
validatorType: "BESU_2X", // required - see table above for supported validator types
basePath: "https://localhost:9999", // besu specific config
},
];
// Instantiate single VerifierFactory from given config in your Bussiness Logic Plugin.
const verifierFactory = new VerifierFactory(ledgerPluginInfo);
// Get ApiClient to validator with ID "myBesuValidatorId"
// Second argument will determine type of returned Verifier (BesuApiClient in this case)
const myBesu: Verifier<BesuApiClient> = sut.getVerifier("myBesuValidatorId", "BESU_1X"))
// Second argument can be ignored for backward-compatibility
// It will return Verifier<(union of all supported ApiClients)>
const client: Verifier<any> = sut.getVerifier(validatorId);
// Use VerifierFactory to get an instance of ledger connector Verifier
const myBesu: Verifier<BesuApiClient> = sut.getVerifier("myBesuValidatorId", "BESU_1X"))
// Or create it manually from ledger ApiClient
const besuApiClientOptions = new BesuApiClientOptions({
basePath: "https://localhost:9999",
});
const apiClient = new BesuApiClient(besuApiClientOptions);
const myBesu: Verifier<BesuApiClient> = new Verifier("besu_openapi_connector", apiClient, "info");
export interface IVerifier {
// Immediately sends request to the validator, doesn't report any error or responses.
sendAsyncRequest(
contract: Record<string, unknown>,
method: Record<string, unknown>,
args: Record<string, unknown>,
): Promise<void>;
// Sends request to be executed on the ledger, watches and reports any error and the response from a ledger.
sendSyncRequest(
contract: Record<string, unknown>,
method: Record<string, unknown>,
args: Record<string, unknown>,
): Promise<any>;
// Start monitoring for new events / blocks from underlying ledger.
startMonitor(
id: string,
options: Record<string, unknown>,
eventListener: IVerifierEventListener,
): void;
// Stops the monitor for specified app, removes it's subscription from internal storage.
stopMonitor(id?: string): void;
}
FAQs
Verifier cactus client library to communicate with validators through socket.io
We found that @bajerm/cactus-verifier-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.