-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename zkp verifier & inject eth configs[]
- Loading branch information
1 parent
16138d3
commit 1311369
Showing
6 changed files
with
54 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './state'; | ||
export * from './chainid'; | ||
export * from './zkp-verifier'; | ||
export * from './onchain-zkp-verifier'; |
31 changes: 22 additions & 9 deletions
31
src/storage/blockchain/zkp-verifier.ts → ...torage/blockchain/onchain-zkp-verifier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
src/storage/interfaces/zkp-verifier.ts → ...torage/interfaces/onchain-zkp-verifier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
import { Signer } from 'ethers'; | ||
import { ZeroKnowledgeProofResponse } from '../../iden3comm'; | ||
import { EthConnectionConfig } from '../blockchain'; | ||
|
||
/** | ||
* Interface that defines methods for ZKP verifier | ||
* | ||
* @beta | ||
* @interface IZKPVerifier | ||
* @interface IOnChainZKPVerifier | ||
*/ | ||
export interface IZKPVerifier { | ||
export interface IOnChainZKPVerifier { | ||
/** | ||
* Submit ZKP Responses to ZKPVerifier contract. | ||
* Submit ZKP Responses to OnChainZKPVerifier contract. | ||
* @public | ||
* @param {string} address - ZKPVerifier contract address | ||
* @param {string} address - OnChainZKPVerifier contract address | ||
* @param {Signer} ethSigner - tx signer | ||
* @param {EthConnectionConfig} ethConfig - ETH config | ||
* @param {number} chainId - chain Id | ||
* @param {ZeroKnowledgeProofResponse[]} zkProofResponses - zkProofResponses | ||
* @returns {Promise<Map<string, ZeroKnowledgeProofResponse>>} - map of transaction hash - ZeroKnowledgeProofResponse | ||
*/ | ||
submitZKPResponse( | ||
address: string, | ||
ethSigner: Signer, | ||
ethConfig: EthConnectionConfig, | ||
chainId: number, | ||
zkProofResponses: ZeroKnowledgeProofResponse[] | ||
): Promise<Map<string, ZeroKnowledgeProofResponse>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters