@iqprotocol/abstract-storage
TypeScript icon, indicating that this package has built-in type declarations

0.15.1 • Public • Published

Abstract Storage

This package is part of IQ Protocol JS SDK.

The package is in development and breaking changes should be expected. Use at your own risk!

The IQ Protocol off-chain state management is storage agnostic and relies on storage providers to implement required functionality. This package provides AccountStore class which can be extended to implement store specific provider.

Use this package when you want to implement a new storage provider.

Installation

yarn add @iqprotocol/abstract-storage

Usage

All AccountStore implementations use built-in account state validator by default. It is also possible to provide a custom validator.

import { AccountStore, AccountStateValidator } from '@iqprotocol/abstract-storage';

class CustomStore extends AccountStore {
  // ...
}

class CustomAccountStateValidator implements AccountStateValidator {
  // ...
}

const validator = new CustomAccountStateValidator();
const customStore = new CustomStore({ validator });

Readme

Keywords

none

Package Sidebar

Install

npm i @iqprotocol/abstract-storage

Weekly Downloads

0

Version

0.15.1

License

MIT

Unpacked Size

21.9 kB

Total Files

10

Last publish

Collaborators

  • stas_iq
  • denis.narushevich.blockvis
  • timurrassolov
  • cvts
  • cheelahim
  • d_kozickis
  • zorato