Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,37 @@ Methods for working with the Lightning Network

To connect to an LND node, authentication details are required.

## Taproot Assets Support

This library includes support for Taproot Assets via the `tapd` daemon. Currently supported methods:

- **listTaprootAssetBalances**: List Taproot Asset balances

## Tapd Authentication

To connect to a Tapd node, authentication details are required, similar to LND.

Export credentials via CLI or manually:

Run `base64` on the tls.cert and admin.macaroon files to get the encoded
authentication data to create the Tapd connection. You can find these files in
the Tapd directory. (~/.tapd or ~/Library/Application Support/Tapd)

base64 -w0 ~/.tapd/tls.cert
base64 -w0 ~/.tapd/data/mainnet/admin.macaroon

You can then use these to interact with your Tapd node directly:

```node
const {authenticatedTapdGrpc} = require('lightning');

const {tapd} = authenticatedTapdGrpc({
cert: 'base64 encoded tls.cert file',
macaroon: 'base64 encoded admin.macaroon file',
socket: '127.0.0.1:10029',
});
```

Export credentials via CLI:
[balanceofsatoshis](https://github.com/alexbosworth/balanceofsatoshis):
`npm install -g balanceofsatoshis` and export via `bos credentials --cleartext`
Expand Down Expand Up @@ -393,3 +424,7 @@ variables set:
Verify that a chain address message has a valid ECDSA signature
- [verifyMessage](https://github.com/alexbosworth/ln-service#verifymessage): Check that a
message from a node in the graph has a valid signature.

## Taproot Assets Methods

- **listTaprootAssetBalances**: List Taproot Asset balances grouped by asset ID or group key.
36 changes: 36 additions & 0 deletions grpc/protos/tapcommon.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
syntax = "proto3";

package taprpc;

option go_package = "github.com/lightninglabs/taproot-assets/taprpc";

// Represents a Bitcoin transaction outpoint.
message OutPoint {
/*
Raw bytes representing the transaction id.
*/
bytes txid = 1;

/*
The index of the output on the transaction.
*/
uint32 output_index = 2;
}

// A transaction outpoint annotated with TAP-level asset metadata. It uniquely
// identifies an asset anchored at a specific outpoint.
message AssetOutPoint {
// The outpoint of the asset anchor, represented as a string in the
// format "<txid>:<vout>". The <txid> is the transaction ID of the UTXO,
// hex-encoded and byte-reversed (i.e., the internal little-endian
// 32-byte value is reversed to big-endian hex format) to match standard
// Bitcoin RPC and UI conventions.
string anchor_out_point = 1;

// The asset ID of the asset anchored at the outpoint.
bytes asset_id = 2;

// The script key of the asset. This is the taproot output key that the
// asset is locked to.
bytes script_key = 3;
}
Loading