diff --git a/xftp-web/src/agent.ts b/xftp-web/src/agent.ts index 421ec5345..5122764f7 100644 --- a/xftp-web/src/agent.ts +++ b/xftp-web/src/agent.ts @@ -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" diff --git a/xftp-web/src/crypto/keys.ts b/xftp-web/src/crypto/keys.ts index 95664a788..21b217906 100644 --- a/xftp-web/src/crypto/keys.ts +++ b/xftp-web/src/crypto/keys.ts @@ -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" diff --git a/xftp-web/src/index.ts b/xftp-web/src/index.ts new file mode 100644 index 000000000..c3e99903f --- /dev/null +++ b/xftp-web/src/index.ts @@ -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"