The user's session keypair for authentication
The document ID of the binary file to delete
The Welshare API environment configuration
Promise that resolves when the file is deleted
import { WelshareApi, resolveEnvironment } from "@welshare/sdk";
await WelshareApi.deleteBinaryFile(
keypair,
"abc-123-def-456",
resolveEnvironment("production")
);
Side effects:
{apiUrl}/auth/delegate/storage?requestType=deleteSecurity notes:
Error handling:
Delete a binary file from the user's storage.
This deletes both the metadata record in Nillion and the encrypted file in S3. The deletion happens in three steps: