Skip to main content
@chipi-stack/core is pre-1.0 (currently 0.6.0). APIs may change before the stable release.

What is @chipi-stack/core?

@chipi-stack/core provides opt-in transaction primitives for developers who need fine-grained control over StarkNet operations. It complements the existing hooks-based SDKs (Next.js, React, Expo) with lower-level building blocks.

When to use core vs hooks

Installation

Module formats

@chipi-stack/core ships both ESM and CommonJS, so both of these resolve:
Versions before 0.6.0 were ESM-only. Because an exports map overrides main, any CommonJS resolver failed on them with ERR_PACKAGE_PATH_NOT_EXPORTED: No "exports" main defined. Since @chipi-stack/backend, @chipi-stack/chipi-react and @chipi-stack/nextjs all depend on core at runtime, the failure surfaced through those packages too.Bundlers (Next.js, Vite, webpack) resolve the import condition and were never affected, so this only appeared outside the bundler: standalone server scripts, cron jobs, tsx, ts-node and Jest. Note the trigger is CommonJS resolution, not CommonJS syntax, so import statements in a .ts file still failed under tsx unless the nearest package.json set "type": "module".If you cannot upgrade yet, adding "type": "module" to the package.json of the script that imports the SDK forces the ESM path and works around it.

Quick Example

Package Architecture

core depends only on @chipi-stack/types. It does not modify or depend on @chipi-stack/shared, keeping the two packages independent.

What’s Inside

Amount

Immutable token amount class with BigInt arithmetic, parsing, and formatting.

TxBuilder

Fluent builder for batching StarkNet multicalls into atomic transactions.

Erc20

Typed ERC20 contract wrapper that returns Amount objects.

TokenRegistry

Token metadata lookup by symbol or address, with network presets.

SignerAdapter

Unified signing interface for passkeys, direct keys, and external providers.