Fixed: basePath self→static binding, namespace detection, event wiring,
SQLite cache, file cache driver. All Mod Boot classes converted to
$listens pattern for lifecycle event discovery.
Working endpoints:
- /v1/explorer/info — live chain height, difficulty, aliases
- /v1/explorer/stats — formatted chain statistics
- /v1/names/directory — alias directory grouped by type
- /v1/names/available/{name} — name availability check
- /v1/names/lookup/{name} — name details
Co-Authored-By: Charon <charon@lethean.io>
75 lines
2.1 KiB
PHP
75 lines
2.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Core PHP Framework
|
|
*
|
|
* Licensed under the European Union Public Licence (EUPL) v1.2.
|
|
* See LICENSE file for details.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Core\Helpers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
/**
|
|
* Helpers Module Service Provider.
|
|
*
|
|
* Provides shared utility classes:
|
|
* - Auth helpers (RecoveryCode, LoginRateLimiter)
|
|
* - Privacy helpers (PrivacyHelper, HadesEncrypt)
|
|
* - File/logging utilities (File, Log, SystemLogs)
|
|
* - Rate limiting (RateLimit)
|
|
* - Misc utilities (TimezoneList, UtmHelper, HorizonStatus, CommandResult)
|
|
*/
|
|
class Boot extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(LoginRateLimiter::class);
|
|
$this->app->singleton(HorizonStatus::class);
|
|
$this->app->singleton(SystemLogs::class);
|
|
$this->app->singleton(TimezoneList::class);
|
|
|
|
$this->registerBackwardCompatAliases();
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Register backward compatibility class aliases.
|
|
*/
|
|
protected function registerBackwardCompatAliases(): void
|
|
{
|
|
$aliases = [
|
|
\App\Support\RecoveryCode::class => RecoveryCode::class,
|
|
\App\Support\SystemLogs::class => SystemLogs::class,
|
|
\App\Support\UtmHelper::class => UtmHelper::class,
|
|
\App\Support\LoginRateLimiter::class => LoginRateLimiter::class,
|
|
\App\Support\File::class => File::class,
|
|
\App\Support\HorizonStatus::class => HorizonStatus::class,
|
|
\App\Support\TimezoneList::class => TimezoneList::class,
|
|
\App\Support\PrivacyHelper::class => PrivacyHelper::class,
|
|
\App\Support\Log::class => Log::class,
|
|
\App\Support\RateLimit::class => RateLimit::class,
|
|
\App\Support\CommandResult::class => CommandResult::class,
|
|
\App\Support\HadesEncrypt::class => HadesEncrypt::class,
|
|
];
|
|
|
|
foreach ($aliases as $old => $new) {
|
|
if (! class_exists($old)) {
|
|
class_alias($new, $old);
|
|
}
|
|
}
|
|
}
|
|
}
|