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

@moromoro/moro-sdk

v1.1.0

Published

- Update src/config.ts to add more tables

Readme

Moromoro SDK

An JavaScript/TypeScript SDK library for querying trading quotes from Moromoro platform. In order to begin trading on Moromoro, we need the trading path that provide the best rate. The SDK help finding the path with ease!

For more information, check out our documentation here: https://docs.moro.exchange

Installation

# For NPM
npm install @moromoro/moro-sdk

# For Yarn
yarn add @moromoro/moro-sdk

Example

Here is the example if JavaScript code for querying best rate and perform a simple swap via Moromoro SDK.

// npm install @moromoro/moro-sdk ethers
const { MoroBestRate } = require('@moromoro/moro-sdk')
const { ethers } = require('ethers')

// MoroRouter_2_0.abi.json can be found here: 
// https://hyperevmscan.io/address/0x3195cAd938d417703312246e376342C553FD4cC2#code
const moroRouterAbi = require('./MoroRouter_2_0.abi.json')

const MORO_ROUTER_ADDRESS = '0x3195cAd938d417703312246e376342C553FD4cC2'

const src = '0x5555555555555555555555555555555555555555' // source Token Address: HYPE
const dest = '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb' // destination Token Address: USDT0
const amountIn = ethers.utils.parseUnits('10', 18) // 10 HYPE in BigNumber
const gasFee = ethers.BigNumber.from('5000000000') // default HyperEVM gas fee for rate calculation
const options = { enableSplit: false } // calculate without using split trades

// initialize provider, requires version of ether.js >= 5.4.0
const provider = new ethers.providers.JsonRpcProvider('https://rpc.hyperliquid.xyz/evm')

async function getQuote() {
    // initialize the moro client
    const moroClient = new MoroBestRate(provider, 'hyperevm')

    // get the quote detail with moro client
    const quote = await moroClient.getQuote(src, dest, amountIn, gasFee, options)
    console.log('quote:', quote)

    return quote
}

async function swap(quote) {
    // add the acceptable slippage of 1% to amountOut
    // since the actual amount can be lower or higher.
    const minAmountOut = ethers.BigNumber.from(quote.amountOut).mul(99).div(100)

    // Get the signer with private key
    // For using with Metamask, see: https://docs.ethers.io/v5/getting-started/#getting-started--connecting
    const signer = new ethers.Wallet(YOUR_PRIVATE_KEY, provider)
    const moroContract = new ethers.Contract(MORO_ROUTER_ADDRESS, moroRouterAbi, signer)

    // send a swap transaction to moro contract
    const swapTx = await moroContract.swap(
        quote.swapAddress,
        quote.data,
        quote.depositAddress,
        src,
        amountIn,
        dest,
        minAmountOut,
        signer.address, // dest token receiver
        0, // Partner ID for profit sharing, default to 0
        0) // metadata, reserved for future use

    console.log(`swap tx successfully submitted, tx hash: ${swapTx.hash}`)
}

getQuote().then(quote => swap(quote))