Ejemplo n.º 1
0
 /// <summary>
 /// Transfer cryptocurrency and tokens in the same transaction atomically among multiple hedera accounts and contracts.
 /// </summary>
 /// <param name="transfers">
 /// A transfers parameter object holding lists of crypto and token transfers to perform.
 /// </param>
 /// <param name="configure">
 /// Optional callback method providing an opportunity to modify
 /// the execution configuration for just this method call.
 /// It is executed prior to submitting the request to the network.
 /// </param>
 /// <returns>
 /// A transfer receipt indicating success of the consensus operation.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">If required arguments are missing.</exception>
 /// <exception cref="InvalidOperationException">If required context configuration is missing.</exception>
 /// <exception cref="PrecheckException">If the gateway node create rejected the request upon submission.</exception>
 /// <exception cref="ConsensusException">If the network was unable to come to consensus before the duration of the transaction expired.</exception>
 /// <exception cref="TransactionException">If the network rejected the create request as invalid or had missing data.</exception>
 public Task <TransactionRecord> TransferWithRecordAsync(TransferParams transfers, Action <IContext>?configure = null)
 {
     var(cryptoTransfers, tokenTransfers) = RequireInputParameter.CryptoAndTransferList(transfers);
     return(TransferImplementationAsync <TransactionRecord>(cryptoTransfers, tokenTransfers, transfers.Signatory, configure));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Transfer cryptocurrency and tokens in the same transaction atomically among multiple hedera accounts and contracts.
 /// </summary>
 /// <param name="transfers">
 /// A transfers parameter object holding lists of crypto and token transfers to perform.
 /// </param>
 /// <param name="configure">
 /// Optional callback method providing an opportunity to modify
 /// the execution configuration for just this method call.
 /// It is executed prior to submitting the request to the network.
 /// </param>
 /// <returns>
 /// A transfer receipt indicating success of the consensus operation.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">If required arguments are missing.</exception>
 /// <exception cref="InvalidOperationException">If required context configuration is missing.</exception>
 /// <exception cref="PrecheckException">If the gateway node create rejected the request upon submission.</exception>
 /// <exception cref="ConsensusException">If the network was unable to come to consensus before the duration of the transaction expired.</exception>
 /// <exception cref="TransactionException">If the network rejected the create request as invalid or had missing data.</exception>
 public async Task <TransactionRecord> TransferWithRecordAsync(TransferParams transfers, Action <IContext>?configure = null)
 {
     return(new TransactionRecord(await ExecuteTransactionAsync(new CryptoTransferTransactionBody(transfers), configure, true, transfers.Signatory).ConfigureAwait(false)));
 }