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

@aruvi/sdk

v1.0.4

Published

Aruvi Payment SDK - Accept private payments on your website

Readme

@aruvi/sdk

Official JavaScript SDK for Aruvi - Privacy-First Payments powered by Fully Homomorphic Encryption (FHE).

Accept confidential payments on your website with just a few lines of code. Transaction amounts are encrypted on-chain - only sender and recipient can see them.

npm version License: BSD-3-Clause

Links

Features

  • 🔒 Privacy-First: Payments encrypted with FHE - amounts hidden on-chain
  • Easy Integration: Add payments in minutes with drop-in components
  • 🎨 Customizable: Styled buttons and modal that match your brand
  • ⚛️ React Support: First-class React components and hooks
  • 🔐 Secure Verification: Server-side payment verification utilities
  • 📱 Mobile Ready: Responsive checkout that works on all devices

Installation

npm install @aruvi/sdk

or

yarn add @aruvi/sdk

or

pnpm add @aruvi/sdk

CDN (Browser)

<script src="https://cdn.jsdelivr.net/npm/@aruvi/sdk@latest/dist/aruvi-sdk.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aruvi/sdk@latest/dist/aruvi-sdk.css">

Quick Start

Vanilla JavaScript

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aruvi/sdk@latest/dist/aruvi-sdk.css">
</head>
<body>
  <div id="pay-button"></div>

  <script src="https://cdn.jsdelivr.net/npm/@aruvi/sdk@latest/dist/aruvi-sdk.min.js"></script>
  <script>
    // Initialize Aruvi
    Aruvi.init({
      merchantAddress: '0xYourWalletAddress',
      environment: 'testnet', // 'testnet' for Sepolia, 'mainnet' for production
    });

    // Create a pay button
    Aruvi.button('#pay-button', {
      amount: '25.00',
      currency: 'USDC',
      description: 'Premium Plan',
      onSuccess: (result) => {
        console.log('Payment successful!', result.paymentId);
        // Verify payment on your server
      },
      onError: (error) => {
        console.error('Payment failed:', error.message);
      },
    });
  </script>
</body>
</html>

React

import { AruviProvider, AruviButton } from '@aruvi/sdk/react';
import '@aruvi/sdk/styles.css';

function App() {
  return (
    <AruviProvider
      config={{
        merchantAddress: '0xYourWalletAddress',
        environment: 'testnet',
      }}
    >
      <CheckoutPage />
    </AruviProvider>
  );
}

function CheckoutPage() {
  const handleSuccess = (result) => {
    console.log('Payment ID:', result.paymentId);
    console.log('Transaction:', result.txHash);
    // Send paymentId to your backend for verification
  };

  const handleError = (error) => {
    console.error('Payment error:', error.message);
  };

  return (
    <AruviButton
      payment={{
        amount: '99.00',
        currency: 'USDC',
        description: 'Annual Subscription',
      }}
      onSuccess={handleSuccess}
      onError={handleError}
      variant="primary"
      size="large"
    />
  );
}

export default App;

API Reference

Aruvi.init(config)

Initialize the SDK with your configuration.

Aruvi.init({
  merchantAddress: '0x...', // Your wallet address to receive payments
  environment: 'testnet',   // 'testnet' (Sepolia) or 'mainnet'
  theme: 'light',           // 'light' or 'dark' (optional)
});

Aruvi.button(selector, options)

Create a payment button.

Aruvi.button('#button-container', {
  amount: '50.00',           // Payment amount
  currency: 'USDC',          // Currency (default: 'USDC')
  description: 'Product',    // What the payment is for
  metadata: { orderId: '123' }, // Custom data (optional)
  onSuccess: (result) => {}, // Success callback
  onError: (error) => {},    // Error callback
  onCancel: () => {},        // Cancel callback (optional)
});

Aruvi.checkout(options)

Open checkout modal programmatically.

Aruvi.checkout({
  amount: '100.00',
  description: 'Order #12345',
  onSuccess: (result) => {
    // Payment completed
  },
});

Payment Result Object

interface PaymentResult {
  paymentId: string;    // Unique payment identifier (bytes32)
  txHash: string;       // Transaction hash on blockchain
  amount: string;       // Payment amount
  from: string;         // Sender address
  to: string;           // Recipient (merchant) address
  timestamp: number;    // Unix timestamp
}

Server-Side Verification

Always verify payments on your backend before fulfilling orders.

import { verifyPayment } from '@aruvi/sdk';

// On your server
async function handlePaymentWebhook(paymentId) {
  const result = await verifyPayment(paymentId, {
    rpcUrl: 'https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY',
    gatewayAddress: '0xf2Dd4FC2114e524E9B53d9F608e7484E1CD3271b',
  });

  if (result.verified) {
    console.log('Payment verified!');
    console.log('From:', result.from);
    console.log('To:', result.to);
    // Fulfill order
  } else {
    console.log('Payment not verified:', result.error);
  }
}

Contract Addresses (Sepolia Testnet)

| Contract | Address | |----------|---------| | AruviPaymentGateway | 0xf2Dd4FC2114e524E9B53d9F608e7484E1CD3271b | | ConfidentialUSDCWrapper | 0xf99376BE228E8212C3C9b8B746683C96C1517e8B | | USDC (Circle) | 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 |

Styling

Import the default styles:

import '@aruvi/sdk/styles.css';

Or customize with CSS variables:

:root {
  --aruvi-primary: #6366f1;
  --aruvi-primary-hover: #4f46e5;
  --aruvi-text: #1f2937;
  --aruvi-background: #ffffff;
  --aruvi-border: #e5e7eb;
  --aruvi-border-radius: 8px;
}

TypeScript Support

Full TypeScript support with exported types:

import type { 
  AruviConfig,
  PaymentOptions,
  PaymentResult,
  VerificationResult 
} from '@aruvi/sdk';

Browser Support

  • Chrome 80+
  • Firefox 75+
  • Safari 13+
  • Edge 80+

License

BSD-3-Clause License - see LICENSE for details.

Author

Built with 🔐 by Ram

Support