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

@liqpro/liq-core

v0.38.1

Published

SDK foundation — types, enums, EIP-712 helpers, chain config, and contract addresses for the Liq perpetuals exchange.

Readme

@liq/core

SDK foundation — types, enums, EIP-712 helpers, chain config, and contract addresses for the Liq perpetuals exchange.

Overview

@liq/core is the zero-framework base layer shared by all Liq SDK packages. It provides the canonical EIP-712 domain and order type definitions, chain configuration with contract addresses for each supported network, shared TypeScript types and enums for orders/positions/accounts, and the branded numeric primitives (Price, Qty, Usd, Margin) used throughout the system. The only runtime dependency is zod.

Key Exports

Chain config

  • getChainConfig(chainId) — returns ChainConfig (contracts, rpcUrl, subgraphUrl) for a given chain ID
  • getContractAddress(chainId, contract) — shortcut to a single contract address
  • ChainConfig — interface with PerpsMarketProxy, SynthetixCoreProxy, PerpsAccountProxy, SpotMarketProxy, TrustedMulticallForwarder, USDC, sUSDC

Supported chains: MegaETH Testnet (chainId 6343)

EIP-712

  • EIP712_ORDER_TYPES — typed data schema for order signing
  • EIP712_DOMAIN_NAME / EIP712_DOMAIN_VERSION"PerpExchange" / "1"
  • buildEip712Domain(chainId, verifyingContract) — constructs the EIP-712 domain object
  • buildLimitOrderMessage(params) — builds a signed limit order payload
  • buildMarketOrderMessage(params) — builds a signed market order payload
  • buildConditionalOrderMessage(params) — builds a signed TP/SL/stop order payload
  • ORDER_TYPE_INDEX — numeric index mapping for OrderType enum values

Types (src/types/)

  • OrderType enum — MARKET, LIMIT, STOP_MARKET, STOP_LIMIT, TAKE_PROFIT_MARKET, TAKE_PROFIT_LIMIT
  • Order, position, account, fill, market, and API types shared across SDK packages

Branded primitives (src/primitives.ts)

  • Price, Qty, Usd, Margin, Bps — branded bigint types (18 decimals)
  • Each brand: constructor, .parse(str), .fmt(val), .zod schema, .mul() arithmetic

Install

pnpm add @liq/core

Build

moon run liq-core:build    # tsup → dist/