clearledger README

The project's README from github.com/Stellar-Clear/clearledger. As one markdown file: README.md.

ClearLedger

Invoice finance infrastructure, built on Stellar and powered by Soroban.

ClearLedger is an open-source invoice-finance platform built on Stellar. Its Soroban smart contracts coordinate participant verification, invoice lifecycle state, USDC liquidity pools, and settlement flows. The complete stack brings together on-chain contracts, a web application, TypeScript SDK and CLI, and a Go indexer/API.

Launch the Stellar Testnet app · Explore the Soroban contracts · Read the documentation · View Testnet contracts

Built for Stellar

ClearLedger uses Soroban, Stellar’s smart-contract platform, to coordinate business identity, invoice records, pool shares, and USDC flows on Stellar. The TypeScript SDK and web app connect to Soroban contracts, while the Go indexer follows contract events to make network activity available to applications.

The workflow

  1. Onboard participants. Register SME issuers and trade buyers through the participant registry.
  2. Create invoice records. Issuers record invoice terms and progress through explicit on-chain lifecycle states.
  3. Coordinate liquidity. USDC pool contracts account for liquidity, invoice funding, LP shares, and repayment flows.
  4. Follow activity. The Go indexer consumes Soroban events for API access and application views.

The protocol records submitted transaction state. It does not independently verify commercial documents, guarantee that an invoice will be funded, or guarantee repayment or returns.

Project map

Path What lives here
apps/web/ Next.js application and public product experience
packages/sdk/, packages/sdk-react/ TypeScript contract clients and React hooks
packages/cli/ Developer command-line tools
indexer/ Go Soroban event indexer and HTTP API
examples/ SDK and integration examples
docs/ Protocol, user, and developer documentation

Soroban contract source and deployment details live in the companion contracts repository.

Run locally

Requirements: Node.js 20+, pnpm 9+, and Docker for the complete local stack. For wallet interactions, install Freighter and select Stellar Testnet.

pnpm install
cp .env.example .env.local
pnpm dev

The web app starts at http://localhost:3000. For the web app, Go indexer, and PostgreSQL together:

cp .env.docker.example .env.docker
docker compose --env-file .env.docker up --build

The hosted app is a testnet web deployment. The Go API/indexer must be run separately; configure NEXT_PUBLIC_API_BASE_URL for the API endpoint when using API-backed features. For the complete variable reference, see environment configuration.

Development

From the repository root, the main checks are pnpm build, pnpm lint, pnpm typecheck, and pnpm test. Run Go checks from indexer/ with go test ./... and go vet ./....

Start with the local setup guide, architecture overview, and contribution guide. For protocol details, see how it works, the invoice lifecycle, and the economic model.

Network and security

The web application and contracts are currently deployed on Stellar Testnet for evaluation and integration. This is not a mainnet financial service. The contracts have not been formally audited, and testnet assets have no promised redemption value. Do not use real funds. Review the contract limitations and security policy before integrating.

Use testnet wallets and assets only. Never put private keys or recovery phrases in environment files or source control.

clearledger (Stellar-Clear/clearledger)

Searching Database…

Что это?ClearLedger — открытая платформа финансирования счетов-фактур на базе Stellar, использующая смарт-контракты Soroban для координации верификации участников, жизненного цикла счетов, пулов ликвидности USDC и расчётов.
Это одно приложение или целый стек компонентов?Это полный стек: контракты Soroban в блокчейне, веб-приложение на Next.js, TypeScript SDK и CLI, а также отдельный Go-индексатор/API, следящий за событиями контрактов.
Как запустить его локально?Склонируйте репозиторий и запустите полный локальный стек (веб-приложение, Go-индексатор, PostgreSQL) с Node.js 20+, pnpm 9+ и Docker; веб-приложение стартует локально, а Go-индексатор/API запускается отдельно.
Что нужно установить, кроме Node и Docker?Ещё нужен браузерный кошелёк Freighter, настроенный на Stellar Testnet, для взаимодействия с контрактами, и тулчейн Go, если хотите запускать собственные тесты индексатора.
Безопасно ли использовать это с реальными деньгами?Нет. Сейчас всё работает только на Stellar Testnet, контракты формально не аудированы, а активы тестнета не имеют выкупной стоимости, поэтому реальные средства использовать нельзя.
Чем на самом деле занимается Go-индексатор?Он читает события контрактов Soroban и отдаёт их через HTTP API, позволяя приложениям и веб-интерфейсу видеть активность по счетам и пулам в блокчейне.
Что можно делать с SDK и CLI?TypeScript SDK (плюс пакет React-хуков) даёт типизированных клиентов для контрактов Soroban, а CLI-пакет предоставляет инструменты командной строки для разработчиков, чтобы работать с протоколом.
Проверяет ли протокол, что счета настоящие и будут оплачены?Нет. ClearLedger лишь записывает в блокчейн состояние поданных транзакций; он не проверяет независимо коммерческие документы и не гарантирует финансирование или возврат.
Где находятся контракты Soroban?Основной репозиторий приложения содержит SDK, CLI, веб-приложение и индексатор, а исходники контрактов Soroban и детали деплоя лежат в отдельном сопутствующем репозитории контрактов.
Size
2.7 MB
Stars
131
Updated
CommitOct 09
Age
8d
Commits · 90 Days