Initial commit
authorCryptoManiac <balthazar@yandex.ru>
Thu, 6 Aug 2015 09:27:28 +0000 (12:27 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Thu, 6 Aug 2015 09:27:28 +0000 (12:27 +0300)
Some stubs were implemented for basic classes.

Novacoin.sln [new file with mode: 0644]
Novacoin/CBlock.cs [new file with mode: 0644]
Novacoin/CBlockHeader.cs [new file with mode: 0644]
Novacoin/CTransaction.cs [new file with mode: 0644]
Novacoin/CTxIn.cs [new file with mode: 0644]
Novacoin/CTxOut.cs [new file with mode: 0644]
Novacoin/Hash160.cs [new file with mode: 0644]
Novacoin/Hash256.cs [new file with mode: 0644]
Novacoin/Novacoin.csproj [new file with mode: 0644]
Novacoin/Properties/AssemblyInfo.cs [new file with mode: 0644]

diff --git a/Novacoin.sln b/Novacoin.sln
new file mode 100644 (file)
index 0000000..e64f8e3
--- /dev/null
@@ -0,0 +1,20 @@
+\feff\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 2012\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novacoin", "Novacoin\Novacoin.csproj", "{6C657EA6-E9FB-41D7-B949-B41DD5136748}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {6C657EA6-E9FB-41D7-B949-B41DD5136748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {6C657EA6-E9FB-41D7-B949-B41DD5136748}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {6C657EA6-E9FB-41D7-B949-B41DD5136748}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {6C657EA6-E9FB-41D7-B949-B41DD5136748}.Release|Any CPU.Build.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(MonoDevelopProperties) = preSolution\r
+               StartupItem = Novacoin\Novacoin.csproj\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/Novacoin/CBlock.cs b/Novacoin/CBlock.cs
new file mode 100644 (file)
index 0000000..ca217fe
--- /dev/null
@@ -0,0 +1,27 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       public class CBlock
+       {
+               /// <summary>
+               /// Block header.
+               /// </summary>
+               public CBlockHeader header;
+
+               /// <summary>
+               /// Transactions array.
+               /// </summary>
+               public CTransaction[] tx;
+
+               /// <summary>
+               /// Block header signature.
+               /// </summary>
+               public byte[] signature;
+
+               public CBlock ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/CBlockHeader.cs b/Novacoin/CBlockHeader.cs
new file mode 100644 (file)
index 0000000..0ccc1fb
--- /dev/null
@@ -0,0 +1,42 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       public class CBlockHeader
+       {
+               /// <summary>
+               /// Version of block schema.
+               /// </summary>
+               public uint nVersion;
+
+               /// <summary>
+               /// Previous block hash.
+               /// </summary>
+               public Hash256 prevHash;
+
+               /// <summary>
+               /// Merkle root hash.
+               /// </summary>
+               public Hash256 merkleRoot;
+
+               /// <summary>
+               /// Block timestamp.
+               /// </summary>
+               public uint nTime;
+
+               /// <summary>
+               /// Compressed difficulty representation.
+               /// </summary>
+               public uint nBits;
+
+               /// <summary>
+               /// Nonce counter.
+               /// </summary>
+               public uint nNonce;
+
+               public CBlockHeader ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/CTransaction.cs b/Novacoin/CTransaction.cs
new file mode 100644 (file)
index 0000000..e068a0d
--- /dev/null
@@ -0,0 +1,38 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       public class CTransaction
+       {
+               /// <summary>
+               /// Version of transaction schema.
+               /// </summary>
+               public uint nVersion;
+
+               /// <summary>
+               /// Transaction timestamp.
+               /// </summary>
+               public uint nTime;
+
+               /// <summary>
+               /// Array of transaction inputs
+               /// </summary>
+               public CTxIn[] inputs;
+
+               /// <summary>
+               /// Array of transaction outputs
+               /// </summary>
+               public CTxOut[] outputs;
+
+               /// <summary>
+               /// Block height or timestamp when transaction is final
+               /// </summary>
+               public uint nLockTime;
+
+               public CTransaction ()
+               {
+
+               }
+       }
+}
+
diff --git a/Novacoin/CTxIn.cs b/Novacoin/CTxIn.cs
new file mode 100644 (file)
index 0000000..6c4b5ec
--- /dev/null
@@ -0,0 +1,32 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       public class CTxIn
+       {
+               /// <summary>
+               /// Hash of parent transaction.
+               /// </summary>
+               public Hash256 txID;
+
+               /// <summary>
+               /// Parent input number.
+               /// </summary>
+               public uint nInput;
+
+               /// <summary>
+               /// First half of script, signatures for the scriptPubKey
+               /// </summary>
+               public byte[] scriptSig;
+
+               /// <summary>
+               /// Transaction variant number, irrelevant if nLockTime isn't specified. Its value is 0xffffffff by default.
+               /// </summary>
+               public uint nSequence;
+
+               public CTxIn ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/CTxOut.cs b/Novacoin/CTxOut.cs
new file mode 100644 (file)
index 0000000..b072985
--- /dev/null
@@ -0,0 +1,22 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       public class CTxOut
+       {
+               /// <summary>
+               /// Input value.
+               /// </summary>
+               public ulong nValue;
+
+               /// <summary>
+               /// Second half of script which contains spending instructions.
+               /// </summary>
+               public byte[] scriptPubKey;
+
+               public CTxOut ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/Hash160.cs b/Novacoin/Hash160.cs
new file mode 100644 (file)
index 0000000..8a995d5
--- /dev/null
@@ -0,0 +1,20 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       /// <summary>
+       /// Representation of pubkey/script hash.
+       /// </summary>
+       public class Hash160
+       {
+               /// <summary>
+               /// Array of digest bytes.
+               /// </summary>
+               private byte[] h;
+
+               public Hash160 ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/Hash256.cs b/Novacoin/Hash256.cs
new file mode 100644 (file)
index 0000000..655b300
--- /dev/null
@@ -0,0 +1,20 @@
+\feffusing System;
+
+namespace Novacoin
+{
+       /// <summary>
+       /// Representation of SHA-256 hash
+       /// </summary>
+       public class Hash256
+       {
+               /// <summary>
+               /// Array of digest bytes.
+               /// </summary>
+               private byte[] h;
+
+               public Hash256 ()
+               {
+               }
+       }
+}
+
diff --git a/Novacoin/Novacoin.csproj b/Novacoin/Novacoin.csproj
new file mode 100644 (file)
index 0000000..9f14b3c
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{6C657EA6-E9FB-41D7-B949-B41DD5136748}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>Novacoin</RootNamespace>
+    <AssemblyName>Novacoin</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="CTxIn.cs" />
+    <Compile Include="CTransaction.cs" />
+    <Compile Include="CTxOut.cs" />
+    <Compile Include="Hash256.cs" />
+    <Compile Include="Hash160.cs" />
+    <Compile Include="CBlockHeader.cs" />
+    <Compile Include="CBlock.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/Novacoin/Properties/AssemblyInfo.cs b/Novacoin/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..c1da566
--- /dev/null
@@ -0,0 +1,27 @@
+\feffusing System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle ("Novacoin")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("alex")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion ("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+