Installation
SecureBatch provides a TypeScript SDK that wraps our WebAssembly engine. This allows you to integrate batch processing directly into your frontend or Node.js applications.
Prerequisites
- Node.js 18.x or higher
Required for server-side implementations.
- Browsers with SharedArrayBuffer support
Chrome 92+, Firefox 79+, Edge 92+, Safari 15.2+
Install the SDK
Run the following command in your project root:
$npm install @securebatch/sdk
Configuration (Next.js)
Because we use WebAssembly, you must enable specific headers in your next.config.js to allow SharedArrayBuffer:
next.config.jsJavaScript
/** @type {import('next').NextConfig} */
const nextConfig = {
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'Cross-Origin-Opener-Policy', value: 'same-origin' },
{ key: 'Cross-Origin-Embedder-Policy', value: 'require-corp' },
],
},
];
},
};
module.exports = nextConfig;