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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@red_dot/redotkit

v2.1.0

Published

Provides merchants with diverse and convenient web3 payment methods.

Downloads

1,610

Readme

RedotPayKit SDK - Merchant Web3 payment integration tool

Provides merchants with diverse and convenient web3 payment methods.

After user registration, integrate the SDK into your web app, allowing for multi-language customization and theming. Multiple payment methods are built in, including Web3 wallets, RedotPay, and Binance Pay.

🌟 Core Features

  • One-click integration of payment interface UI and payment wrappers for multiple wallets (Web3 wallets, RedotPay, and Binance Pay), allowing merchants to use the SDK with minimal cost
  • Automatic chain switching, gas estimation, and transaction confirmation monitoring
  • Built-in payment result verification (anti-tampering, anti-duplicate payment)
  • Supported transaction networks: Ethereum, BNB Smart Chain
  • Supported wallets: RedotPay, Binance, MetaMask
  • Supported transaction countries: Hong Kong, UK, USA, France, Germany, UAE, India, Indonesia, Canada, Saudi Arabia (10 countries, 8 languages)

📦 Installation

Package Manager Installation

# npm
npm install @red_dot/redotkit --save

# yarn
yarn add @red_dot/redotkit

# pnpm
pnpm add @red_dot/redotkit

⚡ Quick Start

1. Initialize SDK(React Project)

// App.tsx
import { BrowserRouter, Routes, Route, HashRouter } from 'react-router-dom';
// import RedotProvider
import RedotProvider from '@red_dot/redotkit';
// redotkit styles
import '@red_dot/redotkit/redotStyles.css';
import { TestDemo } from './TestDemo';

const App = () => {
	return (
		<RedotProvider lang='en' chooseThemeByName='blue'> 
			<HashRouter>
				<Routes>
					<Route path='/' element={<TestDemo />} />
				</Routes>
			</HashRouter>
		</RedotProvider>
	);
};

export default App;

// TestDemo.tsx
import { useState, useCallback } from 'react';
import { useRedot } from '@red_dot/redotkit';
import type { RedotContextType } from '@red_dot/redotkit';


export const TestDemo = (): React.ReactElement => {
	const [isLoading, setIsLoading] = useState(false);
	const [preOrderId, setPreOrderId] = useState<string | null>(null);
	const { init } = useRedot() as RedotContextType;

	const callAllApis = useCallback(async () => {
		try {
			setIsLoading(true);

			if (init) {
				init({
					portalContainer: document.body,
					preOrderId: '',
					jwtToken: '',
					publicKey: ''
				});
			}
		} catch (error) {
			console.error(error);
			
		} finally {
			setIsLoading(false);
		}
	}, [init]);

	return (
		<button
			className='w-full bg-white text-black py-2 px-4 md:py-[18px] md:px-[148px] rounded-2xl font-bold text-base uppercase hover:bg-gray-100 transition-colors'
			onClick={() => callAllApis()}
		>
			Pay Now
		</button>
	);
};

📚 Core API Documentation

1. RedotProvider Initialization Configuration

| Parameter Name | Type | Description | Required | |------------------|--------------------------|---------------------------------------| -------- | | lang | string | Multi-language, default English | No | | customizeTheme | Theme(Object) | Custom Theme | No | | chooseThemeByName| string | Select Built-in Theme Properties | No |

2. Core Methods

useRedot(RedotContextTypeOptional): RedotContextType

  • Function: Retrieves methods provided by the SDK
  • Parameter: undefined
  • Return Value Type:
interface RedotContextType {
	// Built-in multi-language processing
	t: (key: string) => string;
	// Initialize SDK
	init: (options: InitOptions) => Promise<void>;
	// Destroy SDK
	destroy: () => void;
	// Change Multi-language
	changeLanguage: (lang: string) => void;
	// Change Built-in Theme
	changeThemeByClassName: (className: string) => void;
	//	Change Custom Theme
	changeCustomizeTheme: (theme: Theme) => void;
	// Refresh JWT Token
	refreshJwtToken: (jwtToken: string) => boolean;
}
type RedotContextTypeOptional = RedotContextType | undefined;
  • Return: RedotContextType