really had been wanting to add some data lookups to a project but mempool dot space API has a limit on how many requests you can make but notably they don’t publish what the limit is. this made me really nervous about relying in them.

the data backing for mempool is an open source project called electrs. it turns out im already running an electrs server due to my nix-bitcoin install.

so all i needed to do was figure out how to interface with it and viola, got the data i need all on my own ♥️

big winners here imo are nix-bitcoin and tailscale which makes building personal infrastructure across home servers super easy!! as well as bitcoin being open source. lets go decentralized future!!

Reply to this note

Please Login to reply.

Discussion

very very excited about what this unlocks ngl! got a little more work to do but really happy that i’ve got all yje parts i need to finish this off now!

wen #proxmox

Is this even on a self hosted instance of mempool space?

I've got to start playing with nix. Tailscale is a game changer for not having to do the whole NAT, reverse proxy & TLS termination thing

I have a self hosted version of mempool.space running for a personal signet i spun up for base58 but found it kinda clunky and a lot of compute for what i need for this project

nix-bitcoin has a really really easy to configure fork of the dataserver part of mempool dot space (electrs), with the caveat it’s missing the http transport, its json over tcp

Nice. More direct way to get what you need for the job.

Got a cheatsheet for how I can query my electrs? The mempool space api is well documented but I also dont want to have to run an instance on multiple machines.

will put out some resources once ive got something a bit more robust done!

#holesail is also pretty cool for punching service holes through NAT, although I don't think it's nixified anywhere yet. Eould be a nice addition to #nix-bitcoin: "electrs.holesail.enable = true;"

#headscale is an open source coordinator for a tailscale tailnet. It's in nixpkgs. Limited compared to the closed source company coordinator, but good enough if metadata privacy is a concern.

what is nix-bitcoin? or nixpkgs?

If it works via tailscale, then it will work via holesail as well

Nixpkgs is the main package repository in the package manager for NixOS.

nix-bitcoin is a set of bitcoin-related packages & services written for NixOS. Many of them already support ".onion.enable" which will create the hidden service and make the URL available to the operator user. So adding holesail support might be trivial and very easy to bolt on.