This guide explains how to build and test all packages in this monorepo, including required environment variables for live end-to-end tests. It mirrors our CI setup for reliable, repeatable local runs.
Packages:
- @paraport/static — chain metadata/providers (no tests)
- @paraport/core — core logic and session management (unit, integration, live E2E)
- @paraport/vue — Vue 3 component library (unit)
- @paraport/sdk — framework‑agnostic embedded UI (unit)
- @paraport/react — React wrapper (unit)
- Node.js 20.x (LTS)
- pnpm 9.x
Install dependencies at the repo root:
pnpm installThe packages have dependencies and should be built in topological order:
- @paraport/static → 2) @paraport/core → 3) @paraport/vue → 4) @paraport/sdk → 5) @paraport/react
Recommended options:
- Build everything (topo-ordered by pnpm):
pnpm -r build
- Or use explicit steps (mirrors CI stages):
pnpm --filter @paraport/static buildpnpm --filter @paraport/core buildpnpm --filter @paraport/vue buildpnpm --filter @paraport/sdk buildpnpm --filter @paraport/react build
- Makefile alternative:
make installthenmake build
Run all tests that exist in the workspace:
pnpm -r --if-present run testRun specific package tests:
- Core:
pnpm --filter @paraport/core test - Vue:
pnpm --filter @paraport/vue test - SDK:
pnpm --filter @paraport/sdk test - React:
pnpm --filter @paraport/react test
Useful variants (where provided):
- Watch mode (core):
pnpm --filter @paraport/core run test:watch - Coverage (core):
pnpm --filter @paraport/core run test:coverage
Core provides three distinct test flows:
- Unit tests: fast, mocked, run with
pnpm --filter @paraport/core test - Mocked integration (e2e): isolated end-to-end flow with mocks, run with
pnpm --filter @paraport/core run test:e2e - Live E2E tests: exercise the real networks/providers, see below
Before core tests, static must be built at least once:
pnpm --filter @paraport/static buildThese tests submit real transactions on test networks. Use only test accounts.
Environment variables:
E2E_LIVE— set to1to enable live testsE2E_CHAIN— destination chain name; recommended default:CoretimePaseoE2E_MNEMONIC— REQUIRED. 12/24‑word mnemonic used to derive the destination addressE2E_ADDRESS— Optional. If provided, overrides the address derived from the mnemonic
Examples:
Run live tests using a mnemonic (recommended):
pnpm --filter @paraport/static build
E2E_LIVE=1 E2E_CHAIN="CoretimePaseo" E2E_MNEMONIC="word1 word2 ..." pnpm --filter @paraport/core run test:e2e:liveOptionally, provide an explicit address to override the derived one:
pnpm --filter @paraport/static build
E2E_LIVE=1 E2E_CHAIN="CoretimePaseo" E2E_MNEMONIC="word1 word2 ..." E2E_ADDRESS="YOUR_SS58_ADDRESS" pnpm --filter @paraport/core run test:e2e:liveNotes:
- Valid chain names come from
@paraport/static’sChainsenum. For quick starts, useCoretimePaseoas in our CI. - Live config swaps to a Node WS provider automatically (see
packages/core/vitest.config.e2e.live.ts). - Fund the source and destination account with sufficient test tokens or tests may skip/fail.
This sequence mirrors .github/workflows/ci.yml:
pnpm install
# Lint and typecheck (optional but recommended)
pnpm -w run ci:bootstrap
pnpm --filter @paraport/static run typecheck
pnpm --filter @paraport/core run typecheck
pnpm --filter @paraport/vue run typecheck
pnpm --filter @paraport/sdk run typecheck
pnpm --filter @paraport/react run typecheck
# Tests (unit + mocked e2e)
pnpm --filter @paraport/static build
pnpm --filter @paraport/core test
pnpm --filter @paraport/core run test:e2e
pnpm --filter @paraport/core build
pnpm --filter @paraport/vue test
pnpm --filter @paraport/vue build
pnpm --filter @paraport/sdk test
pnpm --filter @paraport/sdk build
pnpm --filter @paraport/react testTo run the scheduled live E2E locally (mirrors core-e2e.yml):
pnpm --filter @paraport/static build
E2E_LIVE=1 E2E_CHAIN=CoretimePaseo E2E_ADDRESS=YOUR_SS58_ADDRESS pnpm --filter @paraport/core run test:e2e:liveAt the root:
- Lint all:
pnpm lint - Bootstrap types for cross‑package checks:
pnpm -w run ci:bootstrap - Typecheck per package:
pnpm --filter <pkg> run typecheck
- “E2E_CHAIN is required…” — set
E2E_CHAINto a valid chain name (e.g.,CoretimePaseo). - “E2E_ADDRESS or E2E_MNEMONIC is required” — provide
E2E_MNEMONIC.E2E_ADDRESSis optional and only used to override the derived address. - Live tests hang/fail — ensure the account is funded and your network allows WebSocket connections.
- Build errors about missing workspace deps — run
pnpm -r buildto ensure topo-ordered builds.
- CI pipeline:
.github/workflows/ci.yml - Core live E2E workflow:
.github/workflows/core-e2e.yml - Package READMEs for usage examples