npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@questnetwork/quest-os-js

v0.9.4

Published

![Completion](https://img.shields.io/badge/completion-14%25-orange) ![Help Wanted](https://img.shields.io/badge/%20-help--wanted-%23159818) ![Version 0.9.4](https://img.shields.io/badge/version-v0.9.4-green) ![Version 0.9.5](https://img.shields.io/badge/v

Downloads

5

Readme

Completion Help Wanted Version 0.9.4 Version 0.9.5 Sponsors

Quest OS JS

Lead Maintainer

StationedInTheField

Description

Unified API for the QuestNetwork dStack. Use with our example app: qDesk.

Main strategy is to create a Quest Network / IPFS / Ethereum interface that even kids can easily understand.

Quest OS offers encrypted channels, persistent storage, peer management, timelines, posts and more. It it used to load add-on modules, like quest-coral-js to use IPFS DAGs, or quest-dolphin-js to use IPFS GossipSub.

Security

Completion 1.0.0 EC AES

Quest OS uses 4096 Bit RSA-OAEP encryption, 256 Bit AES-CBC encryption and NIST P-521 EC signatures.

Installation & Usage

npm install @questnetwork/[email protected]

OR

git clone https://github.com/QuestNetwork/quest-os-js && cd quest-os-js && git checkout 0.9.3 && cd ..

API

async boot(config)

Boots the operating system. The GitHub branches master/0.9.2/0.9.3+ boot with:

JavaScript/NodeJS

import { qOS } from '@questnetwork/quest-os-js'
// configure with a bootstrap swarm peer, for testing you can use:
let config = {
  ipfs: {
        Swarm: [<swarm star peer ip>,<swarm star peer ip>],
        API: '',
        Gateway: ''
  },
  version: <version>
  dev: <true/false>
};
// boot the operating system
qOS.boot().then( () => {
  //the operating system is online, build the future
})

TypeScript/Angular Service

import { Injectable } from '@angular/core';
import { qOS }  from '@questnetwork/quest-os-js';
import * as swarmJson from '../swarm.json';
import  packageJson from '../../../package.json';
const version = packageJson.version;

@Injectable({
  providedIn: 'root'
})
export class QuestOSService {
  public os;
  ready = false;
  config;
  constructor() {
    this.config = {
      ipfs: {
        Swarm: swarmJson['ipfs']['Swarm'],
        API: '',
        Gateway: ''
      },
      version: version,
      dev: swarmJson['dev']
    };
    this.os = qOS;
  }
  async boot(){
      try{
        await this.os.boot(this.config);
        this.ready = true;
      }
      catch(e){
        throw(e);
      }
  }
}

isReady()

Returns true once boot is complete, otherwise returns false.

if(<os>.isReady()){
  console.log("Ready To Sign In");
};

onReady()

Returns a Subject that pushes next when boot is complete

if(<os>.onReady().subsribe( () => {
  console.log("Ready To Sign In");
});

reboot()

Reboots the entire system

<os>.reboot();

utilities.engine.detect()

Returns a string 'node', 'electron' or 'browser'

if(<os>.utilities.engine.detect() == 'node'){
  console.log("Hello Universe");
};

enableSaveLock()

Bee

Locks the system from saving any changes

<os>.enableSaveLock();

disableSaveLock()

Bee

Unlocks the system from saving changes and saves changes normally

<os>.disableSaveLock();

setStorageLocation(location)

Bee

Sets the storage location for the app. Normally Quest OS does this automatically and you do not need to call this function. Possible locations are: "Download","LocalStorage" or "ConfigFile"

<os>.setStorageLocation("LocalStorage");

getStorageLocation(location)

Bee

Returns a string with the current storage location

<os>.getStorageLocation();

signIn(config = {})

Bee

Activates Accounts. Empty config creates a new account

<os>.signIn({});

signOut()

Bee

Deactivates Accounts And Restarts The Interface On The Web, Closes The Current Window In Electron

<os>.signOut();

onSignIn()

Bee

Returns a subscribable Subject that fires when the account is signed in.

<os>.onSignIn().subscribe( () => {
  console.log("Hello Universe");
});

isSignedIn()

Bee

Returns a boolean true or false

if(<os>.isSignedIn()){
  console.log("Hello Universe");
};

channel

async channel.create(dirtyChannelName, parentFolderId = "")

Bee Ocean

Returns the clean channel name

let claenChannelName = await <os>.channel.create('propaganda');

channel.remove(cleanChannelName)

Bee Ocean

Removes a channel

<os>.channel.remove('propaganda----1234');

channel.listen(cleanChannelName)

Ocean

Returns a Subject that forwards non-system channel messages.

<os>.channel.listen('propaganda----1234').subscribe( msg ){
  console.log(msg);
}

async channel.publish(cleanChannelName, message, type = 'CHANNEL_MESSAGE')

Ocean

Returns a Subject that forwards non-system channel messages.

await <os>.channel.publish('propaganda----1234',"Hello Universe");

channel.challenge

channel.challenge.enable(cleanChannelName)

Ocean

Opens the channel to everyone who can solve the Captcha provided by Quest Image Captcha JS

<os>.channel.challenge.enable('propaganda----1234');

channel.challenge.disable(cleanChannelName)

Ocean

Closes the channel to invite only participation

<os>.channel.challenge.disable('propaganda----1234');

channel.challenge.isEnabled(cleanChannelName)

Ocean

if(<os>.isEnabled()){
  console.log("Hello Universe");
};

channel.invite

channel.invite.create(cleanChannelName,newInviteCodeMax, exportFolders = false)

Bee Ocean

Creates a new channel invite, specify max uses of this invite code and whether or not to include your folder structure.

<os>.channel.invite.create('propaganda----1234',5,true);

channel.invite.remove(cleanChannelName,link)

Bee Ocean

Removes a channel invite

<os>.channel.invite.remove('propaganda----1234',"5448495320495320414e2045585452454d454c59204c4f4e4720414e4420494e56414c494420494e5649544520434f4445");

channel.invite.get(channel)

Ocean

Gets all invites for a channel

let invites = <os>.channel.invite.get('propaganda----1234');

channel.invite.get(channel)

Ocean

Gets all invites for a channel

let invites = <os>.channel.invite.get('propaganda----1234');

Unfortunately nobody is working on a detailed API documentation yet, until then check out the source in qDesk Messages 0.9.3+ to see how to use the OS.

We recommend to use our quest-cli to test and build the package. It allows you to bootstrap your Quest Network apps with the same peers and settings.

Pro Tip: Put a file in your /bin that runs the quest-cli like so node /path/to/quest-cli/index.js from any folder on your system. It's much nicer!

Features

0.9.2

0.9.3

  • Quest Social JS
  • Documentation Extended
  • Easier Access
  • Offer "LocalStorage" As A Storage Container On The Web To Stay Signed In

0.9.4 Change Peer Configuration in browser, Electron and on NodeJS

Roadmap

0.9.4

  • Democratically block or mute peers
  • Faux requests. Send request in channel, wait for response, deliver response as if it was an http request.

Support Us

Please consider supporting us, so that we can build a non-profit for this project (ツ)

| Ethereum| Bitcoin | |---|---| | 0xBC2A050E7B87610Bc29657e7e7901DdBA6f2D34E | bc1qujrqa3s34r5h0exgmmcuf8ejhyydm8wwja4fmq | | | |

License

GNU Affero GPLv3