@indra.ai/deva 1.6.22 → 1.6.24

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 +5 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -114,6 +114,7 @@ class LIB {
114
114
  }
115
115
 
116
116
  sign(packet, concerns) {
117
+ const time = Date.now();
117
118
  const {q, id} = packet;
118
119
 
119
120
  const {meta, agent, client, text} = q;
@@ -121,7 +122,7 @@ class LIB {
121
122
  const client_hash = this.hash(client, 'sha256');
122
123
 
123
124
  const {key, method, params} = meta;
124
- const opts = this.lib.copy(params); // copy the params and set as opts.
125
+ const opts = this.copy(params); // copy the params and set as opts.
125
126
 
126
127
  const transport = id.uid; // set the transport id from the packet id.
127
128
  const created = this.formatDate(time, 'long', true); // Formatted created date.
@@ -163,9 +164,9 @@ class LIB {
163
164
  created,
164
165
  copyright: client.copyright || agent.copyright,
165
166
  };
166
- data.md5 = this.lib.hash(data, 'md5'); // hash data packet into md5 and inert into data.
167
- data.sha256 = this.lib.hash(data, 'sha256'); // hash data into sha 256 then set in data.
168
- data.sha512 = this.lib.hash(data, 'sha512'); // hash data into sha 512 then set in data.
167
+ data.md5 = this.hash(data, 'md5'); // hash data packet into md5 and inert into data.
168
+ data.sha256 = this.hash(data, 'sha256'); // hash data into sha 256 then set in data.
169
+ data.sha512 = this.hash(data, 'sha512'); // hash data into sha 512 then set in data.
169
170
  return data;
170
171
  }
171
172
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 55286864875635310000,
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.6.22",
4
+ "version": "1.6.24",
5
5
  "description": "The Deva Core",
6
6
  "main": "index.js",
7
7
  "license": "VLA:15127963876514842820 LICENSE.md",