@synthient/synthient 1.0.0 → 1.0.1
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.
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/models.ts +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ yarn add @synthient/synthient
|
|
|
23
23
|
To use the client, you need to initialize it with your API key. Optionally, you can set a default timeout and proxy configuration.
|
|
24
24
|
|
|
25
25
|
```javascript
|
|
26
|
-
const { Client } = require('synthient');
|
|
26
|
+
const { Client } = require('@synthient/synthient');
|
|
27
27
|
|
|
28
28
|
const apiKey = 'your-private-key-here';
|
|
29
29
|
const client = new Client(apiKey, 5000, 'proxy-host', 8000);
|
|
@@ -100,7 +100,7 @@ The library includes utility functions for verifying tokens and determining acti
|
|
|
100
100
|
Verify the validity of a token.
|
|
101
101
|
|
|
102
102
|
```javascript
|
|
103
|
-
const { verifyToken } = require('synthient');
|
|
103
|
+
const { verifyToken } = require('@synthient/synthient');
|
|
104
104
|
|
|
105
105
|
const isValid = verifyToken(lookupResponse, TokenType.METRICS);
|
|
106
106
|
console.log('Token is valid:', isValid);
|
|
@@ -111,7 +111,7 @@ console.log('Token is valid:', isValid);
|
|
|
111
111
|
Determine the action to take based on the lookup response and risk level.
|
|
112
112
|
|
|
113
113
|
```javascript
|
|
114
|
-
const { determineAction, TokenType, ActionType } = require('synthient');
|
|
114
|
+
const { determineAction, TokenType, ActionType } = require('@synthient/synthient');
|
|
115
115
|
|
|
116
116
|
const action = determineAction(lookupResponse, TokenType.METRICS);
|
|
117
117
|
console.log('Action to take:', ActionType[action]);
|
package/package.json
CHANGED