wowok
Version:
Wowok Blockchain TypeScript API
24 lines (23 loc) • 1 kB
TypeScript
import type { SPQRState, SPQRChunk, SerializedSPQRState } from "./types.js";
export declare function initSPQR(): SPQRState;
export declare function spqrGetNextChunk(state: SPQRState, messageCount: number): {
chunk: SPQRChunk | null;
newState: SPQRState;
};
export declare function spqrProcessReceivedChunks(state: SPQRState, chunks: SPQRChunk[]): {
newState: SPQRState;
completed: boolean;
};
export declare function spqrOnPeerPQPKReceived(state: SPQRState, peerPQPK: Uint8Array): {
newState: SPQRState;
ctChunks: Uint8Array[];
};
export declare function spqrReceiveChunk(state: SPQRState, packedChunk: Uint8Array): {
newState: SPQRState;
peerPQPKReady: boolean;
peerPQPK: Uint8Array | null;
shouldSendCT: boolean;
};
export declare function spqrGetCurrentKey(state: SPQRState): Uint8Array;
export declare function serializeSPQRState(state: SPQRState): SerializedSPQRState;
export declare function deserializeSPQRState(serialized: SerializedSPQRState): SPQRState;