Skip to content

feat(bridge): add Effect Bridge SDK for Miso - #60

Draft
tamashi095 wants to merge 1 commit into
mainfrom
feat/bridge-effect-sdk
Draft

tamashi095 wants to merge 1 commit into
mainfrom
feat/bridge-effect-sdk

Conversation

@tamashi095

Copy link
Copy Markdown
Contributor

Summary

  • Add @misofm/bridge, an Effect v4 SDK generated from a pinned Bridge OpenAPI snapshot: 134 operations across 100 paths and 263 component schemas, including hidden/deprecated endpoints.
  • Provide a redacted authenticated client, injectable Layers, typed errors, incremental pagination, Web Crypto webhook verification, and a Cloudflare Worker example using per-invocation secret bindings.
  • Add deterministic offline code generation, contract/negative tests, packed Node ESM consumer checks, and a local workerd smoke test in CI.

Verification

  • bun run --filter @misofm/bridge generate:check
  • bun run typecheck, bun run test, bun run build
  • bun run --filter @misofm/bridge test:consumer
  • bun run --filter @misofm/bridge test:workerd
  • bun run test:consumer
  • git diff --cached --check before commit
  • Independent GPT-6 Astra xhigh review after bounded implementation/fixes: go for draft review.

The Bridge package suite has 84 passing tests. Tests use fixtures, synthetic credentials, mocked Fetch, and local workerd; no live Bridge calls were made.

Before release / production use

This is deliberately a draft, not an npm release. The publish workflow recognizes bridge-v* for validation but skips npm publish. The pinned Bridge schema disagrees with many published response examples; the specific conflicts are documented in packages/bridge/docs/UPSTREAM.md. In particular, transfer response currency is required by the spec but omitted from all published examples. Type-erased undefined passed to a method requiring path parameters can still send a request with unresolved placeholders; the README documents this as a pre-publication hardening item. Confirm wire behavior after KYC and resolve these gates before publication or production financial flows.

Refs #59.

Cover all 134 pinned Bridge operations with generated Effect schemas and a portable client, pagination, webhook verification, and Miso Worker examples. Add isolated consumer and workerd checks. Refs #59.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant