@reclaimprotocol/attestor-core 5.1.1 → 5.1.4

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.
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GCP attestation validation utilities.
3
+ *
4
+ * Validates JWT attestation tokens from GCP Confidential Computing
5
+ * (Confidential Space). Browser-safe: uses `@peculiar/x509` for chain
6
+ * verification and `globalThis.crypto.subtle` for JWT signature
7
+ * verification. Both are available in Node 19+ and modern browsers.
8
+ */
9
+ import type { Logger } from '../types/general.ts';
10
+ export interface GcpValidationResult {
11
+ isValid: boolean;
12
+ errors: string[];
13
+ ethAddress?: Uint8Array;
14
+ userDataType?: string;
15
+ pcr0?: string;
16
+ envVars?: Record<string, string>;
17
+ }
18
+ export declare function validateGcpAttestationAndExtractKey(attestation: Uint8Array | string, logger?: Logger): Promise<GcpValidationResult>;
19
+ /**
20
+ * Extracts the container image digest from a previously-validated GCP
21
+ * attestation token. Re-validates the JWT before reading.
22
+ */
23
+ export declare function extractImageDigestFromGCPAttestation(token: Uint8Array | string, logger?: Logger): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reclaimprotocol/attestor-core",
3
- "version": "5.1.1",
3
+ "version": "5.1.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "imports": {
@@ -92,8 +92,8 @@
92
92
  "@peculiar/asn1-x509": "^2.6.1",
93
93
  "@peculiar/webcrypto": "^1.5.0",
94
94
  "@peculiar/x509": "^1.14.3",
95
- "@reclaimprotocol/tls": "^0.1.3",
96
- "@reclaimprotocol/zk-symmetric-crypto": "^5.1.3",
95
+ "@reclaimprotocol/tls": "^0.1.4",
96
+ "@reclaimprotocol/zk-symmetric-crypto": "^5.1.6",
97
97
  "ajv": "^8.18.0",
98
98
  "bs58": "^6.0.0",
99
99
  "canonicalize": "^2.1.0",