{"id":23272836,"url":"https://github.com/fenguoz/coinservice","last_synced_at":"2025-08-21T04:31:36.331Z","repository":{"id":37743935,"uuid":"321253667","full_name":"Fenguoz/coinService","owner":"Fenguoz","description":"Supports functions such as address generation, balance inquiry, transaction transfer, etc. commonly used in digital currency. At the same time, a set of codes supports multiple protocols.","archived":false,"fork":false,"pushed_at":"2022-01-23T20:36:38.000Z","size":80,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T03:51:06.544Z","etag":null,"topics":["btc","coin","eos","ethereum","hyperf","php","tron"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fenguoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-14T06:23:50.000Z","updated_at":"2024-04-15T10:45:49.000Z","dependencies_parsed_at":"2022-08-24T16:11:14.713Z","dependency_job_id":null,"html_url":"https://github.com/Fenguoz/coinService","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fenguoz/coinService","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fenguoz%2FcoinService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fenguoz%2FcoinService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fenguoz%2FcoinService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fenguoz%2FcoinService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fenguoz","download_url":"https://codeload.github.com/Fenguoz/coinService/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fenguoz%2FcoinService/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271425158,"owners_count":24757423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["btc","coin","eos","ethereum","hyperf","php","tron"],"created_at":"2024-12-19T19:19:46.134Z","updated_at":"2025-08-21T04:31:36.053Z","avatar_url":"https://github.com/Fenguoz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e币种服务\u003c/h1\u003e\n\n## 概述\n\n币种服务是微服务就是一个独立的实体，它可以独立被部署，也可以作为一个操作系统进程存在。服务与服务之间存在隔离性，服务之间均通过网络调用进行通信，从而加强服务之间的隔离性，避免紧耦合。\n\n该服务基于 Hyperf2.0 框架实现。通过 JSON RPC 轻量级的 RPC 协议标准，可自定义基于 HTTP 协议来传输，或直接基于 TCP 协议来传输方式实现服务注册。客户端只需要通过协议标准直接调用已封装好的方法即可。\n\n适用范围：生成地址、查询余额、交易转账、查询最新区块、交易接收状态...\n\n## 特点\n\n1. 一套写法兼容数字货币中常用功能\n1. 接口方法可可灵活增减\n\n### 支持协议\n\n- [x] 以太坊(ETH)协议\n- [x] 波场(TRON)协议\n- [ ] 比特(BTC)协议\n- [ ] 柚子(EOS)协议\n\n## 支持方法\n\n- 生成地址 `newAddress(array $config, int $protocol)`\n- 根据私钥得到地址 `privateKeyToAddress(string $privateKey, array $config, int $protocol)`\n- 查询余额 `balance(string $address, array $config, int $protocol)`\n- 交易转账 `transfer(string $from, string $to, string $amount, array $config, int $protocol)`\n- 查询最新区块 `blockByNumber(int $blockNumber, array $config, int $protocol)`\n- 交易接收信息 `transactionReceipt(string $txHash, array $config, int $protocol)`\n- 交易接收状态 `receiptStatus(string $txHash, array $config, int $protocol)`\n\n## 快速开始\n\n### 环境要求\n\n- PHP \u003e= 7.2\n- Swoole PHP 扩展 \u003e= 4.5，并关闭了 `Short Name`\n- Nginx\n- Consul\n\n### 部署\n\n``` bash\n# 克隆项目\ngit clone ...\n\n# 进入根目录\ncd {file}\n\n# 安装扩展包\ncomposer install\n\n# 配置env文件\ncp .env.example .env\n\n# 运行 Consul（若已运行，忽略）\nconsul agent -dev -bind 127.0.0.1\n\n# 运行\nphp bin/hyperf.php start\n```\n\n## 计划\n\n- 支持 BTC 协议\n- 支持 EOS 协议\n- ...\n\n## 脚本命令\n| 命令行 | 说明 | crontab |\n| :-----| :---- | :---- |\n| composer install | 安装扩展包 | -- |\n| php bin/hyperf.php server:watch | 热更新（仅测试用） | -- |\n| php bin/hyperf.php swagger:gen -o ./public/swagger/ -f json | 生成swagger文档 | -- |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenguoz%2Fcoinservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenguoz%2Fcoinservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenguoz%2Fcoinservice/lists"}