wallet tron transactions

This commit is contained in:
cano
2024-03-25 06:15:36 +08:00
parent 4b8f205e86
commit 489090382f
83 changed files with 5424 additions and 1343 deletions

32
sdk/Wallet/UsdtTrc20.php Normal file
View File

@ -0,0 +1,32 @@
<?php
namespace Sdk\Wallet;
use App\Exceptions\WalletSdkException;
use GuzzleHttp\Client;
class UsdtTrc20
{
const RPC_URL = 'https://api.trongrid.io';
const CONTRACT_ADDRESS = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t';
const API_SECRET = 'b484f01e-d21d-449d-8d3a-df2646536486';
protected Trc20Sdk $sdk;
public function __construct()
{
$headers = [
'TRON-PRO-API-KEY' => self::API_SECRET,
'Content-Type' => 'application/json',
];
$client = new Client(['base_uri' => self::RPC_URL, 'headers' => $headers]);
$trc20Wallet = new Trc20Sdk($client, self::CONTRACT_ADDRESS);
$this->sdk = $trc20Wallet;
}
function getHandler(): Trc20Sdk
{
return $this->sdk;
}
}