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>
22 lines
476 B
PHP
22 lines
476 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Mod\Chain\Contracts;
|
|
|
|
/**
|
|
* Chain wallet RPC interface.
|
|
*
|
|
* $wallet = app(ChainWallet::class);
|
|
* $balance = $wallet->getBalance();
|
|
*/
|
|
interface ChainWallet
|
|
{
|
|
public function getAddress(): string;
|
|
|
|
public function getBalance(): array;
|
|
|
|
public function registerAlias(string $name, string $address, string $comment): array;
|
|
|
|
public function updateAlias(string $name, string $address, string $comment): array;
|
|
}
|