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

@sky-mavis/flow-cash-sdk

v0.0.2

Published

A simple SDK for deposit today, cash out tomorrow.

Downloads

299

Readme

@sky-mavis/flow-cash-sdk

A TypeScript SDK for deposit today, cash out tomorrow.

Installation

yarn add @sky-mavis/flow-cash-sdk
# or
npm install @sky-mavis/flow-cash-sdk

Usage Flow

The deposit flow consists of 3 simple steps:

Step 1: Get Form Data (Defaults, Currencies, Payment Methods)

import { DepositService } from '@sky-mavis/flow-cash-sdk';

const depositService = new DepositService();

// Get recommended defaults
const defaults = await depositService.getDefaults();
const { amount, source, paymentMethod } = defaults.recommended;

// Get available currencies
const currencies = await depositService.getCurrencies();

// Get available payment methods
const paymentMethods = await depositService.getPaymentTypes({
  source: 'vnd',
  destination: 'usdc_base',
  type: 'buy',
});

Step 2: Get Quotes (Onramper + Relay)

// Get quotes from Onramper
const quotes = await depositService.getQuotes({
  crypto: 'usdc_base',
  fiat: 'vnd',
  amount: '1000000',
  user: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  paymentMethod: 'momo',
  useDepositAddress: true, // Enable relay for cross-chain deposit
  fromToken: {
    chainId: 8453, // Base
    address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // USDC on Base
    decimals: 6,
  },
  toToken: {
    chainId: 2020, // Ronin
    address: '0x0b7007c13325c48911f73a2dad5fa5dcbf808adc', // USDC on Ronin
    decimals: 6,
  },
});

// Select a quote
const selectedQuote = quotes[0];

// Get relay quote for deposit address
const relayQuote = await selectedQuote.getRelayQuote();
const depositAddress = relayQuote.steps[0].depositAddress;

Step 3: Initiate Checkout

// Initiate checkout
const checkout = await depositService.initiateCheckout({
  ramp: selectedQuote.ramp,
  source: 'vnd',
  destination: 'usdc_base',
  amount: 1000000,
  type: 'buy',
  paymentMethod: 'momo',
  network: 'base',
  quoteId: selectedQuote.quoteId,
  addresses: {
    '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913': depositAddress,
  },
});

// Open checkout URL
window.open(checkout.message.transactionInformation.url, '_blank');

Project Structure

src/
├── index.ts              # Main entry point - public API
├── client/               # SDK client class
│   └── index.ts
├── types/                # TypeScript types
│   ├── index.ts
│   ├── common.ts         # Shared types (Address, TxHash)
│   ├── relay.ts          # Relay-specific types
│   └── onramper.ts       # Onramper-specific types
├── constants/            # Configuration constants
│   └── index.ts
├── providers/            # External API integrations
│   ├── relay.ts          # Relay.link provider
│   └── onramper.ts       # Onramper provider
└── utils/                # Helper functions
    ├── validation.ts     # Address/amount validation
    └── format.ts         # Amount formatting

Development

# Install dependencies
yarn install

# Build
yarn build

# Development mode with watch
yarn dev

# Lint
yarn lint

# Type check
yarn typecheck

Architecture

  • client/ - Main SDK class that users interact with
  • types/ - All TypeScript type definitions
  • constants/ - API URLs, default values, chain configs
  • providers/ - Wrapper classes for external APIs (Relay, Onramper)
  • utils/ - Pure utility functions (validation, formatting)

License

MIT