# Awesome Bitcoin developer tools: Devimint

**URL:** <https://delvingbitcoin.org/t/awesome-bitcoin-developer-tools-devimint/94>\
**Category:** Implementation\
**Tags:** lang:rust\
**Created:** [September 17, 2023, 2:31am UTC](https://delvingbitcoin.org/t/awesome-bitcoin-developer-tools-devimint/94 "2023-09-17T02:31:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EthnTuttle](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ethntuttle/32/26_2.png) [@EthnTuttle](https://delvingbitcoin.org/u/EthnTuttle)\
**Post date:** [September 17, 2023, 2:31am UTC](https://delvingbitcoin.org/t/awesome-bitcoin-developer-tools-devimint/94/1 "2023-09-17T02:31:15Z")

</div>

> **[20230915 - Bitcoin developer tools suck, Devimint fixes this](https://bitcointv.com/w/gXuKzcErKxWDv3KKBHZSbA)**
>
> Discussion around Devimint (a tool spawned from Fedimint shell scripts into a Rust library/binary) and how it could be a tool for bitcoin developers to reduce friction and the inner developer loop.

(Click bait title is click bait, but _possibly_ correct)

What are your favorite developer tools for working within the bitcoin ecosystem?

I’ll go first.

**Devimint** (see video for full nuanced discussion, see below for summary thoughts)

There is a Rust library/binary (it can be used as both) that has automated the standing up of local regtest bitcoin infrastructure for developer environments or CI/CD tests.

Let’s look at a `match` arm of [`handle_command()`](https://github.com/fedimint/fedimint/blob/044236814450ad5ae83597f069147cc6d357e7ad/devimint/src/main.rs) because it is more elaborate that other commands I’ve documented and Fedimint uses it a lot in the tests. (The comment is from my local branch during exploration)

```auto
async fn handle_command() -> Result<()> {
    let args = Args::parse();
    match args.command { 
        ...
        // spins up bitcoind, cln w/ gateway, lnd w/ gateway, a faucet, electrs, esplora, and a
        // federation sized from FM_FED_SIZE it opens LN channel between the two nodes. it
        // connects the gateways to the federation. it finally switches to use the CLN
        // gateway using the fedimint-cli
        Cmd::DevFed => {
            let (process_mgr, task_group) = setup(args.common).await?;
            let main = async move {
                let dev_fed = dev_fed(&process_mgr).await?;
                dev_fed.fed.pegin(10_000).await?;
                dev_fed.fed.pegin_gateway(20_000, &dev_fed.gw_cln).await?;
                dev_fed.fed.pegin_gateway(20_000, &dev_fed.gw_lnd).await?;
                let daemons = write_ready_file(&process_mgr.globals, Ok(dev_fed)).await?;
                Ok::<_, anyhow::Error>(daemons)
            };
            cleanup_on_exit(main, task_group).await?;
        }
        ...
    Ok(())
}

```

Not only does it connect very commonly used bitcoin daemons/services, it then opens LN channels and generates blocks so it can pegin to a fully setup Fedimint. I’ve heard of but have not used a tool called Polar that seemingly does similar things, but with Docker. Fedimint couples this tool well with nix and mprocs.

Do please watch the click bait video. There is more nuanced ideas and discussion that I did not cover here. NixOS and nix-bitcoin is also mentioned.

So again, “What are your favorite developer tools for working within the bitcoin ecosystem?” and why is/isn’t it devimint?

---

<div class="post-metadata">

**Author:** ![ajtowns](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ajtowns/32/417_2.png) [@ajtowns](https://delvingbitcoin.org/u/ajtowns)\
**Post date:** [September 18, 2023, 4:49am UTC](https://delvingbitcoin.org/t/awesome-bitcoin-developer-tools-devimint/94/2 "2023-09-18T04:49:24Z")

</div>

(Edited the title; clickbait’s okay, but no need to be dismissive of everyone else’s work)

---

<div class="post-metadata">

**Author:** ![EthnTuttle](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ethntuttle/32/26_2.png) [@EthnTuttle](https://delvingbitcoin.org/u/EthnTuttle)\
**Post date:** [September 18, 2023, 2:44pm UTC](https://delvingbitcoin.org/t/awesome-bitcoin-developer-tools-devimint/94/3 "2023-09-18T14:44:22Z")

</div>

Ack and understood. Thank you for the adjustment. I will be more mindful in the future.
