Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

warp-contracts-lmdb

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

warp-contracts-lmdb - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

6

lib/cjs/LmdbCache.js

@@ -73,3 +73,3 @@ "use strict";

await this.db.transaction(() => {
this.db.putSync(`${cacheKey.contractTxId}|${cacheKey.sortKey}`, value);
this.db.put(`${cacheKey.contractTxId}|${cacheKey.sortKey}`, value);
// Get number of elements that is already in cache.

@@ -96,3 +96,3 @@ // +1 to account for the element we just put and will be inserted with this transaction

.forEach((key) => {
this.db.removeSync(key);
this.db.remove(key);
});

@@ -106,3 +106,3 @@ });

.forEach((key) => {
this.db.removeSync(key);
this.db.remove(key);
});

@@ -109,0 +109,0 @@ });

{
"name": "warp-contracts-lmdb",
"version": "1.1.6",
"version": "1.1.7",
"description": "Lmdb database for Warp Contracts SDK",

@@ -5,0 +5,0 @@ "types": "./lib/types/index.d.ts",

@@ -17,3 +17,10 @@ # Warp Contracts Lmdb Cache

Requires `warp-contracts` SDK ver. min. 1.2.17
### Custom options
LmdbCache constructor accepts a second param with custom configuration.
| Option | Required | Description |
|-----------------------|------------|---------------------------------------------------------------------------------------------------------------------------------------|
| maxEntriesPerContract | false | Maximum number of interactions stored per contract id - above this threshold adding another entry triggers removing old interactions. |
| minEntriesPerContract | false | Minimum number of interactions stored per contract id. Value used when removing old iteractions. |
### Usage

@@ -30,8 +37,18 @@

dbLocation: `./cache/warp/state`
}, {
maxEntriesPerContract: 100,
minEntriesPerContract: 10
}
))
.useContractCache(new LmdbCache({
.useContractCache(
// Contract cache
new LmdbCache({
...defaultCacheOptions,
dbLocation: `./cache/warp/contracts`
}),
// Source cache
new LmdbCache({
...defaultCacheOptions,
dbLocation: `./cache/warp/src`
}));
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc