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

tint-protocol-ai-sdk

v1.0.0

Published

TINT Protocol SDK - Privacy-preserving intent netting with cryptographic commitments

Readme

TINT Protocol SDK

Privacy-preserving intent execution with AI-powered natural language processing and cryptographic netting on Uniswap V4.

🤖 NEW: AI Agent Interface

The TINT SDK now includes a Gemini AI agent that lets users interact using plain English!

import { TintClient } from '@tint-protocol/sdk';

const client = new TintClient({
    privateKey: process.env.PRIVATE_KEY,
    rpcUrl: 'https://1rpc.io/sepolia',
    backendUrl: 'https://your-app.vercel.app/api',
    geminiApiKey: process.env.GEMINI_API_KEY // Enable AI agent
});

// Just talk to it!
await client.processNaturalLanguage('Swap 10 USDC to WETH');
// ✅ Intent parsed, commitment created, swap executed!

Features

AI-Powered Natural Language - Talk to your wallet like a human
Real Pedersen Commitments - Cryptographically hiding and binding
On-Chain Verification - TINTNettingVerifier contract (deployed on Sepolia)
Yellow Network Integration - State channel support via Nitrolite
Automatic Netting - 50-90% gas savings through intent aggregation
MEV Resistance - Only net amounts visible on-chain

Installation

npm install @tint-protocol/sdk @noble/curves @noble/hashes ethers @google/generative-ai

Quick Start

Option 1: AI Agent Interface (Recommended)

import { TintClient } from '@tint-protocol/sdk';

const client = new TintClient({
    privateKey: process.env.PRIVATE_KEY,
    rpcUrl: 'https://1rpc.io/sepolia',
    backendUrl: 'http://localhost:3000/api',
    geminiApiKey: process.env.GEMINI_API_KEY
});

await client.init();

// Natural language!
await client.processNaturalLanguage('Swap 10 USDC to WETH');
await client.processNaturalLanguage('Bridge 5 USDC from ethereum to base');
await client.processNaturalLanguage('Send 0.1 ETH to 0x123...');

// Chat with the agent
const response = await client.chat('How does TINT Protocol work?');
console.log(response);

Option 2: Programmatic API

import { TintClient } from '@tint-protocol/sdk';

const client = new TintClient({
    privateKey: process.env.PRIVATE_KEY,
    rpcUrl: 'https://1rpc.io/sepolia',
    backendUrl: 'https://your-app.vercel.app/api',
    verifierAddress: '0x3837C39afF6A207C8B89fa9e4DAa45e3FBB35443'
});

await client.init();

// Create intents programmatically
const intent1 = await client.createIntent({
    type: 'SWAP',
    fromToken: 'USDC',
    toToken: 'WETH',
    amount: 100
});

await client.submitIntent(intent1);

// Execute with netting
const result = await client.executeBatch();
console.log(`Netting Efficiency: ${result.efficiency}%`);

How It Works

1. Natural Language → Intent

"Swap 10 USDC to WETH" 
    ↓ (Gemini AI)
{type: "SWAP", fromToken: "USDC", toToken: "WETH", amount: 10}

2. Intent → Pedersen Commitment

C = keccak256(amount, randomness)
// Hides the amount until execution

3. Commitment → Yellow Channel

Encrypted transmission through state channels
Privacy-preserving aggregation

4. Netting Calculation

Total Sell: 150 USDC
Total Buy: 0 USDC (from network counter-parties)
Net Residual: 150 USDC
Efficiency: 60% (90 USDC netted off-chain)

5. On-Chain Execution

Only net residual (150 USDC) executed on Uniswap V4
Verified by TINTNettingVerifier contract
60% gas saved, 60% fees saved, 60% MEV saved

Deployed Contracts

Ethereum Sepolia

  • TINTNettingVerifier: 0x3837C39afF6A207C8B89fa9e4DAa45e3FBB35443

API Reference

TintClient

constructor(config: TintClientConfig)

Initialize the TINT client.

Config:

  • privateKey: Wallet private key
  • rpcUrl: RPC endpoint
  • backendUrl: TINT backend API URL
  • verifierAddress: TINTNettingVerifier contract address
  • geminiApiKey: (Optional) Gemini API key for AI agent

async processNaturalLanguage(prompt: string): Promise<ExecutionResult>

🤖 AI Agent Feature - Process natural language intent.

await client.processNaturalLanguage('Swap 10 USDC to WETH');

async chat(message: string): Promise<string>

🤖 AI Agent Feature - Chat with the AI agent.

const response = await client.chat('What is netting?');

hasAgent(): boolean

Check if AI agent is enabled.

TintAgent

async parseIntent(prompt: string): Promise<ParsedIntent[]>

Parse natural language into structured intents.

async summarizeExecution(intents, results): Promise<string>

Generate human-friendly execution summary.

Examples

Multi-Intent Natural Language

await client.processNaturalLanguage(
    'Swap 10 USDC to WETH and then swap 5 USDC to WETH'
);
// ✅ Parses 2 intents, creates 2 commitments, nets them, executes once

Conversational Interface

const client = new TintClient({...config, geminiApiKey: 'your_key'});

await client.chat('How much gas can I save?');
// "With TINT Protocol, you can save 50-90% on gas fees through netting..."

await client.chat('What is a Pedersen commitment?');
// "A Pedersen commitment is a cryptographic primitive that..."

Development

# Build
npm run build

# Test cryptography
node test-crypto.js

# Test AI agent
GEMINI_API_KEY=your_key node test-agent.js

Environment Variables

PRIVATE_KEY="your_private_key"
GEMINI_API_KEY="your_gemini_api_key"  # For AI agent features

License

MIT

Links


🤖 Powered by Gemini AI | 🔐 Secured by Pedersen Commitments | ⚡ Optimized by Netting