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

@meta-payer/sdk

v1.0.0

Published

## Overview

Readme

Meta Payer SDK Documentation

Overview

The Meta Payer SDK (@meta-payer/sdk) is a powerful tool designed for seamless integration and interaction with the Meta Payer system. It offers methods to interface with both API and smart contract modules, allowing users to perform actions such as authentication, account top-ups, withdrawals, subscription creation, and more.

Installation

You can install the Meta Payer SDK in your project using npm or yarn:

npm install @meta-payer/sdk

yarn add @meta-payer/sdk

Configuration

| Network | RPC URL | Chain ID | Contract Address | |----------|-------------------------------------------|---------:|-----------------------------------------------| | testnet | https://bsc-testnet.public.blastapi.io | 97 | 0x84196b81F5B59aEe3ac522dc80B0edE493d7B4F2 | | mainnet | https://bsc-dataseed.binance.org | 56 | |

Supported Stable Tokens

| Network | Token Address | Token Name | |----------|----------------------------------------------|------------| | testnet | 0xcc33adE421C91d7dCa5829D7D5b5Fe7216971a5A | USDC | | mainnet | | USDC |

Initialization

import { MetaPayerSDK, Env } from "@meta-payer/sdk";

const { metaPayerAPI, metaPayerContract, metaPayerConfig } = MetaPayerSDK({
  apiKey: "YOUR_API_KEY", // Replace with your API key
  env: Env.TestNet, // Specify the environment (TestNet, MainNet) Testnet is the default
  metaPayerContractAddress: "META_PAYER_CONTRACT_ADDRESS", // Uses the default config if not provided
});

Usage

API Module Integration

Generate Message to sign for user authentication

const messageToSignResponse = await metaPayerAPI.generateMessageToSign(
  "WALLET_ADDRESS"
);

Sign authentication message to generate the signature

const signature = await signer.signMessage(messageToSignResponse.message);

Create or Login User

const loginResponse = await metaPayerAPI.createOrLoginUser({
  walletAddress: messageToSignResponse.walletAddress,
  nonce: messageToSignResponse.nonce,
  signature,
});

Get User Payload

const user = await metaPayerAPI.getMe(loginResponse.token);

Contract Module Integration

Get Card Balance

const balance = await metaPayerContract.getCardBalance(
  "TOKEN_CONTRACT_ADDRESS",
  "WALLET_ADDRESS"
);

Check if Token is Supported

const isSupported = await metaPayerContract.isTokenSupported(
  "TOKEN_CONTRACT_ADDRESS"
);

Approve Token

const approveResponse = await metaPayerContract.approveToken(
  signer,
  { tokenContractAddress: "TOKEN_CONTRACT_ADDRESS", amount: 10 }
);

Top Up Card

const topUpResponse = await metaPayerContract.topUpCard(
  signer,
  { 
    tokenContractAddress: "TOKEN_CONTRACT_ADDRESS", 
    amount: 10 
  }
);

Withdraw From Card

const withdrawResponse = await metaPayerContract.withdrawCard(
  signer,
  {
  tokenContractAddress: "TOKEN_CONTRACT_ADDRESS",
  amount: 10,
  }
);

Types

To facilitate type safety and ensure seamless integration, we've exported the ContractService and APIService classes. You can now import these classes directly from the SDK to use their typings in your project.

import { ContractService, APIService } from "@meta-payer/sdk";

License

MIT License