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

@nftchance/plug-types

v0.10.2

Published

> [!NOTE] > This repository is a submodule of the larger [Plug monorepo](https://github.com/nftchance/plug) that contains all the required pieces to run the entire Plug stack yourself.

Downloads

51

Readme

🔌 Plug Types

[!NOTE] This repository is a submodule of the larger Plug monorepo that contains all the required pieces to run the entire Plug stack yourself.

The types package of Plug is a separate piece of the repository that contains the key building blocks to create and verify signatures that consume the EIP712 types both onchain and offchain. Using automated generation these types operate as the base of the shape definition through all pieces of the broader monorepo.

Dependencies

In order to run @nftchance/plug-types it is necessary to install all of the following dependencies first:

└─ pnpm — "Efficient package manager for Node modules."

Developer Usage

In practice, the usage of this package should be exceptionally minimal when in isolated environments. Really, this package is intended to be used in a greater setting where your generated Types.sol smart contract is inherited into a larger framework. During generation solady is used to recover the signer of a message from the deterministic EIP712 digest.

When using foundry it is recommended that you use node_modules to manage your dependencies as submodules are a terrible pattern to follow and offer subpar user experience. To do this, you will update your foundry.toml file to include the following:

[profile.default]
    remappings = [
        "solady/=node_modules/solady/src/",
    ]

With this taken care of you have two options:

  1. Use the Types.sol smart contract distributed with this package.
  2. Generate your own Types.sol smart contract using the plug init command followed by plug generate after you have defined your desired plug.config.ts file.

Building & Publishing

When you've made changes to the repository you will need to build the package so that it can be distributed to your users. To do this you can run the following command:

pnpm build

This will generate the dist folder which contains the Types.sol smart contract and the index.js file that is the entrypoint for the package.

The deployable package is automatically managed by changesets enabling the ability to publish the later version of the library through a pull request. Notably, you do not need to run anything yourself to do this outside of creating a changeset when there is a key change that end-users should be aware of. Not all changes require a changeset, but when they do you can generate one with:

pnpm changeset add