@indra.ai/deva 1.6.21 → 1.6.23

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/index.js +6 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -121,7 +121,7 @@ class LIB {
121
121
  const client_hash = this.hash(client, 'sha256');
122
122
 
123
123
  const {key, method, params} = meta;
124
- const opts = this.lib.copy(params); // copy the params and set as opts.
124
+ const opts = this.copy(params); // copy the params and set as opts.
125
125
 
126
126
  const transport = id.uid; // set the transport id from the packet id.
127
127
  const created = this.formatDate(time, 'long', true); // Formatted created date.
@@ -132,7 +132,8 @@ class LIB {
132
132
  const packet_hash = this.hash(packet, 'sha256');
133
133
  const laws_hash = this.hash(agent.laws || client.laws, 'sha256');
134
134
  const token = this.hash(`${key} client:${client.profile.id} fullname:${client.profile.fullname} transport:${transport}`, 'sha256');
135
-
135
+
136
+ // build the main data packet.
136
137
  const data = {
137
138
  id,
138
139
  key,
@@ -162,9 +163,9 @@ class LIB {
162
163
  created,
163
164
  copyright: client.copyright || agent.copyright,
164
165
  };
165
- data.md5 = this.lib.hash(data, 'md5'); // hash data packet into md5 and inert into data.
166
- data.sha256 = this.lib.hash(data, 'sha256'); // hash data into sha 256 then set in data.
167
- data.sha512 = this.lib.hash(data, 'sha512'); // hash data into sha 512 then set in data.
166
+ data.md5 = this.hash(data, 'md5'); // hash data packet into md5 and inert into data.
167
+ data.sha256 = this.hash(data, 'sha256'); // hash data into sha 256 then set in data.
168
+ data.sha512 = this.hash(data, 'sha512'); // hash data into sha 512 then set in data.
168
169
  return data;
169
170
  }
170
171
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 55286864875635310000,
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.6.21",
4
+ "version": "1.6.23",
5
5
  "description": "The Deva Core",
6
6
  "main": "index.js",
7
7
  "license": "VLA:15127963876514842820 LICENSE.md",