Search in sources :

Example 1 with FcBlsArtifactSigner

use of tech.pegasys.web3signer.signing.FcBlsArtifactSigner in project web3signer by ConsenSys.

the class FilecoinRunner method createArtifactSignerProvider.

@Override
protected ArtifactSignerProvider createArtifactSignerProvider(final Vertx vertx, final MetricsSystem metricsSystem) {
    return new DefaultArtifactSignerProvider(() -> {
        final AzureKeyVaultSignerFactory azureFactory = new AzureKeyVaultSignerFactory();
        final HashicorpConnectionFactory hashicorpConnectionFactory = new HashicorpConnectionFactory(vertx);
        try (final InterlockKeyProvider interlockKeyProvider = new InterlockKeyProvider(vertx);
            final YubiHsmOpaqueDataProvider yubiHsmOpaqueDataProvider = new YubiHsmOpaqueDataProvider();
            final AwsSecretsManagerProvider awsSecretsManagerProvider = new AwsSecretsManagerProvider(AWS_CACHE_MAXIMUM_SIZE)) {
            final AbstractArtifactSignerFactory blsArtifactSignerFactory = new BlsArtifactSignerFactory(config.getKeyConfigPath(), metricsSystem, hashicorpConnectionFactory, interlockKeyProvider, yubiHsmOpaqueDataProvider, awsSecretsManagerProvider, (args) -> new FcBlsArtifactSigner(args.getKeyPair(), network));
            final AbstractArtifactSignerFactory secpArtifactSignerFactory = new Secp256k1ArtifactSignerFactory(hashicorpConnectionFactory, config.getKeyConfigPath(), azureFactory, interlockKeyProvider, yubiHsmOpaqueDataProvider, signer -> new FcSecpArtifactSigner(signer, network), false);
            return new SignerLoader().load(config.getKeyConfigPath(), "yaml", new YamlSignerParser(List.of(blsArtifactSignerFactory, secpArtifactSignerFactory)));
        }
    });
}
Also used : HashicorpConnectionFactory(tech.pegasys.signers.hashicorp.HashicorpConnectionFactory) FcBlsArtifactSigner(tech.pegasys.web3signer.signing.FcBlsArtifactSigner) YamlSignerParser(tech.pegasys.web3signer.signing.config.metadata.parser.YamlSignerParser) AbstractArtifactSignerFactory(tech.pegasys.web3signer.signing.config.metadata.AbstractArtifactSignerFactory) SignerLoader(tech.pegasys.web3signer.signing.config.SignerLoader) InterlockKeyProvider(tech.pegasys.web3signer.signing.config.metadata.interlock.InterlockKeyProvider) AwsSecretsManagerProvider(tech.pegasys.signers.aws.AwsSecretsManagerProvider) Secp256k1ArtifactSignerFactory(tech.pegasys.web3signer.signing.config.metadata.Secp256k1ArtifactSignerFactory) YubiHsmOpaqueDataProvider(tech.pegasys.web3signer.signing.config.metadata.yubihsm.YubiHsmOpaqueDataProvider) DefaultArtifactSignerProvider(tech.pegasys.web3signer.signing.config.DefaultArtifactSignerProvider) BlsArtifactSignerFactory(tech.pegasys.web3signer.signing.config.metadata.BlsArtifactSignerFactory) FcSecpArtifactSigner(tech.pegasys.web3signer.signing.FcSecpArtifactSigner) AzureKeyVaultSignerFactory(tech.pegasys.signers.secp256k1.azure.AzureKeyVaultSignerFactory)

Aggregations

AwsSecretsManagerProvider (tech.pegasys.signers.aws.AwsSecretsManagerProvider)1 HashicorpConnectionFactory (tech.pegasys.signers.hashicorp.HashicorpConnectionFactory)1 AzureKeyVaultSignerFactory (tech.pegasys.signers.secp256k1.azure.AzureKeyVaultSignerFactory)1 FcBlsArtifactSigner (tech.pegasys.web3signer.signing.FcBlsArtifactSigner)1 FcSecpArtifactSigner (tech.pegasys.web3signer.signing.FcSecpArtifactSigner)1 DefaultArtifactSignerProvider (tech.pegasys.web3signer.signing.config.DefaultArtifactSignerProvider)1 SignerLoader (tech.pegasys.web3signer.signing.config.SignerLoader)1 AbstractArtifactSignerFactory (tech.pegasys.web3signer.signing.config.metadata.AbstractArtifactSignerFactory)1 BlsArtifactSignerFactory (tech.pegasys.web3signer.signing.config.metadata.BlsArtifactSignerFactory)1 Secp256k1ArtifactSignerFactory (tech.pegasys.web3signer.signing.config.metadata.Secp256k1ArtifactSignerFactory)1 InterlockKeyProvider (tech.pegasys.web3signer.signing.config.metadata.interlock.InterlockKeyProvider)1 YamlSignerParser (tech.pegasys.web3signer.signing.config.metadata.parser.YamlSignerParser)1 YubiHsmOpaqueDataProvider (tech.pegasys.web3signer.signing.config.metadata.yubihsm.YubiHsmOpaqueDataProvider)1