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); }