@saviours/check 0.1.0 → 0.1.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 +33 -24
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
# `@saviours/check`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@saviours/check)
|
|
4
|
+
|
|
5
|
+
Two-line counterparty check for wallets and agents.
|
|
6
|
+
Default path reads Sepolia ENS only — **$0**, no Saviours server.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @saviours/check
|
|
10
|
+
# npm i @saviours/check
|
|
11
|
+
```
|
|
4
12
|
|
|
5
13
|
```ts
|
|
6
|
-
import { check } from "@saviours/check";
|
|
14
|
+
import { check, guard } from "@saviours/check";
|
|
7
15
|
|
|
8
16
|
const r = await check("0x935bfb495e33f74d2e9735df1da66ace442ede48");
|
|
9
|
-
if (r.decision === "BLOCK") throw new Error("
|
|
17
|
+
if (r.decision === "BLOCK") throw new Error("named TAINTED");
|
|
18
|
+
|
|
19
|
+
await guard(addr); // throws SavioursBlockedError on BLOCK
|
|
10
20
|
```
|
|
11
21
|
|
|
12
22
|
| Mode | Path | Cost | Our server? |
|
|
13
23
|
|---|---|---|---|
|
|
14
24
|
| `ens` (default) | PermissionedResolver.text | $0 | No |
|
|
15
25
|
| `shield` | `POST /api/shield/check` | $0 | Gateway |
|
|
16
|
-
| `full` | `POST /api/investigate` |
|
|
26
|
+
| `full` | `POST /api/investigate` | USDC on miss | Gateway |
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
```ts
|
|
29
|
+
await check(addr, { mode: "shield" });
|
|
30
|
+
await check(addr, { mode: "full" });
|
|
31
|
+
```
|
|
21
32
|
|
|
22
|
-
|
|
33
|
+
Also: `castCommand(address)`, React helper `@saviours/check/react`.
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
pnpm add github:devhb1/Saviour#path:packages/check
|
|
26
|
-
# or
|
|
27
|
-
npm install github:devhb1/Saviour#path:packages/check
|
|
28
|
-
```
|
|
35
|
+
## Product law
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
- Memory hit is always **$0**.
|
|
38
|
+
- **UNKNOWN / no name ≠ SAFE.**
|
|
39
|
+
- Only WATCH / TAINTED are named.
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
## Links
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
- App: [www.saviours.xyz](https://www.saviours.xyz) · Build · Wallet gate
|
|
44
|
+
- Integrate guide: [docs/INTEGRATE.md](https://github.com/devhb1/Saviour/blob/main/docs/INTEGRATE.md)
|
|
45
|
+
- MCP: `https://saviour.bazgateway.com/mcp`
|
|
46
|
+
- OpenAPI: [openapi-saviours.json](https://www.saviours.xyz/openapi-saviours.json)
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
## Support
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
npm publish --access public
|
|
44
|
-
```
|
|
50
|
+
- Email: [b4harshit01@gmail.com](mailto:b4harshit01@gmail.com)
|
|
51
|
+
- Twitter: [@harshitb01](https://twitter.com/harshitb01)
|
|
52
|
+
- GitHub: [devhb1](https://github.com/devhb1) · [issues](https://github.com/devhb1/Saviour/issues)
|
|
45
53
|
|
|
46
54
|
## Smoke
|
|
47
55
|
|
|
@@ -50,4 +58,5 @@ node --input-type=module -e "
|
|
|
50
58
|
import { check } from '@saviours/check';
|
|
51
59
|
console.log(await check('0x935bfb495e33f74d2e9735df1da66ace442ede48'));
|
|
52
60
|
"
|
|
61
|
+
# → decision BLOCK · status TAINTED
|
|
53
62
|
```
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saviours/check",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Two-line counterparty check — ENS first, optional Shield/investigate gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author":
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Harshit Bainsla",
|
|
9
|
+
"email": "b4harshit01@gmail.com",
|
|
10
|
+
"url": "https://github.com/devhb1"
|
|
11
|
+
},
|
|
8
12
|
"homepage": "https://www.saviours.xyz",
|
|
9
13
|
"repository": {
|
|
10
14
|
"type": "git",
|
|
@@ -12,7 +16,8 @@
|
|
|
12
16
|
"directory": "packages/check"
|
|
13
17
|
},
|
|
14
18
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/devhb1/Saviour/issues"
|
|
19
|
+
"url": "https://github.com/devhb1/Saviour/issues",
|
|
20
|
+
"email": "b4harshit01@gmail.com"
|
|
16
21
|
},
|
|
17
22
|
"keywords": [
|
|
18
23
|
"ethereum",
|