@runcitadel/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.5.5 • Public • Published

Citadel SDK

Lightweight, type-safe wrapper around the Citadel API.

The Citadel SDK allows you to easily interact with a Citadel node on the local network in your app. It can power your app, but will also be used in the new Citadel dashboard and mobile app.

Note about ES Modules

This package uses ES Modules. It can only be imported in projects using ESM. Trying to require() it will fail.

Simple example

import {Citadel} from "@runcitadel/sdk";

console.log("Initializing testing...");
// Try to discover a Citadel
let node = await Citadel.discover() || "http://localhost";
let citadel = new Citadel(node);
console.log("Checking online state...");
console.log(await citadel.isOnline());
console.log("Logging in...");
await citadel.login("password123!", true);
console.log("Testing connection...");
await citadel.manager.auth.test();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.51latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.51
0.5.40
0.5.30
0.5.20
0.5.11
0.5.01
0.4.00
0.4.0-beta.30
0.4.0-beta.20
0.4.0-beta.10
0.3.80
0.3.60
0.3.50
0.3.41
0.3.30
0.3.20
0.3.10
0.3.00
0.3.0-alpha.20
0.2.11
0.2.00
0.1.90
0.1.80
0.1.70
0.1.60
0.1.51
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.61
0.0.50
0.0.40
0.0.30
0.0.21
0.0.1-beta.240
0.0.1-beta.230
0.0.1-beta.220
0.0.1-beta.210
0.0.1-beta.200
0.0.1-beta.190
0.0.1-beta.180
0.0.1-beta.170
0.0.1-beta.160
0.0.1-beta.150
0.0.1-beta.140
0.0.1-beta.130
0.0.1-beta.120
0.0.1-beta.110
0.0.1-beta.100
0.0.1-beta.90
0.0.1-beta.80
0.0.1-beta.70
0.0.1-beta.60
0.0.1-beta.50
0.0.1-beta.40
0.0.1-beta.31
0.0.1-beta.20
0.0.1-beta.10
0.0.1-alpha.10

Package Sidebar

Install

npm i @runcitadel/sdk

Weekly Downloads

8

Version

0.5.5

License

none

Unpacked Size

140 kB

Total Files

6

Last publish

Collaborators

  • pwltr
  • aarondewes