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

@multiversx/sdk-dapp-form

v5.0.2

Published

A library to hold the main logic for a validating a form for transactions on the MultiversX blockchain

Readme

sdk-dapp-form

A library that holds the core functional logic of a dapp on the MultiversX blockchain

NPM

Table of contents

Installation

The library can be installed via npm or yarn.

npm install @multiversx/sdk-dapp-form

or

yarn add @multiversx/sdk-dapp-form

If you need only the sdk-dapp-form basic logic, without the additional UI, consider using the --no-optional flag. This will not install the packages needed for the optional UI components.

npm install @multiversx/sdk-dapp-form --no-optional

or

yarn add @multiversx/sdk-dapp-form --no-optional

Usage

sdk-dapp-form aims to abstract and simplify the process of formulating and validating transactions on the MultiversX blockchain.

It provides:

  • Form state for a MultiversX transaction, built on Formik, wired through SendFormContainer.
  • Contexts for each concern of the transaction — amount, receiver, gas, data field, tokens, network.
  • Validation — Yup schemas, field-level validators and default error messages, plus validation of transactions arriving from the sign flow.
  • Operations — pure helpers for gas limit, fees, data field and transaction generation.
  • Optional UI — ready-made React fields, form and confirmation screens. These are the only part that needs the optional dependencies.

Consuming the package

The package targets bundlers. Deep imports address a directory barrel at any depth:

import { useFetchGasLimit } from '@multiversx/sdk-dapp-form/out/hooks';
import { Receiver } from '@multiversx/sdk-dapp-form/out/UI/Fields';
import { Form } from '@multiversx/sdk-dapp-form';

Individual non-barrel files are not part of the public surface — import the barrel that re-exports them. Component styles inject themselves on import, so no CSS import is needed; the optional global theme is:

import '@multiversx/sdk-dapp-form/styles.css';

Development

Requires Node 24 (the version used by CI) and pnpm.

pnpm install
pnpm build       # vite library build + barrel shims + global stylesheet -> out/
pnpm watch       # incremental rebuild into out/
pnpm test        # jest (jsdom + testing-library + msw)
pnpm test:watch
pnpm lint        # eslint --fix src
pnpm lint:check  # eslint src, no writes
pnpm pre-pr      # lint + build + test — run before opening a pull request

Local integration with a consuming app:

pnpm publish-yalc        # yalc publish --push
pnpm publish-verdaccio   # publish to a local verdaccio registry

Source imports use the src-rooted path aliases declared in tsconfig.base.json (import { getTransactionFields } from 'helpers'), not relative traversal.

Conventions, build constraints and release rules are documented in AGENTS.md.

Project structure

| Path | Contents | | ------------------------------------------- | ------------------------------------------------------------------------------------- | | src/apiCalls | MultiversX API clients (account, addresses, economics, network, tokens, transactions) | | src/containers | SendFormContainer — Formik plus all context providers | | src/contexts | One context per form concern (amount, receiver, gas, data field, tokens, network) | | src/operations | Pure transaction math: gas limit, fees, data field, transaction generation | | src/validation, src/validationSchema | Field validators, error messages and Yup schemas | | src/validateSignTransactions | Validation of transactions coming from the sign flow | | src/hooks, src/helpers, src/utilities | Shared logic | | src/UI | Optional React components | | src/types, src/constants | Shared types, enums and constants | | src/tests, src/__mocks__ | Form-level tests and the MSW mock server |

Directories that are part of the public surface expose an index barrel; src/index.ts re-exports them.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

One can contribute by creating pull requests, or by opening issues for discovered bugs or desired features.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Before opening the pull request:

  • Run pnpm pre-pr (lint, build, tests).
  • Add an entry under ## [Unreleased] in CHANGELOG.md — a CI check rejects pull requests without one.
  • Fill in the pull request template.

License

GPL-3.0-or-later