Solana RPC gateway для клиента и сервера

This commit is contained in:
AidarKC
2026-10-18 00:03:46 +03:00
parent b67d06ce43
commit aa5addb5d9
17 changed files with 228 additions and 85 deletions
+3 -12
View File
@@ -1,3 +1,4 @@
import { getSolanaCluster } from '../services/solana-rpc-gateway.js';
import { createTopBar } from '../components/topbar.js';
import { iconHtml } from '../components/ui-icon.js';
import {
@@ -51,23 +52,13 @@ function getExplorerClusterName(endpoint) {
}
function isTestRegistrationContour() {
const solanaCluster = getExplorerClusterName(state.entrySettings.solanaServer);
if (solanaCluster !== 'mainnet-beta') return true;
const shineServer = String(state.entrySettings.shineServer || '').trim().toLowerCase();
const shineServerLogin = String(state.entrySettings.shineServerLogin || '').trim().toLowerCase();
return (
shineServer.includes('t1.shineup.me')
|| shineServer.includes('t2.shineup.me')
|| shineServer.includes('t3.shineup.me')
|| shineServer.includes('t4.shineup.me')
|| ['t1', 't2', 't3', 't4'].includes(shineServerLogin)
);
return getSolanaCluster() === 'devnet';
}
function makeSolanaExplorerTxUrl(signature, endpoint) {
const cleanSignature = String(signature || '').trim();
if (!cleanSignature) return '';
const cluster = getExplorerClusterName(endpoint);
const cluster = getSolanaCluster() || getExplorerClusterName(endpoint);
const url = new URL(`https://explorer.solana.com/tx/${encodeURIComponent(cleanSignature)}`);
if (cluster !== 'mainnet-beta') {
url.searchParams.set('cluster', cluster);