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 规范。欢迎任何形式的贡献!

编辑推荐精选

Vora

Vora

免费创建高清无水印Sora视频

Vora是一个免费创建高清无水印Sora视频的AI工具

Refly.AI

Refly.AI

最适合小白的AI自动化工作流平台

无需编码,轻松生成可复用、可变现的AI自动化工作流

酷表ChatExcel

酷表ChatExcel

大模型驱动的Excel数据处理工具

基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。

AI工具使用教程AI营销产品酷表ChatExcelAI智能客服
TRAE编程

TRAE编程

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

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

热门AI工具生产力协作转型TraeAI IDE
AIWritePaper论文写作

AIWritePaper论文写作

AI论文写作指导平台

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

数据安全AI助手热门AI工具AI辅助写作AI论文工具论文写作智能生成大纲
博思AIPPT

博思AIPPT

AI一键生成PPT,就用博思AIPPT!

博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。

热门AI工具AI办公办公工具智能排版AI生成PPT博思AIPPT海量精品模板AI创作
潮际好麦

潮际好麦

AI赋能电商视觉革命,一站式智能商拍平台

潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。

iTerms

iTerms

企业专属的AI法律顾问

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

SimilarWeb流量提升

SimilarWeb流量提升

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

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

Sora2视频免费生成

Sora2视频免费生成

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

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

下拉加载更多