@adastracomputing/ink 0.1.0-alpha.0 → 0.1.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -8,6 +8,22 @@ here. Pre-1.0 releases follow `0.Y.Z` semantics, see
8
8
 
9
9
  No unreleased changes.
10
10
 
11
+ ## 0.1.0-alpha.1, spec clarification
12
+
13
+ Spec-only release. Reference-implementation code in `src/` is
14
+ unchanged from `0.1.0-alpha.0`; the bundled spec text is updated.
15
+
16
+ ### Spec changes
17
+
18
+ - `specs/ink-auditability.md` now pins the canonical
19
+ inclusion-receipt signature format: `ink/audit-inclusion/v1\n` +
20
+ JCS(`{eventId, leafIndex, treeSize, rootHash, timestamp}`).
21
+ Previously the spec described the signature as "over (eventId +
22
+ treeSize + rootHash + timestamp)" without specifying a separator
23
+ or encoding, which caused interop drift between implementations.
24
+ No code change in this package; downstream witness and verifier
25
+ implementations should align with the canonical format.
26
+
11
27
  ## 0.1.0-alpha.0, first public alpha
12
28
 
13
29
  Initial open-source release of the INK protocol reference implementation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adastracomputing/ink",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.1",
4
4
  "description": "Reference implementation and specification of the INK (Inter-agent Networking Kernel) protocol",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Ad Astra Computing Inc.",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@noble/curves": "^2.2.0",
49
- "@noble/ed25519": "^2.1.0",
49
+ "@noble/ed25519": "^3.1.0",
50
50
  "@noble/hashes": "^1.8.0",
51
51
  "canonicalize": "^2.1.0",
52
52
  "zod": "^3.23.0"
@@ -58,7 +58,7 @@
58
58
  "@typescript-eslint/parser": "^8.60.0",
59
59
  "eslint": "^10.4.0",
60
60
  "tsx": "^4.22.3",
61
- "typescript": "^5.6.0",
61
+ "typescript": "^6.0.3",
62
62
  "vitest": "^4.1.7"
63
63
  },
64
64
  "keywords": [
@@ -498,10 +498,18 @@ Authorization: INK-Ed25519 <signature>
498
498
  "leafIndex": 48290,
499
499
  "rootHash": "<SHA-256 hex of Merkle tree root>",
500
500
  "timestamp": "2026-03-19T12:00:01Z",
501
- "serviceSignature": "<Ed25519 signature over (eventId + treeSize + rootHash + timestamp)>"
501
+ "serviceSignature": "<Ed25519 signature, see canonical format below>"
502
502
  }
503
503
  ```
504
504
 
505
+ **Canonical signature format.** `serviceSignature` is an Ed25519 signature over the bytes:
506
+
507
+ ```
508
+ "ink/audit-inclusion/v1\n" || JCS(receipt-fields-without-serviceSignature)
509
+ ```
510
+
511
+ where `JCS` is the RFC 8785 canonical JSON serialization of the inclusion-receipt object with all top-level fields except `serviceSignature` itself. The receipt object's fields used for the signature MUST be exactly `{eventId, leafIndex, treeSize, rootHash, timestamp}`. `protocol` and `type` are envelope metadata, not part of the signed payload. Verifiers reconstruct the signed bytes from the response and check the signature against the witness's published Ed25519 public key.
512
+
505
513
  The inclusion receipt is analogous to CT's Signed Certificate Timestamp (SCT). The agent stores it alongside the audit event and can present it as proof of timely submission.
506
514
 
507
515
  #### 7.3 Verification Protocol
@@ -17,9 +17,8 @@ export interface Keypair {
17
17
 
18
18
  /** Generate a new Ed25519 keypair (signing). */
19
19
  export async function generateKeypair(): Promise<Keypair> {
20
- const privateKey = ed.utils.randomPrivateKey();
21
- const publicKey = await ed.getPublicKeyAsync(privateKey);
22
- return { privateKey, publicKey };
20
+ const { secretKey, publicKey } = await ed.keygenAsync();
21
+ return { privateKey: secretKey, publicKey };
23
22
  }
24
23
 
25
24
  /** Generate a new X25519 keypair (encryption). */