SHA256
Перевести протокол на App test5599 и PDA 1.0
This commit is contained in:
@@ -1099,7 +1099,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
const BLOCK_TYPE_ARCHIVE_HEAD = 80;
|
||||
const CORE_MAX_NUMBER = 2147482623;
|
||||
// Transport namespace актуального standalone Viewer.
|
||||
const SHINE_PROTOCOL_NAMESPACE = 'test5595';
|
||||
const SHINE_PROTOCOL_NAMESPACE = 'test5599';
|
||||
const SHINE_ARWEAVE_APP_TAG = SHINE_PROTOCOL_NAMESPACE;
|
||||
const SHINE_ARWEAVE_CHANNEL_TAG = 'c';
|
||||
const BCH_TYPE_TECH = 0;
|
||||
@@ -3364,7 +3364,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
function v3RenderBlocks(){ const host=document.getElementById('v3-block-view'); if(!host)return; host.innerHTML=''; const wrap=document.createElement('div'); wrap.className='v3-blocks'; const blocks=(currentBlockchainView?.rawBlocks||V3.blocks||[]).slice().sort((a,b)=>b.blockNumber-a.blockNumber); blocks.forEach(b=>{ const d=document.createElement('details'); d.className='v3-block'; const sm=document.createElement('summary'); sm.textContent=`#${b.blockNumber} · type ${b.type}/${b.subType} · ${formatTimestamp(Number(b.timestampSec)*1000)}`; const pre=document.createElement('pre'); pre.textContent=JSON.stringify({blockNumber:b.blockNumber,type:b.type,subType:b.subType,version:b.version,hash:b.hashHex,prevHash:b.prevHashHex,contentHash:b.contentHashHex,contentDataItemId:b.contentDataItemId,line:b.line,arweaveId:b.arweaveId,body:b.body},(k,v)=>typeof v==='bigint'?String(v):v,2); d.append(sm,pre); wrap.appendChild(d); }); if(!blocks.length)wrap.textContent='Блоки ещё не загружены.'; host.appendChild(wrap); }
|
||||
function v3SetView(mode){ const bv=document.getElementById('v3-block-view'), cb=document.getElementById('content-browser'); document.getElementById('v3-channel-tab').classList.toggle('is-active',mode==='channel'); document.getElementById('v3-blocks-tab').classList.toggle('is-active',mode==='blocks'); if(bv)bv.hidden=mode!=='blocks'; if(cb)cb.hidden=mode==='blocks'; if(mode==='blocks')v3RenderBlocks(); }
|
||||
async function v3ClearCache(){ try{ const keys=Object.keys(localStorage).filter(k=>k.startsWith('shine.viewer.data.')||k.startsWith('shine.viewer.author-chain.')); keys.forEach(k=>localStorage.removeItem(k)); if('caches' in window){ for(const k of await caches.keys()) if(k.startsWith('shine-viewer-')) await caches.delete(k); } v3Log('Кэш данных очищен'); }catch(e){v3Log('Ошибка очистки кэша: '+e.message);} }
|
||||
function v3CacheKey(key,channel){return 'shine.viewer.author-chain.test5595.'+String(key);}
|
||||
function v3CacheKey(key,channel){return 'shine.viewer.author-chain.test5599.'+String(key);}
|
||||
function v3SaveCache(key,channel,blocks){ if(!V3.cacheEnabled)return; try{ localStorage.setItem(v3CacheKey(key,channel),JSON.stringify(blocks,(k,v)=>typeof v==='bigint'?{__bigint:String(v)}:v)); }catch(e){v3Log('Кэш переполнен: '+e.message);} }
|
||||
function v3LoadCache(key,channel){ if(!V3.cacheEnabled)return null; try{return JSON.parse(localStorage.getItem(v3CacheKey(key,channel))||'null',(k,v)=>v&&typeof v==='object'&&v.__bigint!==undefined?BigInt(v.__bigint):v);}catch{return null;} }
|
||||
async function v3RestoreCached(key, channel) {
|
||||
|
||||
Reference in New Issue
Block a user