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

@staccoverflow/hydraderp

v1.3.8

Published

Hydra

Downloads

2

Readme

Hydra

Collective account pooling, fan out wallet, dao treasury, all of the things you need to FAN OUT

Setup && Development

To get started the basic steps are to install all the JS dependencies, cargo dependencies will be installed automatically when you run anchor build. This package uses the latest yarn, which is yarn 3 and I will accept no hate for using the latest yarn :)

yarn

There are three components in this repo..

  1. Program
  2. SDK
  3. Docs

Program Development

The Hydra smart contract is written with anchor but we have changed the development flow slightly to allow for what we think is a better SDK. Using anchor build you get the BPF so file and the IDL. You then run the following to generate the SDK and spin up a local validator when you want to test your changes.

yarn run api:gen
yarn run amman:start

Now you have a validator running your newly compiled SO file and any other programs you have listed in the .ammanrc.cjs.

Currently we require the local validator to have the Token Metadata program from Metaplex. We suggest you clone the Metaplex Program Library and put it in the same root folder as hydra like this:

 /root-folder
    /hydra
    /metaplex-program-library

To build the latest token metadata program you will need to do the following:

cd metaplex-program-library/token-metadata/program
cargo build-bpf --bpf-out-dir ../../target/deploy/

Now your top level MPL target folder will have the token metadata so file that amman can find and deploy to the local validator.

After accomplishing this your workflow to build new code will be:

anchor build //Optional as the next commant runs anchor build for you
yarn run api:gen
yarn run amman:start

SDK Development

Now that you know how to build the program, building the SDK is easy. All you need to do is run:

yarn run watch

This will watch your packages/sdk folder for any changes, which means it will build the SDK for use in apps or tests when the auto generated code from the api generator is saved in the folder.

Testing

Now that you have the ability to build the program, generated sdk and the rest of the sdk, running tests is a breeze. With the local validator up and running you can simply run.

yarn test

Using ts-node/register you can even setup breakpoints and debuggers on your IDE to debug your tests. If you dont have the local validator running do:

yarn run amman:start
yarn test

Or if you are like Noah or Will and are extremely lazy and can't be bothered to run more than one command run yarn run mega-test

Docs Development

cd packages/docs
yarn start