@blocklet/sdk 1.6.30 → 1.6.31

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.
@@ -29,19 +29,19 @@ const initClient = () => {
29
29
  const wallet = getWallet();
30
30
  const { address: did, publicKey: pk, secretKey: sk } = wallet;
31
31
  const url = `ws://127.0.0.1:${process.env.ABT_NODE_SERVICE_PORT}${SERVICE_PREFIX}`;
32
- const token = Jwt.sign(did, sk, {});
32
+ const token = () => Jwt.sign(did, sk, {});
33
33
 
34
34
  client = new WsClient(url, {
35
35
  heartbeatIntervalMs: 10 * 1000,
36
36
  params: () => ({
37
- token,
37
+ token: token(),
38
38
  pk,
39
39
  }),
40
40
  });
41
41
 
42
42
  client.connect();
43
43
 
44
- const channel = client.channel(wallet.address, { token, pk });
44
+ const channel = client.channel(wallet.address, () => ({ token: token(), pk }));
45
45
 
46
46
  channel
47
47
  .join()
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.30",
6
+ "version": "1.6.31",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,15 +19,15 @@
19
19
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@abtnode/client": "1.6.30",
23
- "@abtnode/constant": "1.6.30",
24
- "@arcblock/did-auth": "^1.14.20",
25
- "@arcblock/jwt": "^1.14.20",
26
- "@arcblock/ws": "^1.14.20",
27
- "@blocklet/meta": "1.6.30",
22
+ "@abtnode/client": "1.6.31",
23
+ "@abtnode/constant": "1.6.31",
24
+ "@arcblock/did-auth": "^1.14.24",
25
+ "@arcblock/jwt": "^1.14.24",
26
+ "@arcblock/ws": "^1.14.24",
27
+ "@blocklet/meta": "1.6.31",
28
28
  "@nedb/core": "^1.2.2",
29
- "@ocap/mcrypto": "^1.14.20",
30
- "@ocap/wallet": "^1.14.20",
29
+ "@ocap/mcrypto": "^1.14.24",
30
+ "@ocap/wallet": "^1.14.24",
31
31
  "axios": "^0.25.0",
32
32
  "fs-extra": "^10.0.0",
33
33
  "joi": "^17.6.0",
@@ -39,5 +39,5 @@
39
39
  "detect-port": "^1.3.0",
40
40
  "jest": "^27.4.5"
41
41
  },
42
- "gitHead": "d8ea64b807f7852186cd4bf544193496fbb31e7c"
42
+ "gitHead": "ccda31a16ac6b606d34336fcc6db0b2aff15c32e"
43
43
  }