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

@varity-labs/sdk

v2.0.0-alpha.1

Published

Varity SDK - Build any app on Varity L3 with complete thirdweb integration (Engine, Nebula AI, Storage, Bridge, Gateway, x402)

Readme

@varity/sdk

Complete Web3 SDK for Varity L3 - Build production-ready blockchain applications with multi-chain support, thirdweb integration, and enterprise-grade features.

Status:ALL BLOCKERS RESOLVED - Ready for End-to-End Testing (Jan 24, 2026)

Deployed Contracts (Varity L3 - Chain ID 33529)

| Contract | Address | Purpose | |----------|---------|---------| | TemplateMarketplace | 0x769250dac29817081f38CfBa597Ef2485F3a94e8 | 70/30 Revenue Split | | TemplateRegistry | 0xEbD8C516c05BD2b76b5CDd56530b3Dd9f8b3D748 | Template metadata | | VarityAppRegistry | 0x52d4f28ebe20fad743bbef9daa61bfe3ce91eb74 | App Store submissions | | SimplifiedPaymaster | 0xeF467aef91d4e626C7e56967779069bEF22c4453 | Gas sponsorship | | VarityWalletFactory | 0x85AB92708CB4d921f5c2BdCCd7f2D0813a380f71 | Smart wallets |

Revenue Split: 70% → Developer | 30% → Varity Platform

Installation

npm install @varity/sdk@alpha

Quick Start

import { createVaritySDK, varityL3Testnet, ChainRegistry } from '@varity/sdk';

// Initialize SDK
const sdk = createVaritySDK({
  network: 'testnet',
  apiUrl: 'https://api.varity.io',
  thirdwebClientId: 'your-client-id'
});

// Use multi-chain configuration
const chain = ChainRegistry.getChain(33529); // Varity L3
console.log('Connected to:', chain.name);

// Deploy a contract
const contract = await sdk.deployContract({
  chain: varityL3Testnet,
  contractType: 'nft-collection',
  name: 'My Collection'
});

Features

🔗 Multi-Chain Support

  • Varity L3 (Chain ID 33529) - Low-cost Arbitrum Orbit rollup with USDC gas token
  • Arbitrum (Sepolia & Mainnet) - Fast, low-cost L2
  • Base (Sepolia & Mainnet) - Coinbase's L2 built on OP Stack
  • ChainRegistry - Intelligent chain selection based on cost, speed, security

⚡ Complete thirdweb Integration

  • Engine - Production transaction management with auto-retry and webhooks
  • Nebula AI - Natural language blockchain interactions (generate contracts, query chains)
  • Storage - Decentralized storage via IPFS/Arweave
  • Bridge - Cross-chain asset transfers
  • Gateway - Production RPC infrastructure with WebSocket support
  • x402 - API monetization with 70/30 revenue split
  • Smart Wallets - ERC-4337 gasless transactions with account abstraction
  • Server Wallets - Backend automation for transaction signing

🎯 Enterprise Features

  • Template system for rapid deployment (ISO, SaaS, eCommerce, Healthcare)
  • Multi-tenant architecture with wallet-based isolation
  • Comprehensive analytics and forecasting
  • ZK proofs (ZKML, privacy-preserving computations)
  • TEE support (confidential computing)
  • Encryption (Lit Protocol, FHE, AES-256-GCM)

📦 Developer Experience

  • TypeScript-first with full type safety
  • Function-based API (thirdweb v5)
  • Comprehensive error handling
  • Detailed logging and monitoring
  • Extensive documentation

Documentation

See docs.varity.ai/packages/sdk for full documentation.

Key Exports

Multi-Chain

import {
  ChainRegistry,      // Chain registry with intelligent selection
  varityL3,          // Varity L3 Testnet (Chain ID 33529)
  arbitrum,          // Arbitrum One mainnet
  arbitrumSepolia,   // Arbitrum Sepolia testnet
  base,              // Base mainnet
  baseSepolia,       // Base Sepolia testnet
  formatUSDC,        // Format USDC with 6 decimals
  parseUSDC,         // Parse USDC from string
} from '@varity/sdk';

thirdweb Clients

import {
  EngineClient,      // Production transaction management
  NebulaClient,      // AI-powered blockchain interactions
  StorageClient,     // IPFS/Arweave storage
  BridgeClient,      // Cross-chain bridging
  GatewayClient,     // RPC infrastructure
  x402Client,        // API monetization
  createThirdwebWrapper, // Base thirdweb wrapper
} from '@varity/sdk';

Core SDK

import {
  VaritySDK,         // Main SDK class
  createVaritySDK,   // Factory function
  TemplateRegistry,  // Template management
  loadISOTemplate,   // Load ISO template
} from '@varity/sdk';

Contract Addresses (NEW - Jan 24, 2026)

import {
  VARITY_L3_CHAIN_ID,       // 33529
  VARITY_CONTRACTS,          // All deployed contract addresses
  REVENUE_SPLIT,             // { DEVELOPER_PERCENT: 70, PLATFORM_PERCENT: 30 }
  getVarityContractAddress,  // Helper function
} from '@varity/sdk';

// Access specific contracts
const marketplaceAddress = VARITY_CONTRACTS.TemplateMarketplace;
const paymasterAddress = VARITY_CONTRACTS.SimplifiedPaymaster;
const factoryAddress = VARITY_CONTRACTS.VarityWalletFactory;

Examples

Deploy Contract with Multi-Chain

import { createVaritySDK, ChainRegistry } from '@varity/sdk';

const sdk = createVaritySDK({ /* config */ });

// Auto-select cheapest chain
const chain = ChainRegistry.selectChain({
  optimize: 'cost',
  requirements: { testnet: true }
});

const contract = await sdk.deployContract({
  chain,
  contractType: 'marketplace',
  name: 'My Marketplace'
});

AI-Powered Contract Generation

import { NebulaClient } from '@varity/sdk';

const nebula = new NebulaClient({ apiKey: 'your-key' });

// Generate Solidity from natural language
const result = await nebula.generateContract({
  prompt: 'Create an NFT marketplace with royalty splits',
  language: 'solidity',
  framework: 'foundry'
});

console.log(result.code); // Generated Solidity contract

Cross-Chain Asset Bridge

import { BridgeClient, varityL3, arbitrum } from '@varity/sdk';

const bridge = new BridgeClient({ clientId: 'your-id' });

// Get quote for bridging USDC
const quote = await bridge.getQuote({
  fromChain: varityL3,
  toChain: arbitrum,
  amount: 1000000n, // 1 USDC (6 decimals)
  token: 'USDC'
});

// Execute bridge
const tx = await bridge.bridgeAsset({
  quote,
  fromAddress: '0x...',
  toAddress: '0x...'
});

Decentralized Storage

import { StorageClient } from '@varity/sdk';

const storage = new StorageClient({ clientId: 'your-id' });

// Upload file to IPFS
const file = new File(['Hello World'], 'hello.txt');
const result = await storage.uploadFile(file);
console.log('IPFS URI:', result.uri); // ipfs://...

// Download from IPFS
const blob = await storage.downloadFile({ uri: result.uri });

API Monetization with x402

import { x402Client } from '@varity/sdk';

const x402 = new x402Client({ clientId: 'your-id' });

// Create pay-per-call API endpoint
const endpoint = await x402.createPaymentEndpoint({
  apiUrl: 'https://api.yourapp.com/data',
  pricePerCall: 10000n, // 0.01 USDC per call
  paymentToken: 'USDC',
  chain: varityL3
});

// Users pay with crypto, you earn 70% (thirdweb takes 30%)
console.log('Payment endpoint:', endpoint.endpointId);

Version

Current version: 2.0.0-alpha.1

License

MIT - See LICENSE file

Contributing

See CONTRIBUTING.md for development guidelines.

Support

  • Documentation: https://docs.varity.ai
  • Discord: https://discord.gg/varity
  • GitHub Issues: https://github.com/varity-labs/varity-sdk/issues
  • Email: [email protected]

Powered by Varity | Website | Twitter | Discord