@forestrie/forestrie-cli 0.9.0 → 0.9.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/dist/cli.js CHANGED
@@ -31582,7 +31582,8 @@ function decodePublishCheckpointCalldata(inputHex) {
31582
31582
  delegationKey: hexToBytes7(receipt.delegationProof.delegationKey),
31583
31583
  mmrStart: receipt.delegationProof.mmrStart,
31584
31584
  mmrEnd: receipt.delegationProof.mmrEnd,
31585
- signature: hexToBytes7(receipt.delegationProof.signature)
31585
+ signature: hexToBytes7(receipt.delegationProof.signature),
31586
+ algData: receipt.delegationProof.algData.map(hexToBytes7)
31586
31587
  }
31587
31588
  };
31588
31589
  }
@@ -31622,7 +31623,7 @@ var init_decode_checkpoint_calldata = __esm(() => {
31622
31623
  init__esm();
31623
31624
  PUBLISH_CHECKPOINT_ABI = parseAbi([
31624
31625
  "struct ConsistencyProof { uint64 treeSize1; uint64 treeSize2; bytes32[][] paths; bytes32[] rightPeaks; }",
31625
- "struct DelegationProof { bytes protectedHeader; bytes delegationKey; uint64 mmrStart; uint64 mmrEnd; bytes signature; }",
31626
+ "struct DelegationProof { bytes protectedHeader; bytes delegationKey; uint64 mmrStart; uint64 mmrEnd; bytes signature; bytes[] algData; }",
31626
31627
  "struct ConsistencyReceipt { bytes protectedHeader; bytes signature; ConsistencyProof[] consistencyProofs; DelegationProof delegationProof; }",
31627
31628
  "struct InclusionProof { uint64 index; bytes32[] path; }",
31628
31629
  "struct PublishGrant { bytes32 logId; uint256 grant; uint256 request; uint64 maxHeight; uint64 minGrowth; bytes32 ownerLogId; bytes grantData; }",
@@ -34558,7 +34559,7 @@ init_dist();
34558
34559
  // package.json
34559
34560
  var package_default = {
34560
34561
  name: "@forestrie/forestrie-cli",
34561
- version: "0.9.0",
34562
+ version: "0.9.1",
34562
34563
  description: "forestrie — participant CLI for forestrie transparency logs (SCITT / COSE receipts)",
34563
34564
  keywords: [
34564
34565
  "forestrie",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forestrie/forestrie-cli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "forestrie — participant CLI for forestrie transparency logs (SCITT / COSE receipts)",
5
5
  "keywords": [
6
6
  "forestrie",
@@ -13,15 +13,20 @@
13
13
  * consumes it lands in later phases.
14
14
  *
15
15
  * The ABI is written in viem's readable form, mirroring univocity
16
- * `src/interfaces/types.sol`; its selector is asserted against the
17
- * foundry-generated `0x87ce4c61` in the tests.
16
+ * `src/interfaces/types.sol` at v0.3.0; its selector is asserted against the
17
+ * foundry-generated `0x295e6ade` in the tests. `DelegationProof.algData`
18
+ * (ADR-0008, univocity #36) is the alg-specific material — empty for ES256
19
+ * and KS256, the WebAuthn assertion parts for ES256-WebAuthn. Transactions
20
+ * to the pre-ADR-0008 contracts (selector `0x87ce4c61`, five-field
21
+ * delegation) are not `publishCheckpoint` calls on the current ABI and are
22
+ * rejected at the selector.
18
23
  */
19
24
  import { decodeFunctionData, parseAbi } from "viem";
20
25
 
21
26
  /** `publishCheckpoint` ABI — struct shapes mirror univocity types.sol. */
22
27
  export const PUBLISH_CHECKPOINT_ABI = parseAbi([
23
28
  "struct ConsistencyProof { uint64 treeSize1; uint64 treeSize2; bytes32[][] paths; bytes32[] rightPeaks; }",
24
- "struct DelegationProof { bytes protectedHeader; bytes delegationKey; uint64 mmrStart; uint64 mmrEnd; bytes signature; }",
29
+ "struct DelegationProof { bytes protectedHeader; bytes delegationKey; uint64 mmrStart; uint64 mmrEnd; bytes signature; bytes[] algData; }",
25
30
  "struct ConsistencyReceipt { bytes protectedHeader; bytes signature; ConsistencyProof[] consistencyProofs; DelegationProof delegationProof; }",
26
31
  "struct InclusionProof { uint64 index; bytes32[] path; }",
27
32
  "struct PublishGrant { bytes32 logId; uint256 grant; uint256 request; uint64 maxHeight; uint64 minGrowth; bytes32 ownerLogId; bytes grantData; }",
@@ -46,6 +51,8 @@ export type CalldataDelegation = {
46
51
  mmrStart: bigint;
47
52
  mmrEnd: bigint;
48
53
  signature: Uint8Array;
54
+ /** Alg-specific material (ADR-0008); empty for ES256 / KS256. */
55
+ algData: Uint8Array[];
49
56
  };
50
57
 
51
58
  /** The full `ConsistencyReceipt` recovered from `publishCheckpoint` calldata. */
@@ -98,6 +105,7 @@ export function decodePublishCheckpointCalldata(
98
105
  mmrStart: bigint;
99
106
  mmrEnd: bigint;
100
107
  signature: string;
108
+ algData: readonly string[];
101
109
  };
102
110
  };
103
111
 
@@ -128,6 +136,7 @@ export function decodePublishCheckpointCalldata(
128
136
  mmrStart: receipt.delegationProof.mmrStart,
129
137
  mmrEnd: receipt.delegationProof.mmrEnd,
130
138
  signature: hexToBytes(receipt.delegationProof.signature),
139
+ algData: receipt.delegationProof.algData.map(hexToBytes),
131
140
  },
132
141
  };
133
142
  }