ledger

ledger

灵活可编程的金融账本系统 支持多账户原子交易

Formance Ledger是一个开源的可编程金融账本系统,支持原子性多账户交易和内置Numscript语言。它适用于复杂的资金流动场景,如电商平台、企业货币发行、游戏内经济等。该系统为开发者提供了灵活的金融交易解决方案,可满足现代金融应用的各种需求。作为开源项目,Formance Ledger欢迎社区贡献,共同推动金融技术创新。

Formance Ledger金融账本交易系统开源项目数字货币Github

Formance 分类账 测试 goreportcard slack codecov


Formance 分类账是一个可编程的金融分类账,作为 Formance Stack 的一部分开发。它具有原子性、多记账交易功能,并可使用内置的 Numscript DSL 进行编程,专门用于模拟资金流动。它在需要复杂资金移动代码的应用中表现出色,例如:

  • 具有复杂支付流程、支付分账的电子商务,如市场平台
  • 公司发行的货币系统,例如 Twitch Bits
  • 游戏内货币、库存和交易系统,例如 Fortnite V-Bucks
  • 使用非标准资产的支付网关,例如学习积分
  • 本地货币和补充金融

入门指南

Formance 分类账作为独立的二进制文件运行,最新版本可以从发布页面下载。您可以将二进制文件移动到任何可执行路径,如 /usr/local/bin。也可以使用 brew、apt、yum 或 docker 安装

ledger server start # 提交第一笔交易 echo " send [USD/2 599] ( source = @world destination = @payments:001 ) send [USD/2 599] ( source = @payments:001 destination = @rides:0234 ) send [USD/2 599] ( source = @rides:0234 destination = { 85/100 to @drivers:042 15/100 to @platform:fees } ) " > example.num ledger exec quickstart example.num # 获取 drivers:042 的余额 curl -X GET http://localhost:3068/quickstart/accounts/drivers:042 # 列出交易 curl -X GET http://localhost:3068/quickstart/transactions

文档

您可以在 docs.formance.com 找到完整的 Numary 文档

社区

如果您需要帮助、想展示您的作品,或只是想闲聊分类账相关话题,欢迎加入我们的 Slack - 期待在那里见到您!

如何贡献

想为项目做贡献?请阅读 CONTRIBUTING.md 文件。

我们使用 Task 在本地轻松进行代码检查或测试。您可以通过以下命令安装:

go install github.com/go-task/task/v3/cmd/task@latest

然后运行 task 来执行代码检查和测试。您可以在 Taskfile 中找到其他任务。

贡献者 ✨

感谢这些优秀的人(表情符号含义):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center"><a href="https://github.com/Azorlogh"><img src="https://avatars.githubusercontent.com/u/17968319?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alix Bott</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=Azorlogh" title="Code">💻</a></td> <td align="center"><a href="https://www.flemzord.fr/"><img src="https://avatars.githubusercontent.com/u/1952914?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maxence Maireaux</b></sub></a><br /><a href="#infra-flemzord" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#platform-flemzord" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/formancehq/ledger/commits?author=flemzord" title="Code">💻</a></td> <td align="center"><a href="https://github.com/henry-jackson"><img src="https://avatars.githubusercontent.com/u/34102861?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Henry Jackson</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=henry-jackson" title="Code">💻</a></td> <td align="center"><a href="https://matias.insaurral.de/"><img src="https://avatars.githubusercontent.com/u/20110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matias Insaurralde</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=matiasinsaurralde" title="Code">💻</a> <a href="https://github.com/formancehq/ledger/pulls?q=is%3Apr+reviewed-by%3Amatiasinsaurralde" title="Reviewed Pull Requests">👀</a></td> <td align="center"><a href="https://github.com/S0c5"><img src="https://avatars.githubusercontent.com/u/5241972?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David barinas</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=S0c5" title="Code">💻</a></td> <td align="center"><a href="https://github.com/djimnz"><img src="https://avatars.githubusercontent.com/u/949997?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Jimenez</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=djimnz" title="Code">💻</a></td> <td align="center"><a href="http://32b6.com/"><img src="https://avatars.githubusercontent.com/u/1770991?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Clément Salaün</b></sub></a><br /><a href="#ideas-altitude" title="Ideas, Planning, & Feedback">🤔</a></td> </tr> <tr> <td align="center"><a href="https://karmanyaah.malhotra.cc/"><img src="https://avatars.githubusercontent.com/u/32671690?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Karmanyaah Malhotra</b></sub></a><br /><a href="#userTesting-karmanyaahm" title="User Testing">📓</a></td> <td align="center"><a href="https://www.linkedin.com/in/antoinegelloz/"><img src="https://avatars.githubusercontent.com/u/42968436?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antoine Gelloz</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=antoinegelloz" title="Code">💻</a></td> <td align="center"><a href="https://github.com/jdupas22"><img src="https://avatars.githubusercontent.com/u/106673437?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jdupas22</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=jdupas22" title="Code">💻</a></td> <td align="center"><a href="https://edwardpoot.com"><img src="https://avatars.githubusercontent.com/u/1686739?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edward Poot</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=edwardmp" title="Code">💻</a></td> <td align="center"><a href="https://github.com/nicoabie"><img src="https://avatars.githubusercontent.com/u/2797992?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nico Gallinal</b></sub></a><br /><a href="https://github.com/formancehq/ledger/issues?q=author%3Anicoabie" title="Bug reports">🐛</a></td> <td align="center"><a href="https://github.com/gfyrag"><img src="https://avatars.githubusercontent.com/u/9094799?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ragot Geoffrey</b></sub></a><br /><a href="https://github.com/formancehq/ledger/commits?author=gfyrag" title="Code">💻</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

本项目遵循 all-contributors 规范。欢迎任何形式的贡献!

编辑推荐精选

iTerms

iTerms

企业专属的AI法律顾问

iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。

SimilarWeb流量提升

SimilarWeb流量提升

稳定高效的流量提升解决方案,助力品牌曝光

稳定高效的流量提升解决方案,助力品牌曝光

Sora2视频免费生成

Sora2视频免费生成

最新版Sora2模型免费使用,一键生成无水印视频

最新版Sora2模型免费使用,一键生成无水印视频

Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
商汤小浣熊

商汤小浣熊

最强AI数据分析助手

小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。

imini AI

imini AI

像人一样思考的AI智能体

imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。

Keevx

Keevx

AI数字人视频创作平台

Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。

即梦AI

即梦AI

一站式AI创作平台

提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作

下拉加载更多