Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nopara73's full-sized avatar
🎯
Focusing

nopara73 nopara73

🎯
Focusing
View GitHub Profile
@nopara73
nopara73 / Program.cs
Last active June 7, 2017 02:16
BasicTransaction
class Program
{
private static readonly Network _network = Network.TestNet;
private static readonly BitcoinExtKey _seed = new BitcoinExtKey("tprv8ZgxMBicQKsPeGSjHbcTdpBxmVvRmySiUkQFBLruRTrn2dXAtn2rqApjVUgqsFkhfJZLYy8kXgRaEgZh7M3zdxyabF1TcwoxZsgpmAnHYyH");
private static readonly ExtKey _fundingExtKey = _seed.ExtKey.Derive(0, false);
private static readonly BitcoinAddress _fundingAddress = _fundingExtKey.ScriptPubKey.GetDestinationAddress(_network); // mkvRuHAv3qek4mP3ipjqFnaFXj4d2kKit3
private static readonly QBitNinjaClient _qBitClient = new QBitNinjaClient(_network);
static void Main(string[] args)
{
@nopara73
nopara73 / Program.cs
Created June 7, 2017 03:19
BuildProofOfTumbleBitConceptTransactions
private static void BuildProofOfTumbleBitConceptTransactions()
{
uint256 txIdToSpend = _qBitClient.GetBalance(_fundingAddress, unspentOnly: false).Result.Operations.First().TransactionId;
Transaction txToSpend = _qBitClient.GetTransaction(txIdToSpend).Result.Transaction;
var tOfferExtKey = _seed.ExtKey.Derive(1, false);
var tOfferDestination = tOfferExtKey.ScriptPubKey.GetDestinationAddress(_network); // mk1soVb7Se1t99v7APGqiXofr2pKVS7hN5
var tFulfillExtKey = _seed.ExtKey.Derive(2, false);
var tFulfillDestination = tFulfillExtKey.ScriptPubKey.GetDestinationAddress(_network); // n4mey3skuXQna149vUaanuAPyEDiunsryT
@nopara73
nopara73 / Program.cs
Created June 7, 2017 04:14
BuildProofOfTumbleBitConceptTransactions
private static void BuildProofOfTumbleBitConceptTransactions()
{
uint256 txIdToSpend = _qBitClient.GetBalance(_fundingAddress, unspentOnly: false).Result.Operations.First().TransactionId;
Transaction txToSpend = _qBitClient.GetTransaction(txIdToSpend).Result.Transaction;
var tOfferExtKey = _seed.ExtKey.Derive(1, false);
var tOfferDestination = tOfferExtKey.ScriptPubKey.GetDestinationAddress(_network); // mk1soVb7Se1t99v7APGqiXofr2pKVS7hN5
var tFulfillExtKey = _seed.ExtKey.Derive(2, false);
var tFulfillDestination = tFulfillExtKey.ScriptPubKey.GetDestinationAddress(_network); // n4mey3skuXQna149vUaanuAPyEDiunsryT
@nopara73
nopara73 / Program.cs
Last active July 12, 2017 06:12
Build basic transaction
using NBitcoin;
using NBitcoin.Policy;
using QBitNinja.Client;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using static System.Console;
namespace HTumbleBitProofOfConcept
@nopara73
nopara73 / Program.cs
Last active July 12, 2017 06:24
Build tOffer and tFulFill
ExtKey _fundingExtKey = _seed.ExtKey.Derive(0, hardened: false);
BitcoinAddress fundingAddress = _fundingExtKey.ScriptPubKey.GetDestinationAddress(_network); // mkvRuHAv3qek4mP3ipjqFnaFXj4d2kKit3
WriteLine($"{nameof(fundingAddress)}: {fundingAddress}");
uint256 txIdToSpend = (await _qBitClient.GetBalance(fundingAddress, unspentOnly: false).ConfigureAwait(false)).Operations.First().TransactionId;
ctsToken.ThrowIfCancellationRequested();
Transaction txToSpend = (await _qBitClient.GetTransaction(txIdToSpend).ConfigureAwait(false)).Transaction;
ctsToken.ThrowIfCancellationRequested();
// BUILD OFFER TRANSACTION
@nopara73
nopara73 / active.md
Created May 1, 2018 19:36
GitHubHallOfFame

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Mon, 01 May 2017 19:27:03 GMT till Tue, 01 May 2018 19:27:03 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@nopara73
nopara73 / AddressPasteImprovement.mediawiki
Last active December 2, 2018 02:48
Address Paste Improvement


  BIP: ?
  Layer: Applications
  Title: Address Paste Improvement
  Author&#58; nopara73 <adam.ficsor73@gmail.com>
          David Molnar <molnardavid84@gmail.com>
  Comments&#45;Summary&#58; No comments yet.
  Comments&#45;URI&#58; 
  Status&#58; Draft
  Type&#58; Standard Track

@nopara73
nopara73 / WasabiCore.md
Last active April 3, 2019 09:34
Bitcoin Core vs Wasabi Wallet - Network Level Privacy
Adversary Core Core + Tor Wasabi 1.1.3 Wasabi 1.1.4 Wasabi 1.1.4 + Full Node
One Peer Is Malicious Spy private private private private private
All Peers Are Malicious Spies vulnerable[1] private vulnerable[2] private private
Tor Breaker private private private private private
All Peers Are Malicious Spies && Tor Breaker vulnerable[1] vulnerable[1] vulnerable[2] vulnerable[1,2] vulnerable[1]
Malicious Wasabi Backend private private private private private
Malicious Wasabi Backend && Tor Breaker private private vulnerable[1] private private
Supernode vulnerable[1] private private private private
Spying ISP vulnerable[1] private vulnerable[2] private private
@nopara73
nopara73 / coldcard.md
Last active April 15, 2019 22:18
Coldcard + Wasabi

1. PSBT passed to Coldcard (Hex + Decoded)

cHNidP8BAFIBAAAAAc7zcL29QILOKmfw2HxoIPW+ptT73rk9dlDTKAKnDZTvAQAAAAD/////AXjzAgAAAAAAFgAUyI/BVg66hOg6mhA75T7jNY4Q9LcAAAAAAAEBH0ANAwAAAAAAFgAUqzA+o/d8FXwN9KUcOx8sOnTCrlEiBgIn178QYmbFrS8Bge/N+qOdlTmwHmXldAfk1XwRUxUutBh6iOeiVAAAgAAAAIAAAACAAAAAAAEAAAAAIgICCkeqqmQACENtyZREwn1I4O7gA6eAVfNwPgEeYM/EaisYeojnolQAAIAAAACAAAAAgAAAAAADAAAAAA==
@nopara73
nopara73 / SpentCoinHack.md
Last active August 12, 2023 04:43
Wasabi Spent Coin Hack

This happens when an unconfirmed transaction spent a coin of yours, but your Wasabi somehow lost knowledge about it. Note that you are going to doxx your IP address to the block explorers mentioned below, unless you do this over Tor browser.

  1. Expand the coin details and check the TransactionId and the Index
  2. Search for the TransactionId in http://blockstream.info and search for the Index in the outputs.
  3. Click on the address and you'll see all the transactions concerning that address.
  4. One of those transactions spend your coin. If the address transactions are too large and you cannot find the spender, then check https://www.smartbit.com.au/
  5. The advantage of SmartBit is that you can click on the spender transaction unlike Blockstream.info, however the disadvantage of SmartBit is that it doesn't provide indexes to the inputs and outputs.
  6. Finally acquire the unconfirmed spending tarnsaction hex that your wallet is not aware of with the following call: `https://blockchain.info/tx/6f31577df3