it-healer/laravel-monero
Composer 安装命令:
composer require it-healer/laravel-monero
包简介
A library for Laravel that allows you to create and manage the Monero cryptocurrency.
关键字:
README 文档
README
Laravel Monero
Organization of payment acceptance and automation of payments of XMR coins on the Monero blockchain.
Installation
You can install the package via composer:
composer require it-healer/laravel-monero
After you can run installer using command:
php artisan monero:install
Optional, you can install Monero Wallet RPC using command:
php artisan monero:wallet-rpc
And run migrations:
php artisan migrate
Register Service Provider and Facade in app, edit config/app.php:
'providers' => ServiceProvider::defaultProviders()->merge([ ..., \ItHealer\LaravelMonero\MoneroServiceProvider::class, ])->toArray(), 'aliases' => Facade::defaultAliases()->merge([ ..., 'Monero' => \ItHealer\LaravelMonero\Facades\Monero::class, ])->toArray(),
Add cron job, in file app/Console/Kernel in method schedule(Schedule $schedule) add
Schedule::command('monero:sync')
->everyMinute()
->runInBackground();
You must setup Supervisor, create file /etc/supervisor/conf.d/monero.conf with content (change user and paths):
[program:monero]
process_name=%(program_name)s
command=php /home/forge/example.com/artisan monero
autostart=true
autorestart=true
user=forge
redirect_stderr=true
stdout_logfile=/home/forge/example.com/monero.log
stopwaitsecs=3600
Commands
Monero Node sync with all wallets in here.
php artisan monero:node-sync [NODE ID]
Monero Wallet sync.
php artisan monero:wallet-sync [WALLET ID]
Check status of monero-wallet-rpc processes.
php artisan monero:status --all # Check all nodes php artisan monero:status [NODE ID or NAME] # Check specific node php artisan monero:status 1 --method=full # Full diagnostics
Process Monitoring
The module provides comprehensive monitoring capabilities for monero-wallet-rpc processes.
Available Check Methods
| Method | Speed | Reliability | Use Case |
|---|---|---|---|
pid |
Very fast | Low | Quick existence check |
port |
Fast | Medium | Port availability check |
api |
Medium | High | Recommended for production |
full |
Slow | High | Full diagnostics |
Usage in Code
Check node status:
use ItHealer\LaravelMonero\Facades\Monero; $node = MoneroNode::find(1); // Check status (without saving to DB) $result = Monero::checkNodeStatus($node, 'api'); if ($result['status']) { echo "Process is running"; } else { echo "Process is down: " . $result['details']['message']; }
Check and update status in database:
$node = Monero::updateNodeStatus($node, 'api'); if ($node->worked) { echo "Process is operational"; // Details: $node->worked_data }
Check all nodes:
$stats = Monero::checkAllNodesStatus('api'); echo "Total: {$stats['total']}, Working: {$stats['working']}, Failed: {$stats['failed']}";
Health check endpoint:
Route::get('/api/monero/health', function () { $stats = Monero::checkAllNodesStatus('api'); return response()->json($stats, $stats['failed'] === 0 ? 200 : 503); });
Automatic Monitoring
The php artisan monero supervisor process automatically checks and updates the status of all processes every N seconds (configured via monero.wallet_rpc.watcher_period).
Status is stored in the database:
worked(boolean) - whether the process is runningworked_data(json) - detailed information about the last check
Example of reading status from database:
$node = MoneroNode::find(1); if ($node->worked) { echo "Last check: {$node->worked_data['last_check']}"; } else { echo "Error: {$node->worked_data['message']}"; }
For more detailed information, see:
- PROCESS_MONITORING.md - Complete documentation
- EXAMPLES_STATUS_CHECK.md - Quick code examples
- STATUS_CHECK_SUMMARY.md - Summary of changes
For Developers
Command for build JS script:
npm i npm run build
Support
- Telegram: @biodynamist
- WhatsApp: +905516294716
- Web: it-healer.com
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
it-healer/laravel-monero 适用场景与选型建议
it-healer/laravel-monero 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 191 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「laravel」 「Monero」 「XMR」 「it-healer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 it-healer/laravel-monero 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 it-healer/laravel-monero 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 it-healer/laravel-monero 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP library for the Monero simplewallet JSON-RPC interface.
A modern fully strong-typed library for using the Monero daemon rpc and wallet rpc APIs
This bundle provides Coinhive services. It does'nt depend of coinhive.com
Alfabank REST API integration
Laravel Monero Module
A PHP library for the Monero simplewallet JSON-RPC interface.
统计信息
- 总下载量: 191
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-23
