Sign In

@hashlock-tech/shared-types

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashlock-tech/shared-types

Shared TypeScript types, HTLC contract addresses + ABIs, and theme tokens for Hashlock Markets

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
6
100%
Maintainers
1
Weekly downloads
 
Created
Source

@hashlock-tech/shared-types

TypeScript types, HTLC contract addresses + ABIs, and theme tokens shared across the Hashlock Markets ecosystem.

Consumers:

Why this package exists

The wallet is a separate repository from the backend (different release cycle, App Store signing, mobile-specific tooling) but it has to agree with the backend on:

  • Domain enums (TradeStatus, HTLCStatus, RFQStatus, QuoteStatus, etc.)
  • HTLC contract addresses for every supported chain
  • Platform fee + rebate constants
  • Theme tokens (HUD palette, fonts, spacing) — the wallet uses the same visual language as the web app

Hosting this in one published package means a contract change is a versioned event everyone sees, instead of a silent drift between three repos.

Source of truth

SurfaceBackend fileThis package
Domain enumscayman-hashlock/backend/shared/src/types/trading.tssrc/domain.ts
HTLC contract addressescayman-hashlock/backend/shared/src/blockchain/registry.tssrc/contracts/index.ts
Theme tokenscayman-hashlock/web/tailwind.config.tssrc/theme/index.ts

When the backend changes, bump this package's patch version and republish. The CI in cayman-hashlock enforces that enum string values match.

Install

pnpm add @hashlock-tech/shared-types

Usage

import { TradeStatus, HTLCStatus, ChainType, CHAIN_IDS } from '@hashlock-tech/shared-types';
import { HTLC_CONTRACTS, PLATFORM_FEE_BPS } from '@hashlock-tech/shared-types/contracts';
import { colors, fonts, space } from '@hashlock-tech/shared-types/theme';

const sepoliaHtlc = HTLC_CONTRACTS[CHAIN_IDS.ETHEREUM_SEPOLIA]?.etherFee;

Publish

Maintainers only:

pnpm version patch       # or minor / major
git tag v$(jq -r .version package.json)
git push --tags
pnpm publish --access public

The git tag MUST exist before pnpm publish so gitHead in the published package.json resolves to the right commit (memory: feedback_publish_tag_before_npm.md).

License

MIT — see LICENSE.

FAQs

Package last updated on 27 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts