public async Task <OffchainClosingResponse> HubCashout(HubCashoutData data) { var request = new CreateCashoutFromHubModel(data.ClientPubKey, data.Hotwallet, data.AssetId); var response = await _apiClient.ApiOffchainCashouthubPostAsync(request); return(PrepareOffchainClosingResult(response)); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> ApiOffchainCashouthubPostAsync(this IBitcoinApi operations, CreateCashoutFromHubModel model = default(CreateCashoutFromHubModel), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ApiOffchainCashouthubPostWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static object ApiOffchainCashouthubPost(this IBitcoinApi operations, CreateCashoutFromHubModel model = default(CreateCashoutFromHubModel)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IBitcoinApi)s).ApiOffchainCashouthubPostAsync(model), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static object ApiOffchainCashouthubPost(this IBitcoinApi operations, CreateCashoutFromHubModel model = default(CreateCashoutFromHubModel)) { return(operations.ApiOffchainCashouthubPostAsync(model).GetAwaiter().GetResult()); }