fix public API: sodium init, error exports, missing types

This commit is contained in:
shum
2026-02-18 13:34:56 +00:00
parent 9f67e75c65
commit c85050c685
3 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ import {
createXFTPChunk, uploadXFTPChunk, downloadXFTPChunk, downloadXFTPChunkRaw,
deleteXFTPChunk, type XFTPClientAgent
} from "./client.js"
export {newXFTPAgent, closeXFTPAgent, type XFTPClientAgent, type TransportConfig} from "./client.js"
export {newXFTPAgent, closeXFTPAgent, type XFTPClientAgent, type TransportConfig,
XFTPRetriableError, XFTPPermanentError, isRetriable, categorizeError, humanReadableMessage} from "./client.js"
import {processDownloadedFile, decryptReceivedChunk} from "./download.js"
import type {XFTPServer} from "./protocol/address.js"
import {formatXFTPServer, parseXFTPServer} from "./protocol/address.js"
+1
View File
@@ -1,6 +1,7 @@
// Key generation, signing, DH -- Simplex.Messaging.Crypto (Ed25519/X25519/Ed448 functions).
import sodium from "libsodium-wrappers-sumo"
await sodium.ready
import {ed448} from "@noble/curves/ed448"
import {sha256} from "./digest.js"
import {concatBytes} from "../protocol/encoding.js"
+4
View File
@@ -0,0 +1,4 @@
export * from "./agent.js"
export {parseXFTPServer, formatXFTPServer, type XFTPServer} from "./protocol/address.js"
export {decodeFileDescription, encodeFileDescription, validateFileDescription, type FileDescription, type FileChunk, type FileChunkReplica, type FileParty, type RedirectFileInfo} from "./protocol/description.js"
export {type FileHeader} from "./crypto/file.js"