mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-06-06 01:51:45 +00:00
fix public API: sodium init, error exports, missing types
This commit is contained in:
@@ -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,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"
|
||||
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user