0.5.2 • Published 2 years ago

atomic-notes v0.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

0.4.8

2 years ago

0.3.15

2 years ago

0.3.14

2 years ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.4.5

2 years ago

0.3.6

2 years ago

0.4.4

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.4.6

2 years ago

0.3.7

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.5.2

2 years ago

0.4.3

2 years ago

0.3.4

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.3.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago