mirror of
https://github.com/zkemail/zk-email-verify.git
synced 2026-01-10 05:58:08 -05:00
Added memory command and engine prereqs
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
## **Installation**
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
- **Node.js**: Version 14.0.0 or higher.
|
||||
- **Yarn**: Latest version recommended.
|
||||
|
||||
To get started with zk-email, install these three npm packages:
|
||||
## **1. @zk-email/helpers**
|
||||
This package provides utility functions for email verification and cryptographic operations.
|
||||
|
||||
@@ -54,8 +54,6 @@ The `@zk-email/helpers` package provides a comprehensive suite of utility functi
|
||||
- `tryRevertARCChanges`: A flag indicating whether to attempt reverting changes made by email forwarders, defaulting to true.
|
||||
- **Returns:** A `Promise` resolving to a `DKIMVerificationResult` object, which includes details such as the public key, signature, message, body, and other relevant verification outcomes.
|
||||
|
||||
|
||||
|
||||
## zk-email/contracts
|
||||
|
||||
The @zk-email/contracts package contains the main contract of the SDK, `DKIMRegistry.sol`. This Solidity contract serves as a registry for storing the hash of the DomainKeys Identified Mail (DKIM) public key for each domain.
|
||||
|
||||
@@ -135,6 +135,12 @@ Firstly, you need to determine the constraint size of your circuit. You can do t
|
||||
```bash
|
||||
snarkjs r1cs info myCircuit.r1cs
|
||||
```
|
||||
### Memory Allocation for snarkjs
|
||||
To avoid out-of-memory errors in `snarkjs` for large circuits, increase Node.js memory with `node --max-old-space-size=<size>`, where `<size>` is in kilobytes.
|
||||
```
|
||||
node --max-old-space-size=614400 ./../node_modules/.bin/snarkjs
|
||||
```
|
||||
|
||||
|
||||
### Powers of Tau
|
||||
After obtaining the constraint size, find the next highest power of 2 and replace the '12' in the following command with that number. This command initiates the Powers of tau ceremony.
|
||||
|
||||
@@ -8,5 +8,8 @@
|
||||
"packages/*",
|
||||
"scripts"
|
||||
],
|
||||
"packageManager": "yarn@3.2.3"
|
||||
"packageManager": "yarn@3.2.3",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user