Skip to content

Add Solana chain support (read-only balances + native SOL send) #142

Description

@ndii-dev

Summary

Globe Wallet is Stellar-only today. Follow-up to the EVM (Base + Ethereum) multi-chain slice — this tracks the same scope for Solana, which needs its own module since Solana uses a completely different account model and signature scheme (ed25519 + base58 addresses, no EVM-style checksums) from both Stellar and EVM chains.

Reference implementation

See the EVM module added in lib/evm/ (types in lib/types.ts under "EVM chains", lib/evm/networks.ts, lib/evm/evm.service.ts for read-only balance queries, lib/evm/evm-payment.service.ts for server-only signing, app/api/evm/balance + app/api/evm/send routes, components/app/evm-wallet-card.tsx). Solana should follow the same shape: a self-contained module alongside (not retrofitted into) the Stellar-specific IWalletService/AssetCode types, with mock-free read-only balance queries against a real testnet RPC and a server-only signing path gated behind an optional env var (so it fails closed with ERR_PAYMENT_NOT_CONFIGURED rather than fabricating a result, same as STELLAR_SOURCE_SECRET_KEY/EVM_SOURCE_PRIVATE_KEY).

Definition of done

  • @solana/web3.js (or equivalent) added as a dependency
  • Address validation (base58, 32-byte pubkey)
  • Read-only SOL + SPL-token (USDC) balance queries against Solana devnet, verified against real on-chain data (not mocked) in the PR description
  • Server-only native SOL send gated behind an optional SOLANA_SOURCE_PRIVATE_KEY env var, added to lib/env.mjs and .env.example
  • API routes mirroring /api/evm/balance and /api/evm/send
  • Unit + integration tests (mock the RPC client, not real network calls in CI)
  • A minimal UI surface (balance card + send form), linked from somewhere reachable in the app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions