Ejemplo n.º 1
0
 public WalletManagerClient(string serverGrpcUrl) : base(serverGrpcUrl)
 {
     Monitoring = new Monitoring.MonitoringClient(Channel);
     Wallets    = new Wallets.WalletsClient(Channel);
     Balances   = new Balances.BalancesClient(Channel);
     Operations = new Operations.OperationsClient(Channel);
     Transfers  = new Transfers.TransfersClient(Channel);
 }
Ejemplo n.º 2
0
        public VaultApiClient(string apiKey, string serverGrpcUrl)
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            var interceptor = GrpcChannel.ForAddress(serverGrpcUrl)
                              .Intercept(metadata =>
            {
                metadata.Add("Authorization", $"Bearer {apiKey}");
                return(metadata);
            });

            Monitoring = new Monitoring.MonitoringClient(interceptor);
            TransferSigningRequests    = new TransferSigningRequests.TransferSigningRequestsClient(interceptor);
            TransferValidationRequests = new TransferValidationRequests.TransferValidationRequestsClient(interceptor);
            Wallets = new Wallets.WalletsClient(interceptor);
        }