Akord docs
  • Introduction
    • ๐Ÿ‘‹About Akord
    • ๐ŸŒ‡Akordโ€“Arweave Sunsetting FAQs
    • Page
  • API & DEV TOOLS
    • ๐Ÿ•บSimple API upload
    • ๐Ÿค“Learn
      • Akord protocol
        • Tags
        • Vault
          • Fields
          • Functions
            • vault:init
            • vault:update
            • vault:archive
            • vault:restore
        • Membership
          • Fields
          • Functions
            • membership:invite
            • membership:accept
            • membership:reject
            • membership:revoke
            • membership:change-role
            • membership:update
        • Node
          • Fields
          • Functions
            • node:create
            • node:update
            • node:move
            • node:revoke
            • node:restore
            • node:delete
      • Publishing a website
        • Troubleshooting website publishing
      • Technical Litepaper
      • End-to-end encryption
      • Bundling
    • ๐Ÿ—๏ธBuild
      • REST API
        • Authentication
        • Rate limits
        • Timeouts
        • Webhooks
        • Examples
          • Simple uploads
          • Multipart uploads
      • SDK โ€“ AkordJS
        • Usage
        • Modules
          • Auth
          • Vault
          • Membership
          • Folder
          • Stack (file)
          • Manifest
          • Note
          • Memo (message)
          • Batch
        • Examples
      • CLI
        • Quick start
        • Login
        • Vaults
        • Files and stacks
        • Memos / messages
        • Folders
        • Memberships
      • Arweave Gateway โ€“ AKRD
  • App
    • ๐Ÿ’ปProduct guides
      • Signing up
        • Akord Wallet
        • Recovery phrase explained
      • Akord Vaults
        • Vault types explained
        • Creating a vault
        • Vault info
      • File management
        • Uploading files
        • File info
        • Sort/filter, folders & batch actions
        • File versioning
      • Add manifest
      • Sharing files
      • Media gallery
      • Invites
      • Messaging
      • Notes
      • Timeline
      • Storage
        • Monitoring usage
        • Top ups
        • Blockchain transactions
      • Account
        • Reveal recovery phrase
        • Change password
        • Account deletion
Powered by GitBook
On this page
  • Import
  • Quick start
  • More examples

Was this helpful?

  1. API & DEV TOOLS
  2. Build
  3. SDK โ€“ AkordJS

Usage

Import

requires Node.js 16

import { Akord } from "@akord/akord-js";

or

const { Akord } = require("@akord/akord-js");

Quick start

Init Akord

with email & password

import { Auth, Akord } from "@akord/akord-js";
const { wallet, jwt } = Auth.signIn(email, password);
const akord = Akord.init(wallet);

with Akord Wallet & JWT

const akord = Akord.init(wallet, { authToken: jwt });

Create vault

const { vaultId } = await akord.vault.create("my first vault");

Upload file to the vault by creating new stack

const { stackId, uri } = await akord.stack.create(vaultId, file);

Download the latest stack version

const filePath = await akord.stack.download(stackId);

Query user vaults

const vaults = await akord.vault.listAll();

More examples

Last updated 1 year ago

Was this helpful?

See our and learn how to create, contribute and access an Akord Vault. We also have some example flows in our .

๐Ÿ—๏ธ
demo app tutorial
tests repository