///<summary>
 /// Sets the source account for this operation.
 ///</summary>
 ///<param name="account">The operation's source account.</param>
 ///<returns>Builder object so you can chain methods.</returns>
 ///
 public Builder SetSourceAccount(KeyPair account)
 {
     mSourceAccount = account;
     return(this);
 }
 private PaymentOperation(KeyPair destination, Asset asset, string amount)
 {
     Destination = destination ?? throw new ArgumentNullException(nameof(destination), "destination cannot be null");
     Asset       = asset ?? throw new ArgumentNullException(nameof(asset), "asset cannot be null");
     Amount      = amount ?? throw new ArgumentNullException(nameof(amount), "amount cannot be null");
 }
 ///<summary>
 /// Creates a new PaymentOperation builder.
 ///</summary>
 ///<param name="destination">The destination keypair (uses only the public key).</param>
 ///<param name="asset">The asset to send.</param>
 ///<param name="amount">The amount to send in lumens.</param>
 public Builder(KeyPair destination, Asset asset, string amount)
 {
     this.destination = destination;
     this.asset       = asset;
     this.amount      = amount;
 }
 ///<summary>
 /// Construct a new PaymentOperation builder from a PaymentOp XDR.
 ///</summary>
 ///<param name="op"><see cref="PaymentOp"/></param>
 public Builder(PaymentOp op)
 {
     destination = KeyPair.FromXdrPublicKey(op.Destination.InnerValue);
     asset       = Asset.FromXdr(op.Asset);
     amount      = FromXdrAmount(op.Amount.InnerValue);
 }
 /// <summary>
 ///     Set source account of this operation
 /// </summary>
 /// <param name="sourceAccount">Source account</param>
 /// <returns>Builder object so you can chain methods.</returns>
 public Builder SetSourceAccount(KeyPair sourceAccount)
 {
     _sourceAccount = sourceAccount;
     return(this);
 }
 /// <summary>
 ///     Creates a new AllowTrust builder.
 /// </summary>
 /// <param name="trustor">The account of the recipient of the trustline.</param>
 /// <param name="assetCode">
 ///     The asset of the trustline the source account is authorizing. For example, if a gateway wants
 ///     to allow another account to hold its USD credit, the type is USD.
 /// </param>
 /// <param name="authorize">Flag indicating whether the trustline is authorized.</param>
 public Builder(KeyPair trustor, string assetCode, bool authorize)
 {
     _trustor   = trustor;
     _assetCode = assetCode;
     _authorize = authorize;
 }
 private AllowTrustOperation(KeyPair trustor, string assetCode, bool authorize)
 {
     Trustor   = trustor ?? throw new ArgumentNullException(nameof(trustor), "trustor cannot be null");
     AssetCode = assetCode ?? throw new ArgumentNullException(nameof(assetCode), "assetCode cannot be null");
     Authorize = authorize;
 }
 /// <summary>
 ///     Sets the source account for this operation.
 /// </summary>
 /// <param name="sourceAccount"> The operation's source account.</param>
 /// <returns>Builder object so you can chain methods.</returns>
 public Builder SetSourceAccount(KeyPair sourceAccount)
 {
     _SourceAccount = sourceAccount ?? throw new ArgumentNullException(nameof(sourceAccount), "sourceAccount cannot be null");
     return(this);
 }