explorer/server/utils/states.ts
Claude 1299633a41
rebrand(lethean): update branding, ports, and config for Lethean blockchain
- Coin: Zano → Lethean, ticker: ZAN/ZANO → LTHN
- Ports: 11211 → 36941 (mainnet RPC), 46941 (testnet RPC)
- Wallet: 11212 → 36944/46944
- Address prefix: iTHN
- URLs: zano.org → lethean.io
- Explorer links: explorer.lthn.io

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:24:07 +01:00

74 lines
No EOL
1.6 KiB
TypeScript

interface IBlockInfo {
lastBlock?: number,
daemon_network_state?: number,
height?: number,
tx_pool_size?: number,
alias_count?: number,
alt_blocks_count?: number,
}
export let blockInfo: IBlockInfo = {};
export function setBlockInfo(newBlockInfo: IBlockInfo) {
blockInfo = newBlockInfo;
}
export interface ILastBlock {
height: number,
tx_id: string
}
export let lastBlock: ILastBlock = {
height: -1,
tx_id: '0000000000000000000000000000000000000000000000000000000000000000'
}
export interface PriceData {
price?: number;
usd_24h_change?: number;
lastUpdated?: string;
}
export interface State {
countAliasesDB?: number;
countAltBlocksDB?: number;
countAliasesServer?: number;
countAltBlocksServer?: number;
countTrPoolServer?: number;
statusSyncPool: boolean;
now_delete_offers: boolean;
statusSyncAltBlocks: boolean;
now_blocks_sync: boolean;
serverTimeout: number;
block_array: any[];
pools_array: any[];
priceData: {
[key: string]: PriceData
};
fiat_rates: {
[key: string]: number
}
lthnBurned?: number;
explorer_status: "online" | "offline" | "syncing";
}
export let state: State = {
statusSyncPool: false,
now_delete_offers: false,
statusSyncAltBlocks: false,
now_blocks_sync: false,
serverTimeout: 30,
block_array: [],
pools_array: [],
priceData: {},
fiat_rates: {},
explorer_status: "offline",
}
export function setState(newState: State) {
state = newState;
}
export function setLastBlock(lastBlock_: ILastBlock) {
lastBlock = lastBlock_;
}