TrustMint README

The project's README from github.com/zeemscript/TrustMint. As one markdown file: README.md.

TrustMint — Real assets on Stellar

Real assets. Clear rules. Stellar Soroban.

Open-source building blocks for tokenized invoices, property shares, and carbon credits—with eligibility and transfer rules checked by smart contracts.

Open the live preview · Get started · Report an issue

CI status MIT License Stellar Soroban

The idea

Tokenizing an asset is only one part of the work. Applications may also need holder eligibility, transfer policies, and rules tied to an asset's lifecycle. TrustMint brings those examples together in one inspectable Stellar Soroban repository, so builders can explore the pieces and adapt them for their own testnet prototypes.

TrustMint does not verify identities or provide legal compliance. A trusted verifier records an approval decision on-chain; identity documents and the process behind that decision remain off-chain and under the deploying project's control.

Explore the building blocks

Building block What it demonstrates
KYC Registry Authorized verifiers record approval, tier, jurisdiction, and optional expiry for a Stellar address.
Compliance Engine Transfer policy examples such as pause controls, address and jurisdiction blocklists, transfer limits, holding periods, and holder caps.
Invoice Token Invoice metadata with issuance, transfer, settlement, and redemption examples.
Property Token Fractional property shares with cumulative per-share dividend accounting.
Carbon Credit Token Credit issuance, transfer, and retirement records with beneficiary metadata.
RWA Reference Token A separate SEP-41-style token example with KYC and compliance hooks and asset metadata.

The repository also contains a React + Vite dashboard, a TypeScript SDK, deployment helpers, Rust contract tests, and local Stellar integration tests.

How a policy check flows

flowchart LR
  Person[Holder or operator] --> App[Dashboard or SDK]
  App --> Token[Asset contract]
  Token -->|Check approval| KYC[KYC registry]
  Token -->|Evaluate policy| Rules[Compliance engine]
  Token -->|Apply permitted action| State[(Contract state)]
  Verifier[Authorized verifier] --> KYC
  Admin[Authorized admin] --> Rules

Asset contracts invoke the registry and compliance engine during relevant operations. The exact checks depend on the contract and method. An on-chain approval is a record of a verifier's decision, not proof that an off-chain identity or compliance process is adequate.

Get started

Requirements

Build and test the contracts

From the repository root:

rustup target add wasm32-unknown-unknown
cargo build --release --target wasm32-unknown-unknown
cargo test --features testutils

Run the dashboard

cd frontend
npm install
npm run dev

The interface can load without contract IDs. Network-backed workflows need the relevant VITE_*_ID values in frontend/.env. Start from frontend/.env.example. Vite variables are bundled into the browser app, so never put private keys, secrets, or identity documents in them.

Deploy the example suite to Stellar testnet

The helper deploys the KYC registry, compliance engine, invoice token, property token, and carbon-credit token. It writes those IDs to frontend/.env. The separate RWA reference token is not included. The asset metadata in the script is placeholder data; review and replace it before every deployment, including testnet.

bash scripts/setup-identity.sh trustmint-dev
bash scripts/deploy.sh trustmint-dev

Developer commands

# Rust formatting, linting, and contract unit tests
cargo fmt --all -- --check
cargo clippy --all --all-targets -- -D warnings
cargo test --features testutils

# TypeScript SDK
npm run build:sdk

# Frontend
cd frontend
npm run lint
npm run build

The GitHub Actions workflows run formatting, lint, contract tests, WASM builds, and a local Stellar integration job. Passing CI is useful feedback; it is not a security audit or production-readiness guarantee.

Repository map

contracts/          Soroban contracts and unit tests
frontend/           React dashboard, wallet integration, and contract clients
sdk/                TypeScript clients for application developers
scripts/            Testnet identity, deployment, and verification helpers
tests/integration/  Local Stellar integration tests
docs/               Deployment and operations guidance

Project roadmap

Community and project docs


Built in the open for developers exploring real-world asset applications on Stellar.

TrustMint (zeemscript/TrustMint)

Searching Database…

这是什么?TrustMint 是一套开源的智能合约构建模块工具包,用于在 Stellar Soroban 区块链上把发票、房产份额和碳信用等现实世界资产代币化,并内置 KYC 和转账合规规则。
这是现成的应用,还是一套可以在其上构建的示例合约?它是一个参考仓库,包含示例 Soroban 合约(KYC 注册表、合规引擎、资产代币)以及仪表盘和 SDK,供人查看和改造,而不是面向生产的成品应用。
怎么让合约跑起来?安装带 wasm32-unknown-unknown 目标的 Rust 工具链和 Stellar CLI,然后在仓库根目录构建并测试合约;再从前端文件夹使用其 .env 文件运行仪表盘。
开始之前需要安装什么?你需要带 wasm32-unknown-unknown 目标的 Rust 工具链、Stellar CLI 和 Node.js 20 或更新版本;只有想运行本地集成测试套件时才需要 Docker。
TrustMint 真的能替我处理 KYC 验证和法律合规吗?不能。它不验证身份,也不提供法律合规;它只是把受信任验证者的批准决定记录到链上,而身份证件和验证过程都留在链下、由你掌控。
身份证件和机密信息最终存在哪里?身份证件完全不接触链上,README 警告切勿把私钥、机密信息或身份证件放进仪表盘的 .env 文件,因为 Vite 会把这些变量打包进浏览器应用。
这个仓库包含哪些构建模块?一个 KYC 注册表、一个合规引擎(暂停控制、黑名单、转账限额、持有期、持有人上限)、三个示例代币(Invoice、Property、Carbon Credit),以及一个独立的 SEP-41 风格 RWA 参考代币。
它可以直接部署到 Stellar 主网吗?不能,它面向的是测试网原型验证;路线图中仍包括验证 SEP-41 兼容性,并在任何生产使用之前委托独立的 Soroban 安全审计。
附带的仪表盘是做什么的?它是一个 React + Vite 前端,没有合约 ID 也能加载用于浏览,但要驱动真实的链上工作流,就需要把已部署的合约地址设置为 VITE 环境变量。
怎么把示例合约部署到测试网?一个部署辅助脚本会把 KYC 注册表、合规引擎和三个资产代币推送到 Stellar 测试网,并把它们的合约 ID 写入 frontend/.env;那个独立的 RWA 参考代币不由它部署。
Creator
zeemscript
Size
0.7 MB
Stars
131
Updated
CommitOct 04
Age
13d
Commits · 90 Days