Beispiel #1
0
 public Task <UserInfo> RegisterUserAsync(string name, string password)
 => PostAsync <UserInfo>(ServerRoutes.RegisterUser(), new Dictionary <string, string>()
 {
     ["name"]     = name,
     ["password"] = password,
 });
 public Task <Wallet> GetPoolWalletAsync(string token)
 => GetAsync <Wallet>(ServerRoutes.GetPoolWallet(ApiUrl), token);
 public Task <long> GetPlotTransferCostAsync(int deadlineHours)
 => GetAsync <long>(ServerRoutes.GetPlotTransferPrice(ApiUrl, deadlineHours));
 public Task <List <Miner> > ListMinersByNameAsync(string name)
 => GetAsync <List <Miner> >(ServerRoutes.ListMinersByName(ApiUrl, name));
 public Task <Miner> GetMinerByTokenAsync(string token)
 => GetAsync <Miner>(ServerRoutes.GetMinerByToken(ApiUrl, token));
 public Task <ServerStatus> GetStatusAsync()
 => GetAsync <ServerStatus>(ServerRoutes.Status(ApiUrl));
 public Task <User> GetUserByNameAsync(string name)
 => GetAsync <User>(ServerRoutes.GetUserByName(ApiUrl, name));
Beispiel #8
0
 public Task <List <PlotterInfo> > ListPlottersByOwnerNameAsync(string name)
 => GetAsync <List <PlotterInfo> >(ServerRoutes.ListPlottersByOwnerName(name));
Beispiel #9
0
 public Task <List <PlotterInfo> > ListPlottersByOwnerIdAsync(long id)
 => GetAsync <List <PlotterInfo> >(ServerRoutes.ListPlottersByOwnerId(id));
Beispiel #10
0
 public Task <MinerInfo> GetMinerByTokenAsync(string token)
 => GetAsync <MinerInfo>(ServerRoutes.GetMinerByToken(token));
Beispiel #11
0
 public Task <CreatePlotterResult> CreatePlotterAsync(string name, string username, string password)
 => PostAsync <CreatePlotterResult>(ServerRoutes.CreatePlotter(), new Dictionary <string, string>()
 {
     ["name"] = name,
 }, "Basic", Base64Encode($"{username}:{password}"));
Beispiel #12
0
 public Task <MinerInfo> GetMinerByNameAsync(string name)
 => GetAsync <MinerInfo>(ServerRoutes.GetMinerByName(name));
Beispiel #13
0
 public Task <MinerInfo> GetMinerByIdAsync(long id)
 => GetAsync <MinerInfo>(ServerRoutes.GetMinerById(id));
Beispiel #14
0
 public Task <List <UserInfo> > ListUsersAsync()
 => GetAsync <List <UserInfo> >(ServerRoutes.ListUsers());
Beispiel #15
0
 public Task <PlotTransfer> BuyPlotTransferAsync(string token, int deadlineHours)
 => GetAsync <PlotTransfer>(ServerRoutes.BuyPlotTransfer(deadlineHours), AuthenticationScheme, token);
Beispiel #16
0
 public Task <PlotterInfo> GetPlotterByIdAsync(long id)
 => GetAsync <PlotterInfo>(ServerRoutes.GetPlotterById(id));
Beispiel #17
0
 public Task <string> GetPlottingKeysAsync(string token)
 => GetAsync <string>(ServerRoutes.GetPlottingKeys(), AuthenticationScheme, token);
Beispiel #18
0
 public Task <PlotterInfo> GetPlotterByNameAsync(string name)
 => GetAsync <PlotterInfo>(ServerRoutes.GetPlotterByName(name));
 public Task <List <User> > ListUsersAsync()
 => GetAsync <List <User> >(ServerRoutes.ListUsers(ApiUrl));
Beispiel #20
0
 public Task <PlotterInfo> GetPlotterByTokenAsync(string token)
 => GetAsync <PlotterInfo>(ServerRoutes.GetPlotterByToken(token));
 public Task <User> GetUserByIdAsync(long id)
 => GetAsync <User>(ServerRoutes.GetUserById(ApiUrl, id));
Beispiel #22
0
 public Task <Wallet> GetWalletByOwnerIdAsync(long userId)
 => GetAsync <Wallet>(ServerRoutes.GetWalletByOwnerId(userId));
 public Task <List <Miner> > ListMinersByIdAsync(long id)
 => GetAsync <List <Miner> >(ServerRoutes.ListMinersById(ApiUrl, id));
Beispiel #24
0
 public Task <Wallet> GetWalletByOwnerNameAsync(string name)
 => GetAsync <Wallet>(ServerRoutes.GetWalletByOwnerName(name));
 public Task <Wallet> GetWalletByTokenAsync(string name, string password)
 => GetAsync <Wallet>(ServerRoutes.GetWalletByAccount(ApiUrl, name, password));
Beispiel #26
0
 public Task <Wallet> GetPoolWalletAsync()
 => GetAsync <Wallet>(ServerRoutes.GetPoolWallet());
 public Task <PoolInfo> GetPoolInfoAsync()
 => GetAsync <PoolInfo>(ServerRoutes.GetPoolInfo(ApiUrl));
Beispiel #28
0
 public Task <string> GetPoolWalletAddressAsync(string token)
 => GetAsync <string>(ServerRoutes.GetPoolWalletAddress(), AuthenticationScheme, token);
 public Task <PlotTransfer> BuyPlotTransferAsync(string token, int deadlineHours)
 => GetAsync <PlotTransfer>(ServerRoutes.BuyPlotTransfer(ApiUrl, deadlineHours), token);
Beispiel #30
0
        public async Task <ZipArchive> GetCACertificateArchiveAsync(string token)
        {
            var zipStream = await GetStreamAsync(ServerRoutes.GetCACertificate(), "Miner", token);

            return(new ZipArchive(zipStream));
        }