Mykobo Base EVM Integration#1159
Draft
ebma wants to merge 42 commits into
Draft
Conversation
Introduces the Mykobo anchor integration surface in the shared package: singleton MykoboApiService with bearer auth + 401 retry, request/response types, EURC EvmToken on Base, Mykobo env vars, and an email field on RegisterRampRequest.additionalData to bind a ramp to a Mykobo profile.
Adds an EVM-to-SEPA quote strategy that swaps USDC to EURC on Base via Nabla and reads the anchor fee dynamically from Mykobo's /fees endpoint, mirroring the AlfredPay model (no static anchor table row). RouteResolver sends sepa+EVM to the new strategy while sepa+AssetHub stays on the existing Stellar path. Adds Mykobo-specific RampState meta fields and the locked-in implementation plan doc.
Adds the execution slab for the Mykobo EUR offramp targeting Base (EVM): - New evm-to-mykobo route prepares squidRouter (skipped when source is Base USDC), fee distribution, Nabla USDC->EURC swap, Mykobo intent creation, presigned EURC transfer to receivables, plus USDC/EURC/AXLUSDC cleanup approvals. - New mykoboPayoutOnBase phase handler broadcasts the EURC transfer and polls Mykobo until the transaction reaches COMPLETED. - subsidizePostSwap branches to mykoboPayoutOnBase for EUR offramps and routes EUR EVM offramps through the EVM subsidy path. - fundEphemeral now provisions a Base ephemeral for EUR offramps and only verifies user-submitted squid hashes when a blueprint exists. - base-chain post-process sweeps the new baseCleanupEurc phase alongside existing Base cleanups. - ramp controller captures req.ip into additionalData so the Mykobo intent request carries the user IP required by the API.
- Add integration test hitting real Mykobo dev sandbox (fees, intent, quote creation, registerRamp) without on-chain submission. - Fix OffRampFinalizeEngine to honor nablaSwapEvm output for SEPA path (not just PIX); previously SEPA quotes failed finalization. - Strip /v1 from default MYKOBO_BASE_URL; client appends it itself, so env var is now the bare host (https://api-dev.mykobo.app). - Ignore lastRampStateMykoboEur.json test artifact.
Introduces the mykoboOnrampDeposit RampPhase for the upcoming EVM ephemeral flow, an IbanPaymentData.reference field for SCOR payment references, EURC Base ERC20 constants, a free-token config for Mykobo EUR, and wires the new phase into the frontend progress page maps. Reuses the unified subsidizePreSwap / subsidizePostSwap / distributeFees handlers for the EVM branch instead of introducing suffixed phase names.
The unified subsidizePreSwap, subsidizePostSwap, nablaApprove, nablaSwap, and distributeFees handlers previously branched into the EVM path when the input or output currency was BRL (and a partial EURC special-case for offramp post-swap). This hardcoded the BRL flow into every handler and required a new conditional for each future EVM-ephemeral route. Switch the dispatch to check quote.metadata.nablaSwapEvm, which is set by the quote engine whenever the EVM-ephemeral Nabla path is selected (BRL today, Mykobo EUR onramp + offramp next). Removes the FiatToken import where it is no longer used.
Adds OnRampInitializeMykoboEngine which estimates EURC delivered on the Base ephemeral after Mykobo's deposit fee, populating ctx.mykoboMint for downstream stages. Introduces a Mykobo onramp validation helper that checks for an EVM ephemeral and EURC on Base, a MykoboApiService.defaultDepositFee shortcut to lookup MykoboFeeKind.DEPOSIT fees, the MykoboOnrampTransactionParams type carrying the user email, and a parallel ctx.mykoboMint shape next to ctx.aveniaMint / ctx.aveniaTransfer in the quote context.
Adds OnRampSwapEngineMykoboEvm, an EVM Nabla swap variant that consumes ctx.mykoboMint and swaps EURC -> USDC on Base, OnRampMykoboToEvmFeeEngine which carries the Mykobo deposit fee as the anchor fee and computes the Squidrouter network fee for Base USDC -> destination, and the onrampMykoboToEvmStrategy route strategy that chains Initialize -> Fee -> NablaSwap -> Discount -> SquidRouter -> Finalize. Reuses OnRampSquidRouterBrlToEvmEngineBase since it operates on USDC on Base regardless of upstream fiat origin.
Replace Monerium with Mykobo as the EUR→EVM onramp path: - RouteResolver: EURC + EVM destination → onrampMykoboToEvmStrategy - InitialPhaseHandler: EURC BUY → mykoboOnrampDeposit phase Monerium AssetHub strategy is retained for the substrate path.
Add OnrampMykobo kind to ramp-transaction-preparation that routes EURC BUY on EVM destinations to a new prepareMykoboToEvmOnrampTransactions route. RampService.prepareMykoboOnrampTransactions creates the Mykobo deposit intent (EURC, DEPOSIT, evm ephemeral address) and surfaces IBAN + reference via ibanPaymentData. Monerium remains for EURC -> AssetHub.
Mykobo on Base replaces Monerium for EUR onramps. EUR onramps now route exclusively through the Mykobo EVM-ephemeral flow; EUR→AssetHub is no longer supported and returns HTTP 400. - Delete Monerium controller, route, service, handlers, quote engines, strategies, transaction routes, and shared endpoint module - Drop `moneriumAuthToken`, `moneriumMint`, `moneriumOnrampSelfTransfer`, `moneriumOnrampMint` from phase/quote/meta types and validation - Remove EURC→Monerium branch from fund-ephemeral nextPhaseSelector and ramp helpers explorer-link builder - Drop `onrampMoneriumToAssethubStrategy` import and SEPA→AssetHub branch from route-resolver; EURC+AssetHub BUY now hard 400 - Drop `createOnrampSquidrouterTransactionsFromPolygonToMoonbeam` from shared squidrouter; retain Polygon→EVM path for Alfredpay USDT - Inline `Signature` type into ramp.endpoints (was re-exported from deleted Monerium endpoint module) - Update validation.test fixtures to use generic squid/nabla phases
Sweep removal of Monerium frontend integration: KYC machine, redirect step, AssetHub form step, auth service, hook, stories, schema fields, URL params, translations, and progress flow entries. Mykobo replacement UI will be added in a dedicated slab. - Delete moneriumKyc.machine, moneriumAuth, monerium.service, useMoneriumFlow, MoneriumRedirectStep, MoneriumAssethubFormStep, related stories - Remove ERC2612 permit branch and SEPA SELL message-signature branch from sign.actor; drop `moneriumOfframpSignature` and `moneriumOnrampPermit` from additionalData - Drop `moneriumWalletAddress` from useRampSubmission, schema, register payload, types.phases; EUR onramps deposit directly to evmEphemeral - Remove `useMoneriumKycActor`/`Selector`, MoneriumKyc types from contexts and machines/types - Simplify `getRampFlow`: EURC BUY always uses `onramp_eur_evm` (Mykobo flow). Drop `onramp_eur_assethub` and `onramp_eur_assethub_via_hydration` - Replace `onramp_eur_evm` flow with Mykobo: initial → mykoboOnrampDeposit → subsidizePreSwap → nablaApprove → nablaSwap → subsidizePostSwap → squidRouter* → distributeFees → destinationTransfer → complete - Drop `MoneriumErrors.USER_MINT_ADDRESS_NOT_FOUND` branch from useGetRampRegistrationErrorMessage and SummaryStep banner - Drop `ERC20_EURE_POLYGON_*` constants from shared tokens; remove all Monerium translation keys from en.json and pt.json
Poll the Base ephemeral for EURC arrival from Mykobo's SEPA settlement, then transition to subsidizePreSwap so the Nabla EURC→USDC swap can run. - Mirror BRLA/Alfredpay mint-handler structure: `checkEvmBalancePeriodically` on Base for EURC against `evmEphemeralAddress`, expected raw amount taken from `quote.metadata.mykoboMint.outputAmountRaw` - Recovery shortcut: skip the wait if the ephemeral already holds \u226595% of the expected amount (handles fee variance between quote and settlement) - 24h payment timeout reflects SEPA business-day cutoffs; on timeout the phase transitions to `failed`. Inner balance-check timeout (5 min) bubbles up as a recoverable error so the outer process loop can retry - Register `mykoboOnrampDepositHandler` alongside Mykobo payout handler Flow: initial \u2192 mykoboOnrampDeposit \u2192 subsidizePreSwap \u2192 nablaApprove \u2192 nablaSwap \u2192 subsidizePostSwap \u2192 squidRouter* \u2192 destinationTransfer
…ture EUR offramp migrated to Mykobo on Base/EVM; ARS to be rebuilt with AlfredPay later. This removes all Stellar token configs, Spacewalk redeem paths, SEP-10 auth, Stellar/Spacewalk phase handlers, Stellar tx builders/validation, StellarTokenConfig/Details types, Stellar ephemeral helpers, and stellar_eurc /stellar_ars anchor fee branches. FiatToken.ARS preserved for the frontend selector. ARS via 'cbu' now throws explicit 'temporarily unavailable' error in route-resolver. PaymentData.anchorTargetAccount removed (only Stellar callsites). XCM event parser moved to xcmParsers.ts so substrate event listener compiles without redeem parsers.
Deletes stellar_eurc and stellar_ars rows from anchors table and removes XLM-token subsidies, completing the Stellar removal. New migration (028); prior migrations 005/008/022 are left untouched.
…ring Deletes stellarKyc XState machine + SEP-10/24 actors and services, the useSignChallenge hook, and stellar.service. Strips stellar ephemeral creation from useRampSubmission, register.actor, and ramp.machine; removes stellarKyc branch from kyc.states; removes spacewalkRedeem/stellarPayment/stellarCreate Account from phaseFlows and phaseMessages; cleans up rampState context, ramp page, RampSubmitButton, NetworkSelector, TokenSelection helpers, summary TransactionTokensDisplay, storage.service, services/api/index re-export, phases types, localStorage keys, and progress flow resolver. ARS coin icon and FiatToken.ARS preserved for the token selector.
Drops createStellarEphemeral usage from VortexSdk, the stellarEphemeral field from SDK input/internal types, and BrlHandler's stellar ephemeral plumbing. SDK no longer signs Stellar transactions since the backend has no Stellar offramp paths.
…m fallback Refactors the bridged-token-for-fallback ternary into an explicit if/else that throws if Ethereum USDC config is missing. Removes the only Mykobo-scoped biome lint error introduced in this branch.
…hemeral from mykobo offramp test Slab 7 removed stellarTokenConfig, which was the only place FiatToken.EURC had fiat metadata registered, causing getAnyFiatTokenDetails(EURC) to throw 'Token type is not Moonbeam' in the offramp quote validation path. - Register FiatToken.EURC in freeTokenConfig with decimals=6 (Circle's EVM EURC on Base) and matching min/max amount caps. - Remove the leftover Stellar ephemeral from the mykobo-eur-offramp integration test now that the Mykobo+Base flow only needs EVM+Substrate ephemerals (the normalize step now rejects Stellar entries). Mykobo offramp integration test: 5/5 passing against real sandbox.
Mirrors mykobo-eur-offramp.integration.test.ts for BUY direction. Covers Mykobo /fees DEPOSIT lookup, createTransactionIntent DEPOSIT returning IBAN instructions, EUR onramp quote on Base, and ramp registration which calls Mykobo at registration time and populates ibanPaymentData + state.mykoboTransactionId/Reference. Asserts Base-destination phase set: nablaApprove, nablaSwap, destinationTransfer, baseCleanupEurc, baseCleanupUsdc; no SquidRouter. Adds gitignore entries for the test scratch file. All 5/5 tests pass against the real Mykobo sandbox.
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…e flows Adds 05-integrations/mykobo.md covering the active EUR rail (SEPA <-> EURC on Base, mirroring BRLA-on-Base topology) with invariants, threat vectors, and audit checklist. Updates ramp-phase-flows.md corridor list, mermaids, handler-registry table, and audit checklist to reflect Mykobo on/offramp and the removal of the Stellar-EUR offramp and Monerium-EUR onramp.
…cated Adds deprecation banners pointing to mykobo.md. Stellar anchors remain active for ARS-only off-ramp; Monerium is fully removed from active corridors. Files retained for audit lineage of F-023 / F-024.
Updates module index, glossary, system architecture, ephemeral-account inventory, discount/validation notes, integration corridor lists, Spacewalk bridge intro, fund-routing F-029 (Mykobo Base ops added to MOONBEAM_FUNDING_PRIVATE_KEY blast radius), secret-management inventory (MYKOBO_* env vars added), and release-readiness env-var list (replace MONERIUM_* with MYKOBO_*). No code paths reference Monerium for new ramps; banners preserve audit lineage.
AUDIT-RESULTS.md: marks Section 5.2 Monerium DEPRECATED, adds Section 5.2b Mykobo with 21 checks (20 PASS, 1 PARTIAL log redaction, 1 FAIL on HTTP-client timeout per F-014), updates F-014 location list, marks F-023 SUPERSEDED and F-024 carried forward, retargets top-10 action item #9 to a per-user concurrent Mykobo-ramp limit. FINDINGS.md: F-014 service list now includes Mykobo+BRLA and notes the Monerium gap was inherited by the Mykobo client; F-023 status set to SUPERSEDED with resolution explaining the 24h Mykobo outer timeout; F-024 carried forward as DEFERRED — STILL APPLIES with the impact rewritten for the larger 24h exposure window per pending unpaid ramp.
- Rewrite ramp-phase-flows on-ramp and off-ramp mermaid diagrams as unified funnel-after-fiat: per-corridor fiat-watch entry collapses into the shared Pendulum/Nabla chain, then splits again at payout. - Correct EUR on-ramp prose: mykoboOnrampDeposit transitions directly to subsidizePreSwap, skipping fundEphemeral. - Remove ARS as an active corridor: drop ARS row from cross-chain delivery, drop ARS off-ramp branch from the diagram, and downgrade stellar-anchors.md from 'ARS-only' to fully deprecated. - Fix mykobo.md endpoint typo: /v1/mykobo/profile -> /v1/mykobo/profiles (matches mykobo.route.ts).
File four open findings raised during the Mykobo-on-Base EUR rail audit: - F-068 (Critical): /v1/mykobo/profiles GET/POST have no requireAuth; anonymous callers can enumerate KYC profiles by wallet address and POST KYC documents (ID, source-of-funds, selfie) against arbitrary wallet addresses. Parent mount at routes/v1/index.ts is also unwrapped. Violates mykobo.md Invariant 15. Fix: add requireAuth to both routes (mirroring alfredpay.route.ts) plus wallet-ownership check. - F-069 (High): fund-ephemeral-handler.nextPhaseSelector has no EURC SELL branch; EUR off-ramps fall through to 'moonbeamToPendulum', which has no role in Base-only EUR off-ramp routing (evm-to-mykobo.ts). Latent stuck-phase bug. Not surfaced by tests because integration tests only call registerRamp, not startRamp on this path. Fix: add explicit EURC -> distributeFees branch mirroring BRL. - F-070 (Medium): MykoboApiService constructor accepts any URL scheme for MYKOBO_BASE_URL. A misconfigured deployment with http:// would silently transmit bearer tokens, KYC document references, and IBAN payment instructions in cleartext. Fix: enforce URL.protocol === 'https:' in production. - F-071 (Low): MykoboApiService.handleAuthFailure is not debounced. Concurrent 401s trigger concurrent refresh/acquire calls (thundering herd), with this.cachedToken writes racing. getToken is correctly debounced via tokenPromise; apply the same pattern to the 401 path. Also flip the corresponding rows in AUDIT-RESULTS.md (Mykobo subsection 5.2b checks #2, #14, #17, #19) from PASS to FAIL/PARTIAL, update the summary tables in both files to reflect 4 open findings, and add the remediation entries to the Recommended Remediation Order.
Both GET and POST /v1/mykobo/profiles were unprotected, allowing anonymous callers to enumerate KYC profiles and submit arbitrary KYC documents. Adds requireAuth middleware on both routes, mirroring the alfredpay pattern. No wallet-ownership check needed: wallet_address in the Mykobo flow always refers to an ephemeral, not a user-owned wallet.
…RC routing (F-069) The Mykobo (EURC) onramp ephemeral on Base had no source of native ETH, making downstream nablaApprove/nablaSwap/squidRouter txs unable to pay gas. The fund-ephemeral handler also lacked an EURC SELL branch, falling through to moonbeamToPendulum which has no role in the Base-only EUR off-ramp. Changes: - fund-ephemeral-handler.getRequiresBaseEphemeralAddress now also returns true for inputCurrency === EURC (BUY direction). - nextPhaseSelector gets explicit BUY+EURC -> subsidizePreSwap and SELL+EURC -> distributeFees branches. - mykobo-onramp-deposit-handler now transitions to fundEphemeral (not subsidizePreSwap), so the EUR onramp ephemeral gets Base ETH before the Nabla swap. - Frontend phaseFlows.ts onramp_eur_evm inserts fundEphemeral between mykoboOnrampDeposit and subsidizePreSwap to match the new phase order.
…re recovery (F-070, F-071) F-070: MykoboApiService accepted any URL scheme on MYKOBO_BASE_URL; a misconfigured http:// would silently transmit bearer tokens and KYC references in cleartext. Adds assertSecureMykoboBaseUrl which rejects non-HTTPS schemes at construction. In non-production (NODE_ENV !== 'production'), http://localhost and http://127.0.0.1 are permitted for local development. F-071: handleAuthFailure had no concurrency guard, so multiple in-flight 401s would each independently call refreshAccessToken/acquireToken, producing redundant token rotations and potential clobbering of cachedToken. Adds authFailurePromise debounce mirroring the existing tokenPromise pattern in getToken; logic moved into doHandleAuthFailure.
- FINDINGS.md: each F-068..F-071 entry now marked FIXED with a Resolution field describing the exact remediation applied in this audit cycle. - AUDIT-RESULTS.md: invariant rows #2, #14, #17, #19 flipped from FAIL/ PARTIAL back to PASS with references to the fix commits. - Findings Summary updated: 53 fixed / 9 accepted / 9 deferred / 0 open across 71 total. - Recommended remediation items 15-18 marked done with one-line resolution notes.
… wiring - ramp-phase-flows.md: EUR onramp now includes fundEphemeral (was 'skipped'), matching code in fund-ephemeral-handler.ts and mykobo-onramp-deposit-handler.ts. - mykobo.md: on-ramp step 5 includes fundEphemeral before subsidizePreSwap. - ephemeral-accounts.md: flip open checkbox; BaseChainPostProcessHandler is implemented and was already noted as resolved on line 60. - supabase-otp.md, api-surface.md, architecture.md: route-auth audit rows now reference F-068 resolution (requireAuth on /v1/mykobo/profiles GET + POST). No code changes. Polygon-related rebalancer/secret-management/token-relayer specs verified active against apps/rebalancer/src/rebalance/brla-to-axlusdc/ and left unchanged.
…act upstream errors GET /v1/mykobo/profiles now compares the returned profile.email_address against req.userEmail (case-insensitive) and returns 404 on mismatch, so PII for a wallet that belongs to a different user is no longer leaked. POST /v1/mykobo/profiles overwrites email_address with req.userEmail server-side and validates wallet_address with viem's isAddress before forwarding to Mykobo. address is also validated on GET. Upstream MykoboApiError bodies are no longer logged; only status is emitted on the warn line.
…sh by blueprint - fund-ephemeral-handler: drop unreachable Polygon EURC branch (EUR onramps always source from Base via Mykobo; Polygon path was dead code that could mask routing bugs). - ramp.service: only require squidRouterSwapHash when blueprint actually uses Squid (prevents false validation failures for non-Squid routes).
Use createRecoverableError so the phase processor retries on transient upstream timeouts instead of permanently failing the ramp state.
…oute validateOfframpQuote now accepts requireSubstrateEphemeral; EVM->Mykobo opts out (no substrate hop), while assethub->BRL keeps the requirement with an inline guard for the consumer.
- signingService: drop unused Stellar/Monerium exports and PII console.log - useLocalStorage: remove unused enum entries - events.tsx: drop dead SEP24 event types - vars.ts + .env.example: remove unused Monerium env vars - delete useTrackSEP24Events.ts (no callers)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the EUR corridor to Mykobo on Base and removes the legacy Stellar/Spacewalk and Monerium integrations across the shared package, API, SDK, and frontend, aligning the codebase with the new EVM-only EUR rail.
Changes:
- Added Base EURC (EVM token) support and new Mykobo integration surfaces (env vars, services, routes, quote strategies/engines, phases).
- Removed Stellar token types/config, endpoints, SEP-10/SEP-24 flows, Spacewalk redeem, and Monerium SDK/routes/types.
- Updated ramp routing/phase handling and documentation to reflect the deprecation and new Mykobo-based flow.
Reviewed changes
Copilot reviewed 212 out of 214 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/tokens/utils/typeGuards.ts | Removes Stellar token detail guards/unions; simplifies fiat/on-chain token typing. |
| packages/shared/src/tokens/utils/helpers.ts | Removes Stellar token lookup; updates fiat token resolution to Moonbeam/free configs. |
| packages/shared/src/tokens/types/stellar.ts | Deletes Stellar token detail type definitions. |
| packages/shared/src/tokens/types/evm.ts | Adds EURC to EVM token enum. |
| packages/shared/src/tokens/types/base.ts | Removes Stellar TokenType and Stellar variant of PendulumCurrencyId. |
| packages/shared/src/tokens/stellar/config.ts | Deletes Stellar fiat token config. |
| packages/shared/src/tokens/index.ts | Updates barrel exports; adds eurcMykobo export; removes Stellar exports. |
| packages/shared/src/tokens/freeTokens/eurcMykobo.ts | Adds Mykobo-specific EUR config as a free fiat currency config. |
| packages/shared/src/tokens/freeTokens/config.ts | Adds EURC fiat currency entry to free token config. |
| packages/shared/src/tokens/evm/config.ts | Adds Base EURC token configuration and references new constants. |
| packages/shared/src/tokens/constants/misc.ts | Removes Stellar constants; adds Base EURC constants and Base chain IDs. |
| packages/shared/src/substrateEvents/xcmParsers.ts | Introduces XCM/XTokens event parsers. |
| packages/shared/src/substrateEvents/index.ts | Re-exports XCM parsers instead of legacy event parsers. |
| packages/shared/src/substrateEvents/eventListener.ts | Removes redeem listener/recovery; switches to new XCM parser. |
| packages/shared/src/services/squidrouter/onramp.ts | Removes Polygon→Moonbeam (Monerium) onramp path. |
| packages/shared/src/services/mykobo/index.ts | Adds Mykobo shared-service barrel exports. |
| packages/shared/src/services/index.ts | Exposes Mykobo services from shared services index. |
| packages/shared/src/helpers/signUnsigned.ts | Removes Stellar signing and Stellar ephemeral usage from presigning. |
| packages/shared/src/helpers/parseNumbers.ts | Removes Stellar-specific decimal helpers. |
| packages/shared/src/helpers/networks.ts | Removes Stellar network and chain ID metadata. |
| packages/shared/src/helpers/ephemerals.ts | Removes Stellar ephemeral generation. |
| packages/shared/src/helpers/conversions.ts | Removes Stellar hex→public conversion helper. |
| packages/shared/src/endpoints/storage.endpoints.ts | Removes Stellar storage flow types/interfaces. |
| packages/shared/src/endpoints/stellar.endpoints.ts | Deletes Stellar endpoint request/response types. |
| packages/shared/src/endpoints/monerium.ts | Deletes Monerium endpoint types. |
| packages/shared/src/endpoints/index.ts | Removes Stellar/Monerium endpoint exports. |
| packages/shared/src/constants.ts | Adds Mykobo env vars and default base URLs. |
| packages/sdk/src/VortexSdk.ts | Removes Stellar ephemeral creation and signing plumbing. |
| packages/sdk/src/types.ts | Removes Stellar ephemeral from RampState types. |
| packages/sdk/src/handlers/BrlHandler.ts | Removes Stellar ephemeral plumbing from handler calls. |
| docs/security-spec/README.md | Documents Mykobo as active EUR rail; marks Monerium/Stellar anchors deprecated. |
| docs/security-spec/PUBLIC-RELEASE-READINESS.md | Updates undocumented env var list to Mykobo vars. |
| docs/security-spec/07-operations/secret-management.md | Documents Mykobo secret blast radius and configuration. |
| docs/security-spec/07-operations/api-surface.md | Updates auth-surface audit status including Mykobo routes. |
| docs/security-spec/06-cross-chain/fund-routing.md | Updates key-reuse finding to include Mykobo Base operations. |
| docs/security-spec/06-cross-chain/bridge-security.md | Updates Spacewalk description and EUR migration note. |
| docs/security-spec/05-integrations/stellar-anchors.md | Adds “fully deprecated” banner and historical-only notes. |
| docs/security-spec/05-integrations/squid-router.md | Updates Squid usage to Mykobo-on-Base context; removes Monerium path. |
| docs/security-spec/05-integrations/monerium.md | Adds deprecation/removal banner and historical-only note. |
| docs/security-spec/05-integrations/alfredpay.md | Updates narrative to Mykobo replacing Monerium. |
| docs/security-spec/03-ramp-engine/transaction-validation.md | Marks Monerium user-wallet phase as deprecated. |
| docs/security-spec/03-ramp-engine/discount-mechanism.md | Updates discount-less route list to include Mykobo routes. |
| docs/security-spec/01-auth/supabase-otp.md | Updates checklist to include Mykobo routes under requireAuth. |
| bun.lock | Removes @monerium/sdk dependency lock entry. |
| apps/frontend/src/types/sep.ts | Removes SEP (Stellar) frontend types. |
| apps/frontend/src/types/phases.ts | Removes Stellar ephemeral and Monerium wallet address from execution input. |
| apps/frontend/src/stories/MoneriumRedirectStep.stories.tsx | Deletes Monerium redirect step story. |
| apps/frontend/src/stories/MoneriumAssethubFormStep.stories.tsx | Deletes Monerium AssetHub form step story. |
| apps/frontend/src/services/stellar/index.ts | Deletes TOML fetch helper for Stellar anchors. |
| apps/frontend/src/services/api/storage.service.ts | Removes Stellar storage helper methods. |
| apps/frontend/src/services/api/stellar.service.ts | Deletes frontend Stellar API client. |
| apps/frontend/src/services/api/mykobo.service.ts | Adds frontend Mykobo profile/KYC API client (multipart + lookup). |
| apps/frontend/src/services/api/monerium.service.ts | Deletes frontend Monerium API client. |
| apps/frontend/src/services/api/index.ts | Removes Stellar service export. |
| apps/frontend/src/services/anchor/sep24/second.ts | Deletes SEP-24 polling logic. |
| apps/frontend/src/services/anchor/sep24/first.ts | Deletes SEP-24 initiation logic. |
| apps/frontend/src/services/anchor/sep10/utils.ts | Deletes SEP-10 memo/signature utilities. |
| apps/frontend/src/services/anchor/sep10/index.ts | Deletes SEP-10 flow implementation. |
| apps/frontend/src/services/anchor/sep10/challenge.ts | Deletes SEP-10 challenge fetch/validation. |
| apps/frontend/src/pages/widget/index.tsx | Wires Mykobo KYC UI flow into widget; removes Monerium redirect UI. |
| apps/frontend/src/pages/ramp/index.tsx | Removes Monerium and Stellar KYC hook usage. |
| apps/frontend/src/pages/progress/phaseMessages.ts | Adds Mykobo phase messages; removes Stellar/Monerium phase messages. |
| apps/frontend/src/pages/progress/phaseFlows.ts | Adds Mykobo onramp phases and removes Stellar/Monerium flows. |
| apps/frontend/src/pages/progress/index.tsx | Simplifies ramp-flow selection logic after Stellar removal. |
| apps/frontend/src/pages/privacy/index.tsx | Removes Monerium partner entry; retains Mykobo partner links. |
| apps/frontend/src/machines/types.ts | Replaces Monerium/Stellar KYC types with Mykobo; tightens alfredpayCustomer type. |
| apps/frontend/src/machines/ramp.machine.ts | Registers Mykobo KYC machine; removes Monerium/Stellar machines. |
| apps/frontend/src/machines/actors/stellar/startSep24.actor.ts | Deletes SEP-24 start actor. |
| apps/frontend/src/machines/actors/stellar/sep24Second.actor.ts | Deletes SEP-24 second-step actor. |
| apps/frontend/src/machines/actors/register.actor.ts | Removes Stellar signing account and Monerium fields from ramp registration payload. |
| apps/frontend/src/hooks/useRampUrlParams.ts | Removes Monerium OAuth code URL param persistence. |
| apps/frontend/src/hooks/useLocalStorage.ts | Removes Monerium local storage key. |
| apps/frontend/src/hooks/ramp/useRampSubmission.ts | Removes Stellar ephemeral + Monerium wallet address logic. |
| apps/frontend/src/hooks/ramp/schema.ts | Removes Monerium wallet field from schema. |
| apps/frontend/src/hooks/offramp/useSEP24/useTrackSEP24Events.ts | Deletes SEP-24 tracking hook. |
| apps/frontend/src/hooks/offramp/useRampService/useRegisterRamp/helpers.ts | Removes Monerium-specific registration error mapping. |
| apps/frontend/src/hooks/monerium/useMoneriumFlow.ts | Deletes Monerium KYC redirect handler hook. |
| apps/frontend/src/contexts/events.tsx | Removes Stellar-related initialization error type. |
| apps/frontend/src/constants/localStorage.ts | Removes Stellar/SEP-related local storage keys. |
| apps/frontend/src/components/widget-steps/SummaryStep/TransactionTokensDisplay.tsx | Removes Stellar/Monerium partner URL logic. |
| apps/frontend/src/components/widget-steps/SummaryStep/index.tsx | Removes Monerium-specific banner UI. |
| apps/frontend/src/components/widget-steps/MoneriumRedirectStep/index.tsx | Deletes Monerium redirect component. |
| apps/frontend/src/components/widget-steps/MoneriumAssethubFormStep/index.tsx | Deletes Monerium AssetHub form component. |
| apps/frontend/src/components/widget-steps/DetailsStep/index.tsx | Simplifies details form (removes Monerium/AssetHub special-casing). |
| apps/frontend/src/components/widget-steps/DetailsStep/DetailsStepForm.tsx | Removes Monerium AssetHub form from details step. |
| apps/frontend/src/components/TokenSelection/TokenSelectionList/helpers.tsx | Updates fiat token list composition (Moonbeam + free tokens) and networks. |
| apps/frontend/src/components/NetworkSelector/index.tsx | Removes Stellar from supported network selector filtering. |
| apps/frontend/src/components/Mykobo/MykoboKycFlow.tsx | Adds Mykobo KYC flow UI component. |
| apps/frontend/src/components/Footer/index.tsx | Removes Monerium footer link. |
| apps/frontend/package.json | Removes @monerium/sdk dependency. |
| apps/api/src/index.ts | Removes Stellar funding secret from required env vars. |
| apps/api/src/database/migrations/028-remove-stellar-anchors.ts | Removes Stellar anchors/subsidies rows from DB. |
| apps/api/src/constants/constants.ts | Removes Stellar ephemeral balance/time-window constants from API constants. |
| apps/api/src/config/vars.ts | Removes Monerium + Stellar secrets/config; drops SEP10 master secret alias. |
| apps/api/src/api/services/transactions/spacewalk/redeem.ts | Deletes Spacewalk redeem transaction builder. |
| apps/api/src/api/services/transactions/onramp/index.ts | Removes Monerium onramp routing; directs EURC to Mykobo-specific preparer. |
| apps/api/src/api/services/transactions/onramp/common/validation.ts | Replaces Monerium validation with Mykobo validation (Base EURC). |
| apps/api/src/api/services/transactions/onramp/common/types.ts | Adds Mykobo onramp params (email/ip); removes Monerium wallet param type. |
| apps/api/src/api/services/transactions/onramp/common/monerium.ts | Deletes Monerium self-transfer builder. |
| apps/api/src/api/services/transactions/offramp/routes/evm-to-monerium-evm.ts | Deletes Monerium offramp route builder. |
| apps/api/src/api/services/transactions/offramp/routes/assethub-to-brl.ts | Adds explicit missing-substrate-ephemeral guard. |
| apps/api/src/api/services/transactions/offramp/index.ts | Removes Stellar/Monerium offramps; adds Mykobo EUR offramp routing. |
| apps/api/src/api/services/transactions/offramp/common/validation.ts | Removes Stellar offramp validation and adds substrate-ephemeral optionality. |
| apps/api/src/api/services/transactions/offramp/common/types.ts | Removes Stellar/Monerium fields; adds Mykobo-related params (email/destination/ip). |
| apps/api/src/api/services/stellar/loadAccount.ts | Deletes Stellar account load helper. |
| apps/api/src/api/services/stellar/getVaults.ts | Deletes Spacewalk/Stellar vault lookup helper. |
| apps/api/src/api/services/stellar/checkBalance.ts | Deletes Stellar balance polling helper. |
| apps/api/src/api/services/stellar.service.ts | Deletes Stellar tx builder/signing service. |
| apps/api/src/api/services/sep10/sep10.service.ts | Deletes SEP-10 signing service. |
| apps/api/src/api/services/sep10/helpers.ts | Deletes SEP-10 validation helpers. |
| apps/api/src/api/services/ramp/ramp-transaction-preparation.ts | Replaces Monerium selection with Mykobo preparation kind. |
| apps/api/src/api/services/ramp/ramp-transaction-preparation.test.ts | Updates tests for Mykobo routing and removes Monerium assertions. |
| apps/api/src/api/services/ramp/helpers.ts | Simplifies Squid explorer link building (removes Monerium Polygon special-case). |
| apps/api/src/api/services/quote/routes/strategies/onramp-mykobo-to-evm.strategy.ts | Adds Mykobo onramp quote strategy pipeline. |
| apps/api/src/api/services/quote/routes/strategies/onramp-monerium-to-evm.strategy.ts | Deletes Monerium onramp quote strategy. |
| apps/api/src/api/services/quote/routes/strategies/onramp-monerium-to-assethub.strategy.ts | Deletes Monerium→AssetHub strategy. |
| apps/api/src/api/services/quote/routes/strategies/offramp-to-stellar.strategy.ts | Deletes Stellar offramp quote strategy. |
| apps/api/src/api/services/quote/routes/strategies/offramp-to-sepa-evm.strategy.ts | Adds Mykobo (SEPA) offramp quote strategy pipeline. |
| apps/api/src/api/services/quote/routes/route-resolver.ts | Routes EURC onramps to Mykobo; routes SEPA offramps to new strategy; disables ARS. |
| apps/api/src/api/services/quote/engines/squidrouter/onramp-polygon-to-moonbeam.ts | Deletes Monerium Polygon→Moonbeam Squid engine. |
| apps/api/src/api/services/quote/engines/squidrouter/onramp-polygon-to-evm.ts | Deletes Monerium Polygon→EVM Squid engine. |
| apps/api/src/api/services/quote/engines/pendulum-transfers/offramp-stellar.ts | Deletes Stellar pendulum-transfer engine. |
| apps/api/src/api/services/quote/engines/pendulum-transfers/index.ts | Removes Stellar transfer type; keeps only XCM. |
| apps/api/src/api/services/quote/engines/nabla-swap/onramp-mykobo-evm.ts | Adds Mykobo onramp Nabla-on-EVM swap engine (EURC→USDC). |
| apps/api/src/api/services/quote/engines/initialize/onramp-mykobo.ts | Adds Mykobo initialize engine (deposit fee assumption + delivered EURC). |
| apps/api/src/api/services/quote/engines/initialize/onramp-monerium.ts | Deletes Monerium initialize engine. |
| apps/api/src/api/services/quote/engines/finalize/offramp.ts | Updates finalization logic for SEPA offramp path (no Stellar). |
| apps/api/src/api/services/quote/engines/fee/onramp-mykobo-to-evm.ts | Adds fee engine computing Mykobo anchor fee + Squid network fees. |
| apps/api/src/api/services/quote/engines/fee/onramp-monerium-to-evm.ts | Deletes Monerium fee engine. |
| apps/api/src/api/services/quote/engines/fee/onramp-monerium-to-assethub.ts | Deletes Monerium→AssetHub fee engine. |
| apps/api/src/api/services/quote/engines/fee/offramp-stellar.ts | Deletes Stellar fee engine. |
| apps/api/src/api/services/quote/engines/fee/offramp-mykobo.ts | Adds Mykobo withdraw fee engine for SEPA offramps. |
| apps/api/src/api/services/quote/core/types.ts | Removes Stellar meta and adds Mykobo mint context field. |
| apps/api/src/api/services/quote/core/quote-fees.ts | Removes Stellar anchor fee identifiers. |
| apps/api/src/api/services/phases/register-handlers.ts | Registers Mykobo phase handlers; removes Stellar/Monerium handlers. |
| apps/api/src/api/services/phases/post-process/stellar-post-process-handler.ts | Deletes Stellar cleanup post-process handler. |
| apps/api/src/api/services/phases/post-process/index.ts | Removes Stellar post-process from handler list/exports. |
| apps/api/src/api/services/phases/post-process/base-chain-post-process-handler.ts | Adds Base EURC cleanup phase to Base post-processing. |
| apps/api/src/api/services/phases/phase-processor.onramp.integration.test.ts | Removes Stellar ephemeral usage from onramp integration test harness. |
| apps/api/src/api/services/phases/meta-state-types.ts | Removes Stellar/Monerium metadata fields; adds Mykobo metadata fields. |
| apps/api/src/api/services/phases/helpers/stellar-sequence-validator.ts | Deletes Stellar sequence validation helper. |
| apps/api/src/api/services/phases/helpers/stellar-payment-verifier.ts | Deletes Stellar payment verification helper. |
| apps/api/src/api/services/phases/handlers/subsidize-pre-swap-handler.ts | Uses quote.metadata.nablaSwapEvm to select EVM subsidization path. |
| apps/api/src/api/services/phases/handlers/subsidize-post-swap-handler.ts | Adds Mykobo payout phase routing for EURC and removes Stellar route. |
| apps/api/src/api/services/phases/handlers/stellar-payment-handler.ts | Deletes Stellar payment phase handler. |
| apps/api/src/api/services/phases/handlers/nabla-swap-handler.ts | Uses quote.metadata.nablaSwapEvm to select EVM swap path. |
| apps/api/src/api/services/phases/handlers/nabla-approve-handler.ts | Uses quote.metadata.nablaSwapEvm to select EVM approval path. |
| apps/api/src/api/services/phases/handlers/monerium-onramp-mint-handler.ts | Deletes Monerium onramp mint phase handler. |
| apps/api/src/api/services/phases/handlers/initial-phase-handler.ts | Routes EURC onramps to Mykobo deposit phase. |
| apps/api/src/api/services/phases/handlers/helpers.ts | Removes Stellar funding/trustline helper usage from phase helpers. |
| apps/api/src/api/services/phases/handlers/distribute-fees-handler.ts | Uses quote.metadata.nablaSwapEvm to choose EVM fee distribution. |
| apps/api/src/api/routes/v1/stellar.route.ts | Deletes Stellar API routes. |
| apps/api/src/api/routes/v1/mykobo.route.ts | Adds Mykobo profile endpoints with multipart upload + requireAuth. |
| apps/api/src/api/routes/v1/monerium.route.ts | Deletes Monerium routes. |
| apps/api/src/api/routes/v1/index.ts | Removes Stellar/Monerium routes and status; adds Mykobo routing. |
| apps/api/src/api/middlewares/validators.ts | Removes SEP-10 input validation middleware. |
| apps/api/src/api/helpers/anchors.ts | Deletes TOML parsing helper used for Stellar anchors. |
| apps/api/src/api/controllers/subsidize.controller.ts | Removes StellarTokenConfig from subsidy config union type. |
| apps/api/src/api/controllers/storage.controller.ts | Removes Stellar-specific storage headers/flow entries. |
| apps/api/src/api/controllers/ramp.controller.ts | Enriches additionalData with ipAddress from req.ip by default. |
| apps/api/src/api/controllers/pendulum.controller.ts | Removes StellarTokenConfig from token-config iteration type union. |
| apps/api/src/api/controllers/monerium.controller.ts | Deletes Monerium controller. |
| apps/api/.gitignore | Adds Mykobo-specific lastRampState debug artifacts to ignore list. |
| apps/api/.env.example | Removes Monerium env variables from example file. |
| .gitignore | Adds Mykobo-specific lastRampState debug artifacts to ignore list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
141
to
+145
| function getFiatTokens(filterEurcOnly = false): ExtendedTokenDefinition[] { | ||
| const moonbeamEntries = Object.entries(moonbeamTokenConfig); | ||
| const freeFiatCurrencyEntries = Object.entries(freeTokenConfig); | ||
| const stellarEntries = filterEurcOnly | ||
| ? Object.entries(stellarTokenConfig).filter(([key]) => key === FiatToken.EURC) | ||
| : Object.entries(stellarTokenConfig); | ||
|
|
||
| return [...moonbeamEntries, ...freeFiatCurrencyEntries, ...stellarEntries].map(([key, value]) => ({ | ||
| assetIcon: value.fiat.assetIcon, | ||
| assetSymbol: value.fiat.symbol, | ||
| details: value as FiatTokenDetails, | ||
| name: value.fiat.name, | ||
| network: key === FiatToken.BRL ? Networks.Moonbeam : Networks.Stellar, | ||
| networkDisplayName: | ||
| key === FiatToken.BRL ? getNetworkDisplayName(Networks.Moonbeam) : getNetworkDisplayName(Networks.Stellar), | ||
| type: getEnumKeyByStringValue(FiatToken, key) as FiatToken | ||
| })); | ||
| const freeFiatCurrencyEntries = Object.entries(freeTokenConfig).filter(([, value]) => | ||
| filterEurcOnly ? value.fiat.symbol === FiatToken.EURC : true | ||
| ); |
Comment on lines
103
to
105
| if (!tokenDetails) { | ||
| throw new Error(`Invalid fiat token type: ${fiatToken}. Token type is not Stellar or Moonbeam.`); | ||
| throw new Error(`Invalid fiat token type: ${fiatToken}. Token type is not Moonbeam.`); | ||
| } |
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.
No description provided.