public int CompareTo(Account other) { if (ReferenceEquals(this, other)) { return(0); } return(PublicKeyHash.ToHexString().CompareTo(other.PublicKeyHash.ToHexString())); }
public JObject GetJson() { var result = new JObject(); if (PublicKeyHash == null) { throw new SerializeException(string.Format(ErrorCodes.ParameterMissing, _publicKeyHashName)); } if (_key == null) { throw new SerializeException(string.Format(ErrorCodes.ParameterMissing, _keyName)); } result.Add(_networkName, Enum.GetName(typeof(Networks), Network)); result.Add(_typeName, Enum.GetName(typeof(ScriptTypes), Type)); result.Add(_publicKeyHashName, PublicKeyHash.ToHexString()); result.Add(_keyName, _key.GetJson()); return(result); }