0.5.2 • Published 1 year ago
atomic-notes v0.5.2
Atomic Notes SDK
Installation
Use npm due to its imcompatibility with yarn.
npm i atomic-notesimport { Note, Notebook } from "atomic-notes"Responses
All API calls return a response in the format { error, res } unless mentioned otherwise.
const { error, res: versions } = await note.list()
if(!error) console.log(versions)Notebook
Create Notebook
const notebook = new Notebook({ wallet: arweaveWallet })
const { pid } = await notebook.spawn(TAGS)
await note.eval(COLLECTION_LUA_SCRIPT)
await notebook.add(PROFILE_ID)Get Info
const { res } = await notebook.info()Update Info
await notebook.info(NEW_COLLECTION_NOTE_LUA_SCRIPT)Note
Create Note
const note = new Note({ wallet: arweaveWallet })
const { pid } = await note.spawn(MARKDOWN, TAGS)
await notebook.eval(AOMIC_NOTE_LUA_SCRIPT)
await note.allow()
await note.init()
await note.add(PROFILE_ID)
const notebook = new Notebook({ wallet: arweaveWallet, pid: NOTEBOOK_PID })
await notebook.update(pid)Get Info
const { res } = await note.info()Update Info
await note.info(NEW_ATOMIC_NOTE_LUA_SCRIPT)List Versions
const { res } = await note.list()Get Note Content
const { res } = await note.get(VERSION)Update New Version
const { res: patches } = await note.patches(NEW_MARKDOWN)
await note.update(patches, NEW_VERSION)Get Editors
const { res: editors } = await note.editors()Add Editor
await note.addEditor(NEW_EDITOR_WALLET_ADDRESS)Remove Editor
await note.removeEditor(EDITOR_WALLET_ADDRESS)0.4.9
1 year ago
0.4.8
1 year ago
0.3.15
1 year ago
0.3.14
1 year ago
0.3.13
1 year ago
0.3.12
1 year ago
0.3.11
1 year ago
0.3.10
1 year ago
0.3.0
1 year ago
0.2.1
1 year ago
0.2.0
1 year ago
0.4.5
1 year ago
0.3.6
1 year ago
0.4.4
1 year ago
0.3.5
1 year ago
0.3.8
1 year ago
0.4.6
1 year ago
0.3.7
1 year ago
0.5.0
1 year ago
0.4.1
1 year ago
0.3.2
1 year ago
0.4.0
1 year ago
0.3.1
1 year ago
0.5.2
1 year ago
0.4.3
1 year ago
0.3.4
1 year ago
0.5.1
1 year ago
0.4.2
1 year ago
0.3.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago