description |
---|
The Taproot Assets Daemon tapd implements the Taproot Assets Protocol for issuing assets on the Bitcoin blockchain. |
Taproot Assets is alpha software. Use it on mainnet at your own risk!
Taproot Assets requires LND v0.17.0. If compiled from source, it needs to be built with tags=signrpc walletrpc chainrpc invoicesrpc
. LND needs to be synced and running on the same bitcoin network as you are doing your testing. RPC connections need to be accepted and Macaroons need to be set. Learn how to set up LND using the default configuration here. For onchain operations, this LND node should have some funds in its onchain wallet, but does not need open channels to mint, send and receive Taproot Assets on chain.
Compile Taproot Assets from source by cloning the taproot-assets repository. Go version 1.21 or higher is recommended (you may check what version of go is running with go version
).
git clone https://github.com/lightninglabs/taproot-assets.git
cd taproot-assets
checkout <latest version>
make install
{% embed url="https://www.youtube.com/watch?v=Z7KLo-pGBJA" %} Tapping into Taproot Assets #1: Install from Source {% endembed %}
Optionally, create a Taproot Assets configuration file under ~/.tapd/tapd.conf
on Linux or BSD, ~/Library/Application Support/tapd/tapd.conf
in Mac OS or $LOCALAPPDATA/Tapd/tap.conf
in Windows.
Within the tapd.conf
file you can permanently set your variables, such as directory, macaroon or other paths and how to connect to your LND.
As there is currently no migration path between the SQLite and Postgres backends, the backend needs to be configured when tapd
is first initialized.
Run Taproot Assets with the command tapd
. Specify how Taproot Assets can reach LND and what bitcoin network to run Taproot Assets with by passing it additional flags.
tapd --network=testnet --debuglevel=debug --lnd.host=localhost:10009 --lnd.macaroonpath=/.lnd/data/chain/bitcoin/testnet/admin.macaroon --lnd.tlspath=/.lnd/tls.cert --tapddir=~/.tapd --rpclisten=127.0.0.1:10029 --restlisten=127.0.0.1:8089
You may run multiple tapd instances on the same machine, but you will also have to set up multiple LND instances. Refer to this guide for how to set up multiple LND instances with a single Bitcoin backend using rpcpolling
. When running multiple tapd
instances on one machine, don’t forget to set an alternate Taproot Assets directory and API endpoints and specify these when calling tapcli
as well.
For example, to run a second instance of tapd
:
tapd --tapddir=~/.tapd-2 --rpclisten=127.0.0.1:10030 --restlisten=127.0.0.1:8090
To interact with this second instance using tapcli
:
tapcli --rpcserver=127.0.0.1:10030 --tapddir=~/.tapd-2
You can make use of tapcli profiles
to make calls to separate tapd
instances on the same machine.
Tapd is included in the Litd bundle. This allows you to run LND and Tapd in the same process and removes the need to configure the two separately.
{% embed url="https://www.youtube.com/watch?v=EaPZ3EbTWhE" %} Tapping into Taproot Assets #3: Launch with Litd {% endembed %}