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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dontrolle/mangrove.js

v1.4.25

Published

A Typescript SDK for the Mangrove Protocol.

Downloads

11

Readme

CI Coverage Status

This repo contains the SDK for developing TypeScript (and JavaScript) apps using the Mangrove.

The core contracts for Mangrove with example Solidity offer logics live in the mangrove-core repo.

Documentation

If you are looking for the Mangrove developer documentation, the main site to go to is docs.mangrove.exchange.

Prerequisites

For Linux or macOS everything should work out of the box, if you are using Windows, then we recommend installing everything from within WSL2 and expect some quirks.

  1. Node.js 14.14+, we recommend installation through nvm, e.g.:

    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
    # Reopen shell
    $ nvm install --lts
  2. Yarn 2, with Node.js >= 16.10:

    $ corepack enable
  3. Foundry:

    $ curl -L https://foundry.paradigm.xyz | bash
    # Reopen shell
    $ foundryup
  4. Clone the git repo with sub-modules

    $ git clone --recurse-submodules https://github.com/mangrovedao/mangrove.js.git
    # Or set the global git config once: git config --global submodule.recurse true

Usage

The following sections describe the most common use cases in this repo.

Initial setup

After first cloning the repo, you should run yarn install in the root folder.

$ yarn install

Then you need to setup the local environment (still in the root folder):

$ cp .env.local.example .env.test.local

Then open .env.test.local in your favorite editor and put in settings for, e.g., node urls, pointing to a node provider, like, for instance, Alchemy.

Build

To build, run

$ yarn build

If you encounter issues with JavaScript memory consumption, then try increasing the max available space for heap, and try again:

$ export NODE_OPTIONS="$NODE_OPTIONS --max_old_space_size=4096"
$ yarn build

Test

To run tests, run

$ yarn test

Yarn usage details

⚠️  Be aware that when googling Yarn commands, it's often not clear whether the results pertain to Yarn 1 (aka 'Classic') or Yarn 2+. Currently (November 2021), most examples and much tool support is implicitly engineered towards Yarn 1.

Lifecycle scripts and Yarn 2

Yarn 2 deliberately only supports a subset of the lifecycle scripts supported by npm. So when adding/modifying lifecycle scripts, you should consult Yarn 2's documentation on the subject: https://yarnpkg.com/advanced/lifecycle-scripts#gatsby-focus-wrapper .

Git hooks and Husky

We use Husky to manage our Git hooks.

The Git hook scripts are in the .husky/ folder.