@blocklet/sdk 1.16.42-beta-20250413-121549-22e9a196 → 1.16.42-beta-20250415-224346-080ee735

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 (2) hide show
  1. package/lib/service/auth.js +7 -0
  2. package/package.json +15 -15
@@ -117,6 +117,10 @@ class AuthService {
117
117
  'getTrustedDomains',
118
118
  'clearCache',
119
119
  'getVault',
120
+ // access key
121
+ 'createAccessKey',
122
+ 'verifyAccessKey',
123
+ 'getAccessKeys',
120
124
  ];
121
125
  const teamDid = process.env.BLOCKLET_DID;
122
126
  const apiFallback = (fn) => (params = {}, ...args) => fn({ input: { ...params, teamDid }, ...args });
@@ -148,6 +152,9 @@ class AuthService {
148
152
  deletePermission: (fn) => (name) => fn({ input: { name, teamDid } }),
149
153
  hasPermission: (fn) => (role, permission) => fn({ input: { teamDid, role, permission } }),
150
154
  getBlocklet: (fn) => (attachRuntimeInfo = false) => fn({ input: { did: teamDid, attachRuntimeInfo } }, { ignoreFields: ['blocklet.settings.navigations', 'blocklet.settings.theme'] }),
155
+ createAccessKey: (fn) => (params) => fn({ input: { teamDid, authType: 'simple', createdVia: 'sdk', passport: 'guest', ...params } }),
156
+ verifyAccessKey: (fn) => (params) => fn({ input: { teamDid, ...params } }),
157
+ getAccessKeys: (fn) => (params) => fn({ input: { teamDid, ...params } }),
151
158
  };
152
159
  apiList.forEach((api) => {
153
160
  const fn = client[api];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.42-beta-20250413-121549-22e9a196",
6
+ "version": "1.16.42-beta-20250415-224346-080ee735",
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,22 +27,22 @@
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.42-beta-20250413-121549-22e9a196",
31
- "@abtnode/constant": "1.16.42-beta-20250413-121549-22e9a196",
32
- "@abtnode/util": "1.16.42-beta-20250413-121549-22e9a196",
33
- "@arcblock/did": "1.19.19",
34
- "@arcblock/did-auth": "1.19.19",
35
- "@arcblock/jwt": "1.19.19",
36
- "@arcblock/ws": "1.19.19",
37
- "@blocklet/constant": "1.16.42-beta-20250413-121549-22e9a196",
38
- "@blocklet/env": "1.16.42-beta-20250413-121549-22e9a196",
39
- "@blocklet/meta": "1.16.42-beta-20250413-121549-22e9a196",
30
+ "@abtnode/client": "1.16.42-beta-20250415-224346-080ee735",
31
+ "@abtnode/constant": "1.16.42-beta-20250415-224346-080ee735",
32
+ "@abtnode/util": "1.16.42-beta-20250415-224346-080ee735",
33
+ "@arcblock/did": "1.19.20",
34
+ "@arcblock/did-auth": "1.19.20",
35
+ "@arcblock/jwt": "1.19.20",
36
+ "@arcblock/ws": "1.19.20",
37
+ "@blocklet/constant": "1.16.42-beta-20250415-224346-080ee735",
38
+ "@blocklet/env": "1.16.42-beta-20250415-224346-080ee735",
39
+ "@blocklet/meta": "1.16.42-beta-20250415-224346-080ee735",
40
40
  "@did-connect/authenticator": "^2.2.7",
41
41
  "@did-connect/handler": "^2.2.7",
42
42
  "@nedb/core": "^2.1.5",
43
- "@ocap/mcrypto": "1.19.19",
44
- "@ocap/util": "1.19.19",
45
- "@ocap/wallet": "1.19.19",
43
+ "@ocap/mcrypto": "1.19.20",
44
+ "@ocap/util": "1.19.20",
45
+ "@ocap/wallet": "1.19.20",
46
46
  "axios": "^1.7.9",
47
47
  "cheerio": "1.0.0-rc.12",
48
48
  "debug": "^4.3.7",
@@ -82,5 +82,5 @@
82
82
  "ts-node": "^10.9.1",
83
83
  "typescript": "^5.6.3"
84
84
  },
85
- "gitHead": "00ff6ee0d86ea1938965c69a973fd08ec1769f08"
85
+ "gitHead": "12f194b33fffb20ceb2dbe5fc348fb14053ac8c9"
86
86
  }