@abtnode/util 1.8.69-beta-54faead3 → 1.8.69-beta-76f8a46f

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.
@@ -18,7 +18,7 @@ const getDID = (address) => {
18
18
  return `did:abt:${address}`;
19
19
  };
20
20
 
21
- const update = async ({ services, didRegistryUrl, wallet }) => {
21
+ const update = async ({ services, didRegistryUrl, wallet, alsoKnownAs = [] }) => {
22
22
  debug('update did document', { didRegistryUrl });
23
23
 
24
24
  const did = getDID(wallet.address);
@@ -29,6 +29,7 @@ const update = async ({ services, didRegistryUrl, wallet }) => {
29
29
  id: did,
30
30
  controller: did,
31
31
  service: services,
32
+ alsoKnownAs,
32
33
  verificationMethod: [
33
34
  {
34
35
  id: `${did}#key-1`,
@@ -75,15 +76,15 @@ const getServerServices = ({ ips, wallet, domain }) => {
75
76
  return services;
76
77
  };
77
78
 
78
- const getBlockletServices = ({ blockletAppDid, daemonDidDomain, domain }) => {
79
+ const getBlockletServices = ({ appPid, daemonDidDomain, domain }) => {
79
80
  return [
80
81
  {
81
- id: getDID(blockletAppDid),
82
+ id: getDID(appPid),
82
83
  type: 'DNSRecords',
83
84
  records: [
84
85
  {
85
86
  type: 'CNAME',
86
- rr: encodeBase32(blockletAppDid),
87
+ rr: encodeBase32(appPid),
87
88
  value: daemonDidDomain,
88
89
  domain,
89
90
  },
@@ -103,10 +104,16 @@ const updateServerDocument = async ({ ips, wallet, didRegistryUrl, domain }) =>
103
104
  return updateWithRetry({ services, didRegistryUrl, wallet });
104
105
  };
105
106
 
106
- const updateBlockletDocument = async ({ wallet, didRegistryUrl, domain, daemonDidDomain, blockletAppDid }) => {
107
- const services = getBlockletServices({ blockletAppDid, daemonDidDomain, domain });
108
-
109
- return updateWithRetry({ services, didRegistryUrl, wallet });
107
+ const updateBlockletDocument = async ({
108
+ wallet,
109
+ didRegistryUrl,
110
+ domain,
111
+ daemonDidDomain,
112
+ appPid,
113
+ alsoKnownAs = [],
114
+ }) => {
115
+ const services = getBlockletServices({ appPid, daemonDidDomain, domain });
116
+ return updateWithRetry({ services, didRegistryUrl, alsoKnownAs, wallet });
110
117
  };
111
118
 
112
119
  const disableDNS = async ({ wallet, didRegistryUrl }) => updateWithRetry({ services: [], didRegistryUrl, wallet });
package/lib/run-script.js CHANGED
@@ -39,10 +39,11 @@ const wrapStream = (next, prefix, state) => {
39
39
  *
40
40
  * @param {string} script
41
41
  * @param {string} label
42
+ * @param {object} options
42
43
  * @param {object} options.env
43
44
  * @param {string} options.cwd
44
45
  * @param {number} options.timeout
45
- * @param {bool} options.silent
46
+ * @param {boolean} options.silent
46
47
  * @return {Promise}
47
48
  */
48
49
  const runScript = (script, label, options = {}) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.69-beta-54faead3",
6
+ "version": "1.8.69-beta-76f8a46f",
7
7
  "description": "ArcBlock's JavaScript utility",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,13 +18,13 @@
18
18
  "author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@abtnode/constant": "1.8.69-beta-54faead3",
22
- "@abtnode/logger": "1.8.69-beta-54faead3",
23
- "@arcblock/jwt": "^1.18.57",
24
- "@blocklet/constant": "1.8.69-beta-54faead3",
25
- "@ocap/mcrypto": "1.18.57",
26
- "@ocap/util": "1.18.57",
27
- "@ocap/wallet": "1.18.57",
21
+ "@abtnode/constant": "1.8.69-beta-76f8a46f",
22
+ "@abtnode/logger": "1.8.69-beta-76f8a46f",
23
+ "@arcblock/jwt": "^1.18.58",
24
+ "@blocklet/constant": "1.8.69-beta-76f8a46f",
25
+ "@ocap/mcrypto": "1.18.58",
26
+ "@ocap/util": "1.18.58",
27
+ "@ocap/wallet": "1.18.58",
28
28
  "archiver": "^5.3.1",
29
29
  "axios": "^0.27.2",
30
30
  "axios-mock-adapter": "^1.21.2",
@@ -70,5 +70,5 @@
70
70
  "jest": "^27.5.1",
71
71
  "unzipper": "^0.10.11"
72
72
  },
73
- "gitHead": "3dec0c85a77de5ba2d37c19ac769b126bfaafc86"
73
+ "gitHead": "07415e674443b85648ea80b734f7a3690abfc15e"
74
74
  }