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

@bhutan-ndi/polygon-schema-manager

v0.0.1-alpha.1

Published

Polygon schema manager

Readme

Polygon schema registrar

This GitHub repository is dedicated to creating W3C-compliant schemas for JSON-LD credentials, facilitating interoperability and standardization in digital credentialing. Methods

Contract Deployment

| Network | ChainId | Contract Address | | :--------------------: | :-----: | :----------------------------------------: | | Polygon Mainnet | 137 | 0x4B16719E73949a62E9A7306F352ec73F1B143c27 | | Polygon Testnet (amoy) | 80002 | 0x4742d43C2dFCa5a1d4238240Afa8547Daf87Ee7a |

Example of Polygon JSON-LD Schema:

{
  "resourceURI": "did:polygon:testnet:0x13cd23928Ae515b86592C630f56C138aE4c7B79a/resources/398cee0a-efac-4643-9f4c-74c48c72a14b",
  "resourceCollectionId": "55dbc8bf-fba3-4117-855c-1e0dc1d3bb47",
  "resourceId": "398cee0a-efac-4643-9f4c-74c48c72a14b",
  "resourceName": "PANCARD",
  "resourceType": "W3C-schema",
  "mediaType": "txt",
  "created": "2022-11-17T08:10:36Z",
  "checksum": "a95380f460e63ad939541a57aecbfd795fcd37c6d78ee86c885340e33a91b559",
  "previousVersionId": null,
  "nextVersionId": null
}

Schema Operations

Create Schema

Create a new JSON-LD credential schema. This method allows users to define the structure and properties of the credential schema.

import { createSchema } from 'polygon-schema-manager'
const txDetails = await createSchema(did, schemaName, schema)

The function returns, did, schemaId,and txnReceipt.

Get Schema by ID

Retrieves schema details by its unique ID.

import { getSchemaById } from 'polygon-schema-manager'
const schemaDetail = await getSchemaById(did, schemaId)

The function returns Schema details including resourceURI, resourceCollectionId, etc..

Get All Schemas by DID

Retrieves all schemas associated with a specific DID.

import { getSchemaById } from 'polygon-schema-manager'
const schemaDetails = await getSchemaById(did)

The function returns Array of schema objects with essential keys..

Estimate Transaction

Estimates transaction fees for schema-related transactions.

import { estimateTxFee } from 'polygon-schema-manager'
const transactionDetails = await getSchemaById(did)

The function returns transaction details including transactionFee, gasLimit, etc.

Validate Schema Object

Validates the JSON schema object to ensure its correctness.

import { estimateTxFee } from 'polygon-schema-manager'
const transactionDetails = await getSchemaById(did)

The function returns boolean indicating whether the schema is valid.