This release adds support for version 004 of encryption (introduced Nov 2020) and removes support for 003.
Note: This is an early release with significant changes. Please take a backup before using with any real data and report any issues you find.
Standard Notes is a service and application for the secure management and storage of notes.
gosn-v2 is a library to help develop your own application to manage notes on the official, or your self-hosted, Standard Notes server.
The following example shows how to use this library to interact with the SN API directly. To prevent a full download of all items on every sync, use the provided cache package to persist an encrypted copy to disk, only syncing deltas on subsequent calls.
GO111MODULE=on go get -u github.com/jonhadfield/gosn-v2
import "github.com/jonhadfield/gosn-v2"
Sign-in to obtain your session
sio, _ := gosn.SignIn(gosn.SignInInput{
Email: "[email protected]",
Password: "topsecret",
})
An initial sync is required to retrieve your items, as well as your Items Keys that are then added to your session
so, _ := gosn.Sync(gosn.SyncInput{
Session: &sio.Session,
})
items, _ := so.Items.DecryptAndParse(&sio.Session)