
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@hyperoracle/zkgraph-cli
Advanced tools
Note: Only
full
image will be processed by zkOracle node.local
(generated by commands ending with--local
option) means the zkGraph is compiled locally and only contains partial computation (so that proving and executing will be faster).
The workflow of local zkGraph development must follow: Develop
(code in /src) -> Compile
(get compiled wasm image) -> Execute
(get expected output) -> Prove
(generate input and pre-test for actual proving in zkOracle) -> Verify
(verify proof on-chain).
To upload and publish your zkGraph, you should Upload
(upload code to IPFS), and then Publish
(register zkGraph on onchain zkGraph Registry).
Compile for Full Image (Link Compiled with Compiler Server).
zkgraph compile [root]
Options | Description |
---|---|
--local | Compile for Local Image |
--yaml-path <path> | Path to yaml file |
--mapping-path <path> | Path to mapping file |
Execute Full Image.
Please save the ZKGRAPH_STATE_OUTPUT
string for following prove steps.
zkgraph exec [...params] [root]
zkgraph exec <blockId> [root]
zkgraph exec <blockId> <offchainData> [root]
Arguments | Description |
---|---|
<block id> | Block number (or block hash) as runtime context |
<offchainData> | offchain data |
Options | Description |
---|---|
--local | Execute Local Image |
Set Up Full Image
circuit-size
: Specify the circuit size of image instead of the default recommended. eg. zkgraph setup -- --circuit-size <size> (eg. 22)
.zkgraph setup [root]
Options | Description |
---|---|
--local | Set Up Local Image |
-k, --circuit-size <size> | Circuit size (k in 2^k) of image |
Prove Full Image
zkgraph prove [...params] [root]
zkgraph prove <blockId> <expectedStateStr> [root]
zkgraph prove <blockId> <offchainData> <expectedStateStr> [root]
Arguments | Description |
---|---|
<block id> | Block number (or block hash) as runtime context |
<expected state> | State output of the zkGraph execution |
<offchainData> | offchain data |
Options | Description |
---|---|
--local | Prove Local Image |
-i, --inputgen | Run in input generation Mode |
-t, --test | Run in test Mode |
-p, --prove | Run in prove Mode |
Upload zkGraph (Code and Full Image).
Please save the ipfs_hash
from the output dialog for following publish steps.
zkgraph upload [root]
Options | Description |
---|---|
--local | Upload Local zkGraph (Code and Local Image) |
Verify Proof Onchain.
zkgraph verify <prove task id>
Arguments | Description |
---|---|
<prove task id> | Task id of prove task |
Publish and Register zkGraph Onchain.
See also: Verifier Contract Interface.
zkgraph publish <deployed contract address> <ipfs_hash> <bounty_reward_per_trigger>
Arguments | Description |
---|---|
<deployed contract address> | Contract address of deployed verification contract address |
<ipfs hash> | IPFS hash of uploaded zkGraph |
<bounty reward per trigger> | Bounty reward per trigger in ETH |
Publish and register zkGraph Onchain.
zkgraph deposit <deployed contract address> <deposit amount>
Arguments | Description |
---|---|
<deployed contract address> | Contract address of deployed verification contract address |
<deposit amount> | Deposit amount in ETH |
When running zkGraph from the command line, the tool will automatically attempt to locate a configuration file named zkgraph.config.js in the project’s root directory. It also supports other file extensions such as JS and TS.
The most basic config file looks like this:
// zkgraph.config.js
export default {
// config options
}
You can also explicitly specify a config file to use with the --config CLI option (resolved relative to cwd):
zkgraph --config my-config.js
Since zkGraph ships with TypeScript typings, you can leverage your IDE's intellisense with jsdoc type hints:
/** @type {import('@hyperoracle/zkgraph-cli').UserConfig} */
export default {
// ...
}
Alternatively, you can use the defineConfig helper which should provide intellisense without the need for jsdoc annotations:
import { defineConfig } from '@hyperoracle/zkgraph-cli'
export default defineConfig({
// ...
})
ZkGraph also directly supports TS config files. You can use zkgraph.config.ts with the defineConfig helper as well.
object
{ mainet: "", sepolia: "", goerli: ""}
Update your Etherum JSON RPC provider URL here. It is recommended to use providers that support debug_getRawReceipts RPC method.
string
Update your private key here to sign zkwasm messages. Please note that (during testnet phrase) your address balance (in zkwasm server) should > 0.
string
https://zkwasm-explorer.delphinuslab.com:8090
string
http://compiler.hyperoracle.io/compile
string
https://api.pinata.cloud/pinning/pinFileToIPFS
string
string
[root]/build/zkgraph_full.wasm
zkGraph CLI Build-In a tag name is root
.
The root
is user project root path.
Of course, you can also place this tag at any position within the string.
LocalWasmBinPath
is the same.
string
[root]/build/zkgraph_local.wasm
FAQs
## CLI
We found that @hyperoracle/zkgraph-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.