# Taproot Assets Protocol

Welcome to the API reference documentation for Taproot Assets Daemon.

The Taproot Assets Daemon `tapd` implements the [Taproot Assets Protocol](https://github.com/lightninglabs/taproot-assets/blob/master/docs/bip-tap.mediawiki) for issuing assets on the Bitcoin blockchain. Taproot Assets leverages Taproot transactions to commit to newly created assets and their transfers in an efficient and scalable manner. Multiple assets can be created and transferred in a single bitcoin UTXO, while witness data is transacted and kept off-chain.

## Features:

- Mint assets
- Synchronize to universes
- Send and receive assets
- Export and import Taproot Asset proofs
- Create and manage CLI profiles

## Usage  
Learn how to install, configure, and use Taproot Assets Daemon by viewing the documentation in the [Builder's Guide](https://docs.lightning.engineering/the-lightning-network/taproot-assets).

## Summary  
This site features the documentation for `tapcli` (CLI), and the API documentation for Python and JavaScript clients in order to communicate with a local `tapd` instance through gRPC.

## gRPC  
The code samples assume that the there is a local `tapd` instance running and listening for gRPC connections on port `10029`. `TAPROOT-ASSETS_DIR` will be used as a placeholder to denote the base directory of the `tapd` instance. By default, this is `~/.taproot-assets` on Linux and `~/Library/Application Support/TaprootAssets` on macOS.

At the time of writing this documentation, two things are needed in order to make a gRPC request to an `tapd` instance: a TLS/SSL connection and a macaroon used for RPC authentication. The code samples will show how these can be used in order to make a successful, secure, and authenticated gRPC request.

The original `*.proto` files from which the gRPC documentation was generated can be found here:

- [`assetwalletrpc/assetwallet.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/assetwalletrpc/assetwallet.proto)
- [`authmailboxrpc/mailbox.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/authmailboxrpc/mailbox.proto)
- [`mintrpc/mint.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/mintrpc/mint.proto)
- [`portfoliopilotrpc/portfolio_pilot.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/portfoliopilotrpc/portfolio_pilot.proto)
- [`priceoraclerpc/price_oracle.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/priceoraclerpc/price_oracle.proto)
- [`rfqrpc/rfq.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/rfqrpc/rfq.proto)
- [`tapchannelrpc/tapchannel.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapchannelrpc/tapchannel.proto)
- [`tapcommon.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapcommon.proto)
- [`tapdevrpc/tapdev.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapdevrpc/tapdev.proto)
- [`taprootassets.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/taprootassets.proto)
- [`universerpc/universe.proto`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/universerpc/universe.proto)

## REST  
View a listing of all REST URLs on the [REST Endpoints](/content/api-docs/api/taproot-assets/rest-endpoints/index.html) page.

The code samples assume that the there is a local `tapd` instance running and listening for REST connections on port `8089`. `TAPROOT-ASSETS_DIR` will be used as a placeholder to denote the base directory of the `tapd` instance. By default, this is `~/.taproot-assets` on Linux and `~/Library/Application Support/TaprootAssets` on macOS.

At the time of writing this documentation, two things are needed in order to make an HTTP request to an `tapd` instance: a TLS/SSL connection and a macaroon used for RPC authentication. The code samples will show how these can be used in order to make a successful, secure, and authenticated HTTP request.

The original `*.swagger.json` files from which the gRPC documentation was generated can be found here:

- [`assetwalletrpc/assetwallet.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/assetwalletrpc/assetwallet.swagger.json)
- [`authmailboxrpc/mailbox.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/authmailboxrpc/mailbox.swagger.json)
- [`mintrpc/mint.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/mintrpc/mint.swagger.json)
- [`portfoliopilotrpc/portfolio_pilot.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/portfoliopilotrpc/portfolio_pilot.swagger.json)
- [`priceoraclerpc/price_oracle.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/priceoraclerpc/price_oracle.swagger.json)
- [`rfqrpc/rfq.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/rfqrpc/rfq.swagger.json)
- [`tapchannelrpc/tapchannel.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapchannelrpc/tapchannel.swagger.json)
- [`tapcommon.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapcommon.swagger.json)
- [`tapdevrpc/tapdev.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/tapdevrpc/tapdev.swagger.json)
- [`taprootassets.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/taprootassets.swagger.json)
- [`universerpc/universe.swagger.json`](https://github.com/lightninglabs/taproot-assets/blob/0bf1b0f1d89f0cf5b7560389a089728ded156952/taprpc/universerpc/universe.swagger.json)

### REST Encoding  
**NOTE**: The `byte` field type must be set as the base64 encoded string representation of a raw byte array. Also, any time this must be used in a URL path (ie. `/v1/abc/xyz/{payment_hash}`) the base64 string must be encoded using a [URL and Filename Safe Alphabet](https://tools.ietf.org/html/rfc4648#section-5). This means you must replace `+` with `-`, `/` with `_`, and keep the trailing `=` as is. Url encoding (ie. `%2F`) will not work.

This documentation was [generated automatically](https://github.com/lightninglabs/lightning-api-ng) against commit [`0bf1b0f1d89f0cf5b7560389a089728ded156952`](https://github.com/lightninglabs/taproot-assets/tree/0bf1b0f1d89f0cf5b7560389a089728ded156952).
