
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
SNJS is a client-side JavaScript library for [Standard Notes](https://standardnotes.org) that contains shared JavaScript logic for mobile, web, and desktop.
SNJS is a client-side JavaScript library for Standard Notes that contains shared JavaScript logic for mobile, web, and desktop.
This library can be used in any JavaScript environment, including web, desktop, native, and mobile (via React Native).
npm install --save snjs
<script src="snjs.js"></script>
On the web, SNJS objects will be available as on the global window, such as window.protocolManager.
If in a module environment, you can import it via:
import { protocolManager } from 'snjs';
protocolManager.generateInitialKeysAndAuthParamsForUser(email, password).then((results) => {
let keys = results.keys;
let authParams = results.authParams;
let serverPassword = keys.pw;
let encryptionKey = keys.mk;
let authenticationKey = keys.ak;
});
let authParams = getPreviouslyCreatedAuthParams();
protocolManager.computeEncryptionKeysForUser(password, authParams).then((keys) => {
let serverPassword = keys.pw;
let encryptionKey = keys.mk;
let authenticationKey = keys.ak;
});
pw: sent to the server for authentication.
mk: encrypts and decrypts items. Never sent to the server.
ak: authenticates the encryption and decryption of items. Never sent to the server.
Use protocolManager to encrypt and decrypt items. Use the SFItemParams as a wrapper over the item transformer. The SFItemParams class allows you to pass an SFItem object, encryption keys, and auth params, and will return the encrypted result.
let keys = getKeys(); // keys is a hash which should have properties mk and ak.
protocolManager.encryptItem(item, keys, authParams).then(() => {
// item.content is now encrypted
})
let keys = getKeys(); // keys is a hash which should have properties mk and ak.
protocolManager.decryptItem(item, keys).then(() => {
// item.content is now decrypted
})
.then() to every call to be notified of the result, or use await if you don't want to use callbacks.Join the #dev channel in our Slack group for help and discussion.
FAQs
SNJS is a client-side JavaScript library for [Standard Notes](https://standardnotes.org) that contains shared JavaScript logic for mobile, web, and desktop.
We found that snjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.