@blocklet/sdk 1.16.34-beta-20241213-135509-c2832f80 → 1.16.34-beta-20241216-230644-e9ec07d8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,10 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- const lru_cache_1 = __importDefault(require("lru-cache"));
5
+ const lru_cache_1 = require("lru-cache");
6
6
  const auth_1 = __importDefault(require("../service/auth"));
7
7
  const login_1 = require("../util/login");
8
- const cache = new lru_cache_1.default({ max: 10, maxAge: 60 * 1000 });
8
+ const cache = new lru_cache_1.LRUCache({ max: 10, ttl: 60 * 1000 });
9
9
  const clients = {};
10
10
  const getServiceClient = () => {
11
11
  const appId = process.env.BLOCKLET_APP_ID;
package/lib/wallet.js CHANGED
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  const wallet_1 = require("@ocap/wallet");
6
3
  const mcrypto_1 = require("@ocap/mcrypto");
7
4
  const did_1 = require("@arcblock/did");
8
- const lru_cache_1 = __importDefault(require("lru-cache"));
5
+ const lru_cache_1 = require("lru-cache");
9
6
  // NOTICE: 1 个应用的 sdk 运行时最多 4 个钱包
10
7
  // 此处 cache 只是优化性能的手段,即使 miss 也不会造成任何错误,最终决定设置 size 为 4
11
- const cacheWallet = new lru_cache_1.default({ max: 4, maxAge: 60 * 1000 });
8
+ const cacheWallet = new lru_cache_1.LRUCache({ max: 4, ttl: 60 * 1000 });
12
9
  /**
13
10
  * @param {string} [type=process.env.CHAIN_TYPE] can only be 'eth|ethereum' or 'default|arcblock'
14
11
  * @param {string} [appSk=process.env.BLOCKLET_APP_SK] must be hex
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.34-beta-20241213-135509-c2832f80",
6
+ "version": "1.16.34-beta-20241216-230644-e9ec07d8",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,16 +27,16 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.34-beta-20241213-135509-c2832f80",
31
- "@abtnode/constant": "1.16.34-beta-20241213-135509-c2832f80",
32
- "@abtnode/util": "1.16.34-beta-20241213-135509-c2832f80",
30
+ "@abtnode/client": "1.16.34-beta-20241216-230644-e9ec07d8",
31
+ "@abtnode/constant": "1.16.34-beta-20241216-230644-e9ec07d8",
32
+ "@abtnode/util": "1.16.34-beta-20241216-230644-e9ec07d8",
33
33
  "@arcblock/did": "1.18.161",
34
34
  "@arcblock/did-auth": "1.18.161",
35
35
  "@arcblock/jwt": "1.18.161",
36
36
  "@arcblock/ws": "1.18.161",
37
- "@blocklet/constant": "1.16.34-beta-20241213-135509-c2832f80",
38
- "@blocklet/env": "1.16.34-beta-20241213-135509-c2832f80",
39
- "@blocklet/meta": "1.16.34-beta-20241213-135509-c2832f80",
37
+ "@blocklet/constant": "1.16.34-beta-20241216-230644-e9ec07d8",
38
+ "@blocklet/env": "1.16.34-beta-20241216-230644-e9ec07d8",
39
+ "@blocklet/meta": "1.16.34-beta-20241216-230644-e9ec07d8",
40
40
  "@did-connect/authenticator": "^2.2.4",
41
41
  "@did-connect/handler": "^2.2.4",
42
42
  "@nedb/core": "^2.1.5",
@@ -50,7 +50,7 @@
50
50
  "json-stable-stringify": "^1.0.1",
51
51
  "jsonwebtoken": "^9.0.0",
52
52
  "lodash": "^4.17.21",
53
- "lru-cache": "^6.0.0",
53
+ "lru-cache": "^11.0.2",
54
54
  "qs": "^6.13.0",
55
55
  "semver": "^7.6.3",
56
56
  "sitemap": "^8.0.0",
@@ -80,5 +80,5 @@
80
80
  "ts-node": "^10.9.1",
81
81
  "typescript": "^5.6.3"
82
82
  },
83
- "gitHead": "9e8b37f36d17a288a66ccc05e92c8f87825eeb57"
83
+ "gitHead": "053345d37470cb508a807085f14690cfec6073af"
84
84
  }