Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Coding Enthusiast Coding-Enthusiast

🎯
Focusing
  • Autarkysoft
View GitHub Profile
@Coding-Enthusiast
Coding-Enthusiast / BitcoinCoreMiningBug.cs
Created Feb 23, 2021
Testing coinbase maturity on RegTest to be used in Bitcoin.Net CoinbaseQueue class
View BitcoinCoreMiningBug.cs
// Copyright (c) 2021 Autarkysoft
// Distributed under the MIT software license.
// See http://www.opensource.org/licenses/mit-license.php.
// This is using Bitcoin.Net 0.9.0
// Install from nuget using `Install-Package Autarkysoft.Bitcoin -Version 0.9.0`
using Autarkysoft.Bitcoin;
using Autarkysoft.Bitcoin.Blockchain.Blocks;
using Autarkysoft.Bitcoin.Blockchain.Scripts;
using Autarkysoft.Bitcoin.Blockchain.Transactions;
@Coding-Enthusiast
Coding-Enthusiast / gist:8339f64c736053107f0d918675c186e0
Created Aug 30, 2020
515 valid keys are recovered from a WIF missing 7 chars
View gist:8339f64c736053107f0d918675c186e0
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc13VAyRT
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc15Lpsww
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1GjcJ1z
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1JmgZj1
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1TgSYfK
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1YH8BhJ
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1eGCVAm
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1oGcLBe
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1u5JfVe
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc218erjy
@Coding-Enthusiast
Coding-Enthusiast / AddressPlayground.cs
Created Jun 8, 2020
Showcase bitcoin address creation using any script
View AddressPlayground.cs
using Autarkysoft.Bitcoin;
using Autarkysoft.Bitcoin.Blockchain;
using Autarkysoft.Bitcoin.Blockchain.Scripts;
using Autarkysoft.Bitcoin.Blockchain.Scripts.Operations;
using Autarkysoft.Bitcoin.Cryptography.Asymmetric.KeyPairs;
using Autarkysoft.Bitcoin.Cryptography.Hashing;
using Autarkysoft.Bitcoin.Encoders;
public class AddressPlayground
{
@Coding-Enthusiast
Coding-Enthusiast / Sha512.cs
Created May 8, 2019
Unsafe implementation of some hash functions
View Sha512.cs
using System;
using System.Runtime.CompilerServices;
namespace Autarkysoft.Cryptocurrency.Cryptography.Hashing
{
/// <summary>
/// https://tools.ietf.org/html/rfc6234
/// </summary>
public class Sha512 : IHashFunction, IDisposable
{
@Coding-Enthusiast
Coding-Enthusiast / BitwiseOperations.md
Last active Nov 21, 2022
Bitwise operations cheat sheet
View BitwiseOperations.md

AND (&)

100  
101  
---  
100  

OR (|)

100  
101  
---  

101

@Coding-Enthusiast
Coding-Enthusiast / Schnorr.cs
Last active Feb 21, 2019
Schnorr signatures using MuSig and the simple collective signature proposed for Ed25519 before
View Schnorr.cs
using Autarkysoft.Cryptocurrency; // Library not public yet!
using Autarkysoft.Cryptocurrency.Coins;
using Autarkysoft.Cryptocurrency.Cryptography.Asymmetric.EllipticCurve;
using Autarkysoft.Cryptocurrency.Cryptography.Hashing;
using Autarkysoft.Cryptocurrency.Extensions;
using Autarkysoft.Cryptocurrency.KeyPairs;
using System;
using System.Numerics;
namespace TestLibrary
@Coding-Enthusiast
Coding-Enthusiast / MiniPrivateKey.cs
Created Nov 23, 2018
MiniPrivateKey class from CryptoCurrency.Net library.
View MiniPrivateKey.cs
using CryptoCurrency.Net.Coins;
using CryptoCurrency.Net.Extensions;
using CryptoCurrency.Net.Hashing;
using System;
using System.Linq;
using System.Text;
namespace CryptoCurrency.Net.KeyPairs
{
/// <summary>
View InpcBase.cs
public class InpcBase : INotifyPropertyChanged
{
public InpcBase()
{
PropertyDependencyMap = new Dictionary<string, List<string>>();
foreach (var property in GetType().GetProperties())
{
var attributes = property.GetCustomAttributes<DependsOnPropertyAttribute>();
foreach (var dependsAttr in attributes)
View gist:89aaf9c20b11db18be2690eb05c35eb9
<Window x:Class="TestIconvert.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:TestIconvert"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
<Window.Resources>
<vm:CustomConverter x:Key="myConverter"/>
@Coding-Enthusiast
Coding-Enthusiast / Fibonachi.cs
Last active Aug 30, 2017
Find the closest Fibonacci number
View Fibonachi.cs
using System;
using System.Collections.Generic;
namespace Fibonachi
{
class Program
{
static void Main(string[] args)
{
Console.Write("Number: ");