@blocklet/sdk 1.16.0-beta-ad6df3ae → 1.16.0-beta-7a7d5d97

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.
@@ -14,6 +14,10 @@ declare const getAuthenticatorProps: (options?: {}) => {
14
14
  }>;
15
15
  delegator: () => WalletObject<string>;
16
16
  delegation: () => string;
17
- chainInfo: () => Record<string, string>;
17
+ chainInfo: () => {
18
+ type: "arcblock" | "ethereum" | "solona";
19
+ id: string;
20
+ host: string;
21
+ };
18
22
  };
19
23
  export { getDelegation, getDelegator, getDelegatee, getAuthenticatorProps };
package/lib/env.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import env from '@blocklet/env';
2
+ export = env;
package/lib/env.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const env_1 = __importDefault(require("@blocklet/env"));
6
+ module.exports = env_1.default;
@@ -37,10 +37,13 @@ const send_notification_1 = require("../util/send-notification");
37
37
  const constants_1 = require("../util/constants");
38
38
  const wallet_1 = __importDefault(require("../wallet"));
39
39
  const notification_1 = require("../validators/notification");
40
- const getSender = () => ({
41
- appDid: process.env.BLOCKLET_APP_ID,
42
- appSk: process.env.BLOCKLET_APP_SK,
43
- });
40
+ const getSender = () => {
41
+ const wallet = (0, wallet_1.default)();
42
+ return {
43
+ appDid: wallet.address,
44
+ appSk: wallet.secretKey,
45
+ };
46
+ };
44
47
  /**
45
48
  *
46
49
  * @param {Notification} notification
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.0-beta-ad6df3ae",
6
+ "version": "1.16.0-beta-7a7d5d97",
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",
@@ -26,15 +26,15 @@
26
26
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@abtnode/client": "1.16.0-beta-ad6df3ae",
30
- "@abtnode/constant": "1.16.0-beta-ad6df3ae",
29
+ "@abtnode/client": "1.16.0-beta-7a7d5d97",
30
+ "@abtnode/constant": "1.16.0-beta-7a7d5d97",
31
31
  "@arcblock/did": "1.18.64",
32
32
  "@arcblock/did-auth": "1.18.64",
33
33
  "@arcblock/jwt": "1.18.64",
34
34
  "@arcblock/ws": "1.18.64",
35
- "@blocklet/constant": "1.16.0-beta-ad6df3ae",
36
- "@blocklet/env": "1.16.0-beta-ad6df3ae",
37
- "@blocklet/meta": "1.16.0-beta-ad6df3ae",
35
+ "@blocklet/constant": "1.16.0-beta-7a7d5d97",
36
+ "@blocklet/env": "1.16.0-beta-7a7d5d97",
37
+ "@blocklet/meta": "1.16.0-beta-7a7d5d97",
38
38
  "@did-connect/authenticator": "^2.1.46",
39
39
  "@did-connect/handler": "^2.1.46",
40
40
  "@nedb/core": "^2.1.5",
@@ -72,5 +72,5 @@
72
72
  "ts-node": "^10.9.1",
73
73
  "typescript": "^4.8.4"
74
74
  },
75
- "gitHead": "8fa60176a00400cd412b308df3c7d6dcd9af2db1"
75
+ "gitHead": "c25ddcc371454b2e2f7038aa5e64c7b7c27763cb"
76
76
  }