@@ -12,7 +12,6 @@ import { Provable } from '../provable/provable.js';
1212import { InferProvable , provablePure } from '../provable/types/provable-derivers.js' ;
1313import { ProvableTypePure } from '../provable/types/provable-intf.js' ;
1414import { Field } from '../provable/wrapped.js' ;
15- import { fromBase64 , toBase64 } from '../util/base64.js' ;
1615import { prettifyStacktrace , prettifyStacktracePromise } from '../util/errors.js' ;
1716import { Get , Tuple } from '../util/types.js' ;
1817import { TupleToInstances } from './zkprogram.js' ;
@@ -261,14 +260,14 @@ class KimchiVerificationKey {
261260 const rustVerifierIndex = rustConversion . fp . verifierIndexToRust ( this . value as any ) ;
262261 const verifierIndexBase64 =
263262 wasm . caml_pasta_fp_plonk_verifier_index_serialize ( rustVerifierIndex ) ;
264- return toBase64 ( verifierIndexBase64 ) ;
263+ return Buffer . from ( verifierIndexBase64 , 'utf8' ) . toString ( 'base64' ) ;
265264 }
266265
267- static fromString ( s : string ) : KimchiVerificationKey {
266+ static fromString ( base64 : string ) : KimchiVerificationKey {
268267 const srsFp = Pickles . loadSrsFp ( ) ;
269268 const rustVerifierIndex = wasm . caml_pasta_fp_plonk_verifier_index_deserialize (
270269 srsFp ,
271- fromBase64 ( s )
270+ Buffer . from ( base64 , 'base64' ) . toString ( 'utf8' )
272271 ) ;
273272 const rustConversion = getRustConversion ( wasm ) ;
274273 const verifierIndexMl : unknown = rustConversion . fp . verifierIndexFromRust ( rustVerifierIndex ) ;
0 commit comments