import { Envelope, EventRef, StreamEvent, Miniblock, StreamAndCookie, Tags, PlainMessage, Snapshot, GetStreamExResponse } from '@towns-protocol/proto'; import { ParsedEvent, ParsedMiniblock, ParsedSnapshot, ParsedStreamAndCookie, ParsedStreamResponse } from './types'; import { SignerContext } from './signerContext'; export interface UnpackEnvelopeOpts { disableHashValidation?: boolean; disableSignatureValidation?: boolean; } export declare const _impl_makeEvent_impl_: (context: SignerContext, payload: PlainMessage["payload"], prevMiniblockHash?: Uint8Array, prevMiniblockNum?: bigint, tags?: PlainMessage, ephemeral?: boolean) => Promise; export declare const makeEvent: (context: SignerContext, payload: PlainMessage["payload"], prevMiniblockHash?: Uint8Array, prevMiniblockNum?: bigint, tags?: PlainMessage, ephemeral?: boolean) => Promise; export declare const makeEvents: (context: SignerContext, payloads: PlainMessage["payload"][], prevMiniblockHash?: Uint8Array) => Promise; export declare const unpackStream: (stream: StreamAndCookie | undefined, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const waitForStreamEx: (streamId: string | Uint8Array, response: AsyncIterable) => Promise<{ miniblocks: Miniblock[]; snapshot?: Envelope; }>; export declare const unpackStreamEx: (miniblocks: Miniblock[], snapshot: Envelope | undefined, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const unpackStreamAndCookie: (streamAndCookie: StreamAndCookie, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const unpackMiniblock: (miniblock: Miniblock, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const unpackEnvelope: (envelope: Envelope, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const unpackSnapshot: (miniblockHeader: StreamEvent | undefined, miniblockHeaderSnapshotHash: Uint8Array | undefined, snapshot: Envelope, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare function checkEventSignature(event: { creatorAddress: Uint8Array; delegateSig: Uint8Array; delegateExpiryEpochMs: bigint; }, hash: Uint8Array, signature: Uint8Array): void; export declare function makeParsedEvent(event: StreamEvent, hash: Uint8Array | undefined, signature: Uint8Array | undefined): { event: StreamEvent; hash: Uint8Array; hashStr: string; signature: Uint8Array | undefined; creatorUserId: `0x${string}`; ephemeral: boolean; }; export declare function makeParsedSnapshot(snapshot: Snapshot, hash: Uint8Array | undefined, signature: Uint8Array | undefined): { snapshot: Snapshot; hash: Uint8Array; hashStr: string; signature: Uint8Array | undefined; }; export declare const unpackEnvelopes: (event: Envelope[], opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const unpackStreamEnvelopes: (stream: StreamAndCookie, opts: UnpackEnvelopeOpts | undefined) => Promise; export declare const makeEventRef: (streamId: string | Uint8Array, event: Envelope) => EventRef; export declare function riverHash(data: Uint8Array): Uint8Array; export declare function riverSnapshotHash(data: Uint8Array): Uint8Array; export declare function notificationServiceHash(userId: Uint8Array, expiration: bigint, // unix seconds challenge: Uint8Array): Uint8Array; export declare function appRegistryHash(userId: Uint8Array, expiration: bigint, // unix seconds challenge: Uint8Array): Uint8Array; export declare function riverSign(hash: Uint8Array, privateKey: Uint8Array | string): Promise; export declare function riverVerifySignature(hash: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): boolean; export declare function riverRecoverPubKey(hash: Uint8Array, signature: Uint8Array): Uint8Array; export declare function hexToNumber(hex: string): bigint; //# sourceMappingURL=sign.d.ts.map