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

@evergonlabs/tmi-protocol-api

v0.10.1

Published

REST API for Evergon's RWA tokenization and staking platform. Built with [Hono](https://hono.dev/) and OpenAPI.

Readme

@evergonlabs/tmi-protocol-api

REST API for Evergon's RWA tokenization and staking platform. Built with Hono and OpenAPI.

Entry Points

| Subpath | Purpose | |---|---| | ./app | Server-side: buildApps() to create the Hono application | | ./client | Client-side: buildClients() / buildNextClients() for typed RPC clients |

Client Usage

Note: @evergonlabs/tmi-protocol-api-client is deprecated. Use this package's ./client entry point instead.

Setup

import { buildClients, buildNextClients, parseResponse } from "@evergonlabs/tmi-protocol-api/client";

// Create typed clients for all API domains
const clients = buildClients("http://localhost:3000");

// Optionally, create clients for next-gen fractions endpoints
const nextClients = buildNextClients("http://localhost:3000");

buildClients returns an object with per-domain clients:

  • clients.staking — staking platforms, pools, stakes, roles
  • clients.stakingTemplates — pre-built staking templates (RWA, reputation, reputation-lock)
  • clients.fractions — fractionalization markets, sales, approvals, vesting
  • clients.general — balances, gas estimation
  • clients.issuance — ERC20/ERC721 token deployment and management

buildNextClients returns:

  • nextClients.fractions — NFT fractions and lending markets

Examples

All endpoint calls should be wrapped with parseResponse which handles the response parsing and returns typed data directly.

Deploy a staking platform

import { buildClients, parseResponse } from "@evergonlabs/tmi-protocol-api/client";

const clients = buildClients("http://localhost:3000");

const transaction = await parseResponse(
  clients.stakingTemplates.reputation.v0.createPlatform.$post({
    json: {
      chainId: 11155111,
      adminAddress: "0xYourAddress",
      isSoulbound: true,
      erc721: {
        symbol: "TT",
        name: "Test",
        baseUri: "ipfs://",
      },
    },
  }),
);
// Send `transaction.details` via your wallet (viem, ethers, etc.)

Deploy an ERC20 token via factory

const transaction = await parseResponse(
  clients.issuance.erc20.deploy.$post({
    json: {
      chainId: "sepolia",
      factoryAddress: "0xFactoryAddress",
      tokenName: "My Token",
      tokenSymbol: "MTK",
      supplyCap: "1000000000000000000000000",
      defaultTokenAdmin: "0xAdminAddress",
      minter: "0xMinterAddress",
    },
  }),
);

Query token balances

const balances = await parseResponse(
  clients.general.balances.$post({
    json: {
      chainId: 11155111,
      address: "0xOwnerAddress",
      contracts: ["0xTokenAddress"],
    },
  }),
);

Query staking platforms

const platforms = await parseResponse(
  clients.staking.platforms.searchV0.$post({
    json: {
      page: { limit: 10, skip: 0 },
      filter: {},
    },
  }),
);

Deploy a lending market (next-gen)

import { buildNextClients, parseResponse } from "@evergonlabs/tmi-protocol-api/client";

const nextClients = buildNextClients("http://localhost:3000");

const transaction = await parseResponse(
  nextClients.fractions.lending.deploy.$post({
    json: {
      chainId: "sepolia",
      adminAddress: "0xAdminAddress",
      lending: {
        minInterest: 1000,
        maxInterest: 2000,
        minDuration: "86400",
        maxDuration: "172800",
        minimumProportionOverObligation: "2000",
      },
    },
  }),
);

Type Inference

Use InferRequestType and InferResponseType to extract request/response types from any endpoint:

import { InferRequestType, InferResponseType } from "@evergonlabs/tmi-protocol-api/client";

type CreatePlatformRequest = InferRequestType<
  typeof clients.stakingTemplates.reputation.v0.createPlatform.$post
>;
type CreatePlatformResponse = InferResponseType<
  typeof clients.stakingTemplates.reputation.v0.createPlatform.$post
>;

Additional Exports

The ./client entry point also re-exports:

  • FractionsChainId, StakingChainId, PolymorphicChainId — chain ID Zod schemas
  • FactoryChainId — chain ID schema restricted to factory-supported chains
  • Erc20GatedRole, Erc721TokenRole — role enums for token access control
  • DeployTransactionSchema, TransactionSchema, PageSchema — reusable Zod schemas
  • parseResponse — parses Hono RPC response and returns typed data

Server Usage

import { buildApps } from "@evergonlabs/tmi-protocol-api/app";

const { composite: app } = buildApps(config);
// `app` is a standard Hono app — serve with @hono/node-server, Bun, Deno, etc.