This commit is contained in:
hashbro
2026-08-08 05:09:01 +08:00
parent 03a40105fc
commit 74a67c3900
523 changed files with 669 additions and 5965 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Services\Chain;
interface ChainDriver
{
public function chainId(): string;
public function deriveAddress(string $mnemonic, int $index = 0): string;
/**
* @return string txid
*/
public function sendNative(string $mnemonic, int $index, string $to, string $amount): string;
/**
* @return string txid
*/
public function sendToken(string $mnemonic, int $index, string $to, string $amount, string $contract): string;
public function isValidAddress(string $address): bool;
/**
* Human-decimal native balance (e.g. TRX).
*/
public function getNativeBalance(string $address): string;
/**
* Human-decimal token balance (e.g. USDT, 6 decimals on Tron).
*/
public function getTokenBalance(string $address, string $contract): string;
}