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

@fintekkers/ledger-models

v1.1.56

Published

ledger model protos

Readme

Getting Started - Building

In order to build the protos in Javascript, you must download the web extension. For Mac this is:

brew install protobuf@3 brew link --overwrite protobuf@3

brew install protoc-gen-grpc-web

see more at https://github.com/grpc/grpc-web. Once install the Javascript portion of the compile.sh script at the root of this project should work.

TODO: Are there env variables required?

DEV Notes

The *js files are compiled using tsc. The tsconfig.json is used by VS code to determine when to run (by default on-save). Additionally the *.js.map files are generated to allow for setting debug breakpoints in .ts code. Those files can be not autogenerated by setting sourceMap=False in the tsconfig.json. Probably don't need those files in a production environment.

You can run transpilation via pressing Ctrl+Shift+B to open a list of tasks in VS Code and select tsc: watch - tsconfig.json

Publishing

Please see the .github/workflows/npm-publish.yml for the workflow file that deploys the package to a private GitHub repository manager.

The workflow file creates a .npmrc file within the build step and injects the publish token into it. Currently this is coming from dado0583's account (need to migrate to org secrets). The ephemeral .npmrc file will look like this:

@USERNAME:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=TOKEN

Security metrics (LM-485)

Shares outstanding, NAV per share and total net assets are dated series per security, served by the SecurityMetric service at the PRICE service address (BROKER_HOST, else PRICE_SERVICE_HOST/PRICE_SERVICE_PORT, ...). Security reads them by its UUID (a link-mode Security is never hydrated for this); SecurityMetricService also reads many securities at once and records points. Values are decimal.js Decimals; a metric is a SecurityMetricTypeProto value or its name. A missing value is undefined, never 0.

import { SecurityMetricTypeProto } from '@fintekkers/ledger-models/node/fintekkers/models/security/security_metric_type_pb';
import Security from '@fintekkers/ledger-models/node/wrappers/models/security/security';
import { isoDate } from '@fintekkers/ledger-models/node/wrappers/models/security/security_metric';
import { UUID } from '@fintekkers/ledger-models/node/wrappers/models/utils/uuid';
import { getSecurityMetricService } from '@fintekkers/ledger-models/node/wrappers/services/security-metric-service/SecurityMetricService';
const spy = new Security(Security.linkOfLatest(new UUID(UUID.fromString(spyUuid))));

// The latest value on or before a date: undefined when there is none, never 0.
const shares = await spy.getMetric(SecurityMetricTypeProto.SHARES_OUTSTANDING, '2026-11-23');
// shares.value: Decimal 15210000000, isoDate(shares.date): '2026-11-20', shares.ageDays: 3

// Shortcuts; `on` defaults to today.
const nav = await spy.navPerShare('2026-11-23');

// Many securities in one call: every UUID is a key, undefined when it has no value.
const service = getSecurityMetricService();
const latest = await service.get('SHARES_OUTSTANDING', [spyUuid, qqqUuid], '2026-11-23');

// History in date order, gaps kept; `to` defaults to today.
const history = await spy.sharesOutstandingHistory('2026-11-01', '2026-11-23');
const byDate = history.asDict(); // Map { '2026-11-19' => 15204137000, '2026-11-20' => 15210000000 }

// Record: points are checked first, then sent; returns the as_of the service stamped.
const asOf = await service.record('NAV_PER_SHARE', spyUuid, { '2026-11-23': '513.02' });

Other shortcuts: totalNetAssets(on?), sharesOutstanding(on?), navPerShareHistory(from, to?), totalNetAssetsHistory(from, to?); the general forms are getMetric(metric, on?) and getMetricHistory(metric, from, to?). Dates are LocalDates, Dates or ISO yyyy-mm-dd strings. Errors: MissingSecurityId, UnknownMetric and InvalidMetricPoints (its violations list every rejected point) extend SecurityMetricInputError; ServiceUnavailable (the service could not be reached; names host:port) extends SecurityMetricServiceError. Tests can install another transport with setSecurityMetricFetcher(fetcher) (null restores gRPC). Calls time out after 30 s by default (new SecurityMetricService({ deadlineMs })).