Socket
Book a DemoInstallSign in
Socket

x402-stakefy-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x402-stakefy-react

React hooks and components for Stakefy x402 - 10x lower fees than competitors, social payments, session budgets

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

x402-stakefy-react

NPM Version License: MIT

React hooks for Stakefy x402 payments on Solana.

🏠 Main Documentation: github.com/JaspSoe/stakefy-x402

📦 Stakefy Ecosystem

This is part of the complete Stakefy payment infrastructure:

PackageDescriptionNPM
x402-stakefy-sdkCore SDKnpm
x402-stakefy-reactReact hooks (this package)npm
stakefy-expressExpress middlewarenpm

🚀 Quick Start

npm install x402-stakefy-react x402-stakefy-sdk @solana/wallet-adapter-react
import { usePaywall } from 'x402-stakefy-react';

function PremiumContent() {
  const paywall = usePaywall({
    contentId: 'premium-article',
    amount: 0.01,
    merchantId: 'YOUR_WALLET'
  });

  if (!paywall.hasAccess) {
    return (
      <button onClick={paywall.unlock} disabled={paywall.paying}>
        {paywall.paying ? 'Processing...' : 'Unlock for 0.01 SOL'}
      </button>
    );
  }

  return <div>Premium content here!</div>;
}

✨ Available Hooks

  • useStakefyPayment - Simple payments
  • usePaywall - Content paywalls
  • useSessionBudget - Budget management
  • usePaymentChannel - Channel state
  • useUsername - Username resolution

🎯 Examples

Content Paywall

const paywall = usePaywall({
  contentId: 'article-123',
  amount: 0.01,
  merchantId: 'publisher-wallet'
});

Simple Payment

const { pay, loading, error } = useStakefyPayment();

await pay({
  amount: 0.5,
  merchantId: 'merchant-wallet',
  memo: 'Coffee payment'
});

Session Budget

const { session, pay } = useSessionBudget({
  budget: 1.0,
  duration: 3600,
  merchantId: 'merchant-id'
});

📖 Full Documentation

For complete documentation, API reference, and more examples:

👉 Complete Documentation

Includes:

  • All hook APIs
  • Error handling
  • TypeScript types
  • Advanced examples
  • Best practices

📄 License

MIT © Stakefy

Keywords

x402

FAQs

Package last updated on 03 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts