Build non-custodial EVM wallet experiences in TypeScript with OMS Wallet — email and OIDC sign-in, session restore, message signing, transaction submission, and token-balance queries — without your app ever holding a private key. This repository is the source of truth for the OMS Wallet SDK and its official wagmi connector: it exists so web and Node applications can integrate an OMS embedded wallet from a single, versioned, typed package set instead of re-implementing WaaS auth, request signing, and session handling by hand.
It is a pnpm workspace. The root is a private orchestrator (not published); the shippable code
lives in packages/, and examples/ holds runnable browser and Node demos that consume the
packages exactly as an external app would.
| Package | Published as | What it does |
|---|---|---|
packages/oms-wallet |
@polygonlabs/oms-wallet |
The core SDK — email/OIDC authentication, WaaS request signing, wallet/session storage, transaction submission and status polling, signing, access management, and indexer balance queries. Ships dual CJS + ESM for browser and Node consumers. |
packages/oms-wallet-wagmi-connector |
@polygonlabs/oms-wallet-wagmi-connector |
Adapts an active @polygonlabs/oms-wallet instance as a wagmi connector, so existing wagmi apps can use OMS Wallet as a connection option. |
Both packages release in lockstep (a changesets fixed group), so they always share a version.
pnpm install --frozen-lockfile
pnpm lint && pnpm test && pnpm build # the same checks CI runsCommon workspace commands (run from the repo root):
pnpm lint # eslint + markdownlint + prettier + typecheck
pnpm typecheck # tsc -b across the packages
pnpm test # SDK + connector test suites (pnpm -r)
pnpm build # build packages (dual CJS+ESM) + all examples (pnpm -r)
pnpm check:exports # publint on the publishable packages
pnpm dev:example # run a browser exampleWorkspace packages resolve each other from source (via the @polygonlabs/source export
condition), so no package needs to be built before its consumers — pnpm test and pnpm build run
from a clean checkout with no prior build. See AGENTS.md for the full architecture,
TypeScript setup, and conventions.
Publishing is fully automated in CI. Never publish from a local machine. Do not run
changeset versionorchangeset publish(ornpm/pnpm publish) yourself — a local publish bypasses CI, the signed release commit, and npm OIDC provenance. There are deliberately norelease/publishpackage scripts.
The flow, end to end:
- Every PR that changes a package includes a changeset (
pnpm exec changeset, orpnpm exec changeset add --emptyfor no-release changes) committed alongside the code. - Merging changesets to
masteropens achangesets: Release / DeployPR that bumps both packages and updates their changelogs. - Merging that PR triggers CI to publish to npm via OIDC trusted publishing, tag the release, and create a GitHub Release — no human runs a publish command.
To ship a throwaway prerelease under a non-latest npm dist-tag — e.g. so a downstream app can
install a build ahead of the real release — trigger the same Release workflow manually
(still CI, still no local publish):
- GitHub → Actions → Release → Run workflow.
- Set
snapshot_tagto a non-semver dist-tag (e.g.canary,pre-0.3.0). A semver-shaped value like0.3.0is rejected — the snapshot path skips the git tag and GitHub Release, so a real version string must never be used here. - CI runs
changeset version --snapshot <tag>on the runner (never committed) and publishes under that dist-tag via OIDC. Consumers install it withpnpm add @polygonlabs/oms-wallet@<tag>.
This never creates a git tag or GitHub Release; the normal master flow above stays the only way to
cut a real version.
Full details are in PUBLISHING.md. Changeset authoring guidance lives in the
changeset-commit agent skill.
- Follow the conventions in
AGENTS.md(imported byCLAUDE.mdfor Claude Code; read natively by Codex and other agents). - Every package-touching PR needs a changeset (see above); the
Changeset checkCI job enforces it. - Testing conventions and commands are in
TESTING.md.