Fusion is a multi-chain smart contract wallet that leverages zero-knowledge proofs for cross-chain deployments and authentication.
Pre-requisites:
Oracle_prove circuit is used to verify the ECDSA signature through RPC Call to the server. If verified, server provides a secret based on the key which is then hashed to verify the credentials with the contract.
Inputs | Type | Size | Visibility |
---|---|---|---|
pub_key_x | Field[] | 32 | private |
pub_key_y | Field[] | 32 | private |
signature | u8[] | 64 | private |
hashed_message | u8[] | 32 | private |
tx_Hash | Field | 1 | public |
verifying_address | Field | 1 | public |
signing_address | Field | 1 | public |
Deploy_prove circuit is used to verify the payload is from the server.
Inputs | Type | Size | Visibility |
---|---|---|---|
reqDomain | Field | 1 | private |
passcode | Field | 1 | private |
serverHash | Field | 1 | public |
domain | Field | 1 | public |
chaindId | Field | 1 | public |
signing_address | Field | 1 | public |
proving_address | Field | 1 | public |
Credit_prove circuit is used to verify the credit and debit of Gas credits
Inputs | Type | Size | Visibility |
---|---|---|---|
reqDomain | Field | 1 | private |
passcode | Field | 1 | private |
serverHash | Field | 1 | public |
domain | Field | 1 | public |
chaindId | Field | 1 | public |
txHash | u8 | 32 | public |
amount | Field | 1 | public |
tx_type | Field | 1 | public |
proving_address | Field | 1 | public |
Helper function to hash inputs
Inputs | Type | Size | Visibility |
---|---|---|---|
inputs | Field[] | 2 | private |
returns | Field | 1 | public |
Helper function to hash inputs
Inputs | Type | Size | Visibility |
---|---|---|---|
inputs | Field[] | 65 | private |
returns | Field | 1 | public |
# Executing deploy_prove circuit
cd deploy_prove
nargo execute
# Checking constraints
nargo info
# Testing circuits
nargo check
# Generate zk-proof
nargo prove
# generate Solidity Verifier
nargo codegen-verifier