internal ShufflingCreationAttachment(JToken jToken) { Amount = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(jToken, Parameters.Amount)); HoldingId = GetAttachmentValue <ulong>(jToken, Parameters.Holding); HoldingType = (HoldingType)GetAttachmentValue <int>(jToken, Parameters.HoldingType); ParticipantCount = GetAttachmentValue <int>(jToken, Parameters.ParticipantCount); RegistrationPeriod = GetAttachmentValue <int>(jToken, Parameters.RegistrationPeriod); }
internal DigitalGoodsPurchaseAttachment(JToken attachments) { DeliveryDeadlineTimestamp = new DateTimeConverter().GetFromNxtTime(GetAttachmentValue <int>(attachments, Parameters.DeliveryDeadlineTimestamp)); GoodsId = GetAttachmentValue <ulong>(attachments, Parameters.Goods); Price = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.PriceNqt)); Quantity = GetAttachmentValue <int>(attachments, Parameters.Quantity); }
internal DigitalGoodsListingAttachment(JToken attachments) { Name = GetAttachmentValue <string>(attachments, Parameters.Name); Description = GetAttachmentValue <string>(attachments, Parameters.Description); Tags = GetAttachmentValue <string>(attachments, Parameters.Tags); Quantity = GetAttachmentValue <int>(attachments, Parameters.Quantity); Price = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.PriceNqt)); }
internal DigitalGoodsDeliveryAttachment(JToken attachments) { Discount = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.DiscountNqt)); GoodsData = new BinaryHexString(GetAttachmentValue <string>(attachments, Parameters.GoodsData)); GoodsIsText = GetAttachmentValue <bool>(attachments, Parameters.GoodsIsText); GoodsNonce = new BinaryHexString(GetAttachmentValue <string>(attachments, Parameters.GoodsNonce)); Purchase = GetAttachmentValue <ulong>(attachments, Parameters.Purchase); }
internal MonetarySystemPublishExchangeOfferAttachment(JToken attachments) { BuyRate = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.BuyRateNqt)); CurrencyId = GetAttachmentValue <ulong>(attachments, Parameters.Currency); ExpirationHeight = GetAttachmentValue <int>(attachments, Parameters.ExpirationHeight); InitialBuySupply = GetAttachmentValue <long>(attachments, Parameters.InitialBuySupply); InitialSellSupply = GetAttachmentValue <long>(attachments, Parameters.InitialSellSupply); SellRate = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.SellRateNqt)); TotalBuyLimit = GetAttachmentValue <long>(attachments, Parameters.TotalBuyLimit); TotalSellLimit = GetAttachmentValue <long>(attachments, Parameters.TotalSellLimit); }
internal MonetarySystemCurrencyIssuanceAttachment(JToken attachments) { Algorithm = GetAttachmentValue <byte>(attachments, Parameters.Algorithm); Code = GetAttachmentValue <string>(attachments, Parameters.Code); Decimals = GetAttachmentValue <byte>(attachments, Parameters.Decimals); Description = GetAttachmentValue <string>(attachments, Parameters.Description); InitialSupply = GetAttachmentValue <long>(attachments, Parameters.InitialSupply); IssuanceHeight = GetAttachmentValue <int>(attachments, Parameters.IssuanceHeight); MaxDifficulty = GetAttachmentValue <int>(attachments, Parameters.MaxDifficulty); MaxSupply = GetAttachmentValue <long>(attachments, Parameters.MaxSupply); MinDifficulty = GetAttachmentValue <int>(attachments, Parameters.MinDifficulty); MinReservePerUnit = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.MinReservePerUnitNqt)); Name = GetAttachmentValue <string>(attachments, Parameters.Name); ReserveSupply = GetAttachmentValue <long>(attachments, Parameters.ReserveSupply); Ruleset = GetAttachmentValue <byte>(attachments, Parameters.Ruleset); SetTypes(GetAttachmentValue <int>(attachments, Parameters.Type)); }
internal AccountControlSetPhasingOnlyAttachment(JToken attachments) { ControlMaxFees = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.ControlMaxFees)); ControlMinDuration = GetAttachmentValue <int>(attachments, Parameters.ControlMinDuration); ControlMaxDuration = GetAttachmentValue <int>(attachments, Parameters.ControlMaxDuration); var phasing = attachments.SelectToken(Parameters.PhasingControlParams); PhasingHoldingId = GetAttachmentValue <ulong>(phasing, Parameters.PhasingHolding); PhasingQuorum = GetAttachmentValue <long>(phasing, Parameters.PhasingQuorum); PhasingMinBalance = GetAttachmentValue <long>(phasing, Parameters.PhasingMinBalance); PhasingMinBalanceModel = (MinBalanceModel)GetAttachmentValue <int>(phasing, Parameters.PhasingMinBalanceModel); PhasingVotingModel = (VotingModel)GetAttachmentValue <int>(phasing, Parameters.PhasingVotingModel); if (phasing.SelectToken(Parameters.PhasingWhitelist) != null) { var array = (JArray)phasing.SelectToken(Parameters.PhasingWhitelist); PhasingWhitelist = array.ToObject <ulong[]>(); } }
internal MonetarySystemReserveIncreaseAttachment(JToken attachments) { AmountPerUnit = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.AmountPerUnitNqt)); CurrencyId = GetAttachmentValue <ulong>(attachments, Parameters.Currency); }
protected MonetarySystemExchange(JToken attachments) { CurrencyId = GetAttachmentValue <ulong>(attachments, Parameters.Currency); Rate = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.RateNqt)); Units = GetAttachmentValue <long>(attachments, Parameters.Units); }
internal MessagingAliasSellAttachment(JToken attachments) { Alias = GetAttachmentValue <string>(attachments, Parameters.Alias); Price = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.PriceNqt)); }
internal DigitalGoodsRefundAttachment(JToken attachments) { PurchaseId = GetAttachmentValue <ulong>(attachments, Parameters.Purchase); Refund = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.RefundNqt)); }
internal DigitalGoodsPriceChangeAttachment(JToken attachments) { GoodsId = GetAttachmentValue <ulong>(attachments, Parameters.Goods); Price = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.PriceNqt)); }
internal ColoredCoinsDividendPaymentAttachment(JToken attachments) { AmountPerQnt = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.AmountNqtPerQnt)); AssetId = GetAttachmentValue <ulong>(attachments, Parameters.Asset); Height = GetAttachmentValue <int>(attachments, Parameters.Height); }
protected ColoredCoinsOrderPlacementAttachment(JToken attachments) { AssetId = GetAttachmentValue <ulong>(attachments, Parameters.Asset); QuantityQnt = GetAttachmentValue <long>(attachments, Parameters.QuantityQnt); Price = Amount.CreateAmountFromNqt(GetAttachmentValue <long>(attachments, Parameters.PriceNqt)); }