NOVA SDK for JavaScript/TypeScript

Version: 1.0.3 License: MIT Network: NEAR Protocol (Mainnet & Testnet) Package: nova-sdk-jsarrow-up-right

A JavaScript/TypeScript SDK for NOVA's secure, decentralized file-sharing primitive on NEAR. NOVA hybridizes on-chain access control with off-chain TEE-secured keys via Shade Agents, using nonce-based ed25519-signed tokens for ephemeral, verifiable access. This ensures privacy-first data sharing for AI datasets, healthcare/financial records, and sensitive documents.

Features

  • 🔐 Zero-Knowledge Architecture - Keys managed in TEE; never exposed to SDK

  • 🌐 IPFS Storage - Decentralized file storage via Pinata

  • ⛓️ NEAR Blockchain - Immutable access control & transaction logs

  • 🛡️ API Key Auth - Secure authentication via API keys (get yours at nova-sdk.com)

  • 🔑 Automated Signing - MCP server signs transactions using keys from Shade TEE

  • 👥 Group Management - Fine-grained membership with automatic key rotation on revocation

  • 🚀 Composite Operations - Simplified workflows for upload/retrieve

  • 📦 TypeScript Support - Full type definitions included

Installation

npm install nova-sdk-js

⚠️ Mainnet Notice

NOVA SDK operates on NEAR mainnet by default. All operations consume real NEAR tokens.

Typical costs (mainnet):

  • Register group: 0.05 NEAR ($0.15 USD)

  • Upload file: ~0.01 NEAR (incl. IPFS storage)

  • Retrieve file: ~0.001 NEAR

Note: On testnet, IPFS operations are mocked (in-memory storage). Blockchain operations use real testnet with faucet tokens.

Quick Start

Prerequisites

  1. Create a NOVA account at nova-sdk.comarrow-up-right

  2. Generate an API key from the "Manage Account" menu

  3. Fund your account with NEAR tokens for transaction fees

Simple upload/retrieve example

That's it! The SDK automatically:

  • Authenticates using your API key

  • Manages session tokens (auto-refresh before 24h expiry)

  • Handles all encryption/decryption client-side

Configuration Options

📖 Core Operations

File Upload & Retrieve

Group Management

Read-Only Queries

These don't require authentication:

How It Works

Upload Flow

Retrieve Flow

Key point: Plaintext data and encryption keys never travel together. The MCP server never sees your unencrypted files.

Authentication

The SDK uses API keys for secure authentication. Get your key at nova-sdk.comarrow-up-right:

  1. Create or log into your NOVA account

  2. Click "Manage Account"

  3. Click "Generate API Key"

  4. Copy the key (shown only once!)

Note: One API key per account. Generating a new key invalidates the old one.

Error Handling

Costs (Mainnet)

Some operations require NEAR token deposits (paid from user's NOVA account):

  • registerGroup() - ~0.05 NEAR

  • addGroupMember() - ~0.001 NEAR

  • revokeGroupMember() - ~0.001 NEAR

  • upload() - ~0.003 NEAR (claim token + record Tx)

  • retrieve() - 0.001 NEAR (claim only)

Ensure your NOVA account has sufficient balance before calling these methods.

API Reference

Constructor

Methods

Method
Description

upload(groupId, data, filename)

Upload encrypted file

retrieve(groupId, cid)

Retrieve and decrypt file

registerGroup(groupId)

Create new group

addGroupMember(groupId, memberId)

Add member to group

revokeGroupMember(groupId, memberId)

Remove member (rotates key)

authStatus(groupId?)

Check authentication status

isAuthorized(groupId, userId?)

Check group authorization

getGroupOwner(groupId)

Get group owner

getGroupChecksum(groupId)

Get TEE attestation checksum

getTransactionsForGroup(groupId)

List group transactions

getBalance(accountId?)

Get NEAR balance

estimateFee(action)

Estimate operation cost

refreshToken()

Force token refresh

computeHash(data)

SHA-256 hash (sync)

computeHashAsync(data)

SHA-256 hash (async)

License

MIT LICENSEarrow-up-right - Copyright (c) 2026 CivicTech OÜ

Resources

Support

Last updated