Cloud client
CloudClient starts the Calimero cloud’s TEE High Availability flow for a
context. Unlike the other clients it is standalone — construct it directly, it
makes no authenticated node calls, and each method opens the cloud UI in a new
browser tab. See the high-availability guide for
context.
import { CloudClient } from '@calimero-network/mero-js';
const cloud = new CloudClient(); // default host// or: new CloudClient({ cloudBaseUrl: 'https://cloud.example.com' })Constructor
Section titled “Constructor”class CloudClient { constructor(config?: { cloudBaseUrl?: string }); // default 'https://cloud.calimero.network'}enableHA(options): void
Section titled “enableHA(options): void”Opens ${cloudBaseUrl}/enable-ha with the group and context as query
parameters, and an optional redirect_url the cloud returns to when done.
interface EnableHAOptions { groupId: string; contextId: string; redirectUrl?: string;}
cloud.enableHA({ groupId, contextId, redirectUrl: window.location.href });disableHA(options): void
Section titled “disableHA(options): void”The mirror of enableHA, opening ${cloudBaseUrl}/disable-ha. Same options
(DisableHAOptions is structurally identical to EnableHAOptions).
cloud.disableHA({ groupId, contextId });