public Builder(xdr.SetTrustLineFlagsOp op) { _asset = Asset.FromXdr(op.Asset); _trustor = KeyPair.FromXdrPublicKey(op.Trustor.InnerValue); _setFlags = op.SetFlags.InnerValue; _clearFlags = op.ClearFlags.InnerValue; }
/// <summary> /// Construct a new CreatePassiveOffer builder from a CreatePassiveOfferOp XDR. /// </summary> /// <param name="op"></param> public Builder(sdkxdr.CreatePassiveSellOfferOp op) { _Selling = Asset.FromXdr(op.Selling); _Buying = Asset.FromXdr(op.Buying); _Amount = FromXdrAmount(op.Amount.InnerValue); var n = new decimal(op.Price.N.InnerValue); var d = new decimal(op.Price.D.InnerValue); _Price = stellar_dotnet_sdk.Amount.DecimalToString(decimal.Divide(n, d)); }
/// <summary> /// Construct a new CreateAccount builder from a CreateAccountOp XDR. /// </summary> /// <param name="op"> /// <see cref="sdkxdr.ManageOfferOp" /> /// </param> public Builder(sdkxdr.ManageOfferOp op) { _Selling = Asset.FromXdr(op.Selling); _Buying = Asset.FromXdr(op.Buying); _Amount = FromXdrAmount(op.Amount.InnerValue); var n = new decimal(op.Price.N.InnerValue); var d = new decimal(op.Price.D.InnerValue); _Price = decimal.Divide(n, d).ToString(); offerId = op.OfferID.InnerValue; }
public Builder(sdkxdr.PathPaymentStrictSendOp op) { _SendAsset = Asset.FromXdr(op.SendAsset); _SendAmount = FromXdrAmount(op.SendAmount.InnerValue); _Destination = KeyPair.FromXdrPublicKey(op.Destination.InnerValue); _DestAsset = Asset.FromXdr(op.DestAsset); _DestMin = FromXdrAmount(op.DestMin.InnerValue); _Path = new Asset[op.Path.Length]; for (var i = 0; i < op.Path.Length; i++) { _Path[i] = Asset.FromXdr(op.Path[i]); } }
public Builder(sdkxdr.PathPaymentStrictReceiveOp op) { _SendAsset = Asset.FromXdr(op.SendAsset); _SendMax = FromXdrAmount(op.SendMax.InnerValue); _Destination = MuxedAccount.FromXdrMuxedAccount(op.Destination); _DestAsset = Asset.FromXdr(op.DestAsset); _DestAmount = FromXdrAmount(op.DestAmount.InnerValue); _Path = new Asset[op.Path.Length]; for (var i = 0; i < op.Path.Length; i++) { _Path[i] = Asset.FromXdr(op.Path[i]); } }
///<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); }
public Builder(sdkxdr.ChangeTrustOp op) { _Asset = Asset.FromXdr(op.Line); _Limit = FromXdrAmount(op.Limit.InnerValue); }
public Builder(xdr.CreateClaimableBalanceOp op) { _asset = Asset.FromXdr(op.Asset); _amount = FromXdrAmount(op.Amount.InnerValue); _claimants = op.Claimants.Select(Claimant.FromXdr).ToArray(); }
public Builder(xdr.ClawbackOp op) { _asset = Asset.FromXdr(op.Asset); _amount = FromXdrAmount(op.Amount.InnerValue); _from = MuxedAccount.FromXdrMuxedAccount(op.From); }
///<summary> /// Construct a new PaymentOperation builder from a PaymentOp XDR. ///</summary> ///<param name="op"><see cref="PaymentOp"/></param> public Builder(PaymentOp op) { _destination = MuxedAccount.FromXdrMuxedAccount(op.Destination); _asset = Asset.FromXdr(op.Asset); _amount = FromXdrAmount(op.Amount.InnerValue); }