upgrade sdk stability (#196)

This commit is contained in:
nicoshark
2025-02-21 12:23:59 -08:00
committed by GitHub
parent 5d9e959444
commit c2d90fb5ad
6 changed files with 90 additions and 28 deletions

View File

@@ -43,6 +43,7 @@ export function formatCallData_disclose(parsedCallData: any[]) {
export function packForbiddenCountriesList(forbiddenCountries: string[]): string[] {
const MAX_BYTES_IN_FIELD = 31;
const REQUIRED_CHUNKS = 4;
const bytes: number[] = [];
// Convert countries to bytes
@@ -62,7 +63,7 @@ export function packForbiddenCountriesList(forbiddenCountries: string[]): string
: Math.floor(maxBytes / packSize);
// Pack bytes into chunks
const output: string[] = new Array(numChunks);
const output: string[] = new Array(REQUIRED_CHUNKS).fill('0x' + '0'.repeat(64));
for (let i = 0; i < numChunks; i++) {
let sum = BigInt(0);
for (let j = 0; j < packSize; j++) {

View File

@@ -36,6 +36,7 @@ export interface SelfVerificationResult {
publicSignals: PublicSignals;
};
};
error: any;
}
export function parsePublicSignalsDisclose(publicSignals) {