tersign 0.1.4 → 0.1.6
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 +11 -11
- package/dist/canonical.d.ts +9 -2
- package/dist/canonical.js +26 -14
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://tersign
|
|
2
|
+
<a href="https://tersign.ai"><img src="https://raw.githubusercontent.com/tersignhq/.github/main/assets/banner.svg" alt="Tersign — the evidence layer for the agent economy" width="760"></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
No account. No API key. This is the genesis receipt, `seq 1` on the production chain:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
npx tersign verify 0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4 --ledger https://tersign
|
|
23
|
+
npx tersign verify 0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4 --ledger https://tersign.ai
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
```text
|
|
@@ -30,7 +30,7 @@ ledger: counter-signed OK (seller tersign-first, seq 1 …) VALID
|
|
|
30
30
|
`npx tersign verify <receipt.json | 0xdigest> [--ledger url]` recovers the EIP-712 signature **locally**, then checks the entry against the public chain — yours or anyone's. Prefer raw HTTP? The same proof, no CLI:
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
curl https://tersign
|
|
33
|
+
curl https://tersign.ai/v1/receipts/0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4/verify
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Chain of Custody
|
|
@@ -103,8 +103,8 @@ The agent skill `tersign-evidence` ships at [tersignhq/skills](https://github.co
|
|
|
103
103
|
|
|
104
104
|
## The Live Record
|
|
105
105
|
|
|
106
|
-
- **Ledger + dashboard** — public verify page: https://tersign
|
|
107
|
-
- **Census** — 1,500+ hash-chained observations across 1,000+ x402 seller endpoints, probed hourly and autonomously. Live counts: https://
|
|
106
|
+
- **Ledger + dashboard** — public verify page: https://tersign.ai/verify
|
|
107
|
+
- **Census** — 1,500+ hash-chained observations across 1,000+ x402 seller endpoints, probed hourly and autonomously. Live counts: https://prober.tersign.ai/v1/prober/stats
|
|
108
108
|
|
|
109
109
|
## Machine Surfaces
|
|
110
110
|
|
|
@@ -114,13 +114,13 @@ Full URLs, readable without auth. If you are an agent, start here.
|
|
|
114
114
|
|---|---|
|
|
115
115
|
| npm package | `tersign` — https://www.npmjs.com/package/tersign |
|
|
116
116
|
| MCP registry | `io.github.tersignhq/evidence` |
|
|
117
|
-
| ARD catalog (Agentic Resource Discovery) | https://tersign
|
|
118
|
-
| Verify API | `GET https://tersign
|
|
119
|
-
| Envelope API | `GET https://tersign
|
|
120
|
-
| Ledger stats | `GET https://tersign
|
|
121
|
-
| Ledger signer | `GET https://tersign
|
|
117
|
+
| ARD catalog (Agentic Resource Discovery) | https://tersign.ai/.well-known/ai-catalog.json |
|
|
118
|
+
| Verify API | `GET https://tersign.ai/v1/receipts/{digest}/verify` |
|
|
119
|
+
| Envelope API | `GET https://tersign.ai/v1/receipts/{digest}/envelope?venue={internet-court\|kleros\|uma\|generic}` |
|
|
120
|
+
| Ledger stats | `GET https://tersign.ai/v1/stats` |
|
|
121
|
+
| Ledger signer | `GET https://tersign.ai/v1/ledger` |
|
|
122
122
|
| llms.txt | https://raw.githubusercontent.com/tersignhq/tersign-js/main/llms.txt |
|
|
123
|
-
| Genesis verify | `npx tersign verify 0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4 --ledger https://tersign
|
|
123
|
+
| Genesis verify | `npx tersign verify 0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4 --ledger https://tersign.ai` |
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
package/dist/canonical.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
/** Deterministic JSON
|
|
2
|
-
*
|
|
1
|
+
/** Deterministic JSON — RFC 8785 (JCS) conformant for JSON-domain inputs: keys sorted by
|
|
2
|
+
* UTF-16 code units, no whitespace, JSON.stringify scalar/escape semantics. Arrays keep
|
|
3
|
+
* order; undefined properties are dropped (matches JSON.stringify semantics).
|
|
4
|
+
*
|
|
5
|
+
* The string is built directly, never via an object rebuild: JS engines hoist integer-like
|
|
6
|
+
* keys ("1","2","10") into numeric order on insertion, which silently defeats a
|
|
7
|
+
* sort-then-stringify round-trip (JCS orders them "1","10","2"). Byte-identical to the old
|
|
8
|
+
* serializer for every shape without integer-like or control-char keys — the genesis receipt
|
|
9
|
+
* digest and all pinned wire vectors are unchanged. */
|
|
3
10
|
export declare function canonicalStringify(value: unknown): string;
|
|
4
11
|
export declare function digestOf(value: unknown): `0x${string}`;
|
package/dist/canonical.js
CHANGED
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { keccak256, toBytes } from 'viem';
|
|
2
|
-
/** Deterministic JSON
|
|
3
|
-
*
|
|
2
|
+
/** Deterministic JSON — RFC 8785 (JCS) conformant for JSON-domain inputs: keys sorted by
|
|
3
|
+
* UTF-16 code units, no whitespace, JSON.stringify scalar/escape semantics. Arrays keep
|
|
4
|
+
* order; undefined properties are dropped (matches JSON.stringify semantics).
|
|
5
|
+
*
|
|
6
|
+
* The string is built directly, never via an object rebuild: JS engines hoist integer-like
|
|
7
|
+
* keys ("1","2","10") into numeric order on insertion, which silently defeats a
|
|
8
|
+
* sort-then-stringify round-trip (JCS orders them "1","10","2"). Byte-identical to the old
|
|
9
|
+
* serializer for every shape without integer-like or control-char keys — the genesis receipt
|
|
10
|
+
* digest and all pinned wire vectors are unchanged. */
|
|
4
11
|
export function canonicalStringify(value) {
|
|
5
|
-
return
|
|
12
|
+
return serialize(value);
|
|
6
13
|
}
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
10
|
-
if (value
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
function serialize(value) {
|
|
15
|
+
if (value === null)
|
|
16
|
+
return 'null';
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
return '[' + Array.from(value, (v) => serialize(v) ?? 'null').join(',') + ']';
|
|
19
|
+
}
|
|
20
|
+
if (typeof value === 'object') {
|
|
21
|
+
const obj = value;
|
|
22
|
+
const parts = [];
|
|
23
|
+
for (const key of Object.keys(obj).sort()) {
|
|
24
|
+
const s = serialize(obj[key]);
|
|
25
|
+
if (s !== undefined)
|
|
26
|
+
parts.push(JSON.stringify(key) + ':' + s);
|
|
16
27
|
}
|
|
17
|
-
return
|
|
28
|
+
return '{' + parts.join(',') + '}';
|
|
18
29
|
}
|
|
19
|
-
|
|
30
|
+
// string/number/boolean serialize per JCS; undefined/function/symbol yield undefined (dropped)
|
|
31
|
+
return JSON.stringify(value);
|
|
20
32
|
}
|
|
21
33
|
export function digestOf(value) {
|
|
22
34
|
return keccak256(toBytes(canonicalStringify(value)));
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare function envDeps(env?: Record<string, string | undefined>): McpDe
|
|
|
8
8
|
* every client; mcp.test.ts pins it against package.json so a release bump can't drift it. */
|
|
9
9
|
export declare const MCP_SERVER_IDENTITY: {
|
|
10
10
|
readonly name: "tersign";
|
|
11
|
-
readonly version: "0.1.
|
|
11
|
+
readonly version: "0.1.6";
|
|
12
12
|
};
|
|
13
13
|
export declare function buildServer(deps: McpDeps): McpServer;
|
package/dist/mcp/server.js
CHANGED
|
@@ -45,7 +45,7 @@ function json(value) {
|
|
|
45
45
|
}
|
|
46
46
|
/** MUST match package.json name/version — the MCP handshake self-reports this identity to
|
|
47
47
|
* every client; mcp.test.ts pins it against package.json so a release bump can't drift it. */
|
|
48
|
-
export const MCP_SERVER_IDENTITY = { name: 'tersign', version: '0.1.
|
|
48
|
+
export const MCP_SERVER_IDENTITY = { name: 'tersign', version: '0.1.6' };
|
|
49
49
|
export function buildServer(deps) {
|
|
50
50
|
const server = new McpServer(MCP_SERVER_IDENTITY);
|
|
51
51
|
server.registerTool('issue_receipt', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tersign",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Tersign \u2014 the evidence layer for the agent economy. Counter-signed receipts, agent action records, idempotency enforcement, refunds, disputes, and jury-ready evidence envelopes for x402/agent-commerce sellers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"type": "git",
|
|
46
46
|
"url": "git+https://github.com/tersignhq/tersign-js.git"
|
|
47
47
|
},
|
|
48
|
-
"homepage": "https://tersign
|
|
48
|
+
"homepage": "https://tersign.ai",
|
|
49
49
|
"keywords": [
|
|
50
50
|
"x402",
|
|
51
51
|
"agent-economy",
|