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

eas-uikit

v0.0.4

Published

EAS UIKit is a collection of components and utilities used to build applications on top of Ethereum Attestation Service. Developers can quickly build applications that interact with the EAS smart contracts by using the components provided by EAS UIKit.

Downloads

6

Readme

EAS UIKit

EAS UIKit is a collection of components and utilities used to build applications on top of Ethereum Attestation Service. Developers can quickly build applications that interact with the EAS smart contracts by using the components provided by EAS UIKit.

Components

  1. Schema Builder
  2. Schema Viewer
  3. Attest Schema
  4. Attestation Viewer

Getting Started

To get started with EAS UIKit, you can install the package using the following command/s:

npm install eas-uikit
# or
yarn add eas-uikit
# or
pnpm add eas-uikit

you can the then import the components in your application as shown below:

import {
  AttestSchema,
  AttestationViewer,
  SchemaBuilder,
  SchemaViewer,
} from 'eas-uikit';

Schema Viewer

The Schema Viewer component allows you to view the details about the schema such as fields, revocable details, etc.

It takes in the following props:

  • schemaUID: string: The uid of the schema to view
  • registryAddress: string: The SchemaRegistry contract address on the network.
  • signer: Signer: The ethers.js signer object.
<SchemaViewer
  registryAddress='0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0' // Sepolia Schema Registry Address
  schemaUID='0xa1d848a3e4fc480df46ab83f0708ff436a8cc2e5d33ae96b10dba43f3ddc6b7c'
  signer={signer}
/>

Schema Builder

The Schema Builder component allows you to create a new schema by specifying the fields, revocable details, expiration time, recipients, etc.

It takes in the following props:

  • signer: Signer: The ethers.js signer object.
  • registryAddress: string: The SchemaRegistry contract address on the network.
  • onSuccess: (uid: string, receipt?: TransactionReceipt) => void | Promise<void>: Optional Callback function that is called when the schema is successfully created.
  • onError: (error: unknown) => void | Promise<void>: Optional Callback function that is called when an error occurs while creating the schema.

Usage example:

<SchemaBuilder
  registryAddress='0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0' // Sepolia Schema Registry Address
  signer={signer}
  onError={(error) => console.error('Error creating schema:', error)}
  onSuccess={(uid) => console.log('Schema created with uid:', uid)}
/>

Attest Schema

The Attestation Maker component allows you to create an attestation for a schema by specifying the schema UID, recipient, data, etc.

It takes in the following props:

  • schemaUID: string: The uid of the schema to attest.
  • easContractAddress: string: The EAS contract address on the network.
  • registryAddress: string: The SchemaRegistry contract address on the network.
  • signer: Signer: The ethers.js signer object.
  • onSuccess: (uid: string, receipt?: TransactionReceipt) => void | Promise<void>: Optional Callback function that is called when the attestation is successfully created.
  • onError: (error: unknown) => void | Promise<void>: Optional Callback function that is called when an error occurs while creating the attestation.

Usage example:

<AttestSchema
  schemaUID='0xa1d848a3e4fc480df46ab83f0708ff436a8cc2e5d33ae96b10dba43f3ddc6b7c'
  easContractAddress='0xC2679fBD37d54388Ce493F1DB75320D236e1815e' // Sepolia EAS Contract Address
  registryAddress='0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0' // Sepolia Schema Registry Address
  signer={signer}
  onError={(error) => console.error('Error creating attestation:', error)}
  onSuccess={(uid) => console.log('Attestation created with uid:', uid)}
/>

Attestation Viewer

The Attestation Viewer component allows you to view the details about the attestation such as schema, decoded data, expiration time, etc.

It takes in the following props:

export interface AttestationViewerProps { attestationUID: string; easContractAddress: string; registryAddress: string; signer?: Signer; }

  • attestationUID: string: The uid of the attestation to view.
  • easContractAddress: string: The EAS contract address on the network.
  • registryAddress: string: The SchemaRegistry contract address on the network.
  • signer: Signer: The ethers.js signer object.

Usage example:

<AttestationViewer
  attestationUID='0x9e9d8feff919889127a409b0d842bdb2a2e90268ebc80bf163a4e9cda17ffd06'
  easContractAddress='0xC2679fBD37d54388Ce493F1DB75320D236e1815e' // Sepolia EAS Contract Address
  registryAddress='0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0' // Sepolia Schema Registry Address
  signer={signer}
/>

API Reference

For a complete API Reference of available functions and usage examples, please refer to the Generated Typedocs at: https://eas-uikit.envoy1084.xyz