Quick Start Guide
Get up and running with ZKPRET in 5 minutes! This guide will walk you through setting up a local development environment and running your first zero-knowledge proof.
Prerequisitesâ
Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- npm or yarn package manager
- Git for cloning repositories
# Check your versions
node --version # Should be 18+
npm --version # Should be 9+
Installationâ
1. Clone the Repositoryâ
git clone https://github.com/chainaim3003/zk-pret-test-v3.6.git
cd zk-pret-test-v3.6
2. Install Dependenciesâ
npm install
3. Build the Projectâ
npm run build
Zero-Knowledge Proof Examplesâ
This project demonstrates three different zero-knowledge proof implementations for enterprise compliance and verification.
1. GLEIF Data Verificationâ
Validates Legal Entity Identifier (LEI) data for companies without revealing sensitive information.
Command:â
node ./build/tests/with-sign/GLEIFLocalMultiVerifier.js "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
Output:â
$ node ./build/tests/with-sign/GLEIFLocalMultiVerifier.js "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
īŋŊ Oracle Registry: Detected environment: LOCAL
īŋŊ BlockchainManager: Creating shared LocalBlockchain instance...
â
Oracle Registry: Clean architecture initialized for LOCAL environment
īŋŊ LocalBlockchain will be created for test compatibility
//////////////////////*******************/////////////////////GELIF************************!!!!!!!!!!!!!!!!!*
************//////////////
īŋŊ Starting verification for: "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
\nīŋŊ GLEIF Multi-Company Verification Test Started
īŋŊ Companies: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
īŋŊ Total Companies: 1
\nīŋŊ Setting up local blockchain...
â
BlockchainManager: LocalBlockchain initialized (proofs: true)
\nīŋŊ Compiling ZK programs...
â
GLEIFOptim ZK program compiled
â
GLEIFOptimMultiCompanySmartContract compiled
\nīŋŊ Deploying multi-company smart contract...
â
Multi-company smart contract deployed successfully
\n================================================================================
īŋŊ Processing Company 1/1: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
================================================================================
\nīŋŊ STAGE 1: Resolving company name to LEI...
īŋŊ STAGE 1: Two-Stage Lookup - Resolving company name to LEI
īŋŊ Company Name: "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
īŋŊ Normalized: "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
Company Name: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
Type of Network: LOCAL
------------------------------------------------using live GLEIF API-----------------------------------------
---------
īŋŊ COMPLETE GLEIF API RESPONSE:
====================================================================================================
{
"meta": {
"goldenCopy": {
"publishDate": "2025-08-21T16:00:00Z"
},
"pagination": {
"currentPage": 1,
"perPage": 15,
"from": 1,
"to": 1,
"total": 1,
"lastPage": 1
}
},
"links": {
"first": "https://api.gleif.org/api/v1/lei-records?filter%5Bentity.legalName%5D=SREE+PALANI+ANDAVAR+AGROS
+PRIVATE+LIMITED&page%5Bnumber%5D=1&page%5Bsize%5D=15",
"last": "https://api.gleif.org/api/v1/lei-records?filter%5Bentity.legalName%5D=SREE+PALANI+ANDAVAR+AGROS+
PRIVATE+LIMITED&page%5Bnumber%5D=1&page%5Bsize%5D=15"
},
"data": [
{
"type": "lei-records",
"id": "894500Q32QG6KKGMMI95",
"attributes": {
"lei": "894500Q32QG6KKGMMI95",
"entity": {
"legalName": {
"name": "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED",
"language": "en"
},
"otherNames": [],
"transliteratedOtherNames": [],
"legalAddress": {
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
},
"headquartersAddress": {
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
},
"registeredAt": {
"id": "RA000394",
"other": null
},
"registeredAs": "U01112TZ2022PTC039493",
"jurisdiction": "IN",
"category": "GENERAL",
"legalForm": {
"id": "YSP9",
"other": null
},
"associatedEntity": {
"lei": null,
"name": null
},
"status": "ACTIVE",
"expiration": {
"date": null,
"reason": null
},
"successorEntity": {
"lei": null,
"name": null
},
"successorEntities": [],
"creationDate": "2022-07-18T21:00:00Z",
"subCategory": null,
"otherAddresses": [],
"eventGroups": []
},
"registration": {
"initialRegistrationDate": "2025-05-22T12:25:39Z",
"lastUpdateDate": "2025-05-22T12:25:40Z",
"status": "ISSUED",
"nextRenewalDate": "2026-05-22T12:25:40Z",
"managingLou": "529900F6BNUR3RJ2WH29",
"corroborationLevel": "FULLY_CORROBORATED",
"validatedAt": {
"id": "RA000394",
"other": null
},
"validatedAs": "U01112TZ2022PTC039493",
"otherValidationAuthorities": []
},
"bic": null,
"mic": null,
"ocid": "in/U01112TZ2022PTC039493",
"qcc": "QINDAD21MX",
"spglobal": [
"1944713700"
],
"conformityFlag": "CONFORMING"
},
"relationships": {
"managing-lou": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/managing-lou"
}
},
"lei-issuer": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/lei-issuer"
}
},
"field-modifications": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/field-modifications"
}
},
"direct-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/direct-pare
nt-reporting-exception"
}
},
"ultimate-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/ultimate-pa
rent-reporting-exception"
}
}
},
"links": {
"self": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95"
}
}
]
}
īŋŊ DETAILED RECORD ANALYSIS:
====================================================================================================
īŋŊ BASIC RECORD INFO:
Type: lei-records
ID (LEI): 894500Q32QG6KKGMMI95
īŋŊ ATTRIBUTES SECTION (Complete Object):
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
{
"lei": "894500Q32QG6KKGMMI95",
"entity": {
"legalName": {
"name": "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED",
"language": "en"
},
"otherNames": [],
"transliteratedOtherNames": [],
"legalAddress": {
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
},
"headquartersAddress": {
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
},
"registeredAt": {
"id": "RA000394",
"other": null
},
"registeredAs": "U01112TZ2022PTC039493",
"jurisdiction": "IN",
"category": "GENERAL",
"legalForm": {
"id": "YSP9",
"other": null
},
"associatedEntity": {
"lei": null,
"name": null
},
"status": "ACTIVE",
"expiration": {
"date": null,
"reason": null
},
"successorEntity": {
"lei": null,
"name": null
},
"successorEntities": [],
"creationDate": "2022-07-18T21:00:00Z",
"subCategory": null,
"otherAddresses": [],
"eventGroups": []
},
"registration": {
"initialRegistrationDate": "2025-05-22T12:25:39Z",
"lastUpdateDate": "2025-05-22T12:25:40Z",
"status": "ISSUED",
"nextRenewalDate": "2026-05-22T12:25:40Z",
"managingLou": "529900F6BNUR3RJ2WH29",
"corroborationLevel": "FULLY_CORROBORATED",
"validatedAt": {
"id": "RA000394",
"other": null
},
"validatedAs": "U01112TZ2022PTC039493",
"otherValidationAuthorities": []
},
"bic": null,
"mic": null,
"ocid": "in/U01112TZ2022PTC039493",
"qcc": "QINDAD21MX",
"spglobal": [
"1944713700"
],
"conformityFlag": "CONFORMING"
}
īŋŊ RELATIONSHIPS SECTION (Complete Object):
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
{
"managing-lou": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/managing-lou"
}
},
"lei-issuer": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/lei-issuer"
}
},
"field-modifications": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/field-modifications"
}
},
"direct-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/direct-parent-rep
orting-exception"
}
},
"ultimate-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/ultimate-parent-r
eporting-exception"
}
}
}
īŋŊ LINKS SECTION (Complete Object):
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
{
"self": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95"
}
īŋŊ ZK CIRCUIT OPTIMIZATION ANALYSIS:
====================================================================================================
īŋŊ ANALYZING DATA STRUCTURE FOR ZK OPTIMIZATION...
īŋŊ ATTRIBUTES STRUCTURE ANALYSIS:
â
LEI: 894500Q32QG6KKGMMI95
īŋŊ ENTITY DATA STRUCTURE:
â
Legal Name: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
â
Status: ACTIVE
â
Jurisdiction: IN
īŋŊ LEGAL ADDRESS DATA:
{
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
}
īŋŊ HEADQUARTERS ADDRESS DATA:
{
"language": "en",
"addressLines": [
"Door No. 3/5-G, Sri Balaji Nagar, Theethipalayam, Perur (PO)"
],
"addressNumber": null,
"addressNumberWithinBuilding": null,
"mailRouting": null,
"city": "Coimbatore",
"region": "IN-TN",
"country": "IN",
"postalCode": "641010"
}
â
Legal Form: YSP9
â
Category: GENERAL
īŋŊ REGISTRATION DATA STRUCTURE:
{
"initialRegistrationDate": "2025-05-22T12:25:39Z",
"lastUpdateDate": "2025-05-22T12:25:40Z",
"status": "ISSUED",
"nextRenewalDate": "2026-05-22T12:25:40Z",
"managingLou": "529900F6BNUR3RJ2WH29",
"corroborationLevel": "FULLY_CORROBORATED",
"validatedAt": {
"id": "RA000394",
"other": null
},
"validatedAs": "U01112TZ2022PTC039493",
"otherValidationAuthorities": []
}
īŋŊ RELATIONSHIPS STRUCTURE ANALYSIS:
{
"managing-lou": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/managing-lou"
}
},
"lei-issuer": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/lei-issuer"
}
},
"field-modifications": {
"links": {
"related": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/field-modifications"
}
},
"direct-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/direct-parent-rep
orting-exception"
}
},
"ultimate-parent": {
"links": {
"reporting-exception": "https://api.gleif.org/api/v1/lei-records/894500Q32QG6KKGMMI95/ultimate-parent-r
eporting-exception"
}
}
}
īŋŊ Relationship type: managing-lou
īŋŊ Relationship type: lei-issuer
īŋŊ Relationship type: field-modifications
īŋŊ Relationship type: direct-parent
īŋŊ Relationship type: ultimate-parent
â
COMPLIANCE STATUS:
ââââââââââââââââââââââââââââââââââââââââââââââââââ
Company Status: ACTIVE
Is company "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED" GLEIF compliant? true
â
STAGE 1 SUCCESS: Name resolved to LEI
LEI: 894500Q32QG6KKGMMI95
Legal Name: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
Status: ACTIVE
â
STAGE 1 SUCCESS: "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED" â LEI: 894500Q32QG6KKGMMI95
\nīŋŊ Analyzing compliance for SREE PALANI ANDAVAR AGROS PRIVATE LIMITED...
īŋŊ Compliance Score: 100%
â
Is Compliant: true
\nīŋŊ Creating comprehensive Merkle tree for SREE PALANI ANDAVAR AGROS PRIVATE LIMITED...
īŋŊ Creating comprehensive GLEIF Merkle tree...
īŋŊ Processing live GLEIF API structure...
Set field legalName (0): "SREE PALANI ANDAVAR AGROS PRIVATE LIMITED"
Set field lei (1): "894500Q32QG6KKGMMI95"
Set field entityStatus (2): "ACTIVE"
Set field legalForm (3): "YSP9"
Set field jurisdiction (4): "IN"
Set field legalAddress (5): "Door No. 3/5-G, Sri Balaji Nagar, Theethipalaya..."
Set field legalCity (6): "Coimbatore"
Set field legalCountry (7): "IN"
Set field registrationAuthority (8): "RA000394"
Set field entityCategory (9): "GENERAL"
Set field businessRegisterEntityId (10): "U01112TZ2022PTC039493"
Set field leiStatus (11): "ISSUED"
Set field initialRegistrationDate (12): "2025-05-22T12:25:39Z"
Set field lastUpdateDate (13): "2025-05-22T12:25:40Z"
Set field nextRenewalDate (14): "2026-05-22T12:25:40Z"
Set field registration_status (15): "ISSUED"
Set field bic_codes (17): ""
Set field mic_codes (18): ""
Set field conformityFlag (16): "CONFORMING"
Set field managingLou (19): "529900F6BNUR3RJ2WH29"
â
Created Merkle tree with 20 fields
īŋŊ Merkle root: 2821140740269392744656673383969177646982981823396297238562886898521796453095
â
Merkle tree created successfully
\nīŋŊ Preparing ZK proof data for SREE PALANI ANDAVAR AGROS PRIVATE LIMITED...
â
All MerkleWitness8 instances created successfully
\nīŋŊ Generating oracle signature for SREE PALANI ANDAVAR AGROS PRIVATE LIMITED...
â
Oracle signature generated
\nīŋŊ Smart Contract State BEFORE Verification:
\nīŋŊ Smart Contract State BEFORE Verification:
Total Companies: 0
Compliant Companies: 0
Global Compliance Score: 0%
Total Verifications: 0
Registry Version: 1
\nīŋŊ COMPLIANCE FIELD ANALYSIS (Pre-Verification):
īŋŊ Entity Status: "ACTIVE" â â
ACTIVE (Pass)
īŋŊ Registration Status: "ISSUED" â â
ISSUED (Pass)
īŋŊ Conformity Flag: "CONFORMING" â â
ACCEPTABLE (Pass)
īŋŊ Date Validation: Last Update "2025-05-22T12:25:40Z", Next Renewal "2026-05-22T12:25:40Z" â â
VALID DATE
S (Pass)
īŋŊ LEI Validation: "894500Q32QG6KKGMMI95" â â
VALID LEI (Pass)
īŋŊ Overall Compliance Analysis: â
ALL RULES PASSED â ZK Proof Shows: â
COMPLIANT
īŋŊ Business Rules: 5/5 passed
īŋŊ Compliance Percentage: 100%
âŗ Chain Status: NOT YET VERIFIED - Awaiting smart contract transaction...
\n⥠Generating ZK proof for SREE PALANI ANDAVAR AGROS PRIVATE LIMITED...
īŋŊ Proving compliance for: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
īŋŊ LEI: 894500Q32QG6KKGMMI95
īŋŊ Entity Status: ACTIVE
â
ZK proof generated successfully
īŋŊ Contract state after verification:
\nīŋŊ Contract state AFTER verification:
Total Companies: 1
Compliant Companies: 1
Global Compliance Score: 100%
Total Verifications: 1
Registry Version: 1
\nīŋŊ STATE CHANGES:
īŋŊ Total Companies: 0 â 1
â
Compliant Companies: 0 â 1
īŋŊ Global Compliance Score: 0% â 100%
īŋŊ Total Verifications: 0 â 1
īŋŊ Registry Version: 1 â 1
\nīŋŊ COMPLIANCE FIELD ANALYSIS (Post-Verification):
īŋŊ Entity Status: "ACTIVE" â â
ACTIVE (Pass)
īŋŊ Registration Status: "ISSUED" â â
ISSUED (Pass)
īŋŊ Conformity Flag: "CONFORMING" â â
ACCEPTABLE (Pass)
īŋŊ Date Validation: Last Update "2025-05-22T12:25:40Z", Next Renewal "2026-05-22T12:25:40Z" â â
VALID DATE
S (Pass)
īŋŊ LEI Validation: "894500Q32QG6KKGMMI95" â â
VALID LEI (Pass)
īŋŊ Overall Compliance Analysis: â
ALL RULES PASSED â ZK Proof Shows: â
COMPLIANT
īŋŊ Business Rules: 5/5 passed
īŋŊ Compliance Percentage: 100%
â
Chain Status: VERIFIED AND STORED ON BLOCKCHAIN
â
Company SREE PALANI ANDAVAR AGROS PRIVATE LIMITED processed successfully
\n================================================================================
īŋŊ GLEIF Multi-Company Verification Completed!
================================================================================
\nīŋŊ Final Registry Statistics:
âĸ Total Companies Tracked: 1
âĸ Compliant Companies: 1
âĸ Compliance Percentage: 100%
\nīŋŊ Companies Processed:
1. SREE PALANI ANDAVAR AGROS PRIVATE LIMITED: â
COMPLIANT
LEI: 894500Q32QG6KKGMMI95
Score: 100%
\nâ
GLEIF Multi-Company Verification completed!
================================================================================
īŋŊ VERIFICATION RESULTS
================================================================================
īŋŊ Company 1: SREE PALANI ANDAVAR AGROS PRIVATE LIMITED
â
Status: Success
īŋŊ LEI: 894500Q32QG6KKGMMI95
īŋŊ Compliance Score: 100%
â Is Compliant: Yes
â° Timestamp: 2025-08-22T14:30:13.314Z
================================================================================
īŋŊ SUMMARY
================================================================================
īŋŊ Total Companies Processed: 1
â
Successful Verifications: 1
â Failed Verifications: 0
īŋŊ ZK Proofs Generated: 1
īŋŊ Verification completed successfully!
What it does:â
- Verifies company registration data using GLEIF standards
- Generates zero-knowledge proofs for entity validation
- Keeps actual company details private while proving compliance
2. Business Process Model and Notation (BPMN) Verificationâ
Validates business process flows against expected models using BPMN standards.
Command:â
node build/tests/with-sign/BusinessProcessLocalMultiVerifier.js SCF ./src/data/scf/process/EXPECTED/SCF-Expected.bpmn ./src/data/scf/process/ACTUAL/SCF-Accepted1.bpmn
Output:â
$ node build/tests/with-sign/BusinessProcessLocalMultiVerifier.js SCF ./src/data/scf/process/EXPECTED/SCF-Expected.bpmn ./src/data/scf/process/ACTUAL/SCF-Accepted1.bpmn
īŋŊ Environment Detection Debug:
BUILD_ENV: LOCAL
NODE_ENV: undefined
MINA_ENV: undefined
īŋŊ Selected environment value: "LOCAL"
â
Environment "LOCAL" mapped to: LOCAL
īŋŊ Environment Validation:
Current Environment: LOCAL
Should use NetworkOracleRegistry: false
Should connect to DEVNET: false
īŋŊ Oracle Registry: Detected environment: LOCAL
īŋŊ BlockchainManager: Creating shared LocalBlockchain instance...
â
Oracle Registry: Clean architecture initialized for LOCAL environment
īŋŊ LocalBlockchain will be created for test compatibility
īŋŊ Business Process LOCAL Multi-Verifier
==================================================
īŋŊ Single Process Mode
īŋŊ Processing: SCF
īŋŊ Expected: ./src/data/scf/process/EXPECTED/SCF-Expected.bpmn
īŋŊ Actual: ./src/data/scf/process/ACTUAL/SCF-Accepted1.bpmn
īŋŊ Business Process LOCAL Verification Started
īŋŊ Process Type: SCF
īŋŊ Expected BPMN: ./src/data/scf/process/EXPECTED/SCF-Expected.bpmn
īŋŊ Actual BPMN: ./src/data/scf/process/ACTUAL/SCF-Accepted1.bpmn
īŋŊ Setting up local blockchain...
â
BlockchainManager: LocalBlockchain initialized (proofs: true)
â
Local blockchain initialized
īŋŊ Processing BPMN files...
īŋŊ Parsing BPMN files...
â
All possible execution paths from Start to End (Flows):
Path 1: a-c-b-d-f-g
Path 2: a-c-b-d-e-f-g
Path 3: a-b-c-d-f-g
Path 4: a-b-c-d-e-f-g
â
Generated valid regex pattern with balanced parentheses
â
Combined Expression:
a(bc|cb)d(ef|f)g
â
All possible execution paths from Start to End (Flows):
Path 1: a-b-c-d-f-g
â
Generated valid regex pattern with balanced parentheses
â
Combined Expression:
abcdfg
â
BPMN files parsed successfully
īŋŊ Expected Pattern: a(bc|cb)d(ef|f)g
īŋŊ Actual Path: abcdfg
īŋŊ Process Analysis for SCF:
īŋŊ Expected Paths: 1
īŋŊ Actual Paths: 1
⥠Final Decision: Will be determined by ZK Circuit ONLY
īŋŊ Creating OptimMerkle process data for SCF...
īŋŊ Process ID: 0
īŋŊ Process Type: SCF
īŋŊ Merkle Root: 15813820875370175664...
īŋŊ Process Hash: 24529528004867131568...
īŋŊ PROCESS VERIFICATION RESULTS (Pre-Verification):
==================================================
īŋŊī¸ Process Type: SCF
īŋŊ Expected Pattern: a(bc|cb)d(ef|f)g
īŋŊ Actual Path: abcdfg
âŗ Awaiting ZK Circuit verification...
īŋŊ Process Hash: 245295280048671315687148663773...
īŋŊ Merkle Root: 158138208753701756644800896318...
â° Timestamp: 1755872304233
âī¸ Generating ZK proof using existing OptimMerkle utils...
īŋŊ Starting OptimMerkle Enhanced BPMN Verification...
īŋŊ Process Type: SCF
īŋŊ Expected Pattern: a(bc|cb)d(ef|f)g
īŋŊ Actual Path: abcdfg
īŋŊ Fetching oracle data...
â
Oracle data fetched successfully
īŋŊ Process Data Created
- Business Process ID: 0
- Process Type: SCF
- Actual Content Length: 128
īŋŊ Generating Merkle tree...
īŋŊ Merkle Root: 34026010003259489087...
īŋŊ Calculating process hash with o1js best practices...
īŋŊ Process Hash: 12972546453146137192...
âī¸ Generating oracle signature...
âī¸ Oracle signature generated
īŋŊ Generating Merkle witness...
âī¸ Compiling OptimMerkle ZK program...
â
ZK program compiled successfully
īŋŊ Generating OptimMerkle proof...
īŋŊ Using SCF verification circuit
īŋŊ Starting SCF compliance verification with o1js optimization...
CircuitString length 128 exceeds recommended 32 but using hierarchical hashing
CircuitString length 128 exceeds recommended 32 but using hierarchical hashing
actual ||||||||||||||| content ||||||||||||||||| Field { value: [ 0, [ 0, 0n ] ] } BP Type Field { value: [
0, [ 0, 0n ] ] }
in verifyProcessSCF in
in verifyProcessSCF out Bool { value: [ 2, [ 0, [Array] ], [ 3, [Array], [Array] ] ] }
in verifyProcessSCF in
in verifyProcessSCF out Bool { value: [ 2, [ 0, [Array] ], [ 3, [Array], [Array] ] ] }
out true
īŋŊ OptimMerkle SCF Oracle Signature Valid
īŋŊ OptimMerkle SCF Merkle verification complete
â
OptimMerkle SCF Final Result: true
â
OptimMerkle Proof Generated Successfully
īŋŊ OPTIMERKLE VERIFICATION RESULTS:
================================
īŋŊ ZK Regex Result: â
PASS
īŋŊ Merkle Root: 34026010003259489087...
īŋŊ Process Hash: 12972546453146137192...
âī¸ Oracle Verified: â
PASS
īŋŊ Merkle Verified: â
PASS
īŋŊ O1JS Optimized: â
PASS
================================
īŋŊ FINAL VERIFICATION AUTHORITY: ZK CIRCUIT
⥠ZK Circuit Result: â
PASS
īŋŊ Pattern Check was: MATCH (Info Only)
īŋŊ Final Decision: â
PASSED
īŋŊ PROCESS VERIFICATION RESULTS (Post-Verification):
==================================================
īŋŊī¸ Process Type: SCF
īŋŊ Expected Pattern: a(bc|cb)d(ef|f)g
īŋŊ Actual Path: abcdfg
⥠ZK Circuit Verification: â
PASS
īŋŊ Final Authority: ZK CIRCUIT RESULT
īŋŊ Process Hash: 245295280048671315687148663773...
īŋŊ Merkle Root: 158138208753701756644800896318...
â° Timestamp: 1755872304233
â
Chain Status: VERIFIED AND STORED ON BLOCKCHAIN
â
LOCAL Business Process Verification Completed Successfully!
īŋŊ Result: â
PASSED
īŋŊ Environment: LOCAL
â° Timestamp: 1755872304233
īŋŊ SUCCESS: Process verification passed with cryptographic proof!
īŋŊ Process Hash: 245295280048671315687148663773...
īŋŊ Merkle Root: 158138208753701756644800896318...
What it does:â
- Compares actual business processes against expected workflows
- Proves process compliance without revealing implementation details
- Validates Supply Chain Finance (SCF) processes through zero-knowledge proofs
3. Risk Assessment for Stable Coinsâ
Performs risk analysis and compliance checking for stable coin operations.
Command:â
node build/tests/with-sign/RiskStableCoinLocalMultiVerifier.js 100 http://34.203.247.32:8083/eventsBatch src/data/RISK/StableCoin/CONFIG/US/StableCoin-VALID-1.json ultra_strict US
Output:â
$ node build/tests/with-sign/RiskStableCoinLocalMultiVerifier.js 100 http://34.203.247.32:8083/eventsBatch src/data/RISK/StableCoin/CONFIG/US/StableCoin-VALID-1.json ultra_strict US
īŋŊ Environment Detection Debug:
BUILD_ENV: LOCAL
NODE_ENV: undefined
MINA_ENV: undefined
īŋŊ Selected environment value: "LOCAL"
â
Environment "LOCAL" mapped to: LOCAL
īŋŊ Environment Validation:
Current Environment: LOCAL
Should use NetworkOracleRegistry: false
Should connect to DEVNET: false
īŋŊ LOCAL StableCoin Backing Ratio Threshold: 100%
īŋŊ LOCAL StableCoin Liquidity Ratio Threshold: 100%
īŋŊ LOCAL StableCoin Concentration Limit: 100%
â LOCAL StableCoin Quality Threshold: 95
īŋŊ LOCAL ACTUS API URL: http://34.203.247.32:8083/eventsBatch
īŋŊ LOCAL Portfolio Path: src/data/RISK/StableCoin/CONFIG/US/StableCoin-VALID-1.json
īŋŊ LOCAL Execution Mode: ultra_strict
īŋŊī¸ LOCAL Jurisdiction: US
īŋŊ Starting LOCAL StableCoin Proof of Reserves OptimMerkle Verification...
īŋŊ Using LOCAL blockchain for development/testing
īŋŊ Setting up LOCAL blockchain environment...
â
BlockchainManager: LocalBlockchain initialized (proofs: true)
īŋŊ LOCAL: proofsEnabled = false (optimized for development)
â
BlockchainManager: LocalBlockchain initialized (proofs: true)
â
LOCAL blockchain environment ready
īŋŊ Compiling ZK program and smart contract...
â
Compilation successful
īŋŊ Deploying smart contract...
â
Smart contract deployed
īŋŊ Initial contract status: 100
īŋŊ Fetching ACTUS data for LOCAL StableCoin scenario...
Loading StableCoin-specific contract portfolio...
īŋŊ DEBUG: contractPortfolio type: object
īŋŊ DEBUG: contractPortfolio length: 5
īŋŊ DEBUG: Using provided contract array with 5 contracts
īŋŊ DEBUG: Final contracts being sent to ACTUS:
Contract cash01: PAM - 6275 USD
Contract cash02: PAM - 6275 USD
Contract cash03: PAM - 6275 USD
Contract cash04: PAM - 6275 USD
Contract deposit01: PAM - -25000 USD
īŋŊ Calling ACTUS API at: http://34.203.247.32:8083/eventsBatch
īŋŊ DEBUG: ACTUS REQUEST PAYLOAD:
URL: http://34.203.247.32:8083/eventsBatch
Contracts array: [
{
"contractType": "PAM",
"contractID": "cash01",
"contractRole": "RPA",
"contractDealDate": "2024-01-01T00:00:00",
"initialExchangeDate": "2024-01-01T00:00:00",
"statusDate": "2024-01-01T00:00:00",
"notionalPrincipal": "6275",
"maturityDate": "2024-01-02T00:00:00",
"nominalInterestRate": "0.0000",
"currency": "USD",
"dayCountConvention": "A365",
"hqlaCategory": "L1",
"description": "Cash reserves (exactly 25% of portfolio)"
},
{
"contractType": "PAM",
"contractID": "cash02",
"contractRole": "RPA",
"contractDealDate": "2024-01-01T00:00:00",
"initialExchangeDate": "2024-01-02T00:00:00",
"statusDate": "2024-01-01T00:00:00",
"notionalPrincipal": "6275",
"maturityDate": "2024-01-02T00:00:00",
"nominalInterestRate": "0.0000",
"currency": "USD",
"dayCountConvention": "A365",
"hqlaCategory": "L1",
"description": "Additional cash reserves (exactly 25% of portfolio)"
},
{
"contractType": "PAM",
"contractID": "cash03",
"contractRole": "RPA",
"contractDealDate": "2024-01-01T00:00:00",
"initialExchangeDate": "2024-01-03T00:00:00",
"statusDate": "2024-01-01T00:00:00",
"notionalPrincipal": "6275",
"maturityDate": "2024-01-02T00:00:00",
"nominalInterestRate": "0.0000",
"currency": "USD",
"dayCountConvention": "A365",
"hqlaCategory": "L1",
"description": "Additional cash reserves (exactly 25% of portfolio)"
},
{
"contractType": "PAM",
"contractID": "cash04",
"contractRole": "RPA",
"contractDealDate": "2024-01-01T00:00:00",
"initialExchangeDate": "2024-01-04T00:00:00",
"statusDate": "2024-01-01T00:00:00",
"notionalPrincipal": "6275",
"maturityDate": "2024-01-02T00:00:00",
"nominalInterestRate": "0.0000",
"currency": "USD",
"dayCountConvention": "A365",
"hqlaCategory": "L1",
"description": "Additional cash reserves (exactly 25% of portfolio)"
},
{
"contractType": "PAM",
"contractID": "deposit01",
"contractRole": "RPL",
"contractDealDate": "2024-01-01T00:00:00",
"initialExchangeDate": "2024-01-05T00:00:00",
"statusDate": "2024-01-01T00:00:00",
"notionalPrincipal": "-25000",
"maturityDate": "2024-04-03T00:00:00",
"nominalInterestRate": "0.0000",
"currency": "USD",
"dayCountConvention": "A365",
"hqlaCategory": "NonHQLA",
"description": "Outstanding stablecoin tokens (no yield to holders - US compliant)"
}
]
=== CALLING ACTUS API WITH POST-PROCESSING ===
URL: http://34.203.247.32:8083/eventsBatch
Sending 5 contracts
Contract IDs: [ 'cash01', 'cash02', 'cash03', 'cash04', 'deposit01' ]
=== CORE ACTUS API RESPONSE DEBUG ===
API URL: http://34.203.247.32:8083/eventsBatch
Response Status: 200
Response Headers: {
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers",
"content-type": "application/json",
"transfer-encoding": "chunked",
"date": "Fri, 22 Aug 2025 03:52:12 GMT",
"keep-alive": "timeout=60",
"connection": "keep-alive"
}
--- Raw Response Data Structure ---
Type: object
Keys: 0,1,2,3,4
--- Raw Data Sample ---
[
{
"contractId": "cash01",
"status": "Success",
"message": "",
"events": [
{
"type": "MD",
"time": "2024-01-02T00:00",
"payoff": 6275,
"currency": "USD",
"nominalValue": 0,
"nominalRate": 0,
"nominalAccrued": 0
}
]
},
{
"contractId": "cash02",
"status": "Success",
"message": "",
"events": [
{
"type": "IED",
"time": "2024-01-02T00:00",
"payoff": -6275,
"currency": "USD",
"nominalValue": 6275,
"nominalRate": 0,
"nominalAccrued": 0
},
{
"type": "MD",
"time": "2024-01-02T00:00",
"payoff": 6275,
"currency": "USD",
"nominalValue": 0,
"nominalRate": 0,
"nominalAccrued": 0
}
]
},
{
"contractId": "cash03",
"status": "Success",
"message": "",
"events": [
{
"type": "MD",
"time": "2024-01-02T00:00",
"payoff": 0,
"currency": "USD",
"nominalValue": 0,
"nominalRate": 0,
"nominalAccrued": 0
},
{
"type": "IED",
"time": "2024-01-03T00:00",
"payoff": -6275,
"currency": "USD",
"nominalValue": 6275,
"nominalRate": 0,
"nominalAccrued": 0
}
]
},
{
"contractId": "cash04",
"status": "Success",
"message": "",
"events": [
{
"type": "MD",
"time": "2024-01-02T00:00",
"payoff": 0,
"currency": "USD",
"nominalValue": 0,
"nominalRate": 0,
"nominalAccrued": 0
},
{
"type": "IED",
"time": "2024-01-04T00:00",
"payoff": -6275,
"currency": "USD",
"nominalValue": 6275,
"nominalRate": 0,
"nominalAccrued": 0
}
]
},
{
"contractId": "deposit01",
"status": "Success",
"message": "",
"events": [
{
"type": "IED",
"time": "2024-01-05T00:00",
"payoff": -25000,
"currency": "USD",
"nominalValue": 25000,
"nominalRate": 0,
"nominalAccrued": 0
},
{
"type": "MD",
"time": "2024-04-03T00:00",
"payoff": 25000,
"currency": "USD",
"nominalValue": 0,
"nominalRate": 0,
"nominalAccrued": 0
}
]
}
]
=== END CORE ACTUS RESPONSE DEBUG ===
â ī¸ Response is raw contract events - applying post-processing...
=== PROCESSING RAW ACTUS DATA ===
Raw data type: object
Raw data keys: [ '0', '1', '2', '3', '4' ]
Parsed 5 contracts
Contract 0: cash01 (unknown) with 1 events
Contract 1: cash02 (unknown) with 2 events
Contract 2: cash03 (unknown) with 2 events
Contract 3: cash04 (unknown) with 2 events
Contract 4: deposit01 (unknown) with 2 events
Date range: 2024-01-02T05:00:00.000Z to 2024-04-03T05:00:00.000Z
Calculated 4 periods
Post-processing complete:
- Inflow periods: 4
- Outflow periods: 4
- HQLA months: 2
- Sample inflow data:
Period 0: 3 events, total: 12550
Period 1: 1 events, total: 0
Period 2: 1 events, total: 0
=== END PROCESSING RAW ACTUS DATA ===
â
Post-processing complete: 4 periods generated
=== END ACTUS API CALL WITH POST-PROCESSING ===
īŋŊ DEBUG: ACTUS RESPONSE:
Raw response: {
"inflow": [
[
0,
6275,
6275
],
[
0
],
[
0
],
[
0,
25000
]
],
"outflow": [
[
0,
6275,
6275,
6275,
25000
],
[
0
],
[
0
],
[
0
]
],
"periodsCount": 4,
"contractDetails": [
{
"monthKey": "2024-01",
"hqlaBreakdown": {
"L1": 0,
"L2A": 0,
"L2B": 0,
"NonHQLA": -31275
},
"totalInflow": 0,
"totalOutflow": -31275
},
{
"monthKey": "2024-04",
"hqlaBreakdown": {
"L1": 0,
"L2A": 0,
"L2B": 0,
"NonHQLA": 25000
},
"totalInflow": 0,
"totalOutflow": 25000
}
],
"riskMetrics": {
"totalPeriods": 4,
"hqlaResults": {
"2024-01": {
"L1": 0,
"L2A": 0,
"L2B": 0,
"NonHQLA": -31275
},
"2024-04": {
"L1": 0,
"L2A": 0,
"L2B": 0,
"NonHQLA": 25000
}
},
"aggregatedInflows": [
12550,
0,
0,
25000
],
"aggregatedOutflows": [
43825,
0,
0,
0
]
},
"metadata": {
"timeHorizon": "monthly",
"currency": "USD",
"processingDate": "2025-08-22T14:22:57.344Z"
}
}
Periods count: 4
Inflow length: 4
Outflow length: 4
Contract details length: 2
Metadata: {
"timeHorizon": "monthly",
"currency": "USD",
"processingDate": "2025-08-22T14:22:57.344Z"
}
StableCoin ACTUS data fetched: 4 periods
īŋŊī¸ LOCAL JURISDICTION: US
īŋŊ LOCAL REGULATORY COMPLIANCE ASSESSMENT:
īŋŊ STABLE backing ratio requirement: 100%
īŋŊ GENIUS backing ratio requirement: 100%
īŋŊ STABLE backing ratio requirement: 100%
īŋŊ GENIUS backing ratio requirement: 100%
īŋŊ LOCAL Jurisdiction: US
īŋŊ LOCAL Overall Score: 100%
īŋŊ LOCAL Threshold: 85%
īŋŊ LOCAL Status: COMPLIANT
īŋŊ LOCAL Details: Frameworks: STABLE 100%, GENIUS 100%. Weighted Score: 100%. Threshold: 85%. Result: PASS
.
â
LOCAL: Portfolio meets all regulatory requirements.
The ZK program should accept this portfolio.
Expected result: ZK proof generation should SUCCEED.
īŋŊ DEBUG: StableCoin processing with contracts: [
'cash01: 6275',
'cash02: 6275',
'cash03: 6275',
'cash04: 6275',
'deposit01: -25000'
]
īŋŊ Using provided concentration limit: 100%
īŋŊ DEBUG: Categorizing reserves by principals...
īŋŊ DEBUG: Asset contracts: [
'cash01: 6275 (L1))',
'cash02: 6275 (L1))',
'cash03: 6275 (L1))',
'cash04: 6275 (L1))'
]
īŋŊ DEBUG: Total assets: 25100
īŋŊ DEBUG: Processing cash01 (6275) - HQLA: L1
īŋŊ DEBUG: Assigned cash01 (6275) to cash
īŋŊ DEBUG: Processing cash02 (6275) - HQLA: L1
īŋŊ DEBUG: Assigned cash02 (6275) to cash
īŋŊ DEBUG: Processing cash03 (6275) - HQLA: L1
īŋŊ DEBUG: Assigned cash03 (6275) to cash
īŋŊ DEBUG: Processing cash04 (6275) - HQLA: L1
īŋŊ DEBUG: Assigned cash04 (6275) to cash
īŋŊ DEBUG: Final stablecoin reserve categorization (per period):
Cash & Equivalents: 25,100 (100.0%)
US Treasury Securities: 0 (0.0%)
Corporate Bonds: 0 (0.0%)
Other Assets: 0 (0.0%)
Total Reserve Assets: 25,100
īŋŊī¸ Jurisdiction: US
īŋŊ Compliance Score: 100%
âī¸ Status: COMPLIANT
īŋŊ Details: Frameworks: STABLE 100%, GENIUS 100%. Weighted Score: 100%. Threshold: 85%. Result: PASS.
īŋŊ STABLE backing ratio requirement: 100%
īŋŊ GENIUS backing ratio requirement: 100%
īŋŊ DEBUG: Total liabilities from contracts: 25000
īŋŊ LOCAL: Processed 4 periods with reserve categorization
īŋŊ Calculating StableCoin metrics...
īŋŊ Average Backing Ratio: 100.40%
īŋŊ Average Liquidity Ratio: 100.00%
īŋŊ Max Concentration Risk: 100.00%
â Average Asset Quality: 100.00
â
Overall StableCoin Compliance: PASSED
īŋŊ Building Merkle tree structure...
īŋŊ Building Merkle tree structure...
īŋŊ Merkle root: 27774456353012306106219855221547662645465093183859650477532813471972332036677
īŋŊ Merkle root: 27774456353012306106219855221547662645465093183859650477532813471972332036677
â
ZK-COMPLIANT StableCoin validation passed - structural checks completed
Critical validation happens inside the ZK circuit with proper assertions
â
ZK-COMPLIANT StableCoin validation passed - structural checks completed
Critical validation happens inside the ZK circuit with proper assertions
īŋŊ Creating oracle signature...
â
Oracle signature created
â
ZK compliance data structure created and validated
īŋŊ LOCAL: Generating ZK proof (faster execution)...
â
LOCAL: ZK proof generated successfully
īŋŊ Proof public output - StableCoin Compliant: true
īŋŊ Proof public output - Regulatory Compliant: true
īŋŊ Proof public output - Regulatory Score: 95
īŋŊ Proof public output - Backing Ratio: 100
īŋŊ Proof public output - Liquidity Ratio: 100
īŋŊ Proof public output - Concentration Risk: 100
īŋŊ Proof public output - Asset Quality Score: 100
īŋŊ LOCAL: Verifying proof with smart contract...
â
Proof verified by smart contract
īŋŊ Final contract status: 90
īŋŊ Total verifications: 1
īŋŊ LOCAL StableCoin Risk verification completed successfully!
īŋŊ LOCAL Status Change: 100 â 90
â
LOCAL STABLECOIN COMPLIANCE ACHIEVED - Contract status changed to 90
īŋŊ LOCAL StableCoin Risk verification completed successfully!
īŋŊ LOCAL Status Change: 100 â 90
â
LOCAL STABLECOIN COMPLIANCE ACHIEVED - Contract status changed to 90
īŋŊ LOCAL DEVELOPMENT BENEFITS:
⥠Faster execution (no network delays)
īŋŊ Instant blockchain setup
īŋŊ Immediate feedback for testing
What it does:â
- Analyzes stable coin risk metrics against regulatory requirements
- Validates compliance with US financial regulations
- Generates proofs of risk assessment without exposing sensitive financial data
Understanding What Happenedâ
Congratulations! You've just created your first zero-knowledge proof with ZKPRET. Here's what happened:
1. Privacy-Preserving Validationâ
- The invoice amount ($1000) was validated without revealing the actual amount
- Tax compliance was checked without exposing the tax rate
- Company identity was verified without revealing the company ID
2. Standards-Based Validationâ
- The proof verified business logic (positive amounts, reasonable tax rates)
- Compliance status was validated according to predefined rules
- The validation followed ZKPRET's deep composition principles
3. Blockchain Integrationâ
- The proof was generated off-chain for efficiency
- Only the proof result was stored on-chain
- The sensitive data never left your local environment
Getting Helpâ
- Documentation: ZKPRET Docs
- Community Forum: Discord
- GitHub Issues: Report bugs
- Professional Support: Enterprise Support
What's Next?â
You're now ready to build privacy-preserving applications with ZKPRET! Here are some suggested learning paths:
For Developersâ
- Core Components - Understand the platform architecture
- API Reference - Integrate with ZKPRET services
- ZK Programs Development - Build custom circuits
For Business Implementersâ
- Supply Chain Finance - See a complete business solution
- Standards Implementation - Understand compliance requirements
- Partnership Program - Join the ecosystem
For Integration Teamsâ
- Deployment Guide - Production deployment strategies
- Multi-Chain Integration - Cross-chain deployment
- Enterprise Support - Professional services and consulting
Ready to revolutionize how your organization handles sensitive business data? Let's build the future of privacy-preserving enterprise blockchain together! đ