tersign 0.1.6 → 0.1.8

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 CHANGED
@@ -104,7 +104,9 @@ The agent skill `tersign-evidence` ships at [tersignhq/skills](https://github.co
104
104
  ## The Live Record
105
105
 
106
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
107
+ - **Census** — 2,500+ hash-chained observations across 1,100+ x402 seller endpoints, probed hourly and autonomously. Live counts: https://prober.tersign.ai/v1/prober/stats
108
+ - **Conformance** — RFC 8785 (JCS) canonical serialization, keccak256 digests, byte-level cross-implementation vectors published in-repo. Reproduce the bytes and your implementation is conformant — in any language.
109
+ - **Standards** — the `compliance-fields` extension (optional tax/audit records composing with offer-receipt) is proposed upstream: [x402-foundation/x402#2853](https://github.com/x402-foundation/x402/pull/2853)
108
110
 
109
111
  ## Machine Surfaces
110
112
 
@@ -120,6 +122,8 @@ Full URLs, readable without auth. If you are an agent, start here.
120
122
  | Ledger stats | `GET https://tersign.ai/v1/stats` |
121
123
  | Ledger signer | `GET https://tersign.ai/v1/ledger` |
122
124
  | llms.txt | https://raw.githubusercontent.com/tersignhq/tersign-js/main/llms.txt |
125
+ | Conformance vectors (RFC 8785 + keccak256) | https://github.com/tersignhq/tersign-js/blob/main/test/fixtures/canonical-vectors.json |
126
+ | Sample compliance record + digests | https://github.com/tersignhq/tersign-js/blob/main/test/fixtures/compliance-record.json |
123
127
  | Genesis verify | `npx tersign verify 0xe5874f1ffe87f0a6dd9eb157730f67b86ee4538b125fe30fcc4e165213dd3fc4 --ledger https://tersign.ai` |
124
128
 
125
129
  ---
@@ -1,7 +1,10 @@
1
1
  import type { Account } from 'viem/accounts';
2
2
  import type { Adjustment, ComplianceRecordV1, SignedComplianceRecord, SignedReceipt, VerifyLike } from './types.js';
3
+ /** Canonical domain per the compliance-fields extension spec (x402-foundation/x402#2853).
4
+ * Migrated from the vendor domain 'tersign compliance-record' on 2026-07-14 while ZERO
5
+ * production compliance records existed — a free change then, a breaking wire change after. */
3
6
  export declare const COMPLIANCE_DOMAIN: {
4
- readonly name: "tersign compliance-record";
7
+ readonly name: "compliance-fields";
5
8
  readonly version: "1";
6
9
  readonly chainId: 1n;
7
10
  };
@@ -20,6 +23,10 @@ export declare const COMPLIANCE_TYPES: {
20
23
  readonly type: "uint256";
21
24
  }];
22
25
  };
26
+ /** Pinned digest of the compliance-attestation EIP-712 material (like DISPUTE_WIRE_VECTOR).
27
+ * No cross-impl twin yet — the ledger does not re-declare this domain — but the pin catches
28
+ * accidental drift; any change is a breaking protocol change (frozen wire format). */
29
+ export declare const COMPLIANCE_WIRE_VECTOR: `0x${string}`;
23
30
  export interface IssuerConfig {
24
31
  name: string;
25
32
  jurisdiction: string;
@@ -1,6 +1,9 @@
1
1
  import { recoverTypedDataAddress } from 'viem';
2
2
  import { digestOf } from '../canonical.js';
3
- export const COMPLIANCE_DOMAIN = { name: 'tersign compliance-record', version: '1', chainId: 1n };
3
+ /** Canonical domain per the compliance-fields extension spec (x402-foundation/x402#2853).
4
+ * Migrated from the vendor domain 'tersign compliance-record' on 2026-07-14 while ZERO
5
+ * production compliance records existed — a free change then, a breaking wire change after. */
6
+ export const COMPLIANCE_DOMAIN = { name: 'compliance-fields', version: '1', chainId: 1n };
4
7
  export const COMPLIANCE_TYPES = {
5
8
  ComplianceAttestation: [
6
9
  { name: 'version', type: 'uint256' },
@@ -9,6 +12,13 @@ export const COMPLIANCE_TYPES = {
9
12
  { name: 'issuedAt', type: 'uint256' },
10
13
  ],
11
14
  };
15
+ /** Pinned digest of the compliance-attestation EIP-712 material (like DISPUTE_WIRE_VECTOR).
16
+ * No cross-impl twin yet — the ledger does not re-declare this domain — but the pin catches
17
+ * accidental drift; any change is a breaking protocol change (frozen wire format). */
18
+ export const COMPLIANCE_WIRE_VECTOR = digestOf({
19
+ domain: { ...COMPLIANCE_DOMAIN, chainId: 1 },
20
+ types: COMPLIANCE_TYPES,
21
+ });
12
22
  /** MINIMAL tier ≈ EU VAT Art 226b simplified-invoice content — legally sufficient for
13
23
  * sub-€100 supplies EU-wide, and the default for machine-to-machine micro-receipts. */
14
24
  export function buildMinimalRecord(issuer, input) {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from './types.js';
2
2
  export { canonicalStringify, digestOf } from './canonical.js';
3
3
  export { RECEIPT_DOMAIN, RECEIPT_TYPES, OFFER_DOMAIN, OFFER_TYPES, signReceipt, signOffer, verifyReceipt, type VerifyResult, } from './receipt/eip712.js';
4
- export { COMPLIANCE_DOMAIN, COMPLIANCE_TYPES, buildMinimalRecord, recordDigest, signComplianceRecord, verifyComplianceRecord, type IssuerConfig, type MinimalRecordInput, } from './compliance/record.js';
4
+ export { COMPLIANCE_DOMAIN, COMPLIANCE_TYPES, COMPLIANCE_WIRE_VECTOR, buildMinimalRecord, recordDigest, signComplianceRecord, verifyComplianceRecord, type IssuerConfig, type MinimalRecordInput, } from './compliance/record.js';
5
5
  export { MemoryIdempotencyStore, checkIdempotency, extractPaymentId, fingerprint, REPLAY_HEADER, type IdempotencyStore, type IdempotencyOutcome, type IdempotencyOptions, type CachedResponse, type FingerprintParts, } from './idempotency/middleware.js';
6
6
  export { D1IdempotencyStore, D1_IDEMPOTENCY_DDL, type D1Like } from './idempotency/d1.js';
7
7
  export type { DisputeReason, DisputeVerdict, DisputeStatus, DisputePayloadV1, CriterionV1, AcceptanceCriteriaV1, EvidenceArtifactRef, EvidencePayloadV1, DisputeAttestationPayload, EvidenceAttestationPayload, CriteriaAttestationPayload, SignedDispute, SignedEvidence, SignedCriteria, } from './dispute/types.js';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from './types.js';
2
2
  export { canonicalStringify, digestOf } from './canonical.js';
3
3
  export { RECEIPT_DOMAIN, RECEIPT_TYPES, OFFER_DOMAIN, OFFER_TYPES, signReceipt, signOffer, verifyReceipt, } from './receipt/eip712.js';
4
- export { COMPLIANCE_DOMAIN, COMPLIANCE_TYPES, buildMinimalRecord, recordDigest, signComplianceRecord, verifyComplianceRecord, } from './compliance/record.js';
4
+ export { COMPLIANCE_DOMAIN, COMPLIANCE_TYPES, COMPLIANCE_WIRE_VECTOR, buildMinimalRecord, recordDigest, signComplianceRecord, verifyComplianceRecord, } from './compliance/record.js';
5
5
  export { MemoryIdempotencyStore, checkIdempotency, extractPaymentId, fingerprint, REPLAY_HEADER, } from './idempotency/middleware.js';
6
6
  export { D1IdempotencyStore, D1_IDEMPOTENCY_DDL } from './idempotency/d1.js';
7
7
  export { DISPUTE_DOMAIN, EVIDENCE_DOMAIN, CRITERIA_DOMAIN, DISPUTE_TYPES, EVIDENCE_TYPES, CRITERIA_TYPES, DISPUTE_WIRE_VECTOR, disputeDigest, evidenceDigest, criteriaDigest, signDispute, verifyDispute, signEvidence, verifyEvidence, signCriteria, verifyCriteria, } from './dispute/sign.js';
@@ -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.6";
11
+ readonly version: "0.1.8";
12
12
  };
13
13
  export declare function buildServer(deps: McpDeps): McpServer;
@@ -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.6' };
48
+ export const MCP_SERVER_IDENTITY = { name: 'tersign', version: '0.1.8' };
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.6",
3
+ "version": "0.1.8",
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",
@@ -49,14 +49,20 @@
49
49
  "keywords": [
50
50
  "x402",
51
51
  "agent-economy",
52
+ "agentic-commerce",
52
53
  "evidence",
53
54
  "receipts",
54
55
  "eip-712",
56
+ "rfc-8785",
57
+ "hash-chain",
55
58
  "compliance",
59
+ "eu-ai-act",
60
+ "audit-trail",
56
61
  "disputes",
62
+ "refunds",
63
+ "idempotency",
57
64
  "ai-agents",
58
- "mcp",
59
- "audit-trail"
65
+ "mcp"
60
66
  ],
61
67
  "mcpName": "io.github.tersignhq/evidence"
62
68
  }