Monocle Backend SDK - REST client for Backend Decryption & Decryption API
npm install @spur.us/monocle-backendSpur's JavaScript Monocle Backend SDK.
``bash`
npm install @spur.us/monocle-backendor
yarn add @spur.us/monocle-backendor
pnpm add @spur.us/monocle-backend
The package needs to be configured with your Monocle application's secret key, which is available in the Spur Dashboard.
`javascript
import { createMonocleClient } from '@spur.us/monocle-backend';
const monocleClient = await createMonocleClient({
secretKey: process.env.MONOCLE_SECRET_KEY,
});
`
`javascript`
try {
const assessment = await monocleClient.decryptAssessment(encryptedAssessment);
} catch (error) {
// Error handling
}
> [!IMPORTANT]
> This is only available to Enterprise customers
`javascript``
try {
const assessment = await monocleClient.decryptAssessment(
encryptedAssessment,
{ privateKeyPem: process.env.MONOCLE_PRIVATE_KEY }
);
} catch (error) {
// Error handling
}
We welcome all contributors!
Please read our contributing guidelines to learn how to submit issues or open pull requests.
This project is licensed under the MIT license.