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

@verana-labs/verana-types

v0.10.2

Published

Generated TypeScript protobuf codecs for the Verana blockchain.

Readme

@verana-labs/verana-types

TypeScript protobuf codecs generated from the Verana blockchain protobufs with ts-proto.

Overview

This package contains TypeScript type definitions and codecs generated from Verana's protobuf definitions. All files in src/codec/ are auto-generated and should not be edited manually.

Generated Files Location

  • Source: Proto definitions in proto/verana/**/*.proto
  • Generated Output: ts-proto/src/codec/**/*.ts
  • Generator: buf with ts-proto plugin (v1.181.2)

All generated files include this header:

// Code generated by protoc-gen-ts_proto. DO NOT EDIT.

Generating TypeScript Files

Quick Start (Recommended)

From the repository root:

make proto-ts

This command:

  1. Generates TypeScript files from .proto definitions
  2. Outputs to ts-proto/src/codec/
  3. Builds the TypeScript package

Manual Generation

If you prefer to run the steps manually:

# From repository root
cd proto
buf generate --template buf.gen.ts.yaml    # Generates to ../ts-proto/src/codec
cd ../ts-proto
npm install                                 # Install dependencies if needed
npm run build                               # Build the package (emits dist/)

What Gets Generated

The generator creates TypeScript files for:

  • Verana modules: tr, cs, dd, perm, td, de (Trust Registry, Credential Schema, DID Directory, Permission, Trust Deposit, Delegation Engine)
  • Cosmos SDK types: Base types, queries, messages
  • Google protobuf types: Timestamps, durations, etc.

Each module includes:

  • tx.ts - Transaction messages
  • query.ts - Query messages and responses
  • types.ts - Type definitions
  • params.ts - Parameter types
  • genesis.ts - Genesis state types

When to Regenerate

Always regenerate TypeScript files after:

  1. ✅ Modifying any .proto files in proto/verana/
  2. ✅ Adding new message types
  3. ✅ Changing field types or names
  4. ✅ Adding new modules
  5. ✅ Updating proto dependencies

Example workflow:

# 1. Make changes to proto files
vim proto/verana/tr/v1/tx.proto

# 2. Regenerate TypeScript files
make proto-ts

# 3. Verify the changes
cd ts-proto
npm run build

# 4. Test with the test harness
cd test
npm run test:create-tr

Configuration

The generation is configured in proto/buf.gen.ts.yaml:

plugins:
  - plugin: buf.build/community/stephenh-ts-proto:v1.181.2
    out: ../ts-proto/src/codec
    opt:
      - ts_proto_opt=esModuleInterop=true
      - ts_proto_opt=forceLong=long
      - ts_proto_opt=useOptionals=messages
      - ts_proto_opt=snakeToCamel=true

Options explained:

  • esModuleInterop=true - Enables ES module interop
  • forceLong=long - Uses long library for 64-bit integers
  • useOptionals=messages - Makes message fields optional
  • snakeToCamel=true - Converts snake_case to camelCase

Using Generated Types

In Tests

The test harness in ts-proto/test/ demonstrates how to use the generated types:

import { MsgCreateTrustRegistry } from "../../../src/codec/verana/tr/v1/tx";
import { typeUrls } from "../helpers/registry";

const msg = {
  typeUrl: typeUrls.MsgCreateTrustRegistry,
  value: MsgCreateTrustRegistry.fromPartial({
    creator: address,
    did: "did:verana:example",
    // ...
  }),
};

In Frontend Applications

import { MsgCreateTrustRegistry } from "@verana-labs/verana-types/codec/verana/tr/v1/tx";

See ts-proto/test/README.md for complete examples.

Publish

  1. Bump the version in package.json to match the chain tag you are releasing (e.g. v0.7.0 -> 0.7.0).
  2. Regenerate and build as above.
  3. npm publish (or npm pack and upload the tarball to the GitHub release assets).

Consume

npm install @verana-labs/verana-types

Import directly from the codec paths:

import { MsgAddDID } from "@verana-labs/verana-types/codec/verana/dd/v1/tx";