Taprim: Build and analyze custom Taproot spending conditions

Hi all,

As part of our main project named PRIM, we’ve been working on Taprim for a while now, and decided to demo it as a separate tool.

It gives you a canvas where you can design spending conditions, such as an HTLC, a recovery path, or an inheritance arrangement. Taprim analyzes those conditions and turns them into a Taproot descriptor.

Under the hood, it uses the Rust miniscript library, currently version 13.2.0, to compile the script conditions. Taprim handles their placement in the Taproot tree and checks what the overall policy allows.

It also highlights consequences that can be easy to miss, such as one person eventually being able to spend alone or every spending path depending on the same key. The timeline lets you see how the available spending paths change over time.

You can try it here: Taprim demo page

There are samples there at the top bar that you can play with. The demo uses dummy keys on testnet. It runs the engine in your browser and is for experimenting with spending conditions.

If you try it, I’d appreciate hearing what was confusing, what you couldn’t express, or where the explanation didn’t match what you expected. A specific example would help a lot.

We haven’t yet opensourced it, for we are actively working on it.

We’re also interested in working with wallet and hardware-wallet teams to bring this into their products. If this is something your team is working on or is interested in, we’d like to talk.

BTW, for NUMS we are using the latest draft of the proposal we have discussed in BIP 395 for now.

Thanks.