dero-mcp-server 0.2.2 → 0.4.0
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/POSITIONING.md +94 -0
- package/README.md +125 -24
- package/SKILL.md +264 -0
- package/data/docs-index.json +264 -260
- package/dist/bn254.d.ts +74 -0
- package/dist/bn254.d.ts.map +1 -0
- package/dist/bn254.js +205 -0
- package/dist/bn254.js.map +1 -0
- package/dist/citations.d.ts +70 -0
- package/dist/citations.d.ts.map +1 -1
- package/dist/citations.js +161 -1
- package/dist/citations.js.map +1 -1
- package/dist/composites/_shared.d.ts +1 -1
- package/dist/composites/_shared.js +1 -1
- package/dist/composites/audit-chain-artifact-claim.d.ts +128 -0
- package/dist/composites/audit-chain-artifact-claim.d.ts.map +1 -0
- package/dist/composites/audit-chain-artifact-claim.js +305 -0
- package/dist/composites/audit-chain-artifact-claim.js.map +1 -0
- package/dist/composites/diagnose-chain-health.d.ts +1 -1
- package/dist/composites/diagnose-chain-health.js +1 -1
- package/dist/composites/estimate-deploy-cost.d.ts +1 -1
- package/dist/composites/estimate-deploy-cost.js +1 -1
- package/dist/composites/explain-smart-contract.d.ts +1 -1
- package/dist/composites/explain-smart-contract.js +1 -1
- package/dist/composites/forge-demo-proof.d.ts +81 -0
- package/dist/composites/forge-demo-proof.d.ts.map +1 -0
- package/dist/composites/forge-demo-proof.js +204 -0
- package/dist/composites/forge-demo-proof.js.map +1 -0
- package/dist/composites/recommend-docs-path.d.ts +1 -1
- package/dist/composites/recommend-docs-path.js +1 -1
- package/dist/composites/trace-transaction-with-context.d.ts +1 -1
- package/dist/composites/trace-transaction-with-context.js +1 -1
- package/dist/daemon-base.d.ts +28 -0
- package/dist/daemon-base.d.ts.map +1 -0
- package/dist/daemon-base.js +62 -0
- package/dist/daemon-base.js.map +1 -0
- package/dist/dero-curve.d.ts +79 -0
- package/dist/dero-curve.d.ts.map +1 -0
- package/dist/dero-curve.js +79 -0
- package/dist/dero-curve.js.map +1 -0
- package/dist/docs-parse.d.ts.map +1 -1
- package/dist/docs-parse.js +18 -2
- package/dist/docs-parse.js.map +1 -1
- package/dist/http-server.d.ts +37 -0
- package/dist/http-server.d.ts.map +1 -0
- package/dist/http-server.js +132 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.js +18 -11
- package/dist/index.js.map +1 -1
- package/dist/proof-decode.d.ts +125 -0
- package/dist/proof-decode.d.ts.map +1 -0
- package/dist/proof-decode.js +619 -0
- package/dist/proof-decode.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +89 -11
- package/dist/server.js.map +1 -1
- package/dist/tool-descriptions.d.ts +3 -0
- package/dist/tool-descriptions.d.ts.map +1 -1
- package/dist/tool-descriptions.js +39 -0
- package/dist/tool-descriptions.js.map +1 -1
- package/dist/tx-parse.d.ts +63 -0
- package/dist/tx-parse.d.ts.map +1 -0
- package/dist/tx-parse.js +183 -0
- package/dist/tx-parse.js.map +1 -0
- package/package.json +23 -2
package/dist/bn254.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin wrapper around `@noble/curves` bn254 G1 for the FORGE feature.
|
|
3
|
+
*
|
|
4
|
+
* Two responsibilities:
|
|
5
|
+
* 1. Expose DERO's custom Pedersen base point `G` (not the standard bn254
|
|
6
|
+
* generator). See [src/dero-curve.ts](./dero-curve.ts) for the source.
|
|
7
|
+
* 2. Compress/decompress points in **DERO format** (big-endian X + 1 sign
|
|
8
|
+
* byte), not the SEC1 format noble uses natively.
|
|
9
|
+
*
|
|
10
|
+
* Compression format mirrors `derohe/cryptography/bn256/changes.go:19-35`:
|
|
11
|
+
* bytes[0..32] = X big-endian
|
|
12
|
+
* bytes[32] = 0x01 if Y is the larger of the two square roots of x^3 + 3
|
|
13
|
+
* mod P (i.e. Y > P - Y), else 0x00.
|
|
14
|
+
*
|
|
15
|
+
* Scalar handling mirrors `proof.go:89` — DERO casts `uint64 → int64` before
|
|
16
|
+
* passing to `big.Int.SetInt64`, so the uint64 wraparound `18446744073709451616`
|
|
17
|
+
* becomes scalar `-100000`. `scalarMult` accepts arbitrary signed bigints and
|
|
18
|
+
* reduces mod the curve order before multiplication.
|
|
19
|
+
*/
|
|
20
|
+
declare const Point: import("@noble/curves/abstract/weierstrass.js").WeierstrassPointCons<bigint>;
|
|
21
|
+
export type DeroPoint = InstanceType<typeof Point>;
|
|
22
|
+
/**
|
|
23
|
+
* Decompress a 33-byte DERO point. Throws on malformed input or x not on curve.
|
|
24
|
+
*
|
|
25
|
+
* Logic mirrors `Decompress` in `cryptography/bn256/changes.go:215-241`:
|
|
26
|
+
* compute both square roots of x^3 + 3 mod P, then pick smaller/larger based
|
|
27
|
+
* on the sign byte.
|
|
28
|
+
*/
|
|
29
|
+
export declare function deroDecompress(bytes: Uint8Array): DeroPoint;
|
|
30
|
+
/**
|
|
31
|
+
* Compress a point to DERO 33-byte format.
|
|
32
|
+
*
|
|
33
|
+
* Mirrors `Compress` in `cryptography/bn256/changes.go:19-35`:
|
|
34
|
+
* sign = 0 if Y < P - Y, else 1.
|
|
35
|
+
*/
|
|
36
|
+
export declare function deroCompress(point: DeroPoint): Uint8Array;
|
|
37
|
+
/** Convenience: hex string round-trip. */
|
|
38
|
+
export declare function deroDecompressHex(hex: string): DeroPoint;
|
|
39
|
+
/** Convenience: returns lowercase hex of the 33-byte compressed form. */
|
|
40
|
+
export declare function deroCompressHex(point: DeroPoint): string;
|
|
41
|
+
/** DERO's Pedersen base point G (custom — not the standard bn254 generator). */
|
|
42
|
+
export declare const G: DeroPoint;
|
|
43
|
+
/**
|
|
44
|
+
* Scalar multiplication mirroring `proof.go:89`.
|
|
45
|
+
*
|
|
46
|
+
* DERO casts `uint64 → int64 → big.Int` before multiplying, so the uint64
|
|
47
|
+
* wraparound `2^64 - n` for small `n` becomes the negative scalar `-n`. We
|
|
48
|
+
* accept arbitrary signed bigints here and reduce mod the curve order before
|
|
49
|
+
* delegating to noble.
|
|
50
|
+
*/
|
|
51
|
+
export declare function scalarMult(point: DeroPoint, scalar: bigint): DeroPoint;
|
|
52
|
+
/**
|
|
53
|
+
* Treat `value` as a Go `uint64`, mimic `big.Int.SetInt64(int64(value))`, and
|
|
54
|
+
* return the resulting signed scalar reduced mod the curve order.
|
|
55
|
+
*
|
|
56
|
+
* For the cited 2022 proof's V = 18446743853709551435, this returns the
|
|
57
|
+
* curve-order reduction of -220000000181 — the same scalar `proof.Prove()` uses.
|
|
58
|
+
*/
|
|
59
|
+
export declare function uint64ToSignedScalar(uintValue: bigint): bigint;
|
|
60
|
+
export declare function add(a: DeroPoint, b: DeroPoint): DeroPoint;
|
|
61
|
+
export declare function subtract(a: DeroPoint, b: DeroPoint): DeroPoint;
|
|
62
|
+
export declare function negate(point: DeroPoint): DeroPoint;
|
|
63
|
+
export declare function pointsEqual(a: DeroPoint, b: DeroPoint): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Re-derive each fixture from scalar operations and compare against the
|
|
66
|
+
* compressed bytes printed by the Go scratch program. Throws on any mismatch.
|
|
67
|
+
*
|
|
68
|
+
* This is the cross-implementation correctness gate — if the wiring is wrong
|
|
69
|
+
* (custom G missing, SEC1 vs DERO compression confused, sqrt root inversion),
|
|
70
|
+
* one of the six fixtures will fail and forging anything else is unsafe.
|
|
71
|
+
*/
|
|
72
|
+
export declare function verifyDeroBn254(): void;
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=bn254.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bn254.d.ts","sourceRoot":"","sources":["../src/bn254.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAYH,QAAA,MAAM,KAAK,8EAAiB,CAAA;AAG5B,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC,CAAA;AA8ClD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA4B3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAOzD;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAExD;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAMD,gFAAgF;AAChF,eAAO,MAAM,CAAC,EAAE,SAAoD,CAAA;AAEpE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAMtE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,SAAS,CAEzD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,SAAS,CAE9D;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAElD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAE/D;AAMD;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,IAAI,CA0BtC"}
|
package/dist/bn254.js
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin wrapper around `@noble/curves` bn254 G1 for the FORGE feature.
|
|
3
|
+
*
|
|
4
|
+
* Two responsibilities:
|
|
5
|
+
* 1. Expose DERO's custom Pedersen base point `G` (not the standard bn254
|
|
6
|
+
* generator). See [src/dero-curve.ts](./dero-curve.ts) for the source.
|
|
7
|
+
* 2. Compress/decompress points in **DERO format** (big-endian X + 1 sign
|
|
8
|
+
* byte), not the SEC1 format noble uses natively.
|
|
9
|
+
*
|
|
10
|
+
* Compression format mirrors `derohe/cryptography/bn256/changes.go:19-35`:
|
|
11
|
+
* bytes[0..32] = X big-endian
|
|
12
|
+
* bytes[32] = 0x01 if Y is the larger of the two square roots of x^3 + 3
|
|
13
|
+
* mod P (i.e. Y > P - Y), else 0x00.
|
|
14
|
+
*
|
|
15
|
+
* Scalar handling mirrors `proof.go:89` — DERO casts `uint64 → int64` before
|
|
16
|
+
* passing to `big.Int.SetInt64`, so the uint64 wraparound `18446744073709451616`
|
|
17
|
+
* becomes scalar `-100000`. `scalarMult` accepts arbitrary signed bigints and
|
|
18
|
+
* reduces mod the curve order before multiplication.
|
|
19
|
+
*/
|
|
20
|
+
import { bn254 } from '@noble/curves/bn254.js';
|
|
21
|
+
import { BN254_B, BN254_P, BN254_R, CURVE_FIXTURES, DERO_G_COMPRESSED_HEX, } from './dero-curve.js';
|
|
22
|
+
const Point = bn254.G1.Point;
|
|
23
|
+
const Fp = bn254.G1.Point.Fp;
|
|
24
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
25
|
+
// Hex / bytes helpers (private — proof-decode.ts has its own copies).
|
|
26
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
27
|
+
function hexToBytes(hex) {
|
|
28
|
+
if (hex.length % 2 !== 0)
|
|
29
|
+
throw new Error(`hex: odd length ${hex.length}`);
|
|
30
|
+
const out = new Uint8Array(hex.length / 2);
|
|
31
|
+
for (let i = 0; i < out.length; i++) {
|
|
32
|
+
const b = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
|
|
33
|
+
if (Number.isNaN(b))
|
|
34
|
+
throw new Error(`hex: invalid byte "${hex.slice(i * 2, i * 2 + 2)}"`);
|
|
35
|
+
out[i] = b;
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
function bytesToHex(bytes) {
|
|
40
|
+
let hex = '';
|
|
41
|
+
for (const b of bytes)
|
|
42
|
+
hex += b.toString(16).padStart(2, '0');
|
|
43
|
+
return hex;
|
|
44
|
+
}
|
|
45
|
+
function bigIntToBE32(value) {
|
|
46
|
+
if (value < 0n || value >= 1n << 256n) {
|
|
47
|
+
throw new Error(`bigIntToBE32: out of range ${value}`);
|
|
48
|
+
}
|
|
49
|
+
const out = new Uint8Array(32);
|
|
50
|
+
let v = value;
|
|
51
|
+
for (let i = 31; i >= 0; i--) {
|
|
52
|
+
out[i] = Number(v & 0xffn);
|
|
53
|
+
v >>= 8n;
|
|
54
|
+
}
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function be32ToBigInt(bytes, offset = 0) {
|
|
58
|
+
let v = 0n;
|
|
59
|
+
for (let i = 0; i < 32; i++)
|
|
60
|
+
v = (v << 8n) | BigInt(bytes[offset + i]);
|
|
61
|
+
return v;
|
|
62
|
+
}
|
|
63
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
64
|
+
// DERO-format compress / decompress
|
|
65
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
66
|
+
/**
|
|
67
|
+
* Decompress a 33-byte DERO point. Throws on malformed input or x not on curve.
|
|
68
|
+
*
|
|
69
|
+
* Logic mirrors `Decompress` in `cryptography/bn256/changes.go:215-241`:
|
|
70
|
+
* compute both square roots of x^3 + 3 mod P, then pick smaller/larger based
|
|
71
|
+
* on the sign byte.
|
|
72
|
+
*/
|
|
73
|
+
export function deroDecompress(bytes) {
|
|
74
|
+
if (bytes.length !== 33) {
|
|
75
|
+
throw new Error(`deroDecompress: expected 33 bytes, got ${bytes.length}`);
|
|
76
|
+
}
|
|
77
|
+
const sign = bytes[32];
|
|
78
|
+
if (sign !== 0 && sign !== 1) {
|
|
79
|
+
throw new Error(`deroDecompress: invalid sign byte 0x${sign.toString(16).padStart(2, '0')}`);
|
|
80
|
+
}
|
|
81
|
+
const x = be32ToBigInt(bytes, 0);
|
|
82
|
+
if (x >= BN254_P)
|
|
83
|
+
throw new Error(`deroDecompress: x >= P`);
|
|
84
|
+
// rhs = x^3 + B mod P, computed in the field.
|
|
85
|
+
const xF = Fp.create(x);
|
|
86
|
+
const x3 = Fp.mul(Fp.mul(xF, xF), xF);
|
|
87
|
+
const rhs = Fp.add(x3, Fp.create(BN254_B));
|
|
88
|
+
const y1 = Fp.sqrt(rhs);
|
|
89
|
+
if (y1 === undefined)
|
|
90
|
+
throw new Error('deroDecompress: x not on curve (no sqrt)');
|
|
91
|
+
const y2 = Fp.neg(y1);
|
|
92
|
+
// Confirm we actually got a square root (defensive — Fp.sqrt may return any root).
|
|
93
|
+
if (Fp.mul(y1, y1) !== rhs)
|
|
94
|
+
throw new Error('deroDecompress: sqrt verification failed');
|
|
95
|
+
const smaller = y1 < y2 ? y1 : y2;
|
|
96
|
+
const larger = y1 < y2 ? y2 : y1;
|
|
97
|
+
const y = sign === 0 ? smaller : larger;
|
|
98
|
+
return Point.fromAffine({ x: xF, y });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Compress a point to DERO 33-byte format.
|
|
102
|
+
*
|
|
103
|
+
* Mirrors `Compress` in `cryptography/bn256/changes.go:19-35`:
|
|
104
|
+
* sign = 0 if Y < P - Y, else 1.
|
|
105
|
+
*/
|
|
106
|
+
export function deroCompress(point) {
|
|
107
|
+
const { x, y } = point.toAffine();
|
|
108
|
+
const out = new Uint8Array(33);
|
|
109
|
+
out.set(bigIntToBE32(x), 0);
|
|
110
|
+
const negY = (BN254_P - y) % BN254_P;
|
|
111
|
+
out[32] = y < negY ? 0 : 1;
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
/** Convenience: hex string round-trip. */
|
|
115
|
+
export function deroDecompressHex(hex) {
|
|
116
|
+
return deroDecompress(hexToBytes(hex));
|
|
117
|
+
}
|
|
118
|
+
/** Convenience: returns lowercase hex of the 33-byte compressed form. */
|
|
119
|
+
export function deroCompressHex(point) {
|
|
120
|
+
return bytesToHex(deroCompress(point));
|
|
121
|
+
}
|
|
122
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
123
|
+
// Point operations
|
|
124
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
125
|
+
/** DERO's Pedersen base point G (custom — not the standard bn254 generator). */
|
|
126
|
+
export const G = deroDecompressHex(DERO_G_COMPRESSED_HEX);
|
|
127
|
+
/**
|
|
128
|
+
* Scalar multiplication mirroring `proof.go:89`.
|
|
129
|
+
*
|
|
130
|
+
* DERO casts `uint64 → int64 → big.Int` before multiplying, so the uint64
|
|
131
|
+
* wraparound `2^64 - n` for small `n` becomes the negative scalar `-n`. We
|
|
132
|
+
* accept arbitrary signed bigints here and reduce mod the curve order before
|
|
133
|
+
* delegating to noble.
|
|
134
|
+
*/
|
|
135
|
+
export function scalarMult(point, scalar) {
|
|
136
|
+
const r = BN254_R;
|
|
137
|
+
let s = scalar % r;
|
|
138
|
+
if (s < 0n)
|
|
139
|
+
s += r;
|
|
140
|
+
if (s === 0n)
|
|
141
|
+
return Point.ZERO;
|
|
142
|
+
return point.multiply(s);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Treat `value` as a Go `uint64`, mimic `big.Int.SetInt64(int64(value))`, and
|
|
146
|
+
* return the resulting signed scalar reduced mod the curve order.
|
|
147
|
+
*
|
|
148
|
+
* For the cited 2022 proof's V = 18446743853709551435, this returns the
|
|
149
|
+
* curve-order reduction of -220000000181 — the same scalar `proof.Prove()` uses.
|
|
150
|
+
*/
|
|
151
|
+
export function uint64ToSignedScalar(uintValue) {
|
|
152
|
+
if (uintValue < 0n || uintValue >= 1n << 64n) {
|
|
153
|
+
throw new Error(`uint64ToSignedScalar: out of uint64 range ${uintValue}`);
|
|
154
|
+
}
|
|
155
|
+
return uintValue >= 1n << 63n ? uintValue - (1n << 64n) : uintValue;
|
|
156
|
+
}
|
|
157
|
+
export function add(a, b) {
|
|
158
|
+
return a.add(b);
|
|
159
|
+
}
|
|
160
|
+
export function subtract(a, b) {
|
|
161
|
+
return a.subtract(b);
|
|
162
|
+
}
|
|
163
|
+
export function negate(point) {
|
|
164
|
+
return point.negate();
|
|
165
|
+
}
|
|
166
|
+
export function pointsEqual(a, b) {
|
|
167
|
+
return a.equals(b);
|
|
168
|
+
}
|
|
169
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
170
|
+
// Self-test against the Go-extracted fixtures.
|
|
171
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
172
|
+
/**
|
|
173
|
+
* Re-derive each fixture from scalar operations and compare against the
|
|
174
|
+
* compressed bytes printed by the Go scratch program. Throws on any mismatch.
|
|
175
|
+
*
|
|
176
|
+
* This is the cross-implementation correctness gate — if the wiring is wrong
|
|
177
|
+
* (custom G missing, SEC1 vs DERO compression confused, sqrt root inversion),
|
|
178
|
+
* one of the six fixtures will fail and forging anything else is unsafe.
|
|
179
|
+
*/
|
|
180
|
+
export function verifyDeroBn254() {
|
|
181
|
+
const checks = [
|
|
182
|
+
['G', CURVE_FIXTURES.G, G],
|
|
183
|
+
['2G', CURVE_FIXTURES.twoG, G.double()],
|
|
184
|
+
['3G', CURVE_FIXTURES.threeG, G.double().add(G)],
|
|
185
|
+
['-G', CURVE_FIXTURES.negG, G.negate()],
|
|
186
|
+
['G*100000', CURVE_FIXTURES.gMul1Dero, scalarMult(G, 100000n)],
|
|
187
|
+
[
|
|
188
|
+
'G*int64(uint_wrap)',
|
|
189
|
+
CURVE_FIXTURES.gMulNeg1DeroAtoms,
|
|
190
|
+
scalarMult(G, uint64ToSignedScalar(18446744073709451616n)),
|
|
191
|
+
],
|
|
192
|
+
[
|
|
193
|
+
'G*int64(cited2022V)',
|
|
194
|
+
CURVE_FIXTURES.gMulCited2022V,
|
|
195
|
+
scalarMult(G, uint64ToSignedScalar(18446743853709551435n)),
|
|
196
|
+
],
|
|
197
|
+
];
|
|
198
|
+
for (const [label, expectedHex, point] of checks) {
|
|
199
|
+
const actualHex = deroCompressHex(point);
|
|
200
|
+
if (actualHex !== expectedHex) {
|
|
201
|
+
throw new Error(`verifyDeroBn254: ${label} mismatch\n expected: ${expectedHex}\n actual: ${actualHex}`);
|
|
202
|
+
}
|
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AOG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAuC;QACjD,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QACvC,CAAC,IAAI,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QACvC,CAAC,UAAU,EAAE,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,EAAE,OAAQ,CAAC,CAAC;QAC/D;YACE,oBAAoB;YACpB,cAAc,CAAC,iBAAiB;YAChC,UAAU,CAAC,CAAC,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;SAC3D;QACD;YACE,qBAAqB;YACrB,cAAc,CAAC,cAAc;YAC7B,UAAU,CAAC,CAAC,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;SAC3D;KACF,CAAA;IACD,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QACjD,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;QACxC,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CACb,oBAAoB,KAAK,0BAA0B,WAAW,iBAAiB,SAAS,EAAE,CAC3F,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/citations.d.ts
CHANGED
|
@@ -66,5 +66,75 @@ export declare const RELATED_DOCS_BY_TOOL: Record<string, readonly RelatedDocsEn
|
|
|
66
66
|
* return { ...rpcResult, ...(related_docs ? { related_docs } : {}) }
|
|
67
67
|
*/
|
|
68
68
|
export declare function relatedDocsFor(toolName: string): DeroCitation[] | undefined;
|
|
69
|
+
export type FlaggedArtifactMatcher = {
|
|
70
|
+
kind: 'topoheight';
|
|
71
|
+
value: number;
|
|
72
|
+
} | {
|
|
73
|
+
kind: 'block_hash';
|
|
74
|
+
value: string;
|
|
75
|
+
} | {
|
|
76
|
+
kind: 'tx_hash';
|
|
77
|
+
value: string;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'proof_string';
|
|
80
|
+
value: string;
|
|
81
|
+
};
|
|
82
|
+
export type FlaggedArtifact = {
|
|
83
|
+
/** Stable human-readable id for logs and downstream tooling. */
|
|
84
|
+
id: string;
|
|
85
|
+
matchers: readonly FlaggedArtifactMatcher[];
|
|
86
|
+
/** Short factual statement appended to responses that match this artifact. */
|
|
87
|
+
context_note: string;
|
|
88
|
+
related_docs: readonly RelatedDocsEntry[];
|
|
89
|
+
/**
|
|
90
|
+
* The most rebuttal-relevant signed-DERO amount for `dero_forge_demo_proof`
|
|
91
|
+
* to use when `audit_chain_artifact_claim` is called with
|
|
92
|
+
* `include_forge_demo: true` and this artifact matches. For the 2022 claim
|
|
93
|
+
* this is the report's headline amount — forging the same display number
|
|
94
|
+
* for a non-receiver ring slot is the most direct demonstration that the
|
|
95
|
+
* pasted string is a display object, not a consensus statement.
|
|
96
|
+
*/
|
|
97
|
+
demo_amount_dero?: string;
|
|
98
|
+
};
|
|
99
|
+
export declare const FLAGGED_CHAIN_ARTIFACTS: readonly FlaggedArtifact[];
|
|
100
|
+
/**
|
|
101
|
+
* Input shape passed by tool handlers. Optional fields let each tool pass
|
|
102
|
+
* only the inputs it actually has (e.g. dero_get_block_header_by_topo_height
|
|
103
|
+
* only knows about topoheight; dero_get_transaction only knows about
|
|
104
|
+
* tx_hashes). String comparisons are case-insensitive on hex values.
|
|
105
|
+
*/
|
|
106
|
+
export type FlaggedArtifactQuery = {
|
|
107
|
+
topoheight?: number;
|
|
108
|
+
block_hash?: string;
|
|
109
|
+
tx_hash?: string;
|
|
110
|
+
tx_hashes?: readonly string[];
|
|
111
|
+
proof_string?: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Return all flagged artifacts whose matchers fire against the given inputs.
|
|
115
|
+
*
|
|
116
|
+
* Multiple matches return multiple artifacts (rare today; would happen if the
|
|
117
|
+
* same TX got cited in multiple false claims). Tool handlers should merge all
|
|
118
|
+
* matches into a single response.
|
|
119
|
+
*/
|
|
120
|
+
export declare function flaggedArtifactsForInput(query: FlaggedArtifactQuery): FlaggedArtifact[];
|
|
121
|
+
/**
|
|
122
|
+
* Build the response-side enrichment for matched artifacts: a context note
|
|
123
|
+
* (joined if multiple match) plus prepended citations for each match.
|
|
124
|
+
*
|
|
125
|
+
* `baseRelatedDocs` is the tool's existing relatedDocsFor() output (or undefined).
|
|
126
|
+
* Returns `undefined` when no artifacts match — caller should noop in that case.
|
|
127
|
+
*
|
|
128
|
+
* Usage in a tool handler:
|
|
129
|
+
* const enrichment = enrichWithFlaggedArtifacts(
|
|
130
|
+
* { topoheight: args.topoheight },
|
|
131
|
+
* relatedDocsFor('dero_get_block_header_by_topo_height'),
|
|
132
|
+
* )
|
|
133
|
+
* return { ...result, ...(enrichment ?? {}) }
|
|
134
|
+
*/
|
|
135
|
+
export declare function enrichWithFlaggedArtifacts(query: FlaggedArtifactQuery, baseRelatedDocs: DeroCitation[] | undefined): {
|
|
136
|
+
context_note: string;
|
|
137
|
+
related_docs: DeroCitation[];
|
|
138
|
+
} | undefined;
|
|
69
139
|
export {};
|
|
70
140
|
//# sourceMappingURL=citations.d.ts.map
|
package/dist/citations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../src/citations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEpE,MAAM,MAAM,YAAY,GAAG;IACzB,0FAA0F;IAC1F,MAAM,EAAE,WAAW,CAAA;IAC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,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,SAAS,sBAAsB,EAAE,CAAA;IAC3C,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACzC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAqCpD,CAAA;AAEV;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAOD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,oBAAoB,GAC1B,eAAe,EAAE,CAyBnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,oBAAoB,EAC3B,eAAe,EAAE,YAAY,EAAE,GAAG,SAAS,GAC1C;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,YAAY,EAAE,CAAA;CAAE,GAAG,SAAS,CA2BpE"}
|
package/dist/citations.js
CHANGED
|
@@ -23,7 +23,10 @@ function buildCanonicalUrl(product, slug) {
|
|
|
23
23
|
const trimmed = slug.replace(/^\/+|\/+$/g, '');
|
|
24
24
|
if (!trimmed)
|
|
25
25
|
return `${DOC_BASE_URLS[product]}/`;
|
|
26
|
-
|
|
26
|
+
// .md mirror suffix points agents at the LLM-canonical Markdown surface.
|
|
27
|
+
// All four ecosystem sites (derod, tela, hologram, deropay) now ship the
|
|
28
|
+
// App Router .md mirror route, so the suffix applies universally.
|
|
29
|
+
return `${DOC_BASE_URLS[product]}/${trimmed}.md`;
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* Build a DeroCitation pointing at one bundled docs page.
|
|
@@ -115,6 +118,47 @@ export const RELATED_DOCS_BY_TOOL = {
|
|
|
115
118
|
title: "DVM-BASIC: DERO's Smart Contract Language Guide | DERO Blockchain",
|
|
116
119
|
},
|
|
117
120
|
],
|
|
121
|
+
dero_decode_proof_string: [
|
|
122
|
+
{
|
|
123
|
+
product: 'derod',
|
|
124
|
+
slug: 'integrity/payload-vs-transaction-proofs',
|
|
125
|
+
title: 'Proof Types Explained: Transaction vs. Payload Proofs | DERO Blockchain',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
product: 'derod',
|
|
129
|
+
slug: 'integrity/negative-transfer-protection',
|
|
130
|
+
title: 'Negative Transfer Protection: Cryptographic Impossibility | DERO Blockchain',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
audit_chain_artifact_claim: [
|
|
134
|
+
{
|
|
135
|
+
product: 'derod',
|
|
136
|
+
slug: 'integrity/payload-vs-transaction-proofs',
|
|
137
|
+
title: 'Proof Types Explained: Transaction vs. Payload Proofs | DERO Blockchain',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
product: 'derod',
|
|
141
|
+
slug: 'integrity/negative-transfer-protection',
|
|
142
|
+
title: 'Negative Transfer Protection: Cryptographic Impossibility | DERO Blockchain',
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
dero_forge_demo_proof: [
|
|
146
|
+
{
|
|
147
|
+
product: 'derod',
|
|
148
|
+
slug: 'integrity/payload-vs-transaction-proofs',
|
|
149
|
+
title: 'Proof Types Explained: Transaction vs. Payload Proofs | DERO Blockchain',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
product: 'derod',
|
|
153
|
+
slug: 'integrity/negative-transfer-protection',
|
|
154
|
+
title: 'Negative Transfer Protection: Cryptographic Impossibility | DERO Blockchain',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
product: 'derod',
|
|
158
|
+
slug: 'integrity/range-proof-integrity',
|
|
159
|
+
title: "Range Proof Integrity: How DERO's Bulletproof Binds Amounts | DERO Blockchain",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
118
162
|
// Composite #2 (`explain_smart_contract`) curates all four DVM docs so its
|
|
119
163
|
// heuristic can elevate whichever page best matches the detected surface
|
|
120
164
|
// (token / registry / minimal / generic). The composite re-orders this
|
|
@@ -159,4 +203,120 @@ export function relatedDocsFor(toolName) {
|
|
|
159
203
|
return undefined;
|
|
160
204
|
return entries.map((entry) => buildDeroCitation(entry.product, entry.slug, entry.title));
|
|
161
205
|
}
|
|
206
|
+
export const FLAGGED_CHAIN_ARTIFACTS = [
|
|
207
|
+
{
|
|
208
|
+
id: '2022-inflation-claim',
|
|
209
|
+
matchers: [
|
|
210
|
+
{ kind: 'topoheight', value: 1_081_893 },
|
|
211
|
+
{ kind: 'block_hash', value: 'b6bd914f7fb1c79788fe8676c277e58e7bb5a904317afb096b1d2793af9aed13' },
|
|
212
|
+
{ kind: 'tx_hash', value: '5bbe1b7eecfe3447cb045b1197a07a214b456968eda8a3d5a90f5fae9ce57e55' },
|
|
213
|
+
{
|
|
214
|
+
kind: 'proof_string',
|
|
215
|
+
value: 'deroproof1qyyj0cgu3htmkumr79sgca75vwsx8kx7zkrjg0nfez46w36qyx4kwq9zvfyyskpqvdpcfhkhk4m7y9d77ehyj7yhnnrv9z0tjr9m5fqe2yx9t27dwtdxy4j4r0llll7vcmaxwjcl8jzfq',
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
context_note: 'This block/transaction/proof string appears in publicly circulated 2022 inflation claims. The cited payload proof is a user-supplied display object — not a consensus record — and the alleged negative-transfer mechanism cannot produce a verifying range proof. See related_docs for the technical rebuttal.',
|
|
219
|
+
demo_amount_dero: '-2200000.00181',
|
|
220
|
+
// TODO: once `integrity/inflation-claim` ships and the bundled docs index
|
|
221
|
+
// refreshes, prepend it as the primary citation:
|
|
222
|
+
// { product: 'derod', slug: 'integrity/inflation-claim', title: '<exact bundled title>' }
|
|
223
|
+
related_docs: [
|
|
224
|
+
{
|
|
225
|
+
product: 'derod',
|
|
226
|
+
slug: 'integrity/negative-transfer-protection',
|
|
227
|
+
title: 'Negative Transfer Protection: Cryptographic Impossibility | DERO Blockchain',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
product: 'derod',
|
|
231
|
+
slug: 'integrity/payload-vs-transaction-proofs',
|
|
232
|
+
title: 'Proof Types Explained: Transaction vs. Payload Proofs | DERO Blockchain',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
product: 'derod',
|
|
236
|
+
slug: 'integrity/ring-member-behavior',
|
|
237
|
+
title: 'Ring Member Behavior: Understanding Decoy Participation | DERO Blockchain',
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
/** Normalize a hex value for case-insensitive comparison. Non-hex strings pass through unchanged. */
|
|
243
|
+
function normalizeHex(value) {
|
|
244
|
+
return value.trim().toLowerCase();
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Return all flagged artifacts whose matchers fire against the given inputs.
|
|
248
|
+
*
|
|
249
|
+
* Multiple matches return multiple artifacts (rare today; would happen if the
|
|
250
|
+
* same TX got cited in multiple false claims). Tool handlers should merge all
|
|
251
|
+
* matches into a single response.
|
|
252
|
+
*/
|
|
253
|
+
export function flaggedArtifactsForInput(query) {
|
|
254
|
+
const matches = [];
|
|
255
|
+
const queryBlockHash = query.block_hash ? normalizeHex(query.block_hash) : undefined;
|
|
256
|
+
const queryTxHashes = [];
|
|
257
|
+
if (query.tx_hash)
|
|
258
|
+
queryTxHashes.push(normalizeHex(query.tx_hash));
|
|
259
|
+
if (query.tx_hashes)
|
|
260
|
+
for (const h of query.tx_hashes)
|
|
261
|
+
queryTxHashes.push(normalizeHex(h));
|
|
262
|
+
const queryProof = query.proof_string?.trim();
|
|
263
|
+
for (const artifact of FLAGGED_CHAIN_ARTIFACTS) {
|
|
264
|
+
const hit = artifact.matchers.some((m) => {
|
|
265
|
+
switch (m.kind) {
|
|
266
|
+
case 'topoheight':
|
|
267
|
+
return query.topoheight !== undefined && query.topoheight === m.value;
|
|
268
|
+
case 'block_hash':
|
|
269
|
+
return queryBlockHash !== undefined && queryBlockHash === normalizeHex(m.value);
|
|
270
|
+
case 'tx_hash':
|
|
271
|
+
return queryTxHashes.includes(normalizeHex(m.value));
|
|
272
|
+
case 'proof_string':
|
|
273
|
+
return queryProof !== undefined && queryProof === m.value;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
if (hit)
|
|
277
|
+
matches.push(artifact);
|
|
278
|
+
}
|
|
279
|
+
return matches;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Build the response-side enrichment for matched artifacts: a context note
|
|
283
|
+
* (joined if multiple match) plus prepended citations for each match.
|
|
284
|
+
*
|
|
285
|
+
* `baseRelatedDocs` is the tool's existing relatedDocsFor() output (or undefined).
|
|
286
|
+
* Returns `undefined` when no artifacts match — caller should noop in that case.
|
|
287
|
+
*
|
|
288
|
+
* Usage in a tool handler:
|
|
289
|
+
* const enrichment = enrichWithFlaggedArtifacts(
|
|
290
|
+
* { topoheight: args.topoheight },
|
|
291
|
+
* relatedDocsFor('dero_get_block_header_by_topo_height'),
|
|
292
|
+
* )
|
|
293
|
+
* return { ...result, ...(enrichment ?? {}) }
|
|
294
|
+
*/
|
|
295
|
+
export function enrichWithFlaggedArtifacts(query, baseRelatedDocs) {
|
|
296
|
+
const matches = flaggedArtifactsForInput(query);
|
|
297
|
+
if (matches.length === 0)
|
|
298
|
+
return undefined;
|
|
299
|
+
const context_note = matches.map((a) => a.context_note).join('\n\n');
|
|
300
|
+
// Prepend artifact citations (de-duped against baseline by canonical_url).
|
|
301
|
+
const seen = new Set();
|
|
302
|
+
const merged = [];
|
|
303
|
+
for (const artifact of matches) {
|
|
304
|
+
for (const entry of artifact.related_docs) {
|
|
305
|
+
const cite = buildDeroCitation(entry.product, entry.slug, entry.title);
|
|
306
|
+
if (!seen.has(cite.canonical_url)) {
|
|
307
|
+
merged.push(cite);
|
|
308
|
+
seen.add(cite.canonical_url);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
if (baseRelatedDocs) {
|
|
313
|
+
for (const cite of baseRelatedDocs) {
|
|
314
|
+
if (!seen.has(cite.canonical_url)) {
|
|
315
|
+
merged.push(cite);
|
|
316
|
+
seen.add(cite.canonical_url);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return { context_note, related_docs: merged };
|
|
321
|
+
}
|
|
162
322
|
//# sourceMappingURL=citations.js.map
|
package/dist/citations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../src/citations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAuB,MAAM,iBAAiB,CAAA;AAapE,SAAS,iBAAiB,CAAC,OAAuB,EAAE,IAAY;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAA;IACjD,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../src/citations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE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1C,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;YACtE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACjB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,eAAe,EAAE,CAAC;QACpB,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACjB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,CAAA;AAC/C,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* helpers (e.g. narrative builders specific to one composite's response
|
|
11
11
|
* shape) should live next to that composite, not in this file.
|
|
12
12
|
*
|
|
13
|
-
* See
|
|
13
|
+
* See the composite design contract for which
|
|
14
14
|
* utilities live here and the gate every composite must satisfy before it
|
|
15
15
|
* lands on main.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* helpers (e.g. narrative builders specific to one composite's response
|
|
11
11
|
* shape) should live next to that composite, not in this file.
|
|
12
12
|
*
|
|
13
|
-
* See
|
|
13
|
+
* See the composite design contract for which
|
|
14
14
|
* utilities live here and the gate every composite must satisfy before it
|
|
15
15
|
* lands on main.
|
|
16
16
|
*/
|