Vana SDK - v3.5.0
    Preparing search index...

    Class VanaStorage

    Storage provider that talks to the vana-storage Worker (https://storage.vana.org by default). All requests are authenticated with Web3Signed headers signed by the configured wallet.

    Filenames passed to VanaStorage.upload must be of the form "{scope}/{collectedAt}" (e.g. "instagram.profile/2026-05-08T20:00:00.000Z"). The owner address is prepended automatically to produce the canonical blob path /v1/blobs/{owner}/{scope}/{collectedAt}.

    import { privateKeyToAccount } from "viem/accounts";
    import { VanaStorage } from "@opendatalabs/vana-sdk/node";

    const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
    const storage = new VanaStorage({
    signer: {
    address: account.address,
    signMessage: (msg) => account.signMessage({ message: msg }),
    },
    });

    const result = await storage.upload(
    new Blob([ciphertext]),
    "instagram.profile/2026-05-08T20:00:00.000Z",
    );

    Implements

    Index

    Methods

    • Upload an encrypted blob to vana-storage.

      Parameters

      • file: Blob

        The blob to upload.

      • Optionalfilename: string

        Required relative key in the form "{scope}/{collectedAt}". The owner address is prepended automatically.

      Returns Promise<StorageUploadResult>

    • Listing is not supported by vana-storage — file discovery is handled by the Gateway DataRegistry, not the storage layer.

      Parameters

      • Optional_options: StorageListOptions

      Returns Promise<StorageFile[]>