public ApiKeyCredentialsProvider(IOptions <FireblocksApiConfiguration> configuration, IDateTimeProvider dateTimeProvider) { _configuration = configuration.Value; _dateTimeProvider = dateTimeProvider; _tokenSource = new CancellationTokenSource(); _encodingSecret = Convert.FromBase64String(_configuration.ApiSecret); }
public static IServiceCollection AddFireblocksClient( this IServiceCollection services, FireblocksApiConfiguration apiConfiguration) { var options = Options.Create(apiConfiguration); services.AddSingleton(options); AddCommonDependencies(services); return(services); }
public FireblocksApiFixture() { var configuration = new FireblocksApiConfiguration() { ApiKey = Secrets.FireblocksApiKey, ApiSecret = Secrets.FireblocksApiSecret, BaseUrl = "https://api.fireblocks.io" }; var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton(configuration); serviceCollection.AddFireblocksClient(configuration); ServiceProvider = serviceCollection.BuildServiceProvider(); }