feat: ServiceDefinition for Chain and Names modules
ChainService (code=chain, no deps) and NamesService (code=names, depends on chain). Ready for CorePHP service registry discovery when core-api package is installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9a36b836a7
commit
113b228fee
2 changed files with 76 additions and 0 deletions
38
app/Mod/Chain/ChainService.php
Normal file
38
app/Mod/Chain/ChainService.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Mod\Chain;
|
||||
|
||||
/**
|
||||
* Chain service definition for the CorePHP service registry.
|
||||
*
|
||||
* $service = ChainService::definition();
|
||||
* echo $service['code']; // 'chain'
|
||||
*/
|
||||
class ChainService
|
||||
{
|
||||
public static function definition(): array
|
||||
{
|
||||
return [
|
||||
'code' => 'chain',
|
||||
'module' => 'Mod\\Chain',
|
||||
'name' => 'Blockchain',
|
||||
'tagline' => 'Lethean blockchain daemon and wallet RPC',
|
||||
'description' => 'Core chain infrastructure — daemon, wallet, alias management, PoW+PoS consensus.',
|
||||
'icon' => 'link',
|
||||
'color' => '#34d399',
|
||||
'sort_order' => 10,
|
||||
];
|
||||
}
|
||||
|
||||
public static function version(): string
|
||||
{
|
||||
return '1.0.0';
|
||||
}
|
||||
|
||||
public static function dependencies(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
38
app/Mod/Names/NamesService.php
Normal file
38
app/Mod/Names/NamesService.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Mod\Names;
|
||||
|
||||
/**
|
||||
* Names service definition for the CorePHP service registry.
|
||||
*
|
||||
* $service = NamesService::definition();
|
||||
* echo $service['code']; // 'names'
|
||||
*/
|
||||
class NamesService
|
||||
{
|
||||
public static function definition(): array
|
||||
{
|
||||
return [
|
||||
'code' => 'names',
|
||||
'module' => 'Mod\\Names',
|
||||
'name' => '.lthn Registrar',
|
||||
'tagline' => 'Blockchain domain name registration and DNS management',
|
||||
'description' => 'Register .lthn names on-chain, manage DNS records via ITNS sidechain, sunrise period claims.',
|
||||
'icon' => 'globe',
|
||||
'color' => '#818cf8',
|
||||
'sort_order' => 20,
|
||||
];
|
||||
}
|
||||
|
||||
public static function version(): string
|
||||
{
|
||||
return '1.0.0';
|
||||
}
|
||||
|
||||
public static function dependencies(): array
|
||||
{
|
||||
return ['chain'];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue