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

@global-torque/invest-data

v0.4.0

Published

Framework-free investment data clients and repository state helpers.

Readme

Invest Data

Framework-free investment data package for API clients, service contracts, API-error normalization, endpoint client factories, and pure repository state helpers.

Ownership

  • Legacy ApiClient, API hook configuration, API errors, and service request types.
  • API/network error classes that carry selectively sanitized request metadata for the frontend reporting pipeline. Known credential headers, URL fields, and body fields are redacted while useful request context is retained.
  • SDK-read compatibility error projection that preserves bounded protocol response bodies, plus narrowly normalized, revalidated offer list/detail responses during the backend deployment transition.
  • An SDK Vault-resource compatibility facade that preserves the legacy ApiClient hooks and domain return shapes for position and redemption calls.
  • Explicit data-client config for API base URLs, scanner URLs, app links, debug flags, and third-party data adapter keys.
  • Framework-free endpoint factories such as the EVM wallet repository and ERC-7540 Vault lifecycle clients.
  • Pure ActionState shapes and state-transition helpers.

Vue/Pinia repository wrappers live in their owning app or bounded feature. This package exposes only framework-free clients and repository-state helpers.

Allowed Dependencies

  • @global-torque/domain-types for DTO and analytics contracts.
  • @global-torque/invest-core for pure config/link contracts and helpers.
  • Browser fetch/Headers/Response types and injected runtime hooks.

Forbidden Dependencies

  • Vue, Pinia, Vue Router, route-level views, UI packages, apps, or invest-common.
  • invest-runtime or any runtime package that would create a data/runtime cycle.
  • Direct import.meta.env reads. Apps/runtime install data config explicitly.

Public Exports

  • .: root barrel for the HTTP client, legacy ApiClient, EVM repository factory, data-client config helpers, API hooks, API errors, service types, and pure repository state helpers.
  • ./client: framework-free fetch client.
  • ./api-client and ./service/apiClient: legacy ApiClient.
  • ./service/apiClientHooks: hook configuration used by runtime installers.
  • ./service/dataClientConfig: explicit data-client config and client factory helpers.
  • ./service/handlers/apiError and ./service/handlers/offlineRequestError: API error classes.
  • ./service/handlers/networkRequestError: raw fetch/network failure wrapper with data.httpRequest, statusCode: 0, retry metadata, and body metadata normalized through the shared analytics policy.
  • ./service/types: legacy service request/response types.
  • ./repository: pure ActionState and state-transition helpers.
  • ./migration/sdkReadCompatibility: SDK-read error projection plus narrowly scoped deployed-offer normalization for exact decimal strings and temporary close_at validation exclusion, backed by the pinned SDK validator for all other fields.
  • ./evm and ./investDataClient: EVM endpoint repository factories.
  • ./vault: exact-string investment/redemption intent, investor prepare/status, and fund-manager fulfillment client.

Example

import {
  createInvestDataApiClient,
  setInvestDataClientConfig,
} from '@global-torque/invest-data/service/dataClientConfig';

setInvestDataClientConfig({
  apiUrls: {
    wallet: 'https://wallet.example.test',
  },
});

const walletClient = createInvestDataApiClient('wallet');
const wallet = await walletClient.get('/auth/wallet/1150');

Both the legacy ApiClient and the hook-based createInvestDataClient keep the package framework-free while preserving failed request context. HTTP failures expose method, URL, path, status, and selectively redacted body metadata; raw fetch failures are wrapped as NetworkRequestError unless the request was aborted.