Repository navigation
Conversation
|
@bamiebot-maker 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1247
Implements the Partner Integration Sandbox Mode for BridgeWise API, allowing dApps, institutional partners, and wallet integrators to simulate cross-chain bridge lifecycle operations without real capital or on-chain transaction fees.
Key Changes
SandboxInterceptor):x-sandbox-mode: true,x-partner-sandbox: true, query parameters (?sandbox=true), orsb_/sandbox_API keys.partnerId,scenario,requestId) and stamps outgoing response headers (x-sandbox-mode,x-sandbox-scenario,x-sandbox-request-id).SandboxService):success(Standard flow with mock hash generation and steps)insufficient_liquidity(Pool exhaustion simulation)slippage_exceeded(Rejection upon price deviation)route_unavailable(Unsupported chain/token pairings)destination_revert(Simulated revert & refund lifecycle)timeout(Upstream 504 Gateway Timeout simulation)delayed_completion(In-progress processing simulation)POST /sandbox/faucet):INITIALIZED->SUBMITTED->SOURCE_CONFIRMED->DESTINATION_PROCESSING->COMPLETED/REFUNDED).SandboxBridgeProvider):BridgeAdapterinterface for modular quote resolution.SandboxController):GET /sandbox/status: Check sandbox capabilities, active scenario, supported chains/tokens.POST /sandbox/scenarios: Set active scenario for partner.POST /sandbox/reset: Reset all simulated transactions and faucet balances.POST /sandbox/quotes: Request simulated quotes.POST /sandbox/transactions: Submit simulated bridge transfer.GET /sandbox/transactions: List partner simulated transactions.GET /sandbox/transactions/:id: Retrieve single simulated transaction status.POST /sandbox/faucet: Mint test assets.POST /sandbox/webhooks/test: Dispatch test webhook notifications.docs/PARTNER_INTEGRATION_SANDBOX.md):Testing
apps/api/src/sandbox/sandbox.service.spec.tsapps/api/src/sandbox/sandbox.controller.spec.tsapps/api/src/sandbox/sandbox.interceptor.spec.tsapps/api/src/sandbox/sandbox-bridge-provider.spec.ts