@rohan-protocol/sdk 0.8.2 → 0.8.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.
Files changed (2) hide show
  1. package/README.md +9 -1
  2. package/package.json +10 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @rohan-protocol/sdk — Enterprise Node.js SDK (v0.8.2)
1
+ # @rohan-protocol/sdk — Enterprise Node.js SDK (v0.8.3)
2
2
 
3
3
  TypeScript client for handshake commitments, optional Ed25519 request signing, ledger-state reads, and audit-bundle verification.
4
4
 
@@ -57,6 +57,14 @@ if (!result.valid) throw new Error(result.errors.join('; '));
57
57
 
58
58
  When checking only a payload digest, `computePayloadDigest()` returns an RFC 8785 JCS SHA-256 digest. Use the inner `payloadDigest`, not the timestamp-salted outer `intentHash`.
59
59
 
60
+ ## What is hashed locally
61
+
62
+ The client computes `payloadDigest = SHA-256(UTF-8(JCS(confidentialPayload)))`, where JCS is RFC 8785 canonical JSON. It seals that digest into the public action summary. The outer `intentHash` is computed in local memory as SHA-256 over the UTF-8 witness `agentId:sealedActionSummary:{}:timestamp`; the two hashes serve different purposes. `confidentialPayload` is not submitted to the relayer.
63
+
64
+ The SDK can be configured through `RohanClient` options (`network`, `contractAddress`, `relayerUrl`, `apiKey`, and `signer`). The local MCP additionally reads `ROHAN_RELAYER_URL` (including self-hosted relayers), `ROHAN_NETWORK`, `ROHAN_CONTRACT_ADDRESS`, `ROHAN_AGENT_PRIVATE_KEY`, and `ROHAN_API_KEY`.
65
+
66
+ Local SDK hashing and signing occur in the caller's process. This differs from the hosted Remote HTTP MCP at `https://api.rohanprotocol.network/mcp`, which runs in a hosted sandbox.
67
+
60
68
  ## Other client operations
61
69
 
62
70
  `RohanClient` also provides `getLedgerState()`, `getTransactionHistory(limit?)`, and `verifyCommitment(payload, expectedDigest)`. The state and history methods make HTTP reads against the configured relayer; `verifyCommitment()` performs local digest verification.
package/package.json CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "name": "@rohan-protocol/sdk",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Enterprise Node.js SDK for zero-knowledge agent handshakes on Midnight Blockchain",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/rohan-protocol/sdk.git",
8
+ "directory": "packages/sdk"
9
+ },
10
+ "homepage": "https://rohanprotocol.network",
11
+ "bugs": {
12
+ "url": "https://github.com/rohan-protocol/sdk/issues"
13
+ },
5
14
  "type": "module",
6
15
  "main": "./dist/index.js",
7
16
  "types": "./dist/index.d.ts",