mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
* chore(scripts): update Power of Tau download source URL * fix(build): use correct node_modules paths in circom compile step * chore(deps): add dependencies for GCP JWT verifier * feat(circuits): add extractAndValidatePubkey utility circuit for GCP JWT * feat(circuits): add verifyCertificateSignature utility circuit for GCP JWT * feat(circuits): add verifyExtractedString utility circuit for GCP JWT * feat(circuits): implement GCP JWT verifier circuit * feat(scripts): add build script for GCP JWT verifier circuit * chore(deps): pin crypto-circuit dependencies to exact versions * build(circuits): bump jwt_verifier.circom version to 2.1.9 * build(scripts): improve gcp_jwt_verifier error handling * chore(gcp_jwt_verifier): remove string verifier * refactor: optimize and improve GCP JWT Verifier * fix(circuits): enforce colon after JSON key name * fix(circuits): add JSON parsing offset validation constraints * fix: enforce JSON array structure validation in field extraction * fix: add value_length validation to prevent partial extraction --------- Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
30 lines
836 B
Bash
Executable File
30 lines
836 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Get script directory for stable sourcing
|
|
SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
|
source "${SCRIPT_DIR}/common.sh"
|
|
|
|
# Set environment (change this value as needed)
|
|
# ENV="prod"
|
|
ENV="staging"
|
|
|
|
echo -e "${GREEN}Building GCP JWT verifier circuit for $ENV environment${NC}"
|
|
|
|
# Circuit-specific configurations
|
|
CIRCUIT_TYPE="gcp_jwt_verifier"
|
|
CIRCUIT_NAME="gcp_jwt_verifier"
|
|
OUTPUT_DIR="build/gcp"
|
|
POWEROFTAU=24
|
|
MAX_MEMORY=204800
|
|
|
|
# Download power of tau if needed
|
|
download_ptau $POWEROFTAU
|
|
|
|
# Build the circuit
|
|
build_circuit "$CIRCUIT_NAME" "$CIRCUIT_TYPE" "$POWEROFTAU" "$OUTPUT_DIR" "$MAX_MEMORY"
|
|
|
|
echo ""
|
|
echo -e "${BLUE}To generate circuit inputs, run:${NC}"
|
|
echo -e "${YELLOW} yarn tsx circuits/gcp_jwt_verifier/prepare.ts example_jwt.txt circuit_inputs.json${NC}"
|