Skip to main content
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
94%
Published
a month ago (0.1.0)
class Client

The main client class that wraps all the services.

Examples

Example 1

import { Client } from 'hyveos-sdk'
import { Connection } from 'hyveos-web'

const transport = new Connection('http://localhost:8080')
const client = new Client(transport)

Constructors

new
Client(transport: T)

Type Parameters

T extends ITransport

Properties

readonly
debug: Debug

Get access to the debug service which is used for debugging.

readonly
dht: DHT

Get access to the dht service which is used for distributed hash table communication.

Get access to the discovery service which is used for peer discovery.

Get access to the filetransfer service which is used for file transfer.

Get access to the gossipsub service which is used for pubsub communication.

readonly
localdb: LocalDb

Get access to the localdb service which is used for local storage.

readonly
reqresp: ReqRes

Get access to the reqresp service which is used for request response communication. The functionally is similar to http.

Get access to the scripting service which is used for deploying and managing scripts.

Add Package

deno add jsr:@hyveos/sdk

Import symbol

import { Client } from "@hyveos/sdk";

---- OR ----

Import directly with a jsr specifier

import { Client } from "jsr:@hyveos/sdk";

Add Package

npx jsr add @hyveos/sdk

Import symbol

import { Client } from "@hyveos/sdk";

Add Package

yarn dlx jsr add @hyveos/sdk

Import symbol

import { Client } from "@hyveos/sdk";

Add Package

pnpm dlx jsr add @hyveos/sdk

Import symbol

import { Client } from "@hyveos/sdk";

Add Package

bunx jsr add @hyveos/sdk

Import symbol

import { Client } from "@hyveos/sdk";