@blocklet/sdk 1.6.15 → 1.6.16

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.
Files changed (3) hide show
  1. package/README.md +4 -7
  2. package/lib/env.js +4 -7
  3. package/package.json +9 -9
package/README.md CHANGED
@@ -276,8 +276,9 @@ const { Database } = require('@blocklet/sdk');
276
276
  ```javascript
277
277
  const { getWallet } = require('@blocklet/sdk');
278
278
 
279
- // blocklet wallet is an instance of @ocap/wallet
280
- const blockletWallet = getWallet();
279
+ // wallet is an instance of @ocap/wallet const { wallet } = env;
280
+ const wallet = getWallet();
281
+ const { address, secretKey, publicKey } = wallet;
281
282
  ```
282
283
 
283
284
  ## env
@@ -287,11 +288,7 @@ const blockletWallet = getWallet();
287
288
  ```javascript
288
289
  const { env } = require('@blocklet/sdk');
289
290
 
290
- const { name, description, isComponent, dataDir, cacheDir } = env;
291
-
292
- // wallet is an instance of @ocap/wallet
293
- const { wallet } = env;
294
- const { address, secretKey, publicKey } = wallet;
291
+ const { appId, appName, appDescription, appUrl, isComponent, dataDir, cacheDir } = env;
295
292
  ```
296
293
 
297
294
  ## middlewares
package/lib/env.js CHANGED
@@ -1,11 +1,8 @@
1
- const getWallet = require('./wallet');
2
-
3
- const hasSK = !!process.env.BLOCKLET_APP_SK;
4
-
5
1
  module.exports = {
6
- wallet: hasSK ? getWallet() : null,
7
- name: process.env.BLOCKLET_APP_NAME,
8
- description: process.env.BLOCKLET_APP_DESCRIPTION,
2
+ appId: process.env.BLOCKLET_APP_ID,
3
+ appName: process.env.BLOCKLET_APP_NAME,
4
+ appDescription: process.env.BLOCKLET_APP_DESCRIPTION,
5
+ appUrl: process.env.BLOCKLET_APP_URL,
9
6
  isComponent: process.env.BLOCKLET_DID !== process.env.BLOCKLET_REAL_DID,
10
7
  dataDir: process.env.BLOCKLET_DATA_DIR,
11
8
  cacheDir: process.env.BLOCKLET_CACHE_DIR,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.15",
6
+ "version": "1.6.16",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,14 +19,14 @@
19
19
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@abtnode/client": "1.6.15",
23
- "@abtnode/constant": "1.6.15",
24
- "@arcblock/did-auth": "^1.13.84",
25
- "@arcblock/jwt": "^1.13.84",
26
- "@blocklet/meta": "1.6.15",
22
+ "@abtnode/client": "1.6.16",
23
+ "@abtnode/constant": "1.6.16",
24
+ "@arcblock/did-auth": "^1.14.3",
25
+ "@arcblock/jwt": "^1.14.3",
26
+ "@blocklet/meta": "1.6.16",
27
27
  "@nedb/core": "^1.2.2",
28
- "@ocap/mcrypto": "^1.13.84",
29
- "@ocap/wallet": "^1.13.84",
28
+ "@ocap/mcrypto": "^1.14.3",
29
+ "@ocap/wallet": "^1.14.3",
30
30
  "axios": "^0.21.4",
31
31
  "fs-extra": "^10.0.0",
32
32
  "joi": "^17.5.0",
@@ -38,5 +38,5 @@
38
38
  "detect-port": "^1.3.0",
39
39
  "jest": "^27.4.5"
40
40
  },
41
- "gitHead": "1b7b07da04387b1daa838b251a9388355009142d"
41
+ "gitHead": "69b08db16aeb75ce23b0e6bb5b9fa396adba2d4b"
42
42
  }