@indra.ai/deva.security 0.0.35 → 0.0.37

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/feature/methods.js +18 -7
  2. package/package.json +2 -2
@@ -61,13 +61,14 @@ export default {
61
61
  },
62
62
 
63
63
  /**************
64
- method: md5 hash
64
+ method: md5, sha256, sha512 hash
65
65
  params: packet
66
- describe: Return system md5 hash for the based deva.
66
+ describe: Return system md5, sha256, sha512 hash from value.
67
67
  ***************/
68
68
  hash(packet) {
69
69
  const transport = packet.id;
70
- this.feature('security');
70
+ this.zone('security', `hash:${transport}`);
71
+ this.feature('security', `hash:${transport}`);
71
72
  this.action('method', `hash:${transport}`);
72
73
 
73
74
  this.state('set', `meta:${transport}`); //set the meta state for the proxy
@@ -81,6 +82,8 @@ export default {
81
82
 
82
83
  this.state('set', `hash:${transport}`); //set the meta state for the proxy
83
84
  const hash = this.lib.hash(packet.q.text, algo);
85
+
86
+ this.state('return', `hash:${transport}`);
84
87
  return Promise.resolve(hash);
85
88
  },
86
89
 
@@ -102,8 +105,13 @@ export default {
102
105
  describe: Return system date for today.
103
106
  ***************/
104
107
  today(packet) {
105
- this.feature('security');
108
+ const transport = packet.id;
109
+ this.zone('security', `today:${transport}`);
110
+ this.feature('security', `today:${transport}`);
111
+ this.action('method', `today:${transport}`);
112
+ this.state('get', `today:${transport}`);
106
113
  const theDate = this.lib.formatDate(Date.now(), 'long', true);
114
+ this.state('get', `today:${transport}`);
107
115
  return Promise.resolve(theDate);
108
116
  },
109
117
  /**************
@@ -112,10 +120,13 @@ export default {
112
120
  describe: Return system date for today.
113
121
  ***************/
114
122
  time(packet) {
115
- this.feature('security');
116
- this.action('method', 'time')
117
- this.state('get', 'time')
123
+ const transport = packet.id;
124
+ this.zone('security', `time:${transport}`);
125
+ this.feature('security', `time:${transport}`);
126
+ this.action('method', `time:${transport}`);
127
+ this.state('get', `time:${transport}`);
118
128
  const theTime = Date.now();
129
+ this.state('return', `time:${transport}`);
119
130
  return Promise.resolve(theTime);
120
131
  },
121
132
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 6507120243760,
3
3
  "name": "@indra.ai/deva.security",
4
- "version": "0.0.35",
4
+ "version": "0.0.37",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://deva.space/devas/security",
30
30
  "dependencies": {
31
- "@indra.ai/deva": "^1.5.41"
31
+ "@indra.ai/deva": "^1.5.42"
32
32
  },
33
33
  "data": {
34
34
  "agent": {