internal AbstractEncryptedMessage(BinaryHexString message, bool messageIsText, bool compressMessage, bool isPrunable) { MessageIsText = messageIsText; CompressMessage = compressMessage; IsPrunable = isPrunable; Message = message; }
internal ShuffligCancellationAttachment(JToken jToken) { BlameData = GetAttachmentValue <string>(jToken, Parameters.BlameData); CancellingAccountId = GetAttachmentValue <ulong>(jToken, Parameters.CancellingAccount); KeySeeds = GetAttachmentValue <string>(jToken, Parameters.KeySeeds); ShufflingId = GetAttachmentValue <ulong>(jToken, Parameters.Shuffling); ShufflingStateHash = GetAttachmentValue <string>(jToken, Parameters.ShufflingStateHash); }
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 ShufflingRecipientsAttachment(JToken jToken) { ShufflingId = GetAttachmentValue <ulong>(jToken, Parameters.Shuffling); ShufflingStateHash = GetAttachmentValue <string>(jToken, Parameters.ShufflingStateHash); var array = (JArray)jToken.SelectToken(Parameters.RecipientPublicKeys); RecipientPublicKeys = array.ToObject <string[]>().Select(s => new BinaryHexString(s)); }
private Message(string message, bool isText, bool isPrunable, BinaryHexString messageHash) { IsText = isText; MessageText = message; IsPrunable = isPrunable; MessageHash = messageHash; Data = IsText ? Encoding.UTF8.GetBytes(message) : ByteToHexStringConverter.ToBytesFromHexString(message).ToArray(); }
public EncryptedMessage(BinaryReader reader, byte transactionVersion, bool isPrunable) : base(reader, transactionVersion, true) { if (!isPrunable) { throw new ArgumentException("Value must be true", nameof(isPrunable)); } IsPrunable = true; EncryptedMessageHash = reader.ReadBytes(32); Data = null; IsText = false; IsCompressed = false; }
internal ShufflingProcessingAttachment(JToken jToken) { Hash = GetAttachmentValue <string>(jToken, Parameters.Hash); ShufflingId = GetAttachmentValue <ulong>(jToken, Parameters.Shuffling); ShufflingStateHash = GetAttachmentValue <string>(jToken, Parameters.ShufflingStateHash); var array = (JArray)jToken.SelectToken(Parameters.Data); if (array != null) { Data = array.ToObject <string[]>().Select(s => new BinaryHexString(s)); } }
protected EncryptedMessageBase(JToken messageToken) { IsCompressed = Convert.ToBoolean(((JValue)messageToken.SelectToken(Parameters.IsCompressed)).Value.ToString()); IsText = Convert.ToBoolean(((JValue)messageToken.SelectToken(Parameters.IsText)).Value.ToString()); if (messageToken.SelectToken(Parameters.MessageToEncrypt) != null) { MessageToEncrypt = ((JValue)messageToken.SelectToken(Parameters.MessageToEncrypt)).Value.ToString(); } if (messageToken.SelectToken(Parameters.Nonce) != null) { Nonce = ((JValue)messageToken.SelectToken(Parameters.Nonce)).Value.ToString(); Data = ((JValue)messageToken.SelectToken(Parameters.Data)).Value.ToString(); } }
public EncryptedMessageBase(BinaryReader reader, byte transactionVersion, bool isPrunable = false) : base(reader, transactionVersion) { if (!isPrunable) { var length = reader.ReadInt32(); IsText = length < 0; if (length < 0) { length &= int.MaxValue; } Data = reader.ReadBytes(length); Nonce = reader.ReadBytes(32); IsCompressed = version != 2; } }
public CreateTransactionByPublicKey(short deadline, Amount fee, BinaryHexString publicKey) : base(false, deadline, fee) { PublicKey = publicKey; }
public PublicKeyAnnouncement(BinaryReader reader, byte transactionVersion) : base(reader, transactionVersion) { RecipientPublicKey = reader.ReadBytes(32); }
private PublicKeyAnnouncement(BinaryHexString recipientPublicKey) { RecipientPublicKey = recipientPublicKey; }
private EncryptedMessage(JToken messageToken, bool isPrunable, string encryptedMessageHash) : base(messageToken) { IsPrunable = isPrunable; EncryptedMessageHash = encryptedMessageHash; }
public AlreadyEncryptedMessageToSelf(BinaryHexString message, BinaryHexString messageNonce, bool isText, bool isCompressed) : base(message, isText, isCompressed) { Nonce = messageNonce; }
internal AbstractEncryptedMessageToSelf(BinaryHexString message, bool messageIsText, bool compressMessage) { MessageIsText = messageIsText; CompressMessage = compressMessage; Message = message; }
public AlreadyEncryptedMessage(BinaryHexString message, BinaryHexString encryptedMessageNonce, bool isText, bool isCompressed, bool isPrunable = false) : base(message, isText, isCompressed, isPrunable) { Nonce = encryptedMessageNonce; }
internal ShufflingRegistrationAttachment(JToken jToken) { ShufflingFullHash = GetAttachmentValue <string>(jToken, Parameters.ShufflingFullHash); }
public AccountWithPublicKey(ulong accountId, BinaryHexString publicKey) : base(accountId) { PublicKey = publicKey; }
public AccountWithPublicKey(string accountRs, BinaryHexString publicKey) : base(accountRs) { PublicKey = publicKey; }
internal TaggedDataUploadAttachment(JToken jToken) { Hash = new BinaryHexString(GetAttachmentValue <string>(jToken, Parameters.Hash)); ParseTaggedData(jToken); }
internal ShufflingVerificationAttachment(JToken jToken) { ShufflingId = GetAttachmentValue <ulong>(jToken, Parameters.Shuffling); ShufflingStateHash = GetAttachmentValue <string>(jToken, Parameters.ShufflingStateHash); }