/** * PNM signing + publish for the browser/Helia node (WS6.6). * * Until now the Helia side only subscribed to and decoded PNMs * (ui/runtime/pnm-flatbuffer.ts). This module adds the producer half, * byte-compatible with the Go node's dataset-publication PNM envelope * (sdn-server internal/storage/manifest.go BuildDatasetPublicationPNM / * internal/channels/pnm_verifier.go): * * - size-prefixed $PNM FlatBuffer with MULTIFORMAT_ADDRESS ("/ipfs/"), * PUBLISH_TIMESTAMP (RFC3339), CID, FILE_NAME, FILE_ID, * SIGNATURE_TYPE "Ed25519", and SIGNATURE = hex(ed25519 over * "SDN-DPM-PNM\0" + FILE_ID + "\0" + CID), signed with the wallet's * Ed25519 key (native/WASM crypto boundary — no WebCrypto). * - published on the gossipsub topic /spacedatanetwork/sds/PNM.fbs — the * topic the Go node's EPM service consumes. */ export declare const PNM_SCHEMA = "PNM.fbs"; export declare const PNM_TOPIC = "/spacedatanetwork/sds/PNM.fbs"; /** Signature payload — must match Go datasetPublicationPNMSignaturePayload. */ export declare function pnmSignaturePayload(cid: string, fileId: string): Uint8Array; export interface BuildSignedPnmOptions { /** Content id the PNM announces (e.g. a DPM manifest or record CID). */ cid: string; /** SDS file identifier of the announced content (e.g. "$DPM", "EPHEMERIS"). */ fileId: string; fileName?: string; publishedAt?: Date | string; multiformatAddress?: string; /** Ed25519 private key (wallet-derived) used to sign the announcement. */ signingKey: Uint8Array; } /** Build + sign a size-prefixed $PNM envelope (Go-verifier compatible). */ export declare function buildSignedPnm(options: BuildSignedPnmOptions): Promise; export interface SignedPnmEvidence { cid: string; fileId: string; signatureType: string; signature: Uint8Array; multiformatAddress?: string; publishTimestamp?: string; } /** Decode + verify a signed PNM envelope (mirror of the Go verifier). */ export declare function verifySignedPnm(pnmBytes: Uint8Array, providerPublicKey?: Uint8Array): Promise; /** Anything that can publish raw bytes to a gossipsub topic. */ export interface RawTopicPublisher { publish(topic: string, data: Uint8Array): Promise; } /** Publish a signed PNM on the canonical PNM topic. */ export declare function publishSignedPnm(publisher: RawTopicPublisher, pnmBytes: Uint8Array, topic?: string): Promise; /** Build, sign, and publish in one step. */ export declare function signAndPublishPnm(publisher: RawTopicPublisher, options: BuildSignedPnmOptions): Promise<{ topic: string; pnmBytes: Uint8Array; }>; //# sourceMappingURL=pnm-publisher.d.ts.map