File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
library/tools/pluginServer
plugins/merkleMemberships/server Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const defaultConfiguration: ServerConfigurations = {
4141 } ,
4242 plugins : {
4343 SimplePreimagePlugin : { } ,
44- MerkleMembershipsPlugin : { }
44+ MerkleMembershipsPlugin : { trees : [ ] }
4545 }
4646}
4747
@@ -57,7 +57,7 @@ export function readConfigurations(): ServerConfigurations {
5757 env . get ( 'MINAUTH_CONFIG' )
5858 . default ( "config.yaml" )
5959 . asString ( ) ;
60-
60+
6161 if ( ! fs . existsSync ( configFile ) ) {
6262 console . warn ( "configuration file not exists, use the default configuration" )
6363 return defaultConfiguration ;
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ async function initializePlugins():
1919 . entries ( configurations . plugins )
2020 . reduce ( async ( o , [ name , cfg ] ) => {
2121 const factory = untypedPlugins [ name ] ;
22- const plugin = await factory . initialize ( cfg ) ;
22+ const typedCfg = factory . configurationSchema . parse ( cfg )
23+ const plugin = await factory . initialize ( typedCfg ) ;
2324 return { ...o , [ name ] : plugin } ;
2425 } , { } ) ;
2526}
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export class MerkleMembershipsPlugin
104104 }
105105
106106 static async initialize ( cfg : MinaTreesProviderConfiguration ) : Promise < MerkleMembershipsPlugin > {
107+ console . log ( cfg )
107108 const { verificationKey } = await MerkleMembershipsProgram . compile ( ) ;
108109 const storage = await MinaTreesProvider . initialize ( cfg ) ;
109110 return new MerkleMembershipsPlugin ( verificationKey , storage ) ;
You can’t perform that action at this time.
0 commit comments