Skip to content

Instantly share code, notes, and snippets.

View PierreRochard's full-sized avatar
🍯

Pierre Rochard PierreRochard

🍯
View GitHub Profile
bitcoin-s {
datadir = ${HOME}/.bitcoin-s
network = mainnet # regtest, testnet3, mainnet
logging {
level = WARN # trace, debug, info, warn, error, off
# You can also tune specific module loggers.
# They each take the same levels as above.
# If they are commented out (as they are
from twython import Twython
api_key = input('Enter the API key: ')
print('\n')
api_secret = input('Enter the API secret: ')
print('\n')
twitter = Twython(api_key, api_secret)
auth = twitter.get_authentication_tokens()
print(auth['auth_url'])
query($prNumber: Int = 15024){
rateLimit {
limit
cost
remaining
resetAt
}
repository(owner: "bitcoin", name: "bitcoin") {
pullRequest(number: $prNumber) {
id

Archive or remove?

@PierreRochard
PierreRochard / your_lightning_commitment_transaction_with_htlcs
Created May 9, 2019 21:34
Your version of the commitment transaction that you are holding off-chain (with HTLCs)
# Based on a diagram posted by @pm47 https://github.com/lightningnetwork/lightning-rfc/issues/553#issuecomment-455641943
+------------------------------------------------+
| 2-of-2 multi-sig funding tx confirmed on-chain |
+------------------------------------------------+
|
|
|
|
// npm init -f
// npm install grpc --save
// npm install @grpc/proto-loader --save
const grpc = require('grpc');
const fs = require('fs');
const protoLoader = require('@grpc/proto-loader');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
2018-11-03 12:34:10.500 [INF] DISC: Broadcasting batch of 2 new announcements
2018-11-03 12:34:40.501 [INF] DISC: Broadcasting batch of 4 new announcements
2018-11-03 12:35:10.500 [INF] DISC: Broadcasting batch of 3 new announcements
2018-11-03 12:35:40.499 [INF] DISC: Broadcasting batch of 1 new announcements
2018-11-03 12:36:21.474 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:21.474 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:42.041 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:47.475 [INF] RPCS: [newaddress] addr=tb1qfs02pqxf4jq30x5wmeevtsm9jddtus7luhep3j
2018-11-03 12:36:56.303 [INF] RPCS: [sendcoins] addr=tb1qfs02pqxf4jq30x5wmeevtsm9jddtus7luhep3j, amt=0.0018 BTC, sat/kw=253
2018-11-03 12:36:56.316 [INF] LNWL: Inserting unconfirmed transaction 29b4a9242652c10a71c31eb252a2324b662da8dc2d5eebecf7772f2ce057e635
PS C:\Users\pierre> .\Documents\lnd-neutrino.bat
C:\Users\pierre>C:\Users\pierre\Documents\lnd.exe --bitcoin.active --bitcoin.testnet --autopilot.active --autopilot.allocation=1 --autopilot.minchansize=600000 --autopilot.maxchannels=10 --autopilot.private --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --debuglevel=debug
2018-10-28 07:22:23.715 [WRN] LTND: open C:\Users\pierre\AppData\Local\Lnd\lnd.conf: The system cannot find the file specified.
2018-10-28 07:22:23.716 [INF] LTND: Version 0.5.0-beta commit=3b2c807288b1b7f40d609533c1e96a510ac5fa6d
2018-10-28 07:22:23.718 [INF] LTND: Active chain: Bitcoin (network=testnet)
2018-10-28 07:22:23.721 [INF] CHDB: Checking for schema update: latest_version=6, db_version=6
2018-10-28 07:22:23.739 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
2018-10-28 07:22:23.739 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080
2018-10-28 07:22:23.740 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a w
@PierreRochard
PierreRochard / grpc_windows_csharp.md
Last active September 22, 2018 13:31
gRPC Windows C# Command

From https://grpc.io/docs/quickstart/csharp.html C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\protoc.exe -I./protos .\protos\helloworld.proto --csharp_out .\csharp\Helloworld\Greeter\ --grpc_out .\csharp\Helloworld\Greeter\ --plugin=protoc-gen-grpc=C:\Users\pierre.nuget \packages\grpc.tools\1.14.1\tools\windows_x64\grpc_csharp_plugin.exe

From https://grpc.io/docs/tutorials/basic/csharp.html C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\protoc.exe -I.\protos --csharp_out .\csharp\RouteGuide\RouteGuide --grpc_out .\csharp\RouteGuide\RouteGuide .\protos\route_guide.proto --plugin=protoc-gen-grpc=C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\grpc_csharp_plugin.exe

For LND gRPC:

  1. git clone https://github.com/protocolbuffers/protobuf
  2. git clone https://github.com/googleapis/googleapis
Download the latest 64 bit Windows version of Bitcoin Core https://bitcoincore.org/en/download/
Install it but don't run it
Testnet:
& 'C:\Program Files\Bitcoin\bitcoin-qt.exe' -testnet=1 -txindex=1 -zmqpubrawblock=tcp://127.0.0.1:18501 -zmqpubrawtx=tcp://127.0.0.1:18502 -rpcuser=test_user -rpcpassword=test_password -server=1
Mainnet:
& 'C:\Program Files\Bitcoin\bitcoin-qt.exe' -testnet=0 -txindex=1 -zmqpubrawblock=tcp://127.0.0.1:18503 -zmqpubrawtx=tcp://127.0.0.1:18504 -rpcuser=test_user -rpcpassword=test_password -server=1
Let it sync
Download the latest 64 bit Windows version of LND https://github.com/lightningnetwork/lnd/releases