Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am grunch on github.
  • I am negrunch (https://keybase.io/negrunch) on keybase.
  • I have a public key ASB3Ha7k17Xhlc8WT9UPk15FgqaoWo4Fid-G4s8rmYFqMAo

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1NPrWYLPzfxf87LpAdrXt3FXGAodmrpV2H https://explorer.blockstack.org/address/1NPrWYLPzfxf87LpAdrXt3FXGAodmrpV2H
@grunch
grunch / guia.md
Last active October 3, 2020 15:47
Guia workshop Lightning Nodes

Guía de instalación de un nodo ligero de Lightning Network utilizando LND neutrino.

1.- Descargar Raspberry pi OS Lite (https://www.raspberrypi.org/downloads/), en esta página están las instrucciones para descargar e instalar la imagen en una micro sd en windows, mac y linux.

2.- Formatear la sd card con Raspberry Pi Imager o con balenaEtcher (https://www.balena.io/etcher/)

NOTA: El símbolo $ se utiliza como prompt y le permite al usuario entrar ordernes al computador, los comandos serán interpretados por bash en Linux, el símbolo # al principio de una línea indica que el texto a continuación es un comentario

3.- Antes de iniciar la raspberry pi con la memoria formateada, debemos insertarla en una computadora y crear dos archivos que nos permitirán conectarnos remotamente. Con el comando touch creamos un archivo vacío y con esto en la partición /boot, con esto habilitamos conexión por ssh en el primer inicio de la sd card recién formateada

BEGIN MESSAGE.
VgJ4jhg9m3CCnls vpvg16cWP91u5ZU 4fiODuNzKrIPJxu y7rlGavsvr79yda
uXHgw2I0UvyGCmg TkYCkqpCL7hTCKq 6Xr2MZHgg4XL6P9 jPUUdEs6bwcgwRX
pnIrBOcZ3D9dzTJ kMBznnrkTgOxDML qdgOLbJBrN3HP3E 2zslNsiCcVifJMO
ftzsJle2lpif8sW iqMRnLuOUshKE6L O6YxW21.
END MESSAGE.
BEGIN MESSAGE.
VgJ4jhg9m3CCnls vpvg16cWP91u5ZU 4fiODuNzKrIPJxu y7rlGavsvr79yda
uXHgw2I0UvyGCmg TkYCkqpCL7hTCKq 6Xr2MZHgg4XL6P9 jPUUdEs6bwcgwRX
pnIrBOcZ3D9dzTJ kMBznnrkTgOxDML qdgOLbJBrN3HP3E 2zslNsiCcVifJMO
ftzsJle2lpif8sW iqMRnLuOUshKE6L O6YxW21.
END MESSAGE.
@grunch
grunch / guia-lapp.md
Last active August 19, 2021 15:23
Guia de configuración inicial para desarrollar una LApp

Tutorial para desarrollar tu primera LApp

Requisitos:

  • NodeJs >= 8
  • LND >= 9

NodeJs puede ser descargado en su sitio oficial https://nodejs.org

En lugar de descargar y configurar un nodo LND, vamos a utilizar la herramienta polar, la cual realizará esta tarea por nosotros.

@grunch
grunch / miniscript.rs
Created July 16, 2021 14:45
miniscript
use miniscript::DescriptorTrait;
use std::str::FromStr;
use bitcoin::{Network, PrivateKey, PublicKey};
use bitcoin::secp256k1;
use bdk::Error;
#[derive(Debug)]
pub struct WifAndHexPub {
wif: String,
hex_pub: String,
@grunch
grunch / miniscript2.rs
Last active July 22, 2021 13:30
miniscript with bdk example
use std::str::FromStr;
use bitcoin::Address;
use bitcoin::util::psbt::PartiallySignedTransaction;
use bitcoin::consensus::{encode::serialize};
use anyhow::{Result};
use bdk::{Wallet, database::MemoryDatabase};
use bdk::wallet::{coin_selection::DefaultCoinSelectionAlgorithm};
use bdk::blockchain::{electrum, noop_progress};
use bdk::electrum_client::Client;
use bdk::KeychainKind;
@grunch
grunch / lntip.md
Last active October 4, 2022 22:34
LNTip

Tutorial para desarrollar una Lightning App para recibir Propinas

Requisitos:

  • NodeJs >= 8
  • LND >= 0.13

NodeJs puede ser descargado en su sitio oficial

En lugar de descargar y configurar un nodo LND, vamos a utilizar la herramienta polar, la cual realizará esta tarea por nosotros.

@grunch
grunch / rgb-node.md
Last active December 21, 2021 21:11

RGB node

git clone git@github.com:rgb-org/rgb-node.git
cd rgb-node
git checkout 3f3c520c19d84c66d430e76f0fc68c5a66d79c84
cargo install --path . --all-features --locked
....
Installed package `rgb_node v0.4.2 (/home/grunch/dev/rgb-node)` (executables `fungibled`, `rgb-cli`, `rgbd`, `stashd`)