Skip to content

[#146] Add distributeAsset() function to send initial token supply from issuer to distributor #177

Description

@BigNathan1

Backlog reference: #146 · stellar

Summary

Add distributeAsset() function to send initial token supply from issuer to distributor

Context

The backend/src/contracts/ Stellar SDK wrapper layer (stellar.ts, assets.ts, trustlines.ts, transactions.ts) that every route handler calls into. This is the one place Horizon interaction logic should live — route handlers stay thin and testable.

Foundation work to reach a working single-community MVP: infrastructure, schema, core CRUD APIs, the Stellar contract layer, the base frontend, wallet auth, tests, CI, and a hardened security baseline. Every later phase assumes this phase is solid.

Acceptance Criteria

  • Add distributeAsset() function to send initial token supply from issuer to distributor — implemented as described above.
  • The Horizon/Stellar interaction is verified against testnet, not just mocked.
  • Stellar/Horizon error codes are mapped to clear, actionable messages rather than surfaced raw.
  • Unit tests mock Horizon so the suite stays fast and deterministic.

Definition of Done

  • Implemented on a branch and opened as a PR referencing this issue (Closes #146 won't auto-link since this is a repo-internal reference — mention the issue number GitHub assigned instead).
  • CI is green (lint, typecheck, tests, build).
  • Reviewed against CONTRIBUTING.md conventions (Conventional Commits, code style).
  • CHANGELOG.md updated under [Unreleased] if the change is user- or API-visible.
  • Merged to main.

Generated from the CoopLumen backlog (issue.md). See CONTRIBUTING.md for the contribution workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions