Skip to content

feat: add mock SDK server for local dev and CI - #516

Merged
phertyameen merged 1 commit into
bridgelet-org:mainfrom
bright5455:feat/mock-sdk-server
Aug 27, 2026
Merged

feat: add mock SDK server for local dev and CI#516
phertyameen merged 1 commit into
bridgelet-org:mainfrom
bright5455:feat/mock-sdk-server

Conversation

@bright5455

Copy link
Copy Markdown
Contributor

closes #463

Started automatically via frontend/instrumentation.ts on every Next.js server boot, so local dev and CI no longer need a live bridgelet-sdk / testnet instance by default. Steps aside automatically when E2E_USE_MOCKS=false (already set by .github/workflows/compatibility.yml's real-SDK integration job), so no changes were needed to that workflow.

The mock also serves its own GET /api/docs-json, so check-sdk-contract.mjs can be pointed at the mock itself to verify it hasn't drifted from the declared contract — documented step-by-step in frontend/lib/sdk/mocks/README.md, including the known AccountStatus enum gap this mock intentionally mirrors rather than silently fixes.

Executive Summary

Linked Issues & References

  • Issue: Resolves #
  • Related PRs:

Type of Change

Category

  • New Feature (Non-breaking change adding functionality)
  • Bug Fix (Non-breaking change fixing an issue)
  • Performance Optimization (Code change to improve efficiency)
  • Refactoring (Code structure change without external API modification)
  • Security Patch (Fixing a vulnerability or security concern)
  • Documentation (Updates to README, Wiki, or inline docs)
  • Infrastructure (CI/CD, build scripts, Docker)

Domain

  • Smart Contracts (Rust/Soroban)
  • SDK/Backend (NestJS/TypeScript)
  • Frontend/UI

Technical Implementation Details

Breaking Changes

  • No - Backward compatibility is maintained.
  • Yes - This change requires consumers of the SDK/Contract to update their code.

Verification & Testing Strategy

Automated Tests

  • Unit Tests: Added/Updated new unit tests.
  • Integration Tests: Verified interaction between modules.
  • Linting: Code follows the project's style guide.

Manual Verification

1. Environment:

  • Target Environment:

2. Reproduction Steps:

3. Proof of Execution:

Quality Assurance Checklist

  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect these changes.
  • My changes do not generate new warnings or errors.
  • I have verified that new dependencies are necessary and secure.
  • (If Smart Contract) I have verified gas usage and storage footprints are optimized.

By submitting this Pull Request, I acknowledge that I have adhered to the Bridgelet contribution guidelines.

Adds frontend/lib/sdk/mocks/ — an msw/node mock of bridgelet-sdk's
account/claim endpoints (create account, check status, verify, redeem),
covering exactly what scripts/check-sdk-contract.mjs declares as the
frontend's real contract with the SDK.

Started automatically via frontend/instrumentation.ts on every Next.js
server boot, so local dev and CI no longer need a live bridgelet-sdk /
testnet instance by default. Steps aside automatically when
E2E_USE_MOCKS=false (already set by .github/workflows/compatibility.yml's
real-SDK integration job), so no changes were needed to that workflow.

The mock also serves its own GET /api/docs-json, so
check-sdk-contract.mjs can be pointed at the mock itself to verify it
hasn't drifted from the declared contract — documented step-by-step in
frontend/lib/sdk/mocks/README.md, including the known AccountStatus enum
gap this mock intentionally mirrors rather than silently fixes.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@bright5455 is attempting to deploy a commit to the aminubabafatima8-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@bright5455 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@phertyameen
phertyameen merged commit 65c5ab2 into bridgelet-org:main Aug 27, 2026
5 of 6 checks passed
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.

Mock SDK server for local and CI testing

2 participants