Client Setup

Initializing the SDK Client

The subsequent step involves setting up the universal client, which is essential for accessing the SDK functions. This client facilitates interactions with any DAO on the connected network.

You can import the Client class through @aragon/sdk-client, enabling you to execute operations applicable to all DAOs, irrespective of the plugins they incorporate.

For each plugin, there are specialized clients available that provide access to plugin-specific functionalities.

Clients can be organized as singletons for inheritance purposes or integrated into a context hook for streamlined use across your Javascript framework.

import { Client } from "@aragon/sdk-client";
import { context } from "../index";

// Instantiate the general purpose client from the Aragon OSx SDK context.
const client: Client = new Client(context);
console.log(client);

Last updated