X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=Novacoin%2FCScriptID.cs;h=9035de5dabbdb61ee3844792f13ae18e392341f6;hb=1dcac5faa2b1477034f82466ffb16170fa2e9bb6;hp=c252f567412d0913444f30a40a3e22a2d9b59d3f;hpb=4426ee1dc8ae6733d46b5413d3bce28333792d22;p=NovacoinLibrary.git
diff --git a/Novacoin/CScriptID.cs b/Novacoin/CScriptID.cs
index c252f56..9035de5 100644
--- a/Novacoin/CScriptID.cs
+++ b/Novacoin/CScriptID.cs
@@ -1,30 +1,50 @@
/**
- * Novacoin classes library
- * Copyright (C) 2015 Alex D. (balthazar.ad@gmail.com)
+* Novacoin classes library
+* Copyright (C) 2015 Alex D. (balthazar.ad@gmail.com)
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see .
+*/
namespace Novacoin
{
- public class CScriptID : Hash160
+ ///
+ /// Represents the script identifier. Internal value is calculated as Hash160(script).
+ ///
+ public class CScriptID : uint160
{
- public CScriptID(Hash160 scriptHash)
+ #region Constructors
+ public CScriptID() : base()
{
- _hashBytes = scriptHash.hashBytes;
}
+ public CScriptID(CScriptID KeyID) : base(KeyID as uint160)
+ {
+ }
+
+ public CScriptID(uint160 pubKeyHash) : base(pubKeyHash)
+ {
+ }
+
+ public CScriptID(byte[] hashBytes) : base(hashBytes)
+ {
+ }
+ #endregion
+
+ ///
+ /// Generate Pay-to-ScriptHash address
+ ///
+ /// Base58 formatted novacoin address
public override string ToString()
{
return (new CNovacoinAddress(this)).ToString();