Skip to main content

Start developing

Kuber Client

Example repository: kuber-client-example

Test file: hydra.test.ts

Installation

To install the kuber-client package, you can use npm or yarn:

npm install kuber-client
# or
yarn add kuber-client

Quick Start

Here's a quick example of how to use KuberHydraApiProvider to interact with a Hydra head:

const { KuberHydraApiProvider } = require("kuber-client");

async function main() {
const hydra = new KuberHydraApiProvider("http://localhost:8082");

const headState = await hydra.queryHeadState();
console.log("Head state:", headState.state);

// Example: Close the head
await hydra.close(true);
}

main();