mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 07:08:10 -05:00
Feat/proof conversion (#491)
* export castFromScope * export proof conversion
This commit is contained in:
@@ -80,3 +80,15 @@ export function packForbiddenCountriesList(forbiddenCountries: string[]): string
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
export function formatProof(proof: any, publicSignals: any) {
|
||||
return {
|
||||
a: proof.a,
|
||||
b: [
|
||||
[proof.b[0][1], proof.b[0][0]],
|
||||
[proof.b[1][1], proof.b[1][0]],
|
||||
],
|
||||
c: proof.c,
|
||||
pubSignals: publicSignals,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ describe("VerifyAll", () => {
|
||||
vcAndDiscloseProof: vcAndDiscloseProof
|
||||
};
|
||||
|
||||
const types = ['0', '1', '2']; // Example types
|
||||
const types = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; // Example types
|
||||
const [readableData, success] = await verifyAll.verifyAll(
|
||||
timestamp,
|
||||
vcAndDiscloseHubProof,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@selfxyz/core",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.15",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/selfxyz/self"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { castFromScope } from '@common/utils/circuits/uuid';
|
||||
import { formatProof } from '@common/utils/contracts/formatCallData';
|
||||
|
||||
export { SelfBackendVerifier } from './SelfBackendVerifier';
|
||||
export { castFromScope };
|
||||
export { castFromScope, formatProof };
|
||||
|
||||
Reference in New Issue
Block a user