0.5.2 • Published 10 months ago

atomic-notes v0.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Atomic Notes SDK

Installation

Use npm due to its imcompatibility with yarn.

npm i atomic-notes
import { 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

10 months ago

0.4.8

10 months ago

0.3.15

10 months ago

0.3.14

10 months ago

0.3.13

10 months ago

0.3.12

10 months ago

0.3.11

10 months ago

0.3.10

10 months ago

0.3.0

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.4.5

10 months ago

0.3.6

10 months ago

0.4.4

10 months ago

0.3.5

10 months ago

0.3.8

10 months ago

0.4.6

10 months ago

0.3.7

10 months ago

0.5.0

10 months ago

0.4.1

10 months ago

0.3.2

10 months ago

0.4.0

10 months ago

0.3.1

10 months ago

0.5.2

10 months ago

0.4.3

10 months ago

0.3.4

10 months ago

0.5.1

10 months ago

0.4.2

10 months ago

0.3.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago