The array of underlying node clients for the cluster.
The signer used by this client for signing.
Creates one or more data documents owned by the user.
Optionaloptions: { auth?: AuthContext }Deletes a user-owned document from all nodes.
Optionaloptions: { auth?: AuthContext }The DID of the signer associated with this client.
Grants a given Did access to a given user-owned document.
Optionaloptions: { auth?: AuthContext }Lists references to all data documents owned by the user.
Optionaloptions: {Retrieves information about each node in the cluster.
Reads a single data document, automatically revealing concealed values if a key is configured.
Optionaloptions: { auth?: AuthContext }Reads the user's profile information from the cluster.
Optionaloptions: { auth?: AuthContext }Revokes access for a given Did to the specified user-owned document.
Optionaloptions: { auth?: AuthContext }StaticfromCreates and initializes a new SecretVaultUserClient instance.
// Basic instantiation with an auto-generated key
const userClient = await SecretVaultUserClient.from({
signer: Signer.generate(),
baseUrls: ["http://localhost:40081", "http://localhost:40082"],
});
// Advanced: Using a custom signer from a browser wallet
import { Signer } from "@nillion/nuc";
// Assumes window.ethereum is available from a browser wallet like MetaMask
const customSigner = await Signer.fromEip1193Provider(window.ethereum);
const clientWithSigner = await SecretVaultUserClient.from({
signer: customSigner,
baseUrls: ["http://localhost:40081", "http://localhost:40082"],
});
Client for user operations on SecretVaults.
This client handles user-specific operations for managing owned documents, including creation, retrieval, updates, and deletion. It supports automatic handling of concealed data when configured with blindfold.
Example