Feat/proof conversion (#491)

* export castFromScope

* export proof conversion
This commit is contained in:
nicoshark
2025-03-29 01:13:45 +09:00
committed by GitHub
parent a357636e39
commit acd3329f31
4 changed files with 16 additions and 3 deletions

View File

@@ -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,
};
}

View File

@@ -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,

View File

@@ -1,6 +1,6 @@
{
"name": "@selfxyz/core",
"version": "0.0.14",
"version": "0.0.15",
"repository": {
"type": "git",
"url": "https://github.com/selfxyz/self"

View File

@@ -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 };