DaemonRpc implements ChainDaemon, WalletRpc implements ChainWallet. Interfaces bound in FrameworkBooted — enables mocking for tests and swapping to Go wrapper when go-process is ready. Concrete bindings kept for backwards compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
686 B
PHP
32 lines
686 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Mod\Chain\Contracts;
|
|
|
|
/**
|
|
* Chain daemon RPC interface.
|
|
*
|
|
* $daemon = app(ChainDaemon::class);
|
|
* $info = $daemon->getInfo();
|
|
*/
|
|
interface ChainDaemon
|
|
{
|
|
public function getInfo(): array;
|
|
|
|
public function getBlockByHeight(int $height): array;
|
|
|
|
public function getBlockByHash(string $hash): array;
|
|
|
|
public function getLastBlockHeader(): array;
|
|
|
|
public function getAllAliases(): array;
|
|
|
|
public function getAliasByName(string $name): ?array;
|
|
|
|
public function getBlockCount(): int;
|
|
|
|
public function getTransaction(string $hash): array;
|
|
|
|
public function call(string $method, array $params = []): array;
|
|
}
|