33 lines
686 B
PHP
33 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;
|
||
|
|
}
|