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

reflect-api-js

v0.1.0

Published

Unofficial TypeScript library for the Reflect API

Downloads

99

Readme

Reflect API (reflect-api-js)

Unofficial TypeScript Library for the Reflect API

This repository provides a modular, production-ready scaffold for building a backend or client-side integration compatible with the Reflect API — the programmable infrastructure behind Reflect, autonomous money designed for the stablecoin era.

Reflect issues income-generating stablecoins (such as rUSD, with future support for rEUR and others) that automatically farm the best DeFi rates on Solana while remaining fully liquid, fully insured on-chain, and non-custodial. Every stablecoin earns continuous yield with no lockups, no claims process, and built-in real-time insurance.

The official Reflect API (base URL: https://prod.api.reflect.money enables developers and protocols to:

  • Mint and redeem stablecoins
  • Retrieve real-time/historical APYs and exchange rates
  • Set up whitelabeled integrations with branded tokens
  • Manage API keys, vaults, metadata, and user whitelists
  • Generate on-chain transactions securely
  • Access protocol statistics and events

This TypeScript implementation uses Express.js (or any Node.js HTTP framework) and is structured for clarity, maintainability, and future extension (e.g., adding database integration, authentication middleware, or on-chain interactions).

All endpoints are currently stubbed with placeholder/mock JSON responses, making this an ideal starting point for:

  • Local development and testing
  • Building a mirror/proxy server
  • Creating a custom backend for Reflect integrations
  • Learning the Reflect API structure

Project scaffold

├── package.json 
├── tsconfig.json 
├── src/ 
│ ├── health/ 
│ │ ├── healthCheck.ts 
│ │ └── index.ts 
│ ├── stablecoin/ 
│ │ ├── generateBurnTransaction.ts 
│ │ ├── generateMintTransaction.ts 
│ │ ├── getAllApy.ts 
│ │ ├── getAvailableStablecoins.ts 
│ │ ├── getHistoricalApy.ts 
│ │ ├── getHistoricalExchangeRates.ts 
│ │ ├── getLatestExchangeRates.ts 
│ │ ├── getMintRedeemQuote.ts 
│ │ ├── getRealtimeExchangeRate.ts 
│ │ ├── getSpecificApy.ts 
│ │ ├── getSupplyCaps.ts 
│ │ └── index.ts 
│ ├── integration/ 
│ │ ├── generateClaimTx.ts 
│ │ ├── generateIntegrationMintTx.ts 
│ │ ├── generateRedemptionTx.ts 
│ │ ├── getCurrentExchangeRate.ts 
│ │ ├── getHistoricalIntegrationStats.ts 
│ │ ├── getIntegrationConfig.ts 
│ │ ├── getIntegrationEvents.ts 
│ │ ├── getIntegrationStatistics.ts 
│ │ ├── getIntegrationsByAuthority.ts 
│ │ ├── initializeIntegrationFlow.ts 
│ │ ├── initializeIntegrationVault.ts 
│ │ ├── initializeIntegration.ts 
│ │ ├── initializeStablecoinToken.ts 
│ │ ├── initializeUserBrandedToken.ts 
│ │ ├── mintAndWhitelabel.ts 
│ │ ├── index.ts 
│ │ ├── redeemWhitelabeled.ts 
│ │ ├── revealApiKey.ts 
│ │ ├── rotateApiKey.ts 
│ │ ├── transferMintAuthority.ts 
│ │ ├── updateIntegrationConfig.ts 
│ │ ├── uploadIntegrationMetadata.ts 
│ │ └── whitelistUsers.ts 
│ ├── stats/ 
│ │ ├── getHistoricalTvlAndVolume.ts 
│ │ ├── getProtocolStatistics.ts 
│ │ └── index.ts 
│ └── events/ 
│ ├── getEventsBySigner.ts 
│ ├── getRecentEvents.ts 
│ └── index.ts 
├── README.md

Each endpoint lives in its own file for easy navigation and modification.


Quick start

  1. Clone and install dependencies:
git clone https://github.com/your-username/reflect-api-js.git
cd reflect-api-js
npm install
  1. Build the project:
npm run build
  1. Start the server:
npm start
  1. The server listens on 0.0.0.0:3000 by default. Try some endpoints:
# Root health
GET http://localhost:3000/ → { "status": "reflect api running" }

# Health
GET http://localhost:3000/health/ → { "status": "ok" }

# Stablecoins
GET http://localhost:3000/stablecoins/ → list of available stablecoins
GET http://localhost:3000/stablecoins/supply-caps → supply caps
POST http://localhost:3000/stablecoins/quote → body { "stablecoin": "rUSD", "amount": 10.0, "side": "mint" }

Endpoints are grouped by functionality.

  • /health
  • /stablecoins
  • /integrations
  • /stats
  • /events

Official Resources

Note: This mirros the official API structure but is a TypeScript implementation. It is unofficial and not affiliated with Reflect. Use the official API in prediction.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. https://opensource.org/licenses/MIT

Contact

For questions or feedback, please contact Saw Simeon.