From: CryptoManiac Date: Sun, 23 Aug 2015 03:01:08 +0000 (+0300) Subject: Add license header. X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=commitdiff_plain;h=4426ee1dc8ae6733d46b5413d3bce28333792d22 Add license header. --- diff --git a/License.txt b/License.txt new file mode 100644 index 0000000..e69de29 diff --git a/Novacoin/AddressTools.cs b/Novacoin/AddressTools.cs index a8d78bb..1bf7e2a 100644 --- a/Novacoin/AddressTools.cs +++ b/Novacoin/AddressTools.cs @@ -24,7 +24,6 @@ namespace Novacoin } } - public class AddressTools { private const string strDigits = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; diff --git a/Novacoin/ByteQueue.cs b/Novacoin/ByteQueue.cs index be1b639..1b32adf 100644 --- a/Novacoin/ByteQueue.cs +++ b/Novacoin/ByteQueue.cs @@ -1,8 +1,24 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Novacoin { diff --git a/Novacoin/CBlock.cs b/Novacoin/CBlock.cs index 7286622..5cc3977 100644 --- a/Novacoin/CBlock.cs +++ b/Novacoin/CBlock.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + + using System; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CBlockHeader.cs b/Novacoin/CBlockHeader.cs index 3e799dc..1612ee1 100644 --- a/Novacoin/CBlockHeader.cs +++ b/Novacoin/CBlockHeader.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Linq; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CKey.cs b/Novacoin/CKey.cs index 54990fe..a24d6c8 100644 --- a/Novacoin/CKey.cs +++ b/Novacoin/CKey.cs @@ -1,14 +1,30 @@ -using System.Collections.Generic; -using System.Linq; +/** + * Novacoin classes library + * Copyright (C) 2015 Alex D. (balthazar.ad@gmail.com) -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Parameters; + * 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. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +using Org.BouncyCastle.Asn1.Sec; using Org.BouncyCastle.Asn1.X9; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.Math.EC; using Org.BouncyCastle.Security; -using Org.BouncyCastle.Asn1.Sec; -using Org.BouncyCastle.Math.EC; +using System.Collections.Generic; +using System.Linq; namespace Novacoin diff --git a/Novacoin/CKeyID.cs b/Novacoin/CKeyID.cs index a021d83..c1050b9 100644 --- a/Novacoin/CKeyID.cs +++ b/Novacoin/CKeyID.cs @@ -1,8 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +/** + * 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 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 . + */ namespace Novacoin { diff --git a/Novacoin/CKeyPair.cs b/Novacoin/CKeyPair.cs index c47e7eb..6c7243c 100644 --- a/Novacoin/CKeyPair.cs +++ b/Novacoin/CKeyPair.cs @@ -1,14 +1,30 @@ -using System.Collections.Generic; -using System.Linq; -using System; +/** + * Novacoin classes library + * Copyright (C) 2015 Alex D. (balthazar.ad@gmail.com) -using Org.BouncyCastle.Math; -using Org.BouncyCastle.Math.EC; + * 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. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.Math; +using Org.BouncyCastle.Math.EC; using Org.BouncyCastle.Security; +using System; +using System.Collections.Generic; +using System.Linq; namespace Novacoin diff --git a/Novacoin/CNovacoinAddress.cs b/Novacoin/CNovacoinAddress.cs index 3b41edd..1becaf4 100644 --- a/Novacoin/CNovacoinAddress.cs +++ b/Novacoin/CNovacoinAddress.cs @@ -1,8 +1,23 @@ -using System; +/** + * 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 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 . + */ + using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Novacoin { diff --git a/Novacoin/COutPoint.cs b/Novacoin/COutPoint.cs index 71f2bda..ae6c14b 100644 --- a/Novacoin/COutPoint.cs +++ b/Novacoin/COutPoint.cs @@ -1,8 +1,25 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; namespace Novacoin { diff --git a/Novacoin/CPubKey.cs b/Novacoin/CPubKey.cs index 7feaf84..ff84c78 100644 --- a/Novacoin/CPubKey.cs +++ b/Novacoin/CPubKey.cs @@ -1,4 +1,22 @@ -using System.Collections.Generic; +/** + * 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 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 . + */ + +using System.Collections.Generic; using System.Linq; using Org.BouncyCastle.Math.EC; using Org.BouncyCastle.Crypto.Parameters; diff --git a/Novacoin/CScript.cs b/Novacoin/CScript.cs index 077111f..9e65e38 100644 --- a/Novacoin/CScript.cs +++ b/Novacoin/CScript.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Linq; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CScriptID.cs b/Novacoin/CScriptID.cs index 1f5314e..c252f56 100644 --- a/Novacoin/CScriptID.cs +++ b/Novacoin/CScriptID.cs @@ -1,8 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +/** + * 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 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 . + */ namespace Novacoin { diff --git a/Novacoin/CTransaction.cs b/Novacoin/CTransaction.cs index d2e6e7b..08495af 100644 --- a/Novacoin/CTransaction.cs +++ b/Novacoin/CTransaction.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CTxIn.cs b/Novacoin/CTxIn.cs index 967ae0e..a4660b8 100644 --- a/Novacoin/CTxIn.cs +++ b/Novacoin/CTxIn.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CTxOut.cs b/Novacoin/CTxOut.cs index 32fa51b..2d4d756 100644 --- a/Novacoin/CTxOut.cs +++ b/Novacoin/CTxOut.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Text; using System.Collections.Generic; diff --git a/Novacoin/CryptoUtils.cs b/Novacoin/CryptoUtils.cs index 4c3f808..7c456d7 100644 --- a/Novacoin/CryptoUtils.cs +++ b/Novacoin/CryptoUtils.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Security.Cryptography; namespace Novacoin diff --git a/Novacoin/Hash.cs b/Novacoin/Hash.cs index 4210c28..0089f38 100644 --- a/Novacoin/Hash.cs +++ b/Novacoin/Hash.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Security.Cryptography; using System.Collections.Generic; using System.Linq; diff --git a/Novacoin/Hash160.cs b/Novacoin/Hash160.cs index 4b99ea0..61eb5d8 100644 --- a/Novacoin/Hash160.cs +++ b/Novacoin/Hash160.cs @@ -1,15 +1,31 @@ -using System; -using System.Security.Cryptography; -using System.Collections.Generic; -using System.Text; +/** + * 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 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 . + */ + using System.Linq; +using System.Collections.Generic; +using System.Security.Cryptography; namespace Novacoin { - /// - /// Representation of pubkey/script hash. - /// - public class Hash160 : Hash + /// + /// Representation of pubkey/script hash. + /// + public class Hash160 : Hash { /// /// Computes RIPEMD160 hash using managed library diff --git a/Novacoin/Hash256.cs b/Novacoin/Hash256.cs index 71de8a5..3d98837 100644 --- a/Novacoin/Hash256.cs +++ b/Novacoin/Hash256.cs @@ -1,10 +1,25 @@ -using System; -using System.Text; +/** + * 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 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 . + */ + + using System.Linq; using System.Collections.Generic; -using System.Security.Cryptography; - namespace Novacoin { /// diff --git a/Novacoin/IListExtensions.cs b/Novacoin/IListExtensions.cs index a8ccfd2..391cff7 100644 --- a/Novacoin/IListExtensions.cs +++ b/Novacoin/IListExtensions.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - +using System.Collections.Generic; using System.Diagnostics.Contracts; namespace Novacoin diff --git a/Novacoin/Interop.cs b/Novacoin/Interop.cs index f9766f4..f0b2c93 100644 --- a/Novacoin/Interop.cs +++ b/Novacoin/Interop.cs @@ -1,4 +1,22 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Novacoin/RIPEMD160.cs b/Novacoin/RIPEMD160.cs index 28f5ebf..7185101 100644 --- a/Novacoin/RIPEMD160.cs +++ b/Novacoin/RIPEMD160.cs @@ -1,8 +1,23 @@ -using System; -using System.Security.Cryptography; +/** + * + * 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. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + + using System.Collections.Generic; -using System.Text; using System.Linq; +using System.Security.Cryptography; namespace Novacoin { diff --git a/Novacoin/SHA1.cs b/Novacoin/SHA1.cs index 6d60d1c..4de79ee 100644 --- a/Novacoin/SHA1.cs +++ b/Novacoin/SHA1.cs @@ -1,8 +1,22 @@ -using System; -using System.Text; -using System.Linq; -using System.Collections.Generic; +/** + * + * 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. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +using System.Collections.Generic; +using System.Linq; using System.Security.Cryptography; namespace Novacoin diff --git a/Novacoin/SHA256.cs b/Novacoin/SHA256.cs index b8b6086..68cc8b5 100644 --- a/Novacoin/SHA256.cs +++ b/Novacoin/SHA256.cs @@ -1,10 +1,24 @@ -using System; -using System.Text; +/** + * 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 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 . + */ + using System.Linq; using System.Collections.Generic; -using System.Security.Cryptography; - namespace Novacoin { /// diff --git a/Novacoin/ScriptCode.cs b/Novacoin/ScriptCode.cs index 21fbf67..f6f43d6 100644 --- a/Novacoin/ScriptCode.cs +++ b/Novacoin/ScriptCode.cs @@ -1,11 +1,24 @@ +/** + * + * 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. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + using System; using System.Collections.Generic; using System.Linq; -using System.Text; - using System.Numerics; - -// using Org.BouncyCastle.Math; +using System.Text; namespace Novacoin { @@ -265,7 +278,7 @@ namespace Novacoin { // The next byte contains the number of bytes to be pushed onto the stack, // i.e. you have something like OP_PUSHDATA1 0x01 [0x5a] - szBytes[3] = (byte)codeBytes.Get(); + szBytes[3] = codeBytes.Get(); } else if (opcode == instruction.OP_PUSHDATA2) { diff --git a/Novacoin/ScryptHash256.cs b/Novacoin/ScryptHash256.cs index c53882f..da6c9cc 100644 --- a/Novacoin/ScryptHash256.cs +++ b/Novacoin/ScryptHash256.cs @@ -1,4 +1,20 @@ -using System; +/** + * + * 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. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +using System; using System.Collections.Generic; using System.Linq; diff --git a/Novacoin/VarInt.cs b/Novacoin/VarInt.cs index ea30a58..edca418 100644 --- a/Novacoin/VarInt.cs +++ b/Novacoin/VarInt.cs @@ -1,8 +1,24 @@ -using System; +/** + * 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 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 . + */ + +using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Novacoin { diff --git a/NovacoinTest/Program.cs b/NovacoinTest/Program.cs index 2206ea1..8bd9342 100644 --- a/NovacoinTest/Program.cs +++ b/NovacoinTest/Program.cs @@ -194,10 +194,10 @@ namespace NovacoinTest // Script validation test + CTransaction txTo = new CTransaction(Interop.HexToList("0100000078b4c95306340d96b77ec4ee9d42b31cadc2fab911e48d48c36274d516f226d5e85bbc512c010000006b483045022100c8df1fc17b6ea1355a39b92146ec67b3b53565e636e028010d3a8a87f6f805f202203888b9b74df03c3960773f2a81b2dfd1efb08bb036a8f3600bd24d5ed694cd5a0121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffff364c640420de8fa77313475970bf09ce4d0b1f8eabb8f1d6ea49d90c85b202ee010000006b483045022100b651bf3a6835d714d2c990c742136d769258d0170c9aac24803b986050a8655b0220623651077ff14b0a9d61e30e30f2c15352f70491096f0ec655ae1c79a44e53aa0121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffff7adbd5f2e521f567bfea2cb63e65d55e66c83563fe253464b75184a5e462043d000000006a4730440220183609f2b995993acc9df241aff722d48b9a731b0cd376212934565723ed81f00220737e7ce75ef39bdc061d0dcdba3ee24e43b899696a7c96803cee0a79e1f78ecb0121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffff999eb03e00a41c2f9fde8865a554ceebbc48d30f4c8ba22dd88da8c9b46fa920030000006b483045022100ec1ab104ef086ba79b0f2611ebf1bfdd22a7a1020f6630fa1c6707546626e0db022056093d4048a999392185ccc735ef736a5497bd68f60b42e6c0c93ba770b54d010121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffffc0543b86be257ddd85b014a76718a70fab9eaa3c477460e4ca187094d86f369c0500000069463043021f24275c72f952043174daf01d7f713f878625f0522124a3cab48a0a2e12604202201b47742e6697b0ebdd1e4ba49c74baf142a0228ad0e0ee847488994c9dce78470121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffffe1793d4519147782293dd1db6d90e461265d91db2cc6889c37209394d42ad10d050000006a473044022018a0c3d73b2765d75380614ab36ee8e3c937080894a19166128b1e3357b208fb0220233c9609985f535547381431526867ad0255ec4969afe5c360544992ed6b3ed60121030dd13e6d3c63fa10cc0b6bf968fbbfcb9a988b333813b1f22d04fa60e344bc4cffffffff02e5420000000000001976a91457d84c814b14bd86bf32f106b733baa693db7dc788ac409c0000000000001976a91408c8768d5d6bf7c1d9609da4e766c3f1752247b188ac00000000")); CTransaction txPrev = new CTransaction(Interop.HexToList("0100000079755d53010000000000000000000000000000000000000000000000000000000000000000ffffffff0b03d26401062f503253482fffffffff1cb3250000000000001976a914a1876be00980e343d9fb60b8219e0e8345fc744b88ac7b2c0000000000001976a914549ff7e6fe90d762e2e51678bda26f54fbbfcce388ac4f380000000000001976a9146c923ed1d87738df97301892aca83ba6b262cc4d88acfecc0000000000001976a91458d438e17b2e9f09a79b3920c06e3fd4bdc4cb3788ac84e80000000000001976a914797d85f272d66990adc30a30974c5d643a5dab3f88acc85e0100000000001976a9149a430715e524e951ddd5d947614c6cd4b412ed5888ac4e850100000000001976a914ae0da10f13d51e66fe5559023a2a32ed15ca335f88ac1d180200000000001976a914e2431bf313ac865fd8f1289d1627cf9391fabd7788ac472c0200000000001976a914fcbe5b3267acfea71fe3d768597fdbe0b8a9b16488ace0af0200000000001976a91498facbedc6424820a79c381fdd3c6e7c4389dc3888ac6cbb0200000000001976a9140c3a1469e5088100f11ec56b77fdeba61c25650c88acb8ec0200000000001976a914d99b39f6d1e06c1e2292eb6786188e193c5dec5988acb33c0300000000001976a9141b49aedc9ed1026722b1686e1322be08b998acfe88acca620300000000001976a914753cf85eef5fd49cc9694b67f3ed366508d0562488acc06f0300000000001976a914c157ab891e5f8dfe37a8e7598b53a646eed4028888acb59c0400000000001976a914cad1890de0e59796e501131dc11bd31a6acf96b488ac49070500000000001976a914c7b6639b55215e5d17590f3b5df46ad7ab37ee6d88ac34b20500000000001976a914a8eaab473a06570cafdf2aa44d976d09cc29814d88ac23db0600000000001976a914407356864b5e1b3df8a863d678183140be6ef17588acb55e0700000000001976a914037a31012e8e1962e251c0432d9258058326cdcf88ac278f0800000000001976a914e0e70b5b3192dd3e418642055a50840a19ffcf7088acccad0800000000001976a914640ebcbda496cc9e4fdb2281aeecaa00691007d288ac85ef0800000000001976a91451978f1d2ad964c556127fdb9e201e31a6ca474d88ac45790d00000000001976a9148c0b235018aa2a8f8b884e5fad1e1d1fce4b6cb288aca5a01500000000001976a914b1c9131340b7dbcfc060d977200c43686bcb73f188ac4dce1700000000001976a914684d742a36d06ca1bce3560b00135ca1432b984288ac2dac0000000000004341043b253cc0b5c8ce26f24b84bb955bec955cbb4643f19ab7ea073884f22874abdafc42040b97efec3c9eeb29ce69022a96cc1772f8bc805f78af0d3dc5c441db5fac00000000000000002a6a284d9ca0d38f66957fa8dd5de67fa23034284a51d669ee34b0608e060f56f4dd93000000000200000000000000")); - - Console.WriteLine("Script validation result: {0}", ScriptCode.VerifyScript(tx.vin[0].scriptSig, txPrev.vout[1].scriptPubKey, tx, 0, (int)scriptflag.SCRIPT_VERIFY_P2SH, 0)); + Console.WriteLine("Script validation result: {0}", ScriptCode.VerifyScript(txTo.vin[0].scriptSig, txPrev.vout[1].scriptPubKey, txTo, 0, (int)scriptflag.SCRIPT_VERIFY_P2SH, 0)); Console.ReadLine(); }