npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@majikah/majik-signature-client-tauri

v1.6.0

Published

Typed TypeScript facade over the Tauri signature plugin with bounded native-path single-file and batch streaming APIs.

Readme

@majikah/majik-signature-client-tauri

TypeScript facade over tauri-plugin-majik-signature-client. Extends MajikKeyClientTauri (accounts, lock/unlock, passphrases, synchronous read-model and its events) and adds contacts, groups, stamps, logs, preferences, signing and verification, seals, signature maps, backups, and bounded-memory native-path streaming. 113 typed methods.

const majik = await MajikSignatureClientTauri.open({ onUnlockRequested: askForPassphrase });

const signed = await majik.signFile({
  input: { path: "C:\\docs\\contract.pdf" },
  output: { path: "C:\\docs\\contract.signed.pdf" },
});
const result = await majik.verifyFile({ input: { path: signed.file.path! }, target: { accountId: majik.getActiveAccountId()! } });

await majik.withSigningSession(undefined, async () => { /* several signs, one unlock */ });
majik.onSig("new-stamp", (stamp) => {});

Files: pass { path } (Rust reads/validates; nothing large crosses IPC) or, for small blobs, await toFileInput(blob). Results: output.path writes to disk; otherwise read outputBytes(result.file) / outputBlob(...). Errors are MajikKeyClientError with .kind (unlockRequired, fileNotFound, fileNotAFile, fileUnreadable, fileEmpty, fileTooLarge, fileInvalid, fileExists, fileWriteFailed, ...).

Native-path streaming

For multi-gigabyte files, use the streaming methods instead of the legacy FileInput methods. They pass native paths directly to Rust and return metadata rather than materializing file bytes in the webview.

const operationId = crypto.randomUUID();
const unsubscribe = majik.onStreamProgress((progress) => {
  if (progress.operationId === operationId) {
    console.info(progress.bytesProcessed, progress.totalBytes);
  }
});

const signed = await majik.signFileEmbeddedStream({
  operationId,
  inputPath: "C:\\docs\\large-video.mov",
  outputPath: "C:\\docs\\large-video.signed.mov",
  streaming: { chunkSize: 4 * 1024 * 1024 },
});

unsubscribe();
console.info(signed.output.path, signed.output.sizeBytes);

The facade also exposes signFileDetachedStream, signFileEmbeddedStreamWithPrior, signFileDetachedStreamWithPrior, verifyFileEmbeddedStream, and verifyFileDetachedStream. Revision methods take priorFilePath; they do not accept an in-memory prior file. Use cancelStream(operationId) to request cancellation, and onStreamProgress() to observe progress. A progress event contains operationId, bytesProcessed, and nullable totalBytes; it is delivered on the dedicated majik-signature-client:stream-progress channel to avoid unnecessary read-model refreshes.

Streaming options accept a preferred chunkSize between 64 KiB and 64 MiB. Omit it or set it to null to use the native system recommendation. Allocation failures automatically retry with the system recommendation and progressively smaller sizes; set strictChunkSize: true to disable fallback. The automatic recommendation is capped at 64 MiB, while 64 MiB is the maximum explicit override. Signing writes atomically to outputPath; overwrite defaults to false. The detached envelope input remains separately bounded by Rust.

Use getSystemProfile() and getRecommendedStreamingConfig() to inspect the native resource profile and current recommendation. Streaming commands resolve their own recommendation at operation start, so callers do not need to query it before every operation. Progress updates include the effective chunk size, attempt number and whether adaptive fallback is active.

Subclass it for online features (MajikSignatureClientDatabase): this.invoke() for any command, your own axios layer on top. npm run build first builds ../majik-key-client-tauri-ts (a file: dependency).

Native-path streaming batches (1.6.0)

Version 1.6.0 exposes the Rust client's detached batch signing and MJKSMAP streaming verification. Source file bytes stay on disk and do not cross webview IPC.

const unsubscribe = majik.onStreamProgress((progress) => {
  // Batch progress also includes fileIndex, totalFiles and the manifest path.
  console.info(progress.path, progress.bytesProcessed, progress.totalBytes);
});

const signed = await majik.signBatchDetachedPathsStream({
  operationId: crypto.randomUUID(),
  inputs: [
    { manifestPath: "contracts/nda.pdf", sourcePath: "C:/docs/nda.pdf" },
    { manifestPath: "media/demo.mov", sourcePath: "C:/media/demo.mov" },
  ],
  mapOutputPath: "C:/output/contracts.mjksmap",
  options: { mode: "map", continueOnError: true },
  streaming: { chunkSize: 4 * 1024 * 1024, maxBytesPerFile: 10 * 1024 * 1024 * 1024 },
});

const verification = await majik.verifyMjksMapPathsStream({
  operationId: crypto.randomUUID(),
  mapPath: "C:/output/contracts.mjksmap",
  inputs: [
    { manifestPath: "contracts/nda.pdf", sourcePath: "C:/docs/nda.pdf" },
    { manifestPath: "media/demo.mov", sourcePath: "C:/media/demo.mov" },
  ],
  target: { accountId: majik.getActiveAccountId()! }, // trusted key required
  streaming: { chunkSize: 4 * 1024 * 1024 },
});

unsubscribe();

Separate output mode requires outputDir instead of mapOutputPath and writes unique numbered sidecars. Streaming MJKSMAP verification requires a trusted account, contact or address key; it does not use self-reported keys. Batch input is limited to 10,000 files, 4,096 UTF-16 code units per native or manifest path, 1,024 code units per MIME value, and 8 MiB of aggregate path/MIME metadata. The map file is limited to 64 MiB. Chunk sizes are 64 KiB–64 MiB. maxBytesPerFile is optional; omitting it does not impose an arbitrary total source-size cap.

The TypeScript facade performs early checks for paths, operation IDs, metadata, chunk sizes, duplicate manifest aliases, batch counts and trusted verification targets. The Rust plugin repeats validation because IPC arguments are untrusted. Native paths are not sandboxed by this package; the host app must configure Tauri capabilities and OS permissions.

License

Apache-2.0 — free for personal and commercial use.


Author

Developed by Josef Elijah Fabian (Zelijah) | Majikah Solutions OPC

About the Developer


Contact