SHA256
Обновить HEADER, теги CORE и конфигурацию основного сервера
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 = 'test5599';
|
||||
const SHINE_PROTOCOL_NAMESPACE = 'SHiNE';
|
||||
const SHINE_ARWEAVE_APP_TAG = SHINE_PROTOCOL_NAMESPACE;
|
||||
const SHINE_ARWEAVE_CHANNEL_TAG = 'c';
|
||||
const BCH_TYPE_TECH = 0;
|
||||
@@ -1950,7 +1950,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
seen.add(previous.toLowerCase());
|
||||
}
|
||||
}
|
||||
const license = strict(reader.readBytes(reader.readU8()));
|
||||
const license = strict(reader.readBytes(version === 2 ? reader.readU16() : reader.readU8()));
|
||||
const initialBlockchainKey = base64Url(reader.readBytes(32));
|
||||
reader.ensureDone();
|
||||
return { kind: 'header', login, tag, initialBlockchainKey, accountType, previousAccounts, license };
|
||||
@@ -2040,7 +2040,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
}
|
||||
|
||||
function parseBlockchainBody(type, subType, version, bodyBytes, line) {
|
||||
if (version !== 1) {
|
||||
if (version !== 1 && !(type === BCH_TYPE_TECH && subType === BCH_SUBTYPE_HEADER && version === 2)) {
|
||||
return { kind: 'unsupported', reason: `Неподдерживаемая версия body ${version}` };
|
||||
}
|
||||
if (type === BCH_TYPE_TECH && subType === BCH_SUBTYPE_HEADER) {
|
||||
@@ -2083,7 +2083,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
const core = parseCorePayload(coreBytes);
|
||||
if (contentBytes.length < 7 || contentBytes.length > 8*1024*1024-117 || contentBytes[0] !== 1 || bytesToHex(await digestSha256(contentBytes)) !== core.contentHashHex) throw new Error('CONTENT hash/format mismatch');
|
||||
const type=readUint16BE(contentBytes,1),subType=readUint16BE(contentBytes,3),version=readUint16BE(contentBytes,5);
|
||||
if (version !== 1 || (type===0 && subType===0)!==(core.blockNumber===0)) throw new Error('Invalid CONTENT version/HEADER');
|
||||
if ((version !== 1 && !(type===0 && subType===0 && version===2)) || (type===0 && subType===0)!==(core.blockNumber===0)) throw new Error('Invalid CONTENT version/HEADER');
|
||||
const channelText=type===1 && [10,11,50,90,92,100,110,120,130].includes(subType);
|
||||
const expectedLine=type===0&&subType!==0?2147483647:type===3?2147483646:type===4?2147483645:null;
|
||||
if (channelText ? !core.line||core.line.lineCode>CORE_MAX_NUMBER : expectedLine===null ? !!core.line : core.line?.lineCode!==expectedLine) throw new Error('CONTENT/CORE line mismatch');
|
||||
@@ -2095,7 +2095,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
const tags=node.tags||[];
|
||||
const expected={App:SHINE_PROTOCOL_NAMESPACE,n:String(core.blockNumber)};
|
||||
if(core.line) expected.l=({2147483645:'P',2147483646:'C',2147483647:'T'})[core.line.lineCode]??String(core.line.lineCode);
|
||||
if(tags.length!==Object.keys(expected).length || Object.entries(expected).some(([name,value])=>tags.filter(t=>t.name===name&&t.value===value).length!==1)) throw new Error('CORE index tags mismatch');
|
||||
if(tags.length!==Object.keys(expected).length || Object.entries(expected).some(([name,value])=>tags.filter(t=>t.name===name&&(t.value===value || (name==='App' && t.value==='test5599'))).length!==1)) throw new Error('CORE index tags mismatch');
|
||||
}
|
||||
|
||||
function refKey(blockchainName, blockNumber, blockHashHex) {
|
||||
@@ -2437,7 +2437,7 @@ var solanaWeb3=function(exports){"use strict";function getDefaultExportFromCjs(x
|
||||
const gateway = baseUrl(gatewayBaseUrl);
|
||||
const ownerAddress = await arweaveOwnerAddressFromBlockchainKey(blockchainKey);
|
||||
// Author-first: channel is a local view filter, never an Arweave query filter.
|
||||
const tags = [{ name: 'App', values: [SHINE_ARWEAVE_APP_TAG] }];
|
||||
const tags = [{ name: 'App', values: [SHINE_ARWEAVE_APP_TAG, 'test5599'] }];
|
||||
const query = `query($owners:[String!],$tags:[TagFilter!],$after:String){transactions(first:100,after:$after,owners:$owners,tags:$tags,sort:HEIGHT_DESC){pageInfo{hasNextPage}edges{cursor node{id owner{address key} block{height timestamp} bundledIn{id} tags{name value}}}}}`;
|
||||
let after = null;
|
||||
let page = 0;
|
||||
|
||||
Reference in New Issue
Block a user