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

kolayx402login

v1.0.0

Published

All-in-one package: KolayLogin auth + X402 payments + E-commerce template + AI shopping assistant

Readme

KolayX402Login

All-in-one package combining:

  • KolayLogin Authentication (Supabase)
  • X402 Payment Facilitator
  • E-commerce Next.js Template
  • AI Shopping Assistant

🚀 Quick Start

npm install kolayx402login

📦 What's Included

1. Authentication (KolayLogin)

Complete authentication solution powered by Supabase:

  • Email/password authentication
  • OAuth providers (Google, Apple, Microsoft)
  • Enterprise SSO
  • Merchant management

2. X402 Payment Integration

Crypto payment processing:

  • X402 facilitator client
  • Payment verification
  • Payment settlement
  • Multi-network support (BSC, Base)

3. E-commerce Template

Ready-to-use Next.js e-commerce application:

  • Product catalog
  • Shopping cart
  • Checkout flow
  • Order management
  • X402 payment integration

4. AI Shopping Assistant

AI-powered shopping experience:

  • Natural language product search
  • Conversational shopping
  • XMTP protocol integration
  • Claude AI integration
  • Automated order processing

🎯 Usage

Generate E-commerce Template

# Using CLI
kolayx402login init ecommerce ./my-shop

# Or programmatically
import { generateEcommerceTemplate } from 'kolayx402login';

await generateEcommerceTemplate({
  outputDir: './my-shop',
  projectName: 'my-shop',
  merchantId: 'merchant_abc123',
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  network: 'bsc',
  supabaseUrl: 'YOUR_SUPABASE_URL',
  supabaseKey: 'YOUR_SUPABASE_ANON_KEY',
});

Generate AI Assistant Template

# Using CLI
kolayx402login init ai-assistant ./my-assistant

# Or programmatically
import { generateAIAssistantTemplate } from 'kolayx402login/templates/ai-assistant';

await generateAIAssistantTemplate({
  outputDir: './my-assistant',
  merchantId: 'merchant_abc123',
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  network: 'bsc',
  xmtpApiKey: 'YOUR_XMTP_API_KEY',
  claudeApiKey: 'YOUR_CLAUDE_API_KEY',
});

💻 Complete Integration Example

import {
  KolayLoginClient,
  createMerchant,
  X402Facilitator,
  AIShoppingAssistant,
  generateEcommerceTemplate,
} from 'kolayx402login';

// 1. Authenticate user
const client = new KolayLoginClient({
  supabaseUrl: 'YOUR_SUPABASE_URL',
  supabaseKey: 'YOUR_SUPABASE_ANON_KEY',
});

const { user } = await client.signUp('[email protected]', 'password');

// 2. Create merchant
const merchant = await createMerchant(
  {
    userId: user.id,
    name: 'My Shop',
    email: '[email protected]',
  },
  {
    supabaseUrl: 'YOUR_SUPABASE_URL',
    supabaseKey: 'YOUR_SUPABASE_ANON_KEY',
  }
);

console.log('Merchant ID:', merchant.merchantId);

// 3. Initialize X402 facilitator
const facilitator = new X402Facilitator({
  merchantId: merchant.merchantId,
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  network: 'bsc',
});

// 4. Create AI shopping assistant
const assistant = new AIShoppingAssistant({
  merchantId: merchant.merchantId,
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  network: 'bsc',
  claudeApiKey: 'YOUR_CLAUDE_API_KEY',
});

// 5. Search products using AI
const products = await assistant.searchProducts('wireless headphones under $100');

// 6. Process order
const order = await assistant.processOrder({
  productName: 'Sony WH-CH720N',
  quantity: 1,
  userId: user.id,
});

// 7. Generate e-commerce template
await generateEcommerceTemplate({
  outputDir: './my-shop-dashboard',
  merchantId: merchant.merchantId,
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  network: 'bsc',
});

🔧 React Hooks

import { useMerchant, useX402 } from 'kolayx402login/auth';
import { AIShoppingAssistant } from 'kolayx402login/ai-assistant';

function ShoppingApp() {
  const { merchant, createMerchant } = useMerchant();
  const { verifyPayment, settlePayment } = useX402({
    merchantId: merchant?.merchantId || '',
    facilitatorAddress: '0x...',
    network: 'bsc',
  });

  const assistant = new AIShoppingAssistant({
    merchantId: merchant?.merchantId || '',
    facilitatorAddress: '0x...',
    network: 'bsc',
  });

  const handleSearch = async (query: string) => {
    const products = await assistant.searchProducts(query);
    return products;
  };

  return (
    <div>
      {/* Your UI */}
    </div>
  );
}

📚 API Reference

Authentication

import { KolayLoginClient, createMerchant } from 'kolayx402login/auth';

X402 Payments

import { X402Facilitator } from 'kolayx402login/x402';

E-commerce Template

import { generateEcommerceTemplate } from 'kolayx402login/templates/ecommerce';

AI Assistant

import { AIShoppingAssistant } from 'kolayx402login/ai-assistant';

🎨 Examples

See the examples/ directory for complete working examples:

  • examples/ecommerce/ - Full e-commerce application
  • examples/ai-assistant/ - AI shopping assistant

📖 Documentation

🔒 Security

  • All API calls are authenticated
  • Merchant IDs are automatically generated
  • Payment data is encrypted in transit
  • XMTP protocol for secure messaging

🤝 Contributing

Contributions are welcome! Please read our contributing guidelines first.

📝 License

MIT

🔗 Related Packages

📞 Support

For support, email [email protected] or visit our GitHub repository.