tersign 0.1.7 → 0.1.9
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 +2 -0
- package/dist/compliance/record.d.ts +8 -1
- package/dist/compliance/record.js +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,3 +135,5 @@ Full URLs, readable without auth. If you are an agent, start here.
|
|
|
135
135
|
<p align="center"><sub>MIT · built and published from <a href="https://github.com/tersignhq/tersign-js">tersignhq/tersign-js</a> via trusted-publishing CI, provenance attested · <code>tersign</code> reserved on PyPI</sub></p>
|
|
136
136
|
|
|
137
137
|
<p align="center"><sub><b>Venues rotate. The transcript endures.</b></sub></p>
|
|
138
|
+
|
|
139
|
+
- Evidence-record conformance suite (two-sided vectors: independence, completeness, existence, phase): https://github.com/tersignhq/evidence-record-conformance
|
|
@@ -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: "
|
|
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
|
-
|
|
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';
|
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.9";
|
|
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.9' };
|
|
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.9",
|
|
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",
|