NAV
shell python javascript

Taro gRPC API Reference

Welcome to the gRPC API reference documentation for Taro.

The Taro Daemon tarod implements the Taro protocol for issuing assets on the Bitcoin blockchain. Taro 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:

This site features the documentation for pool (CLI), and the API documentation for Python and JavaScript clients in order to communicate with a local tarod instance through gRPC.

The examples to the right assume that the there is a local tarod instance running and listening for gRPC connections on port 10029. TARO_DIR will be used as a placeholder to denote the base directory of the tarod instance. By default, this is ~/.taro on Linux and ~/Library/Application Support/Taro on macOS.

At the time of writing this documentation, two things are needed in order to make a gRPC request to a tarod instance: a TLS/SSL connection and a macaroon used for RPC authentication. The examples to the right 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:

This is the reference for the gRPC API. Alternatively, there is also a REST API which is documented here.

This documentation was generated automatically against commit e0007b59d2e4879524287e1f41277dd4fd40356d.

Service Taro

Taro.AddrReceives

Unary RPC

List all receives for incoming asset transfers for addresses that were created previously.


# - Show all inbound asset transfers

$ tarocli addrs receives [command options] [--addr | addr]

# --addr value  show transfers of a single address only
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.AddrReceivesRequest(
        filter_addr=<string>,
        filter_status=<AddrEventStatus>,
    )
>>> response = stub.AddrReceives(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "events": <array AddrEvent>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  filter_addr: <string>, 
  filter_status: <AddrEventStatus>, 
};
taro.addrReceives(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "events": <array AddrEvent>,
//  }

gRPC Request: tarorpc.AddrReceivesRequest

Parameter Type Description
filter_addr string Filter receives by a specific address. Leave empty to get all receives.
filter_status AddrEventStatus Filter receives by a specific status. Leave empty to get all receives.

gRPC Response: tarorpc.AddrReceivesResponse

Parameter Type Description
events array AddrEvent The events that match the filter criteria.

Taro.DebugLevel

Unary RPC

DebugLevel allows a caller to programmatically set the logging verbosity of tarod. The logging can be targeted according to a coarse daemon-wide logging level, or in a granular fashion to specify the logging for a target sub-system.


# Logging level for all subsystems {trace, debug, info, warn, error, critical, off}
# You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems
# Use show to list available subsystems

$ tarocli debuglevel [command options] [arguments...]

# --show         if true, then the list of available sub-systems will be printed out
# --level value  the level specification to target either a coarse logging level, or granular set of specific sub-systems with logging levels for each
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.DebugLevelRequest(
        show=<bool>,
        level_spec=<string>,
    )
>>> response = stub.DebugLevel(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "sub_systems": <string>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  show: <bool>, 
  level_spec: <string>, 
};
taro.debugLevel(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "sub_systems": <string>,
//  }

gRPC Request: tarorpc.DebugLevelRequest

Parameter Type Description
show bool If true, all the valid debug sub-systems will be returned.
level_spec string

gRPC Response: tarorpc.DebugLevelResponse

Parameter Type Description
sub_systems string

Taro.DecodeAddr

Unary RPC

DecodeAddr decode a Taro address into a partial asset message that represents the asset it wants to receive.


# - Attempt to decode a taro addr

$ tarocli addrs decode [command options] [--addr | addr]

# --addr value  the address to decode
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.DecodeAddrRequest(
        addr=<string>,
    )
>>> response = stub.DecodeAddr(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "encoded": <string>,
    "asset_id": <bytes>,
    "asset_type": <AssetType>,
    "amount": <int64>,
    "group_key": <bytes>,
    "script_key": <bytes>,
    "internal_key": <bytes>,
    "taproot_output_key": <bytes>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  addr: <string>, 
};
taro.decodeAddr(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "encoded": <string>,
//      "asset_id": <bytes>,
//      "asset_type": <AssetType>,
//      "amount": <int64>,
//      "group_key": <bytes>,
//      "script_key": <bytes>,
//      "internal_key": <bytes>,
//      "taproot_output_key": <bytes>,
//  }

gRPC Request: tarorpc.DecodeAddrRequest

Parameter Type Description
addr string

gRPC Response: tarorpc.Addr

Parameter Type Description
encoded string The bech32 encoded Taro address.
asset_id bytes The asset ID that uniquely identifies the asset.
asset_type AssetType The type of the asset.
amount int64 The total amount of the asset stored in this Taro UTXO.
group_key bytes The group key of the asset (if it exists)
script_key bytes The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key bytes The internal key used for the on-chain output.
taproot_output_key bytes The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

Taro.ExportProof

Unary RPC

ExportProof exports the latest raw proof file anchored at the specified script_key.


# export a taro proof

$ tarocli proofs export [command options] [arguments...]

# --asset_id value    the asset ID of the asset to export
# --script_key value  the script key of the asset to export
# --proof_file value  (optional) the file to write the raw proof to; use the dash character (-) to write the raw binary proof to stdout instead of the default JSON format
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ExportProofRequest(
        asset_id=<bytes>,
        script_key=<bytes>,
    )
>>> response = stub.ExportProof(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "raw_proof": <bytes>,
    "genesis_point": <string>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  asset_id: <bytes>, 
  script_key: <bytes>, 
};
taro.exportProof(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "raw_proof": <bytes>,
//      "genesis_point": <string>,
//  }

gRPC Request: tarorpc.ExportProofRequest

Parameter Type Description
asset_id bytes
script_key bytes

gRPC Response: tarorpc.ProofFile

Parameter Type Description
raw_proof bytes
genesis_point string

Taro.ImportProof

Unary RPC

ImportProof attempts to import a proof file into the daemon. If successful, a new asset will be inserted on disk, spendable using the specified target script key, and internal key.


# import a taro proof, resulting in a spendable asset

$ tarocli proofs import [command options] [arguments...]

# --proof_file value  the path to the proof file on disk; use the dash character (-) to read from stdin instead
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ImportProofRequest(
        proof_file=<bytes>,
        genesis_point=<string>,
    )
>>> response = stub.ImportProof(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  proof_file: <bytes>, 
  genesis_point: <string>, 
};
taro.importProof(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//  }

gRPC Request: tarorpc.ImportProofRequest

Parameter Type Description
proof_file bytes
genesis_point string

gRPC Response: tarorpc.ImportProofResponse

This response has no parameters.

Taro.ListAssets

Unary RPC

ListAssets lists the set of assets owned by the target daemon.


# list all pending and mined assets

$ tarocli assets list [arguments...]

>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ListAssetRequest()
>>> response = stub.ListAssets(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "assets": <array Asset>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = {}
taro.listAssets(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "assets": <array Asset>,
//  }

gRPC Request: tarorpc.ListAssetRequest

This request has no parameters.

gRPC Response: tarorpc.ListAssetResponse

Parameter Type Description
assets array Asset

Taro.ListBalances

Unary RPC

ListBalances lists asset balances


# list balances for all assets or a selected asset

$ tarocli assets balance [command options] [arguments...]

# --by_group         Group asset balances by group key
# --asset_id value   A specific asset ID to run the balance query against
# --group_key value  A specific asset group key to run the balance query against. Must be used together with --by_group
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ListBalancesRequest(
        asset_id=<bool>,
        group_key=<bool>,
        asset_filter=<bytes>,
        group_key_filter=<bytes>,
    )
>>> response = stub.ListBalances(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "asset_balances": <array AssetBalancesEntry>,
    "asset_group_balances": <array AssetGroupBalancesEntry>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  asset_id: <bool>, 
  group_key: <bool>, 
  asset_filter: <bytes>, 
  group_key_filter: <bytes>, 
};
taro.listBalances(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "asset_balances": <array AssetBalancesEntry>,
//      "asset_group_balances": <array AssetGroupBalancesEntry>,
//  }

gRPC Request: tarorpc.ListBalancesRequest

Parameter Type Description
asset_id bool Group results by asset IDs.
group_key bool Group results by group keys.
asset_filter bytes If the query results should grouped by asset ids, then an optional asset filter may be provided to query balance of a specific asset.
group_key_filter bytes If the query results should be grouped by group keys, then an optional group key filter may be provided to query the balance of a specific asset group.

gRPC Response: tarorpc.ListBalancesResponse

Parameter Type Description
asset_balances array AssetBalancesEntry
asset_group_balances array AssetGroupBalancesEntry

Taro.ListTransfers

Unary RPC

ListTransfers lists outbound asset transfers tracked by the target daemon.


# list outgoing transfers of all assets or a selected asset

$ tarocli assets transfers [command options] [arguments...]

# --asset_id value  A specific asset ID to list outgoing transfers for
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ListTransfersRequest()
>>> response = stub.ListTransfers(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "transfers": <array AssetTransfer>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = {}
taro.listTransfers(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "transfers": <array AssetTransfer>,
//  }

gRPC Request: tarorpc.ListTransfersRequest

This request has no parameters.

gRPC Response: tarorpc.ListTransfersResponse

Parameter Type Description
transfers array AssetTransfer The unordered list of outgoing asset transfers.

Taro.ListUtxos

Unary RPC

ListUtxos lists the UTXOs managed by the target daemon, and the assets they hold.


# list all utxos managing assets

$ tarocli assets utxos [arguments...]

>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ListUtxosRequest()
>>> response = stub.ListUtxos(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "managed_utxos": <array ManagedUtxosEntry>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = {}
taro.listUtxos(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "managed_utxos": <array ManagedUtxosEntry>,
//  }

gRPC Request: tarorpc.ListUtxosRequest

This request has no parameters.

gRPC Response: tarorpc.ListUtxosResponse

Parameter Type Description
managed_utxos array ManagedUtxosEntry The set of UTXOs managed by the daemon.

Taro.MintAsset

Unary RPC

MintAsset will attempts to mint the set of assets (async by default to ensure proper batching) specified in the request.


# Attempt to mint a new asset with the specified parameters

$ tarocli assets mint [command options] [arguments...]

# --type value       the type of asset, must either be: normal, or collectible
# --name value       the name/tag of the asset
# --supply value     the target supply of the minted asset (default: 0)
# --meta value       the metadata associated with the asset
# --enable_emission  if true, then the asset supports on going emission
# --skip_batch       if true, then the asset will be minted immediately
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.MintAssetRequest(
        asset_type=<AssetType>,
        name=<string>,
        meta_data=<bytes>,
        amount=<int64>,
        enable_emission=<bool>,
        skip_batch=<bool>,
    )
>>> response = stub.MintAsset(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "batch_key": <bytes>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  asset_type: <AssetType>, 
  name: <string>, 
  meta_data: <bytes>, 
  amount: <int64>, 
  enable_emission: <bool>, 
  skip_batch: <bool>, 
};
taro.mintAsset(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "batch_key": <bytes>,
//  }

gRPC Request: tarorpc.MintAssetRequest

Parameter Type Description
asset_type AssetType The type of the asset to be created.
name string The name, or "tag" of the asset. This will affect the final asset ID.
meta_data bytes An opaque blob that resents metadata related to the asset. This will affect the final asset ID.
amount int64 The total amount of units of the new asset that should be created. If the AssetType is Collectible, then this field cannot be set.
enable_emission bool If true, then the asset will be created with a key group, which allows for future asset issuance.
skip_batch bool If true, then a batch will be created immediately. Otherwise the asset creation transaction may be batched with other pending minting requests.

gRPC Response: tarorpc.MintAssetResponse

Parameter Type Description
batch_key bytes A public key serialized in compressed format that can be used to uniquely identify a pending minting batch. Responses that share the same key will be batched into the same minting transaction.

Taro.NewAddr

Unary RPC

NewAddr makes a new address from the set of request params.


# Create a new Taro address to receive an asset on-chain

$ tarocli addrs new [command options] [arguments...]

# --genesis_bootstrap_info value  the asset genesis bootstrap info of the asset to receive
# --group_key value               optional, the group key of the asset to receive
# --amt value                     the amt of the asset to receive (default: 0)
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.NewAddrRequest(
        genesis_bootstrap_info=<bytes>,
        group_key=<bytes>,
        amt=<int64>,
    )
>>> response = stub.NewAddr(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "encoded": <string>,
    "asset_id": <bytes>,
    "asset_type": <AssetType>,
    "amount": <int64>,
    "group_key": <bytes>,
    "script_key": <bytes>,
    "internal_key": <bytes>,
    "taproot_output_key": <bytes>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  genesis_bootstrap_info: <bytes>, 
  group_key: <bytes>, 
  amt: <int64>, 
};
taro.newAddr(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "encoded": <string>,
//      "asset_id": <bytes>,
//      "asset_type": <AssetType>,
//      "amount": <int64>,
//      "group_key": <bytes>,
//      "script_key": <bytes>,
//      "internal_key": <bytes>,
//      "taproot_output_key": <bytes>,
//  }

gRPC Request: tarorpc.NewAddrRequest

Parameter Type Description
genesis_bootstrap_info bytes
group_key bytes
amt int64

gRPC Response: tarorpc.Addr

Parameter Type Description
encoded string The bech32 encoded Taro address.
asset_id bytes The asset ID that uniquely identifies the asset.
asset_type AssetType The type of the asset.
amount int64 The total amount of the asset stored in this Taro UTXO.
group_key bytes The group key of the asset (if it exists)
script_key bytes The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key bytes The internal key used for the on-chain output.
taproot_output_key bytes The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

Taro.QueryAddrs

Unary RPC

QueryTaroAddrs queries the set of Taro addresses stored in the database.


# Query for the set of created addresses, supports pagination

$ tarocli addrs query [command options] [arguments...]

# --created_after value   a duration short hand (-1h, 2d, 2w, etc)
# --created_before value  a duration short hand (-2h, 3d, 2w, etc)
# --limit value           the max number of addrs to returned (default: 0)
# --offset value          the number of addrs to skip before returning the first addr (default: 0)
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.QueryAddrRequest(
        created_after=<int64>,
        created_before=<int64>,
        limit=<int32>,
        offset=<int32>,
    )
>>> response = stub.QueryAddrs(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "addrs": <array Addr>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  created_after: <int64>, 
  created_before: <int64>, 
  limit: <int32>, 
  offset: <int32>, 
};
taro.queryAddrs(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "addrs": <array Addr>,
//  }

gRPC Request: tarorpc.QueryAddrRequest

Parameter Type Description
created_after int64 If set, then only addresses created after this Unix timestamp will be returned.
created_before int64 If set, then only addresses created before this Unix timestamp will be returned.
limit int32 The max number of addresses that should be returned.
offset int32 The offset from the addresses that should be returned.

gRPC Response: tarorpc.QueryAddrResponse

Parameter Type Description
addrs array Addr

Taro.SendAsset

Unary RPC

SendAsset uses a passed taro address to attempt to complete an asset send. The method returns information w.r.t the on chain send, as well as the proof file information the receiver needs to fully receive the asset.


# send asset w/ a taro addr

$ tarocli assets send [command options] [arguments...]

# --addr value  addr to send to
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.SendAssetRequest(
        taro_addr=<string>,
    )
>>> response = stub.SendAsset(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "transfer_txid": <bytes>,
    "anchor_output_index": <int32>,
    "transfer_tx_bytes": <bytes>,
    "taro_transfer": <TaroTransfer>,
    "total_fee_sats": <int64>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  taro_addr: <string>, 
};
taro.sendAsset(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "transfer_txid": <bytes>,
//      "anchor_output_index": <int32>,
//      "transfer_tx_bytes": <bytes>,
//      "taro_transfer": <TaroTransfer>,
//      "total_fee_sats": <int64>,
//  }

gRPC Request: tarorpc.SendAssetRequest

Parameter Type Description
taro_addr string

gRPC Response: tarorpc.SendAssetResponse

Parameter Type Description
transfer_txid bytes
anchor_output_index int32
transfer_tx_bytes bytes
taro_transfer TaroTransfer
total_fee_sats int64

Taro.StopDaemon

Unary RPC

StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon.


# Gracefully stop all daemon subsystems before stopping the daemon itself.
# This is equivalent to stopping it using CTRL-C.

$ tarocli stop [arguments...]

>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.StopRequest()
>>> response = stub.StopDaemon(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = {}
taro.stopDaemon(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//  }

gRPC Request: tarorpc.StopRequest

This request has no parameters.

gRPC Response: tarorpc.StopResponse

This response has no parameters.

Taro.VerifyProof

Unary RPC

VerifyProof attempts to verify a given proof file that claims to be anchored at the specified genesis point.


# verify a taro proof

$ tarocli proofs verify [command options] [arguments...]

# --proof_file value  the path to the proof file on disk; use the dash character (-) to read from stdin instead
>>> import codecs, grpc, os
>>> # Generate the following 2 modules by compiling the /tarorpc/taro.proto with the grpcio-tools.
>>> # See https://github.com/lightningnetwork/lnd/blob/master/docs/grpc/python.md for instructions.
>>> import taro_pb2 as tarorpc, taro_pb2_grpc as tarostub
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> os.environ['GRPC_SSL_CIPHER_SUITES'] = 'HIGH+ECDSA'
>>> cert = open('TARO_DIR/tls.cert', 'rb').read()
>>> ssl_creds = grpc.ssl_channel_credentials(cert)
>>> channel = grpc.secure_channel('localhost:10029', ssl_creds)
>>> stub = tarostub.TaroStub(channel)
>>> request = tarorpc.ProofFile(
        raw_proof=<bytes>,
        genesis_point=<string>,
    )
>>> response = stub.VerifyProof(request, metadata=[('macaroon', macaroon)])
>>> print(response)
{ 
    "valid": <bool>,
}
const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const loaderOptions = {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true
};
const packageDefinition = protoLoader.loadSync('tarorpc/taro.proto', loaderOptions);
const tarorpc = grpc.loadPackageDefinition(packageDefinition).tarorpc;
const macaroon = fs.readFileSync("TARO_DIR/regtest/taro.macaroon").toString('hex');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const lndCert = fs.readFileSync('TARO_DIR/tls.cert');
const sslCreds = grpc.credentials.createSsl(lndCert);
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
    let metadata = new grpc.Metadata();
    metadata.add('macaroon', macaroon);
    callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
const taro = new tarorpc.Taro('localhost:10029', creds);
let request = { 
  raw_proof: <bytes>, 
  genesis_point: <string>, 
};
taro.verifyProof(request, function(err, response) {
  console.log(response);
});
// Console output:
//  { 
//      "valid": <bool>,
//  }

gRPC Request: tarorpc.ProofFile

Parameter Type Description
raw_proof bytes
genesis_point string

gRPC Response: tarorpc.ProofVerifyResponse

Parameter Type Description
valid bool

gRPC Messages

tarorpc.Addr

Parameter Type Description
encoded string The bech32 encoded Taro address.
asset_id bytes The asset ID that uniquely identifies the asset.
asset_type AssetType The type of the asset.
amount int64 The total amount of the asset stored in this Taro UTXO.
group_key bytes The group key of the asset (if it exists)
script_key bytes The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key bytes The internal key used for the on-chain output.
taproot_output_key bytes The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

tarorpc.AddrEvent

Parameter Type Description
creation_time_unix_seconds uint64 The time the event was created in unix timestamp seconds.
addr Addr The address the event was created for.
status AddrEventStatus The current status of the event.
outpoint string The outpoint that contains the inbound asset transfer.
utxo_amt_sat uint64 The amount in satoshis that were transferred on chain along with the asset. This amount is independent of the requested asset amount, which can be looked up on the address.
taproot_sibling bytes The taproot sibling hash that was used to send to the Taproot output. NOTE: Not yet implemented.
confirmation_height uint32 The height at which the on-chain output was confirmed. If this is zero, it means the output is unconfirmed.
has_proof bool Indicates whether a proof file can be found for the address' asset ID and script key.

tarorpc.AddrReceivesRequest

Parameter Type Description
filter_addr string Filter receives by a specific address. Leave empty to get all receives.
filter_status AddrEventStatus Filter receives by a specific status. Leave empty to get all receives.

tarorpc.AddrReceivesResponse

Parameter Type Description
events array AddrEvent The events that match the filter criteria.

tarorpc.AnchorInfo

Parameter Type Description
anchor_tx bytes The transaction that anchors the Taro commitment where the asset resides.
anchor_txid bytes The txid of the above transaction.
anchor_block_hash bytes The block hash the contains the anchor transaction above.
anchor_outpoint string The outpoint (txid:vout) that stores the Taro commitment.
internal_key bytes The raw internal key that was used to create the anchor Taproot output key.

tarorpc.Asset

Parameter Type Description
version int32 The version of the Taro asset.
asset_genesis GenesisInfo The base genesis information of an asset. This information never changes.
asset_type AssetType The type of the asset.
amount int64 The total amount of the asset stored in this Taro UTXO.
lock_time int32 An optional locktime, as with Bitcoin transactions.
relative_lock_time int32 An optional relative lock time, same as Bitcoin transactions.
script_version int32 The version of the script, only version 0 is defined at present.
script_key bytes The script key of the asset, which can be spent under Taproot semantics.
asset_group AssetGroup The information related to the key group of an asset (if it exists).
chain_anchor AnchorInfo Describes where in the chain the asset is currently anchored.

tarorpc.AssetBalance

Parameter Type Description
asset_genesis GenesisInfo The base genesis information of an asset. This information never changes.
asset_type AssetType The type of the asset.
balance int64 The balance of the asset owned by the target daemon.

tarorpc.AssetGroup

Parameter Type Description
raw_group_key bytes The raw group key which is a normal public key.
tweaked_group_key bytes The tweaked group key, which is derived based on the genesis point and also asset type.
asset_id_sig bytes A signature over the genesis point using the above key.

tarorpc.AssetGroupBalance

Parameter Type Description
group_key bytes The group key or nil aggregating assets that don't have a group.
balance int64 The total balance of the assets in the group.

tarorpc.AssetOutput

Parameter Type Description
anchor_point string
asset_id bytes
script_key bytes
amount int64
new_proof_blob bytes
split_commit_proof bytes

tarorpc.AssetSpendDelta

Parameter Type Description
asset_id bytes The asset ID that uniquely identifies the asset.
old_script_key bytes The old script key that uniquely identified the spent asset on disk.
new_script_key bytes The new script key. We assume BIP 86 usage when updating the script keys on disk.
new_amt int64 The new amount for the asset.

tarorpc.AssetTransfer

Parameter Type Description
transfer_timestamp int64
old_anchor_point string The old/current location of the Taro commitment that was spent as an input.
new_anchor_point string The new location of the Taro commitment referenced by the old anchor point.
taro_root bytes The new Taro root that commits to the set of modified and unmodified assets.
anchor_tx_hash bytes The new transaction that commits to the set of Taro assets found at the above new anchor point.
asset_spend_deltas array AssetSpendDelta Describes the set of mutated assets that now live at the new anchor tx point.

tarorpc.DebugLevelRequest

Parameter Type Description
show bool If true, all the valid debug sub-systems will be returned.
level_spec string

tarorpc.DebugLevelResponse

Parameter Type Description
sub_systems string

tarorpc.DecodeAddrRequest

Parameter Type Description
addr string

tarorpc.ExportProofRequest

Parameter Type Description
asset_id bytes
script_key bytes

tarorpc.GenesisInfo

Parameter Type Description
genesis_point string The first outpoint of the transaction that created the asset (txid:vout).
name string The name of the asset.
meta bytes The opaque meta data of the asset.
asset_id bytes The asset ID that uniquely identifies the asset.
output_index uint32 The index of the output that carries the unique Taro commitment in the genesis transaction.
genesis_bootstrap_info bytes The full genesis information encoded in a portable manner so it can be easily copy/pasted for address creation.
version int32 The version of the Taro commitment that created this asset.

tarorpc.ImportProofRequest

Parameter Type Description
proof_file bytes
genesis_point string

tarorpc.ImportProofResponse

This message has no parameters.

tarorpc.ListAssetRequest

This message has no parameters.

tarorpc.ListAssetResponse

Parameter Type Description
assets array Asset

tarorpc.ListBalancesRequest

Parameter Type Description
asset_id bool Group results by asset IDs.
group_key bool Group results by group keys.
asset_filter bytes If the query results should grouped by asset ids, then an optional asset filter may be provided to query balance of a specific asset.
group_key_filter bytes If the query results should be grouped by group keys, then an optional group key filter may be provided to query the balance of a specific asset group.

tarorpc.ListBalancesResponse

Parameter Type Description
asset_balances array AssetBalancesEntry
asset_group_balances array AssetGroupBalancesEntry

tarorpc.ListBalancesResponse.AssetBalancesEntry

Parameter Type Description
key string
value AssetBalance

tarorpc.ListBalancesResponse.AssetGroupBalancesEntry

Parameter Type Description
key string
value AssetGroupBalance

tarorpc.ListTransfersRequest

This message has no parameters.

tarorpc.ListTransfersResponse

Parameter Type Description
transfers array AssetTransfer The unordered list of outgoing asset transfers.

tarorpc.ListUtxosRequest

This message has no parameters.

tarorpc.ListUtxosResponse

Parameter Type Description
managed_utxos array ManagedUtxosEntry The set of UTXOs managed by the daemon.

tarorpc.ListUtxosResponse.ManagedUtxosEntry

Parameter Type Description
key string
value ManagedUtxo

tarorpc.ManagedUtxo

Parameter Type Description
out_point string The outpoint of the UTXO.
amt_sat int64 The UTXO amount in satoshis.
internal_key bytes The internal key used for the on-chain output.
taro_root bytes The Taro root that commits to the set of assets at this UTXO.
assets array Asset The assets held at this UTXO.

tarorpc.MintAssetRequest

Parameter Type Description
asset_type AssetType The type of the asset to be created.
name string The name, or "tag" of the asset. This will affect the final asset ID.
meta_data bytes An opaque blob that resents metadata related to the asset. This will affect the final asset ID.
amount int64 The total amount of units of the new asset that should be created. If the AssetType is Collectible, then this field cannot be set.
enable_emission bool If true, then the asset will be created with a key group, which allows for future asset issuance.
skip_batch bool If true, then a batch will be created immediately. Otherwise the asset creation transaction may be batched with other pending minting requests.

tarorpc.MintAssetResponse

Parameter Type Description
batch_key bytes A public key serialized in compressed format that can be used to uniquely identify a pending minting batch. Responses that share the same key will be batched into the same minting transaction.

tarorpc.NewAddrRequest

Parameter Type Description
genesis_bootstrap_info bytes
group_key bytes
amt int64

tarorpc.PrevInputAsset

Parameter Type Description
anchor_point string
asset_id bytes
script_key bytes
amount int64

tarorpc.ProofFile

Parameter Type Description
raw_proof bytes
genesis_point string

tarorpc.ProofVerifyResponse

Parameter Type Description
valid bool

tarorpc.QueryAddrRequest

Parameter Type Description
created_after int64 If set, then only addresses created after this Unix timestamp will be returned.
created_before int64 If set, then only addresses created before this Unix timestamp will be returned.
limit int32 The max number of addresses that should be returned.
offset int32 The offset from the addresses that should be returned.

tarorpc.QueryAddrResponse

Parameter Type Description
addrs array Addr

tarorpc.SendAssetRequest

Parameter Type Description
taro_addr string

tarorpc.SendAssetResponse

Parameter Type Description
transfer_txid bytes
anchor_output_index int32
transfer_tx_bytes bytes
taro_transfer TaroTransfer
total_fee_sats int64

tarorpc.StopRequest

This message has no parameters.

tarorpc.StopResponse

This message has no parameters.

tarorpc.TaroTransfer

Parameter Type Description
old_taro_root bytes
new_taro_root bytes
prev_inputs array PrevInputAsset
new_outputs array AssetOutput

gRPC Enums

AddrEventStatus

Name Value Description
ADDR_EVENT_STATUS_UNKNOWN 0
ADDR_EVENT_STATUS_TRANSACTION_DETECTED 1
ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED 2
ADDR_EVENT_STATUS_PROOF_RECEIVED 3
ADDR_EVENT_STATUS_COMPLETED 4

AssetType

Name Value Description
NORMAL 0 Indicates that an asset is capable of being split/merged, with each of the units being fungible, even across a key asset ID boundary (assuming the key group is the same).
COLLECTIBLE 1 Indicates that an asset is a collectible, meaning that each of the other items under the same key group are not fully fungible with each other. Collectibles also cannot be split or merged.

Taro REST API Reference

Welcome to the gRPC API reference documentation for Taro.

The Taro Daemon tarod implements the Taro protocol for issuing assets on the Bitcoin blockchain. Taro 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:

This site features the API documentation for shell script (CLI), Python and JavaScript clients in order to communicate with a local tarod instance through gRPC.

The examples to the right assume that the there is a local tarod instance running and listening for REST connections on port 8089. TARO_DIR will be used as a placeholder to denote the base directory of the tarod instance. By default, this is ~/.taro on Linux and ~/Library/Application Support/Taro on macOS.

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

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

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. This means you must replace + with -, / with _, and keep the trailing = as is. Url encoding (ie. %2F) will not work.

This is the reference for the REST API. Alternatively, there is also a gRPC API which is documented here.

This documentation was generated automatically against commit e0007b59d2e4879524287e1f41277dd4fd40356d.

/v1/taro/addrs

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X GET --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/addrs
{ 
    "addrs": <array tarorpcAddr>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/addrs'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "addrs": <array tarorpcAddr>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let options = {
  url: 'https://localhost:8089/v1/taro/addrs',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
};
request.get(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "addrs": <array tarorpcAddr>, 
//  }

GET /v1/taro/addrs

tarocli: addrs query QueryTaroAddrs queries the set of Taro addresses stored in the database.

Field Type Placement Description
created_after string query If set, then only addresses created after this Unix timestamp will be returned.
created_before string query If set, then only addresses created before this Unix timestamp will be returned.
limit int32 query The max number of addresses that should be returned.
offset int32 query The offset from the addresses that should be returned.

Response

Field Type Description
addrs array tarorpcAddr
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/addrs -d '{ \
    "genesis_bootstrap_info":<byte>, \
    "group_key":<byte>, \
    "amt":<string>, \
}'
{ 
    "encoded": <string>, 
    "asset_id": <byte>, 
    "asset_type": <tarorpcAssetType>, 
    "amount": <string>, 
    "group_key": <byte>, 
    "script_key": <byte>, 
    "internal_key": <byte>, 
    "taproot_output_key": <byte>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/addrs'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'genesis_bootstrap_info': base64.b64encode(<byte>).decode(), 
        'group_key': base64.b64encode(<byte>).decode(), 
        'amt': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "encoded": <string>, 
    "asset_id": <byte>, 
    "asset_type": <tarorpcAssetType>, 
    "amount": <string>, 
    "group_key": <byte>, 
    "script_key": <byte>, 
    "internal_key": <byte>, 
    "taproot_output_key": <byte>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  genesis_bootstrap_info: <byte>,
  group_key: <byte>,
  amt: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/addrs',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "encoded": <string>, 
//      "asset_id": <byte>, 
//      "asset_type": <tarorpcAssetType>, 
//      "amount": <string>, 
//      "group_key": <byte>, 
//      "script_key": <byte>, 
//      "internal_key": <byte>, 
//      "taproot_output_key": <byte>, 
//  }

POST /v1/taro/addrs

tarocli: addrs new NewAddr makes a new address from the set of request params.

Field Type Placement Description
genesis_bootstrap_info byte body
group_key byte body
amt string body

Response

Field Type Description
encoded string The bech32 encoded Taro address.
asset_id byte The asset ID that uniquely identifies the asset.
asset_type tarorpcAssetType The type of the asset.
amount string The total amount of the asset stored in this Taro UTXO.
group_key byte The group key of the asset (if it exists)
script_key byte The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key byte The internal key used for the on-chain output.
taproot_output_key byte The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

/v1/taro/addrs/decode

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/addrs/decode -d '{ \
    "addr":<string>, \
}'
{ 
    "encoded": <string>, 
    "asset_id": <byte>, 
    "asset_type": <tarorpcAssetType>, 
    "amount": <string>, 
    "group_key": <byte>, 
    "script_key": <byte>, 
    "internal_key": <byte>, 
    "taproot_output_key": <byte>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/addrs/decode'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'addr': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "encoded": <string>, 
    "asset_id": <byte>, 
    "asset_type": <tarorpcAssetType>, 
    "amount": <string>, 
    "group_key": <byte>, 
    "script_key": <byte>, 
    "internal_key": <byte>, 
    "taproot_output_key": <byte>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  addr: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/addrs/decode',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "encoded": <string>, 
//      "asset_id": <byte>, 
//      "asset_type": <tarorpcAssetType>, 
//      "amount": <string>, 
//      "group_key": <byte>, 
//      "script_key": <byte>, 
//      "internal_key": <byte>, 
//      "taproot_output_key": <byte>, 
//  }

POST /v1/taro/addrs/decode

tarocli: addrs decode DecodeAddr decode a Taro address into a partial asset message that represents the asset it wants to receive.

Field Type Placement Description
addr string body

Response

Field Type Description
encoded string The bech32 encoded Taro address.
asset_id byte The asset ID that uniquely identifies the asset.
asset_type tarorpcAssetType The type of the asset.
amount string The total amount of the asset stored in this Taro UTXO.
group_key byte The group key of the asset (if it exists)
script_key byte The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key byte The internal key used for the on-chain output.
taproot_output_key byte The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

/v1/taro/addrs/receives

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/addrs/receives -d '{ \
    "filter_addr":<string>, \
    "filter_status":<tarorpcAddrEventStatus>, \
}'
{ 
    "events": <array tarorpcAddrEvent>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/addrs/receives'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'filter_addr': <string>, 
        'filter_status': <tarorpcAddrEventStatus>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "events": <array tarorpcAddrEvent>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  filter_addr: <string>,
  filter_status: <tarorpcAddrEventStatus>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/addrs/receives',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "events": <array tarorpcAddrEvent>, 
//  }

POST /v1/taro/addrs/receives

tarocli: addrs receives List all receives for incoming asset transfers for addresses that were created previously.

Field Type Placement Description
filter_addr string body Filter receives by a specific address. Leave empty to get all receives.
filter_status tarorpcAddrEventStatus body Filter receives by a specific status. Leave empty to get all receives.

Response

Field Type Description
events array tarorpcAddrEvent The events that match the filter criteria.

/v1/taro/assets

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X GET --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/assets
{ 
    "assets": <array tarorpcAsset>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/assets'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "assets": <array tarorpcAsset>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let options = {
  url: 'https://localhost:8089/v1/taro/assets',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
};
request.get(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "assets": <array tarorpcAsset>, 
//  }

GET /v1/taro/assets

tarocli: assets list ListAssets lists the set of assets owned by the target daemon.

This request has no parameters.

Response

Field Type Description
assets array tarorpcAsset
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/assets -d '{ \
    "asset_type":<tarorpcAssetType>, \
    "name":<string>, \
    "meta_data":<byte>, \
    "amount":<string>, \
    "enable_emission":<boolean>, \
    "skip_batch":<boolean>, \
}'
{ 
    "batch_key": <byte>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/assets'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'asset_type': <tarorpcAssetType>, 
        'name': <string>, 
        'meta_data': base64.b64encode(<byte>).decode(), 
        'amount': <string>, 
        'enable_emission': <boolean>, 
        'skip_batch': <boolean>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "batch_key": <byte>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  asset_type: <tarorpcAssetType>,
  name: <string>,
  meta_data: <byte>,
  amount: <string>,
  enable_emission: <boolean>,
  skip_batch: <boolean>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/assets',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "batch_key": <byte>, 
//  }

POST /v1/taro/assets

tarocli: assets mint MintAsset will attempts to mint the set of assets (async by default to ensure proper batching) specified in the request.

Field Type Placement Description
asset_type tarorpcAssetType body The type of the asset to be created.
name string body The name, or "tag" of the asset. This will affect the final asset ID.
meta_data byte body An opaque blob that resents metadata related to the asset. This will affect the final asset ID.
amount string body The total amount of units of the new asset that should be created. If the AssetType is Collectible, then this field cannot be set.
enable_emission boolean body If true, then the asset will be created with a key group, which allows for future asset issuance.
skip_batch boolean body If true, then a batch will be created immediately. Otherwise the asset creation transaction may be batched with other pending minting requests.

Response

Field Type Description
batch_key byte A public key serialized in compressed format that can be used to uniquely identify a pending minting batch. Responses that share the same key will be batched into the same minting transaction.

/v1/taro/assets/balance

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X GET --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/assets/balance
{ 
    "asset_balances": <object>, 
    "asset_group_balances": <object>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/assets/balance'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "asset_balances": <object>, 
    "asset_group_balances": <object>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let options = {
  url: 'https://localhost:8089/v1/taro/assets/balance',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
};
request.get(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "asset_balances": <object>, 
//      "asset_group_balances": <object>, 
//  }

GET /v1/taro/assets/balance

tarocli: assets balance ListBalances lists asset balances

Field Type Placement Description
asset_id boolean query Group results by asset IDs.
group_key boolean query Group results by group keys.
asset_filter string query If the query results should grouped by asset ids, then an optional asset filter may be provided to query balance of a specific asset.
group_key_filter string query If the query results should be grouped by group keys, then an optional group key filter may be provided to query the balance of a specific asset group.

Response

Field Type Description
asset_balances object
asset_group_balances object

/v1/taro/assets/transfers

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X GET --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/assets/transfers
{ 
    "transfers": <array tarorpcAssetTransfer>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/assets/transfers'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "transfers": <array tarorpcAssetTransfer>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let options = {
  url: 'https://localhost:8089/v1/taro/assets/transfers',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
};
request.get(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "transfers": <array tarorpcAssetTransfer>, 
//  }

GET /v1/taro/assets/transfers

tarocli: assets transfers ListTransfers lists outbound asset transfers tracked by the target daemon.

This request has no parameters.

Response

Field Type Description
transfers array tarorpcAssetTransfer The unordered list of outgoing asset transfers.

/v1/taro/assets/utxos

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X GET --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/assets/utxos
{ 
    "managed_utxos": <object>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/assets/utxos'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "managed_utxos": <object>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let options = {
  url: 'https://localhost:8089/v1/taro/assets/utxos',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
};
request.get(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "managed_utxos": <object>, 
//  }

GET /v1/taro/assets/utxos

tarocli: assets utxos ListUtxos lists the UTXOs managed by the target daemon, and the assets they hold.

This request has no parameters.

Response

Field Type Description
managed_utxos object The set of UTXOs managed by the daemon.

/v1/taro/debuglevel

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/debuglevel -d '{ \
    "show":<boolean>, \
    "level_spec":<string>, \
}'
{ 
    "sub_systems": <string>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/debuglevel'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'show': <boolean>, 
        'level_spec': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "sub_systems": <string>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  show: <boolean>,
  level_spec: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/debuglevel',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "sub_systems": <string>, 
//  }

POST /v1/taro/debuglevel

tarocli: debuglevel DebugLevel allows a caller to programmatically set the logging verbosity of tarod. The logging can be targeted according to a coarse daemon-wide logging level, or in a granular fashion to specify the logging for a target sub-system.

Field Type Placement Description
show boolean body If true, all the valid debug sub-systems will be returned.
level_spec string body

Response

Field Type Description
sub_systems string

/v1/taro/proofs/export

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/proofs/export -d '{ \
    "asset_id":<byte>, \
    "script_key":<byte>, \
}'
{ 
    "raw_proof": <byte>, 
    "genesis_point": <string>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/proofs/export'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'asset_id': base64.b64encode(<byte>).decode(), 
        'script_key': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "raw_proof": <byte>, 
    "genesis_point": <string>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  asset_id: <byte>,
  script_key: <byte>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/proofs/export',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "raw_proof": <byte>, 
//      "genesis_point": <string>, 
//  }

POST /v1/taro/proofs/export

tarocli: proofs export ExportProof exports the latest raw proof file anchored at the specified script_key.

Field Type Placement Description
asset_id byte body
script_key byte body

Response

Field Type Description
raw_proof byte
genesis_point string

/v1/taro/proofs/import

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/proofs/import -d '{ \
    "proof_file":<byte>, \
    "genesis_point":<string>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/proofs/import'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'proof_file': base64.b64encode(<byte>).decode(), 
        'genesis_point': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  proof_file: <byte>,
  genesis_point: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/proofs/import',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//  }

POST /v1/taro/proofs/import

tarocli: proofs import ImportProof attempts to import a proof file into the daemon. If successful, a new asset will be inserted on disk, spendable using the specified target script key, and internal key.

Field Type Placement Description
proof_file byte body
genesis_point string body

Response

This response has no parameters.

/v1/taro/proofs/verify

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/proofs/verify -d '{ \
    "raw_proof":<byte>, \
    "genesis_point":<string>, \
}'
{ 
    "valid": <boolean>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/proofs/verify'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'raw_proof': base64.b64encode(<byte>).decode(), 
        'genesis_point': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "valid": <boolean>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  raw_proof: <byte>,
  genesis_point: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/proofs/verify',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "valid": <boolean>, 
//  }

POST /v1/taro/proofs/verify

tarocli: proofs verify VerifyProof attempts to verify a given proof file that claims to be anchored at the specified genesis point.

Field Type Placement Description
raw_proof byte body
genesis_point string body

Response

Field Type Description
valid boolean

/v1/taro/send

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/send -d '{ \
    "taro_addr":<string>, \
}'
{ 
    "transfer_txid": <byte>, 
    "anchor_output_index": <int32>, 
    "transfer_tx_bytes": <byte>, 
    "taro_transfer": <tarorpcTaroTransfer>, 
    "total_fee_sats": <string>, 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/send'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'taro_addr': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "transfer_txid": <byte>, 
    "anchor_output_index": <int32>, 
    "transfer_tx_bytes": <byte>, 
    "taro_transfer": <tarorpcTaroTransfer>, 
    "total_fee_sats": <string>, 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
  taro_addr: <string>,
};
let options = {
  url: 'https://localhost:8089/v1/taro/send',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//      "transfer_txid": <byte>, 
//      "anchor_output_index": <int32>, 
//      "transfer_tx_bytes": <byte>, 
//      "taro_transfer": <tarorpcTaroTransfer>, 
//      "total_fee_sats": <string>, 
//  }

POST /v1/taro/send

tarocli: assets send SendAsset uses a passed taro address to attempt to complete an asset send. The method returns information w.r.t the on chain send, as well as the proof file information the receiver needs to fully receive the asset.

Field Type Placement Description
taro_addr string body

Response

Field Type Description
transfer_txid byte
anchor_output_index int32
transfer_tx_bytes byte
taro_transfer tarorpcTaroTransfer
total_fee_sats string

/v1/taro/stop

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $TARO_DIR/regtest/taro.macaroon)"
$ curl -X POST --cacert $TARO_DIR/tls.cert --header "$MACAROON_HEADER" https:://localhost:8089/v1/taro/stop -d '{ \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'https://localhost:8089/v1/taro/stop'
>>> cert_path = 'TARO_DIR/tls.cert'
>>> macaroon = codecs.encode(open('TARO_DIR/regtest/taro.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
const fs = require('fs');
const request = require('request');
const macaroon = fs.readFileSync('TARO_DIR/regtest/taro.macaroon').toString('hex');
let requestBody = { 
};
let options = {
  url: 'https://localhost:8089/v1/taro/stop',
  // Work-around for self-signed certificates.
  rejectUnauthorized: false,
  json: true,
  headers: {
    'Grpc-Metadata-macaroon': macaroon
  },
  form: JSON.stringify(requestBody)
};
request.post(options, function(error, response, body) {
  console.log(body);
});
// Console output:
//  { 
//  }

POST /v1/taro/stop

tarocli: stop StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon.

This request has no parameters.

Response

This response has no parameters.

REST Messages

protobufAny

Field Type Description
type_url string
value byte

rpcStatus

Field Type Description
code int32
message string
details array protobufAny

tarorpcAddr

Field Type Description
encoded string The bech32 encoded Taro address.
asset_id byte The asset ID that uniquely identifies the asset.
asset_type tarorpcAssetType The type of the asset.
amount string The total amount of the asset stored in this Taro UTXO.
group_key byte The group key of the asset (if it exists)
script_key byte The specific script key the asset must commit to in order to transfer ownership to the creator of the address.
internal_key byte The internal key used for the on-chain output.
taproot_output_key byte The tweaked internal key that commits to the asset and represents the on-chain output key the Bitcoin transaction must send to in order to transfer assets described in this address.

tarorpcAddrEvent

Field Type Description
creation_time_unix_seconds string The time the event was created in unix timestamp seconds.
addr tarorpcAddr The address the event was created for.
status tarorpcAddrEventStatus The current status of the event.
outpoint string The outpoint that contains the inbound asset transfer.
utxo_amt_sat string The amount in satoshis that were transferred on chain along with the asset. This amount is independent of the requested asset amount, which can be looked up on the address.
taproot_sibling byte The taproot sibling hash that was used to send to the Taproot output. NOTE: Not yet implemented.
confirmation_height int64 The height at which the on-chain output was confirmed. If this is zero, it means the output is unconfirmed.
has_proof boolean Indicates whether a proof file can be found for the address' asset ID and script key.

tarorpcAddrReceivesRequest

Field Type Description
filter_addr string Filter receives by a specific address. Leave empty to get all receives.
filter_status tarorpcAddrEventStatus Filter receives by a specific status. Leave empty to get all receives.

tarorpcAddrReceivesResponse

Field Type Description
events array tarorpcAddrEvent The events that match the filter criteria.

tarorpcAnchorInfo

Field Type Description
anchor_tx byte The transaction that anchors the Taro commitment where the asset resides.
anchor_txid byte The txid of the above transaction.
anchor_block_hash byte The block hash the contains the anchor transaction above.
anchor_outpoint string The outpoint (txid:vout) that stores the Taro commitment.
internal_key byte The raw internal key that was used to create the anchor Taproot output key.

tarorpcAsset

Field Type Description
version int32 The version of the Taro asset.
asset_genesis tarorpcGenesisInfo The base genesis information of an asset. This information never changes.
asset_type tarorpcAssetType The type of the asset.
amount string The total amount of the asset stored in this Taro UTXO.
lock_time int32 An optional locktime, as with Bitcoin transactions.
relative_lock_time int32 An optional relative lock time, same as Bitcoin transactions.
script_version int32 The version of the script, only version 0 is defined at present.
script_key byte The script key of the asset, which can be spent under Taproot semantics.
asset_group tarorpcAssetGroup The information related to the key group of an asset (if it exists).
chain_anchor tarorpcAnchorInfo Describes where in the chain the asset is currently anchored.

tarorpcAssetBalance

Field Type Description
asset_genesis tarorpcGenesisInfo The base genesis information of an asset. This information never changes.
asset_type tarorpcAssetType The type of the asset.
balance string The balance of the asset owned by the target daemon.

tarorpcAssetGroup

Field Type Description
raw_group_key byte The raw group key which is a normal public key.
tweaked_group_key byte The tweaked group key, which is derived based on the genesis point and also asset type.
asset_id_sig byte A signature over the genesis point using the above key.

tarorpcAssetGroupBalance

Field Type Description
group_key byte The group key or nil aggregating assets that don't have a group.
balance string The total balance of the assets in the group.

tarorpcAssetOutput

Field Type Description
anchor_point string
asset_id byte
script_key byte
amount string
new_proof_blob byte
split_commit_proof byte

tarorpcAssetSpendDelta

Field Type Description
asset_id byte The asset ID that uniquely identifies the asset.
old_script_key byte The old script key that uniquely identified the spent asset on disk.
new_script_key byte The new script key. We assume BIP 86 usage when updating the script keys on disk.
new_amt string The new amount for the asset.

tarorpcAssetTransfer

Field Type Description
transfer_timestamp string
old_anchor_point string The old/current location of the Taro commitment that was spent as an input.
new_anchor_point string The new location of the Taro commitment referenced by the old anchor point.
taro_root byte The new Taro root that commits to the set of modified and unmodified assets.
anchor_tx_hash byte The new transaction that commits to the set of Taro assets found at the above new anchor point.
asset_spend_deltas array tarorpcAssetSpendDelta Describes the set of mutated assets that now live at the new anchor tx point.

tarorpcDebugLevelRequest

Field Type Description
show boolean If true, all the valid debug sub-systems will be returned.
level_spec string

tarorpcDebugLevelResponse

Field Type Description
sub_systems string

tarorpcDecodeAddrRequest

Field Type Description
addr string

tarorpcExportProofRequest

Field Type Description
asset_id byte
script_key byte

tarorpcGenesisInfo

Field Type Description
genesis_point string The first outpoint of the transaction that created the asset (txid:vout).
name string The name of the asset.
meta byte The opaque meta data of the asset.
asset_id byte The asset ID that uniquely identifies the asset.
output_index int64 The index of the output that carries the unique Taro commitment in the genesis transaction.
genesis_bootstrap_info byte The full genesis information encoded in a portable manner so it can be easily copy/pasted for address creation.
version int32 The version of the Taro commitment that created this asset.

tarorpcImportProofRequest

Field Type Description
proof_file byte
genesis_point string

tarorpcImportProofResponse

This property has no parameters.

tarorpcListAssetResponse

Field Type Description
assets array tarorpcAsset

tarorpcListBalancesResponse

Field Type Description
asset_balances object
asset_group_balances object

tarorpcListTransfersResponse

Field Type Description
transfers array tarorpcAssetTransfer The unordered list of outgoing asset transfers.

tarorpcListUtxosResponse

Field Type Description
managed_utxos object The set of UTXOs managed by the daemon.

tarorpcManagedUtxo

Field Type Description
out_point string The outpoint of the UTXO.
amt_sat string The UTXO amount in satoshis.
internal_key byte The internal key used for the on-chain output.
taro_root byte The Taro root that commits to the set of assets at this UTXO.
assets array tarorpcAsset The assets held at this UTXO.

tarorpcMintAssetRequest

Field Type Description
asset_type tarorpcAssetType The type of the asset to be created.
name string The name, or "tag" of the asset. This will affect the final asset ID.
meta_data byte An opaque blob that resents metadata related to the asset. This will affect the final asset ID.
amount string The total amount of units of the new asset that should be created. If the AssetType is Collectible, then this field cannot be set.
enable_emission boolean If true, then the asset will be created with a key group, which allows for future asset issuance.
skip_batch boolean If true, then a batch will be created immediately. Otherwise the asset creation transaction may be batched with other pending minting requests.

tarorpcMintAssetResponse

Field Type Description
batch_key byte A public key serialized in compressed format that can be used to uniquely identify a pending minting batch. Responses that share the same key will be batched into the same minting transaction.

tarorpcNewAddrRequest

Field Type Description
genesis_bootstrap_info byte
group_key byte
amt string

tarorpcPrevInputAsset

Field Type Description
anchor_point string
asset_id byte
script_key byte
amount string

tarorpcProofFile

Field Type Description
raw_proof byte
genesis_point string

tarorpcProofVerifyResponse

Field Type Description
valid boolean

tarorpcQueryAddrResponse

Field Type Description
addrs array tarorpcAddr

tarorpcSendAssetRequest

Field Type Description
taro_addr string

tarorpcSendAssetResponse

Field Type Description
transfer_txid byte
anchor_output_index int32
transfer_tx_bytes byte
taro_transfer tarorpcTaroTransfer
total_fee_sats string

tarorpcStopRequest

This property has no parameters.

tarorpcStopResponse

This property has no parameters.

tarorpcTaroTransfer

Field Type Description
old_taro_root byte
new_taro_root byte
prev_inputs array tarorpcPrevInputAsset
new_outputs array tarorpcAssetOutput

REST Enums

tarorpcAddrEventStatus

Name Value Description
ADDR_EVENT_STATUS_UNKNOWN 0
ADDR_EVENT_STATUS_TRANSACTION_DETECTED 1
ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED 2
ADDR_EVENT_STATUS_PROOF_RECEIVED 3
ADDR_EVENT_STATUS_COMPLETED 4

tarorpcAssetType

Name Value Description
NORMAL 0
COLLECTIBLE 1

Other API References

This is the gRPC and REST API reference for the taro daemon. There are separate API reference documents for the following daemons: