# @hyperledger/cactus-core-api

> Contains type definitions/interfaces for the kernel of the codebase. Kept separate from the implementation so that it is easier to use it as a dependency.

Latest version **2.0.0** (published 2024-10-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @hyperledger/cactus-core-api
pnpm add @hyperledger/cactus-core-api
yarn add @hyperledger/cactus-core-api
bun add @hyperledger/cactus-core-api
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-10-18 |
| First published | 2020-12-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 7 |
| Unpacked size | 7.7 MB |
| Known vulnerabilities | 0 (+38 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 411 |
| Author | Hyperledger Cactus Contributors |
| Maintainers | hyperledger-ghci, hyperledger-lf |
| Keywords | Hyperledger, Cactus, Integration, Blockchain, Distributed Ledger Technology |

## Links

- npm: https://www.npmjs.com/package/@hyperledger/cactus-core-api
- Repository: https://github.com/hyperledger/cacti
- Homepage: https://github.com/hyperledger/cacti#readme
- Issues: https://github.com/hyperledger-cacti/cacti/issues
- npm.io page: https://npm.io/package/@hyperledger/cactus-core-api

## Dependencies (7)

- [ajv](https://npm.io/package/ajv.md) 8.17.1
- [axios](https://npm.io/package/axios.md) 1.7.7
- [ajv-formats](https://npm.io/package/ajv-formats.md) 3.0.1
- [ajv-draft-04](https://npm.io/package/ajv-draft-04.md) 1.0.0
- [@grpc/grpc-js](https://npm.io/package/@grpc/grpc-js.md) 1.11.3
- [google-protobuf](https://npm.io/package/google-protobuf.md) 3.21.4
- [@hyperledger/cactus-common](https://npm.io/package/@hyperledger/cactus-common.md) 2.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2024-10-18
- 2.0.0-main.339 (main) — 2024-06-13
- 2.0.0-2945-supply-chain-app-build-failed.241 (2945-supply-chain-app-build-failed) — 2024-03-08
- 2.0.0-lfx-connector.208 (lfx-connector) — 2024-02-07
- 2.0.0-dev.197 (dev) — 2024-01-25
- 2.0.0-build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix.126 (build-deps-upgrade-to-lerna-lite-v3-1-0-config-fix) — 2023-12-08
- 1.0.1-jwt-supply-chain.9df3fe79.16 (jwt-supply-chain) — 2022-04-05
- 0.8.1-pr-brioux-1333.92b26c3a.36 (pr-brioux-1333) — 2021-10-06
- 0.10.1-fix-quorum-api-server.0677a0e6.4 (fix-quorum-api-server) — 2021-09-29
- 0.10.1-fix-quorum-no-keychain-endpoints.bf5e0403.1 (fix-quorum-no-keychain-endpoints) — 2021-09-28
- 0.9.1-ci-942.cbb849c6.35 (ci-942) — 2021-09-27
- 0.9.1-add-bluebird-dependency.a8944f63.33 (add-bluebird-dependency) — 2021-09-23
- 0.9.1-web-socket-identity-provider.845e2a3e.23 (web-socket-identity-provider) — 2021-09-16
- 0.9.1-docs-1312.bcfd3c31.6 (docs-1312) — 2021-09-09
- 0.8.1-vaultTransitKeychain.5ad9cac4.17 (vaultTransitKeychain) — 2021-08-30
- … 44 more at https://npm.io/package/@hyperledger/cactus-core-api/versions

## README

# @hyperledger/cactus-core-api

This package is meant to be depended on by most of the other packages for interface
definitions, abstract classes and generated code. All of which is to be kept with
as few dependencies as possible in order to reduce the potential for circular
dependencies.

From the above it also comes that the `core-api` package is rarely used by developers who are implementing projects with Hyperledger Cactus and instead it is mostly consumed by the framework's other packages internally (e.g. the Hyperledger Cactus contributors).

# Usage

## Installation

You can install the package via your favorite package manager.

Yarn: 

    yarn add --exact @hyperledger/cactus-core-api

npm: 

    npm install --save-exact=true @hyperledger/cactus-core-api

> We highly recommend using exact versions in general when managing your dependencies
> in order to achieve (or get closer to) [reproducible builds](https://reproducible-builds.org/) and to enhance your
> security posture against malicious package versions that might get pushed to the
> registries without the knowledge or consent or well intentioned maintainers.

## Import

```typescript
import {
  GetKeychainEntryRequestV1,
  isICactusPlugin,
  IEndpointAuthzOptions,
  IExpressRequestHandler,
  IWebServiceEndpoint,
} from "@hyperledger/cactus-core-api";
```

## Check If POJO is a Cactus Plugin

```typescript
if (!isICactusPlugin(plugin)) {
    throw new Error(`PluginRegistry#add() plugin not an ICactusPlugin`);
}
```

# Development

## Weaver Protocol Buffers

To test the Rust build, you need to run either one of the following:

`yarn lerna run proto:protoc-gen-rust` (from the project root)

or a regular cargo build from the core-api package directory, e.g.:

```sh
cd packages/cactus-core-api/
cargo build
```

If you prefer to use `make` that also works from the package directory:

```sh
cd packages/cactus-core-api/
make
```

The protocol buffer to Rust compilation is not yet part of the project build by
default because we need some time to include the Rust toolchain in the project-wide
list of build dependencies for developers.

---
_Source: https://npm.io/package/@hyperledger/cactus-core-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
