Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@iqprotocol/in-memory-storage
Advanced tools
This package is part of [IQ Protocol JS SDK.](https://github.com/iqlabsorg/iq-sdk-js)
This package is part of IQ Protocol JS SDK.
:exclamation: The package is in development and breaking changes should be expected. Use at your own risk! |
---|
The package includes very basic Account Store Interface implementation for handling account states in memory. Use this package when you want to test account state management functionality without setting up a persistent storage.
:warning: This provider is meant for testing and does not guarantee data persistence. Do not use for production deployments!
yarn add @iqprotocol/in-memory-storage
import { InMemoryAccountStore, Account, AccountState } from '@iqprotocol/in-memory-storage';
const store = new InMemoryAccountStore();
const account: Account = {
id: 'test-id',
data: { ... },
};
await store.saveAccount(account);
const accountState: AccountState = {
accountId: account.id,
serviceId: 'test-service',
energyGapHalvingPeriod: 86400,
power: 10n,
lockedPower: 2n,
energyCap: 5n,
energy: 5n,
energyCalculatedAt: Math.floor(Date.now() / 1000),
};
await store.initAccountState(accountState);
FAQs
This package is part of [IQ Protocol JS SDK.](https://github.com/iqlabsorg/iq-sdk-js)
The npm package @iqprotocol/in-memory-storage receives a total of 49 weekly downloads. As such, @iqprotocol/in-memory-storage popularity was classified as not popular.
We found that @iqprotocol/in-memory-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.