public ICosmosApiClient CreateClient() { var settings = new CosmosApiClientSettings(); foreach (var configurator in _settingConfigurators) { configurator(settings); } return(new CosmosApiClient(settings)); }
public CosmosApiClient(CosmosApiClientSettings settings) { _settings = settings; _flurlClient = new Lazy <IFlurlClient>(CreateClient, LazyThreadSafetyMode.ExecutionAndPublication); GaiaRest = new GaiaREST(GetClient); TendermintRpc = new TendermintRPC(GetClient); Transactions = new Transactions(GetClient); Auth = new Auth(GetClient); Bank = new Bank(GetClient); Staking = new Staking(GetClient); Governance = new Governance(GetClient); Slashing = new Slashing(GetClient); Distribution = new Distribution(GetClient); Mint = new Mint(GetClient); var jsonSerializerSettings = JsonSerializerSettings(); Serializer = new NewtownJsonSerializer(jsonSerializerSettings); }