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

rocket-pay-api

v0.0.4

Published

Cryptocurrency payment system based on @tonRocketBot

Readme

rocket-pay-api

Rocket Pay is a payment system based on @tonRocketBot, which allows you to accept payments in cryptocurrency using the API.

This library help you to work with Rocket Pay via Rocket Pay API

Install

npm i rocket-pay-api

Usage

API

First, you need to create your application and get an API token. Open @tonRocketBot or @ton_rocket_test_bot (for testnet), create a new app and get API Token.

Next step: try to call a simple info() method to check that everything is working well:

import RocketPay from 'rocket-pay-api'

const rocketPay = new RocketPay(token)
const myAppInfo = await rocketPay.info()
console.log(myAppInfo)

You can setup net hostname (defaults to pay.ton-rocket.com)

const rocketPay = new RocketPay(token, {
  hostname: 'https://dev-pay.ton-rocket.com'
});

Net | Bot | Hostname ------- | ----------------------------------------------------------- |------------------------ mainnet | @tonRocketBot | https://pay.ton-rocket.com testnet | @ton_rocket_test_bot | https://dev-pay.ton-rocket.com

All queries to the Rocket Pay API must be sent over HTTPS

You can find all available methods in next chapter.

Look full code in the examples directory

Methods

API

version

Returns current version of API. You may use it as healthcheck

rocketPay.version()

info

A simple method for testing your app's authentication token. Requires no parameters. Returns basic information about the app.

rocketPay.info()

transfer

Use this method to send coins from your app to the user. Returns object of completed transfer.

  • tgUserId (number) Telegram User ID. The user needs to have an account in our bot (send /start if no)
  • currency (string) Currency code. Supported assets: TONCOIN
  • amount (number) Amount of the transfer in float. For example: 1.23
  • transferId (string) It is used to make your request idempotent
  • description (string) Optional. The comment of the invoice
rocketPay.transfer({
  tgUserId: 87209764,
  currency: "TONCOIN",
  amount: 1.23,
  transferId: "abc-def",
  description: "You are awesome!"
})

createInvoice

Use this method to create a new invoice. Returns object of created invoice.

  • amount (number) Amount of the invoice in float. For example: 1.23
  • currency (string) Currency code. Supported assets: TONCOIN
  • description (string) Optional. Description of the invoice
  • hidden_message (string) Optional. The message will show when the user pays your invoice
  • callbackUrl (string) Optional. Callback url
  • payload (string) Optional. Some data. User ID, payment id, or any data you want to attach to the invoice.
rocketPay.createInvoice({
  amount: 1.23,
  currency: "TONCOIN",
  description: "best thing in the world, 1 item",
  hiddenMessage: "thank you",
  callbackUrl: "https://t.me/ton_rocket",
  payload: "some custom payload I want to see in webhook or when I request invoice"
})

getInvoices

Use this method to get invoices of your app. On success, the returns array of invoices

rocketPay.getInvoices()