npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@intenus/seal

v2.4.0

Published

Seal encryption/decryption wrapper for Intenus Protocol (AI infra standard)

Readme

@intenus/seal

Seal encryption/decryption wrapper for Intenus Protocol - secure intent and solution data.

Features

  • Intent Encryption - Secure intent data for solver processing
  • Solution Encryption - Protect solver solutions with privacy
  • Session Management - Automatic session key caching and lifecycle
  • Object-Based Access - Smart contract-enforced access via Intent/Solution objects
  • Type Safety - Full TypeScript support

Installation

npm install @intenus/seal

Quick Start

import { IntenusSealClient, encryptIntentData, decryptIntentData } from '@intenus/seal';
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';

const client = new IntenusSealClient({
  network: 'testnet'
});

const keypair = Ed25519Keypair.generate();

// Encrypt intent data
const intentData = {
  action: 'swap',
  tokenIn: 'SUI',
  tokenOut: 'USDC',
  amountIn: '1000000'
};

const encrypted = await encryptIntentData(
  client,
  intentData,
  'user_context_123'  // Context for policy ID generation
);

// Decrypt with intent object ID
const decrypted = await decryptIntentData(
  client,
  encrypted.encryptedData,
  intentObjectId,
  solverKeypair
);

Core API

Helper Functions

// Encrypt intent with defaults
const result = await encryptIntentData(
  client,
  intentData,
  'context_123',  // Context for policy ID generation
  {
    threshold: 2
  }
);

// Decrypt intent (requires Intent object ID)
const decrypted = await decryptIntentData(
  client,
  encryptedData,
  intentObjectId,
  solverKeypair
);

// Encrypt solution
const solutionResult = await encryptSolutionData(
  client,
  solutionData,
  'solver_123',  // Solver context
  {
    threshold: 2,
    isPublic: false
  }
);

// Decrypt solution (requires Solution object ID)
const decryptedSolution = await decryptSolutionData(
  client,
  encryptedData,
  solutionObjectId,
  authorizedKeypair
);

Direct Client API

// Encrypt intent
const intentResult = await client.encryptIntent(data, {
  packageId: protocolPackageId,
  policyId: 'policy_123',
  threshold: 2,
  context: 'user_batch_456'  // Optional context
});

// Encrypt solution
const solutionResult = await client.encryptSolution(data, {
  packageId: protocolPackageId,
  policyId: 'policy_789',
  threshold: 2,
  isPublic: false
});

// Decrypt intent (requires Intent object ID from chain)
const decryptedIntent = await client.decryptIntent(
  encryptedData,
  intentObjectId,
  solverKeypair
);

// Decrypt solution (requires Solution object ID from chain)
const decryptedSolution = await client.decryptSolution(
  encryptedData,
  solutionObjectId,
  authorizedKeypair
);

Configuration

const client = new IntenusSealClient({
  network: 'testnet',
  defaultThreshold: 2,
  verifyKeyServers: false
});

Advanced Configuration

const client = new IntenusSealClient({
  network: 'mainnet',
  suiClient: customSuiClient,
  keyServers: [
    {
      objectId: '0x73d05d62c18d9374e3ea529e8e0ed6161da1a141a94d3f76ae3fe4e99356db75',
      weight: 2,
      apiKeyName: 'x-api-key',
      apiKey: 'your-api-key'
    }
  ],
  defaultThreshold: 2,
  verifyKeyServers: true
});

Utilities

import {
  generatePolicyId,
  prepareDataForEncryption,
  parseDecryptedData,
  validateEncryptionConfig
} from '@intenus/seal';

// Generate policy ID
const policyId = generatePolicyId('intent', 'batch_123');

// Prepare data
const data = prepareDataForEncryption({ key: 'value' });

// Parse decrypted data
const parsed = parseDecryptedData(decryptedBytes, 'json');

// Validate config
const isValid = validateEncryptionConfig(config);

Error Handling

import { IntenusSealError, ERROR_CODES } from '@intenus/seal';

try {
  const result = await client.encryptIntent(data, config, signer);
} catch (error) {
  if (error instanceof IntenusSealError) {
    switch (error.code) {
      case ERROR_CODES.ENCRYPTION_FAILED:
        console.log('Encryption failed:', error.message);
        break;
      case ERROR_CODES.UNAUTHORIZED:
        console.log('Access denied:', error.message);
        break;
    }
  }
}

Types

import type {
  IntenusSealConfig,
  SealPolicyConfig,
  IntentEncryptionConfig,
  SolutionEncryptionConfig,
  EncryptionResult
} from '@intenus/seal';

import { POLICY_TYPES } from '@intenus/seal';

License

MIT