feat(wallet): comprehensive asset management for Stellar/Soroban tokens (#108) - #258
Merged
ScriptedBro merged 2 commits intoSep 6, 2026
Merged
Conversation
Add Stellar asset management to the wallet service: - balances and trustline mapping from Horizon, real-time BalanceTracker with WebSocket balances_updated push events - asset discovery (issuer flags, SAC contract ids, curated catalog) and SEP-1 metadata resolution - trustline operations (changeTrust, setTrustLineFlags) and transfers (classic payments, SAC Soroban, path payments, LP deposit/withdraw) - cached portfolio aggregation with configurable spam filtering - shared Asset/Trustline/Portfolio types in @delegolabs/types - ASSET_* env config, .env.example, and vitest coverage - docs: assets-management.md + docs index link
The asset management commit added a smol-toml importer entry to the lockfile, but the package was never declared in the wallet's package.json nor used in code (SEP-1 resolution uses @stellar/stellar-sdk's StellarToml). Remove the orphaned specifier so `pnpm install --frozen-lockfile` passes again. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@mayokun-max 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! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 #108 — adds comprehensive asset management for Stellar/Soroban tokens to the wallet backend: trustlines, real-time balances, SEP-1 token metadata, spam filtering, liquidity pool tokens, a portfolio API, and transfer helpers.
What's included
Trustline management
apps/backend/wallet/src/assets/trustlines.ts)credit_alphanum4,credit_alphanum12, and Soroban contract tokensauthorized,authorizedToMaintainLiabilities,clawbackEnabledflagsAsset balances & real-time updates
available/lockedbreakdowns (balances.ts)websocket/server.ts,websocket/types.ts)queue/txQueue.ts,transactions/index.ts)Token metadata & discovery
discovery.ts,metadata.ts) — name, symbol, decimals, logo, description, websiteauthRequired,authRevocable,authImmutableSpam filtering
spamFilter.ts,config.ts) with env-driven configuration (see.env.example)Liquidity pool tokens & portfolio API
liquidity_poolasset type supportportfolio.ts) — native balance + per-asset balances, targeting < 200mspackages/types/src/assets.tsTransfer helpers
transfers.ts,submitter.ts)Tests
Notes for reviewers
pnpm install --frozen-lockfilepreviously failed because the feature commit added asmol-tomlimporter entry topnpm-lock.yamlwithout declaring the package inapps/backend/wallet/package.json(it's unused in code — SEP-1 resolution usesStellarToml.Resolverfrom@stellar/stellar-sdk). This PR removes the orphaned specifier.main(not touched here): merge-conflict markers committed inpackages/utils/src/index.tsand an unclosed block inapps/backend/payments/src/routes.ts. Both predate this branch.Files
31 files changed, ~3,570 insertions: asset module under
apps/backend/wallet/src/assets/, types inpackages/types/, websocket + queue integration, docs indocs/assets-management.md.