yup-ethereum
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

yup-ethereum

CI

Yup extension that validates an Ethereum address.

⚠️ This extension implements a lightweight version of the web3.js utility functions. Without supplying the actual public key, it's tricky to perfectly validate a given address.

Install

# NPM
npm i --save-dev yup-ethereum

# Yarn
yarn add -D yup-ethereum

Usage

Here's some example usage to get you started:

import * as Yup from 'yup';

import 'yup-ethereum';

const ethereumSchema = Yup.string().ethereum().required();

schema.isValidSync('0xc1912fee45d61c87cc5ea59dae31190fffff232d') // true

Contributors

Don't be scared to raise an issue or a pull request!

Any contributions, no matter how big or small will land your picture here and be greatly appreciated ❤️

Adam Zerella

Package Sidebar

Install

npm i yup-ethereum

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

3.7 kB

Total Files

5

Last publish

Collaborators

  • azerella