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

soul-quickstore-client

v0.1.38

Published

QuickStore is an NPM package meant for quick storing and retrieving of data for Soul Identity SDK applications. It should not be used for long term data storage as it is consistently purged.

Downloads

5

Readme

soul-quickstore-client

QuickStore is an NPM package meant for quick storing and retrieving of data for Soul Identity SDK applications. It should not be used for long term data storage as it is consistently purged.

Installation

You can install the QuickStore using NPM:

npm install soul-quickstore-client --save

Usage

Here's how to use the QuickStore class in your JavaScript or TypeScript project:

import { QuickStore } from 'soul-quickstore-client';

// Initialize QuickStore with a key
const store = new QuickStore('your_key_here');

// Start a session with initial data
store
  .startSession('your_initial_data_here')
  .then(success => {
    if (success) console.log('Session started successfully');
  })
  .catch(error => {
    console.error('Failed to start session:', error);
  });

// Update session with data
store
  .updateSession('your_data_here')
  .then(success => {
    if (success) console.log('Session updated successfully');
  })
  .catch(error => {
    console.error('Failed to update session:', error);
  });

// Retrieve session
store
  .retrieveSession()
  .then(data => {
    console.log('Session data:', data);
  })
  .catch(error => {
    console.error('Failed to retrieve session:', error);
  });

// Delete session
store
  .deleteSession()
  .then(success => {
    if (success) console.log('Session deleted successfully');
  })
  .catch(error => {
    console.error('Failed to delete session:', error);
  });

API

  • constructor(inputKey?: Uint8Array | string): Initializes the QuickStore object with an optional key. If no key is provided, a new key is generated.
  • startSession(initialData?: string): Promise<boolean>: Starts a session with optional initial data.
  • updateSession(data: string): Promise<boolean>: Updates the session with the provided data.
  • retrieveSession(): Promise<string>: Retrieves the current session's data.
  • deleteSession(): Promise<boolean>: Deletes the current session.
  • getID(): string: Returns the id of the current session.
  • setBackendUrl(url: string): Sets the backend URL for the session management.
  • getUpdateKey(): string: Returns the update key for the current session.
  • getRetrievalKey(): string: Returns the retrieval key for the current session.

Errors

The QuickStore class throws errors when it encounters issues with data size or when there's a problem with session management:

  • initialData too large: Thrown when the initial data provided to startSession is larger than 100000 characters.
  • data too large: Thrown when the data provided to updateSession is larger than 100000 characters.
  • no data: Thrown when trying to retrieve a session's data but no data is found.
  • decryption failed: Thrown when decryption of the session's data fails.

Contributing

Please feel free to fork this repository, make changes, and submit pull requests. If you find any bugs, please report them by creating new issues in the repository.

License

This project is licensed under the MIT License.

Visit Soul Stamps

For more information and to explore our other offerings, check out Soul Identity.