/// <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> ApiOffchainBroadcastcommitmentPostAsync(this IBitcoinApi operations, BroadcastCommitmentModel model = default(BroadcastCommitmentModel), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ApiOffchainBroadcastcommitmentPostWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
        public async Task <TransactionHashResponse> BroadcastCommitment([FromBody] BroadcastCommitmentModel model)
        {
            var asset = await GetAsset(model.Asset);

            return(new TransactionHashResponse(await _offchain.BroadcastCommitment(model.ClientPubKey, asset, model.Transaction, true)));
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static object ApiOffchainBroadcastcommitmentPost(this IBitcoinApi operations, BroadcastCommitmentModel model = default(BroadcastCommitmentModel))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IBitcoinApi)s).ApiOffchainBroadcastcommitmentPostAsync(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 ApiOffchainBroadcastcommitmentPost(this IBitcoinApi operations, BroadcastCommitmentModel model = default(BroadcastCommitmentModel))
 {
     return(operations.ApiOffchainBroadcastcommitmentPostAsync(model).GetAwaiter().GetResult());
 }