Skip to main content
This release is 0 versions behind 24.6.1 — the latest version of @rivet-gg/actor-client. Jump to latest

🔧 Rivet Actors have built-in RPC, state, and events — the easiest way to build modern applications.

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
64%
Published
2 days ago (24.6.1-rc.2)
class Client

Client for managing & connecting to actors.

Constructors

new
Client(
managerEndpointPromise: string | Promise<string>,
)

Creates an instance of Client.

Methods

create<A = unknown>(opts: CreateOptions): Promise<ActorHandle<A>>

Creates a new actor with the provided tags.

get<A = unknown>(
tags: ActorTags,
opts?: GetOptions,
): Promise<ActorHandle<A>>

Gets an actor by its tags, creating it if necessary.

getWithId<A = unknown>(
actorId: string,
): Promise<ActorHandle>

Gets an actor by its ID.

See

Add Package

deno add jsr:@rivet-gg/actor-client

Import symbol

import { Client } from "@rivet-gg/actor-client";

---- OR ----

Import directly with a jsr specifier

import { Client } from "jsr:@rivet-gg/actor-client";

Add Package

npx jsr add @rivet-gg/actor-client

Import symbol

import { Client } from "@rivet-gg/actor-client";

Add Package

yarn dlx jsr add @rivet-gg/actor-client

Import symbol

import { Client } from "@rivet-gg/actor-client";

Add Package

pnpm dlx jsr add @rivet-gg/actor-client

Import symbol

import { Client } from "@rivet-gg/actor-client";

Add Package

bunx jsr add @rivet-gg/actor-client

Import symbol

import { Client } from "@rivet-gg/actor-client";