mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-29 13:40:38 +02:00
v0.9.6: InfoNet hashchain, Wormhole gate encryption, mesh reputation, 16 community contributors
Gate messages now propagate via the Infonet hashchain as encrypted blobs — every node syncs them through normal chain sync while only Gate members with MLS keys can decrypt. Added mesh reputation system, peer push workers, voluntary Wormhole opt-in for node participation, fork recovery, killwormhole scripts, obfuscated terminology, and hardened the self-updater to protect encryption keys and chain state during updates. New features: Shodan search, train tracking, Sentinel Hub imagery, 8 new intelligence layers, CCTV expansion to 11,000+ cameras across 6 countries, Mesh Terminal CLI, prediction markets, desktop-shell scaffold, and comprehensive mesh test suite (215 frontend + backend tests passing). Community contributors: @wa1id, @AlborzNazari, @adust09, @Xpirix, @imqdcr, @csysp, @suranyami, @chr0n1x, @johan-martensson, @singularfailure, @smithbh, @OrfeoTerkuci, @deuza, @tm-const, @Elhard1, @ttulttul
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
export interface GateEnvelopeMessageLike {
|
||||
event_type?: string;
|
||||
gate?: string;
|
||||
message?: string;
|
||||
ciphertext?: string;
|
||||
epoch?: number;
|
||||
nonce?: string;
|
||||
sender_ref?: string;
|
||||
format?: string;
|
||||
decrypted_message?: string;
|
||||
payload?: {
|
||||
gate?: string;
|
||||
ciphertext?: string;
|
||||
nonce?: string;
|
||||
sender_ref?: string;
|
||||
format?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type GateEnvelopeState = 'plaintext' | 'decrypted' | 'locked';
|
||||
|
||||
function _field(message: GateEnvelopeMessageLike, key: 'gate' | 'ciphertext' | 'nonce' | 'sender_ref' | 'format'): string {
|
||||
const payload = message.payload;
|
||||
const nested = payload && typeof payload === 'object' ? payload[key] : '';
|
||||
const direct = message[key];
|
||||
return String((direct ?? nested ?? '') || '');
|
||||
}
|
||||
|
||||
export function isEncryptedGateEnvelope(message: GateEnvelopeMessageLike): boolean {
|
||||
return (
|
||||
String(message.event_type ?? '') === 'gate_message' &&
|
||||
!!_field(message, 'ciphertext').trim() &&
|
||||
(_field(message, 'format') || 'mls1') === 'mls1'
|
||||
);
|
||||
}
|
||||
|
||||
export function gateEnvelopeDisplayText(message: GateEnvelopeMessageLike): string {
|
||||
if (!isEncryptedGateEnvelope(message)) {
|
||||
return String(message.message ?? '');
|
||||
}
|
||||
const decrypted = String(message.decrypted_message ?? '').trim();
|
||||
return decrypted || 'ENCRYPTED GATE MESSAGE - KEY UNAVAILABLE';
|
||||
}
|
||||
|
||||
export function gateEnvelopeState(message: GateEnvelopeMessageLike): GateEnvelopeState {
|
||||
if (!isEncryptedGateEnvelope(message)) {
|
||||
return 'plaintext';
|
||||
}
|
||||
return String(message.decrypted_message ?? '').trim() ? 'decrypted' : 'locked';
|
||||
}
|
||||
Reference in New Issue
Block a user