use of tech.pegasys.web3signer.core.service.http.handlers.signing.Eth1SignForIdentifierHandler in project web3signer by ConsenSys.
the class Eth1Runner method populateRouter.
@Override
protected Router populateRouter(final Context context) {
final RouterBuilder routerBuilder = context.getRouterBuilder();
final LogErrorHandler errorHandler = context.getErrorHandler();
final ArtifactSignerProvider signerProvider = context.getArtifactSignerProvider();
addPublicKeysListHandler(routerBuilder, signerProvider, ETH1_LIST.name(), context.getErrorHandler());
final SignerForIdentifier<SecpArtifactSignature> secpSigner = new SignerForIdentifier<>(signerProvider, this::formatSecpSignature, SECP256K1);
routerBuilder.operation(ETH1_SIGN.name()).handler(new BlockingHandlerDecorator(new Eth1SignForIdentifierHandler(secpSigner, new HttpApiMetrics(context.getMetricsSystem(), SECP256K1)), false)).failureHandler(errorHandler);
addReloadHandler(routerBuilder, signerProvider, RELOAD.name(), context.getErrorHandler());
return context.getRouterBuilder().createRouter();
}
Aggregations