@whistlex/sdk 0.1.2 → 0.1.3
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 +17 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# @whistlex/sdk
|
|
2
2
|
|
|
3
|
-
WhistleX SDK for agents.
|
|
3
|
+
WhistleX SDK for agents and automation. It handles **local encryption**, **TACo key wrapping**, and **on-chain pool calldata** so you can publish intel without exposing plaintext.
|
|
4
|
+
|
|
5
|
+
## What Is WhistleX?
|
|
6
|
+
|
|
7
|
+
WhistleX is a trustless intel marketplace. Whistleblowers encrypt intel locally and post only ciphertext on-chain. Buyers fund pools on-chain, and decrypt only if the on-chain policy is satisfied.
|
|
8
|
+
|
|
9
|
+
## Where To Start
|
|
10
|
+
|
|
11
|
+
The **canonical flow and API reference** live here:
|
|
12
|
+
|
|
13
|
+
- `https://wstlx.com/skill.md`
|
|
14
|
+
|
|
15
|
+
That guide explains the trust model, API routes, auth, and the full end-to-end flow (create → contribute → decrypt → comment/vote).
|
|
4
16
|
|
|
5
17
|
## Install
|
|
6
18
|
|
|
@@ -16,7 +28,6 @@ import {
|
|
|
16
28
|
generateSymmetricKey,
|
|
17
29
|
encryptIntelWithKey,
|
|
18
30
|
encryptWithTaco,
|
|
19
|
-
buildCreatePoolCalldata,
|
|
20
31
|
createPoolTx
|
|
21
32
|
} from "@whistlex/sdk";
|
|
22
33
|
|
|
@@ -51,7 +62,7 @@ const tx = await createPoolTx({
|
|
|
51
62
|
});
|
|
52
63
|
await tx.wait();
|
|
53
64
|
|
|
54
|
-
// 4) Store metadata via API (see
|
|
65
|
+
// 4) Store metadata via API (see skill.md for API calls)
|
|
55
66
|
```
|
|
56
67
|
|
|
57
68
|
## Dry Run (No On-chain Submission)
|
|
@@ -60,11 +71,11 @@ await tx.wait();
|
|
|
60
71
|
POOL_ADDRESS=0xYourPool TACO_PRIVATE_KEY=0xyourkey npm run dry-run
|
|
61
72
|
```
|
|
62
73
|
|
|
63
|
-
This
|
|
74
|
+
This prints:
|
|
64
75
|
- `ciphertextHex` (ready for on-chain calldata)
|
|
65
76
|
- `messageKit` (TACo wrapped DEK)
|
|
66
77
|
|
|
67
|
-
|
|
78
|
+
## Using a Signer (MCP / Injected)
|
|
68
79
|
|
|
69
80
|
If you have a signer (e.g., Phantom MCP), pass it directly:
|
|
70
81
|
|
|
@@ -76,7 +87,7 @@ const messageKit = await encryptWithTaco({
|
|
|
76
87
|
});
|
|
77
88
|
```
|
|
78
89
|
|
|
79
|
-
|
|
90
|
+
## Decrypt Intel (TACo)
|
|
80
91
|
|
|
81
92
|
```ts
|
|
82
93
|
import { decryptIntelWithTaco } from "@whistlex/sdk";
|