Skip to content

UnveilTech/unveilpass-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnveilPass Node.js SDK

Official Node.js SDK for UnveilPass — zero-knowledge password manager.

Features

  • Agent Gateway — Request credentials from your vault with human-in-the-loop approval
  • CryptoLink — Send encrypted files with end-to-end encryption (AES-256-GCM)
  • Zero-knowledge — All encryption happens client-side. The server never sees your data.

Installation

npm install @unveilpass/sdk

Quick Start

Agent Gateway — Request Credentials

const { UnveilPassAgent } = require('@unveilpass/sdk');

const agent = new UnveilPassAgent('uvp_agent_your_key_here');

// Request a credential (blocks until manager approves)
const cred = await agent.getCredential('entry-uuid-here', { ttl: 300, timeout: 120 });
console.log(cred.username, cred.password);

CryptoLink — Send Encrypted Files

const { UnveilPassAgent } = require('@unveilpass/sdk');

const agent = new UnveilPassAgent('uvp_agent_your_key_here');

// Send a file with PIN protection
const result = await agent.sendFile('contract.pdf', {
    ttl: 86400,        // 24 hours
    pin: '482916',
    message: 'Please sign and return'
});
console.log(result.link);  // Share with recipient
console.log(result.pin);   // Share separately

// With download limit
const result2 = await agent.sendFile('report.xlsx', {
    ttl: 604800,       // 7 days
    maxDownloads: 5
});

// List and delete
const sends = await agent.listSends();
await agent.deleteSend(sends[0].id);

API Reference

new UnveilPassAgent(agentKey, serverUrl?)

Create an agent client. Default server: https://unveilpass.com.

Credential Methods

Method Description
requestCredential(entryId, ttl?) Request access. Returns requestId.
checkStatus(requestId) Check status (pending, approved, denied, expired).
fetchCredential(requestId) Fetch credential after approval (one-time).
getCredential(entryId, options?) Request and wait (blocking). Options: { ttl, timeout, pollInterval }.

CryptoLink Methods

Method Description
sendFile(filepath, options?) Encrypt and upload. Options: { ttl, maxDownloads, singleUse, pin, message }. Returns { link, id, pin? }.
listSends() List all CryptoLink sends.
deleteSend(sendId) Delete a CryptoLink send.

Security

  • Files encrypted client-side with AES-256-GCM (Node.js crypto module)
  • Decryption key in URL fragment — never sent to server
  • PIN hashed with SHA-256 — server never sees the PIN
  • Agent credentials are one-time use with TTL

Requirements

  • Node.js 16+
  • No external dependencies (uses built-in crypto and fs modules)

License

MIT

Links

About

UnveilPass Node.js SDK — Agent Gateway + CryptoLink encrypted file transfer

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors