Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c4ff2e5
tapdb: add pagination and ordering to QueryAddrEvents
darioAnongba Sep 30, 2025
15618d0
taprpc: add pagination and sorting to AddrReceivesRequest
darioAnongba Sep 30, 2025
5cad587
rpc: add pagination and sorting to AddrReceives endpoint
darioAnongba Sep 30, 2025
fcdaadf
cmd: add pagination and sorting to tapcli addr receives
darioAnongba Sep 30, 2025
866745d
docs: release notes for addrs receives pagination
darioAnongba Sep 30, 2025
9134ed1
itest: add test for address receives pagination
darioAnongba Sep 30, 2025
2b50915
taprpc: simplify MacaroonWhitelist func code
ffranr Sep 29, 2025
b9731cb
taprpc: separate universe proof courier permissions in MacaroonWhitelist
ffranr Oct 8, 2025
90590ce
proof+taprpc: inline default macaroon whitelist logic
ffranr Oct 8, 2025
9de0379
proof: update stale universe proof courier comment
ffranr Oct 8, 2025
87bf2ce
taprpc: add default permissions for MailboxInfo and Universe/Info
ffranr Oct 8, 2025
8816b7f
docs: add release note
ffranr Oct 10, 2025
216f349
tapgarden: refactor fee rate calculation from fundGenesisPsbt
ffranr Mar 3, 2025
72bc6ce
tapgarden: refactor fundGenesisPsbt to pass wallet funding as closure
ffranr Mar 3, 2025
d0615fd
tapgarden: refactor fundGenesisPsbt to pass in pending batch
ffranr Mar 3, 2025
f4cb29a
tapgarden: remove batch key argument from fundGenesisPsbt
ffranr Mar 3, 2025
8145677
tapgarden: mock helper FundGenesisTx returns change output index
ffranr Oct 9, 2025
448e0bd
tapgarden: add batch funding support to RandMintingBatch
ffranr Oct 9, 2025
b579cb4
tapdb: use new funded mint batch in TestUpsertMintSupplyPreCommit
ffranr Oct 9, 2025
23ddf52
tapdb+tapgarden: replace RandSeedlingMintingBatch with RandMintingBatch
ffranr Oct 9, 2025
3840e5a
chain_bridge: refactor GetBlockTimestamp to use GetBlockHeaderByHeight
ffranr Oct 10, 2025
932c867
lndservices: add block header cache
ffranr Oct 10, 2025
def015a
lndservices+tapcfg: use block header cache in LndRpcChainBridge
ffranr Oct 13, 2025
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
38 changes: 38 additions & 0 deletions address/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,33 @@ const (
StatusCompleted Status = 3
)

// SortDirection is an enum used to specify the order of returned events.
type SortDirection uint8

const (
// UndefinedSortDirection indicates that the sort direction
// is not specified.
UndefinedSortDirection SortDirection = iota

// DescSortDirection indicates that the sort should be in
// descending order.
DescSortDirection

// AscSortDirection indicates that the sort should be in
// ascending order.
AscSortDirection
)

const (
// DefaultEventQueryLimit is the number of events returned
// when no limit is provided.
DefaultEventQueryLimit = 512

// MaxEventQueryLimit is the maximum number of events that can be
// returned in a single query.
MaxEventQueryLimit = 16384
)

// EventQueryParams holds the set of query params for address events.
type EventQueryParams struct {
// AddrTaprootOutputKey is the optional 32-byte x-only serialized
Expand All @@ -65,6 +92,17 @@ type EventQueryParams struct {
// (inclusive). Can be set to nil to return events of all creation
// times.
CreationTimeTo *time.Time

// Offset is the offset into the result set to start returning events.
Offset int32

// Limit is the max number of events that should be returned. If zero,
// then DefaultEventQueryLimit will be used.
Limit int32

// SortDirection is the sort direction to use when returning the
// events. The default zero value sorts the events in ascending order.
SortDirection SortDirection
}

// AssetOutput holds the information about a single asset output that was sent
Expand Down
24 changes: 24 additions & 0 deletions cmd/commands/addrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ const (
limitName = "limit"

offsetName = "offset"

directionName = "direction"
)

var queryAddrsCommand = cli.Command{
Expand Down Expand Up @@ -293,6 +295,20 @@ var receivesAddrCommand = cli.Command{
Usage: "filter transfers created before this + " +
"unix timestamp (seconds)",
},
cli.Int64Flag{
Name: limitName,
Usage: "the max number of events returned",
},
cli.Int64Flag{
Name: offsetName,
Usage: "the number of events to skip",
},
cli.StringFlag{
Name: directionName,
Usage: "the sort direction for events (asc or desc). " +
"Defaults to desc.",
Value: "desc",
},
},
Action: addrReceives,
}
Expand All @@ -311,10 +327,18 @@ func addrReceives(ctx *cli.Context) error {
addr = ctx.Args().First()
}

direction := taprpc.SortDirection_SORT_DIRECTION_DESC
if ctx.String(directionName) == "asc" {
direction = taprpc.SortDirection_SORT_DIRECTION_ASC
}

resp, err := client.AddrReceives(ctxc, &taprpc.AddrReceivesRequest{
FilterAddr: addr,
StartTimestamp: ctx.Uint64("start_timestamp"),
EndTimestamp: ctx.Uint64("end_timestamp"),
Limit: int32(ctx.Int64(limitName)),
Offset: int32(ctx.Int64(offsetName)),
Direction: direction,
})
if err != nil {
return fmt.Errorf("unable to query addr receives: %w", err)
Expand Down
6 changes: 6 additions & 0 deletions docs/release-notes/release-notes-0.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@
information directly from the RPC response without performing separate
blockchain queries.

- The `AddrReceives` RPC has new fields `limit`, `offset` and `direction` that
allows pagination and sorting. [See PR](https://github.com/lightninglabs/taproot-assets/pull/1813).

## tapcli Additions

- [Rename](https://github.com/lightninglabs/taproot-assets/pull/1682) the mint
Expand All @@ -239,6 +242,9 @@
- The `tapcli addrs receives` command now supports
[new `--start_timestamp` and `--end_timestamp` flags](https://github.com/lightninglabs/taproot-assets/pull/1794).

- The `tapcli addrs receives` command now has new flags `--limit`, `--offset` and
`--direction` that allows pagination and sorting. [See PR](https://github.com/lightninglabs/taproot-assets/pull/1813).

- The `fetchsupplycommit` command [now supports](https://github.com/lightninglabs/taproot-assets/pull/1823)
a `--first` flag to fetch the very first supply commitment; if no flag is
provided, it defaults to fetching the latest. Only one of `--first`,
Expand Down
70 changes: 70 additions & 0 deletions docs/release-notes/release-notes-0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Release Notes
- [Bug Fixes](#bug-fixes)
- [New Features](#new-features)
- [Functional Enhancements](#functional-enhancements)
- [RPC Additions](#rpc-additions)
- [tapcli Additions](#tapcli-additions)
- [Improvements](#improvements)
- [Functional Updates](#functional-updates)
- [RPC Updates](#rpc-updates)
- [tapcli Updates](#tapcli-updates)
- [Breaking Changes](#breaking-changes)
- [Performance Improvements](#performance-improvements)
- [Deprecations](#deprecations)
- [Technical and Architectural Updates](#technical-and-architectural-updates)
- [BIP/bLIP Spec Updates](#bipblip-spec-updates)
- [Testing](#testing)
- [Database](#database)
- [Code Health](#code-health)
- [Tooling and Documentation](#tooling-and-documentation)

# Bug Fixes

# New Features

## Functional Enhancements

## RPC Additions

## tapcli Additions

# Improvements

## Functional Updates

## RPC Updates

- [PR#1841](https://github.com/lightninglabs/taproot-assets/pull/1841): Remove
the defaultMacaroonWhitelist map and inline its entries directly
into the conditional logic within MacaroonWhitelist. This ensures that
access to previously always-available endpoints is now governed by
explicit user configuration (read/write/courier), improving permission
control and aligning with expected access restrictions.

- [PR#1841](https://github.com/lightninglabs/taproot-assets/pull/1841): Add
default RPC permissions for RPC endpoints universerpc.Universe/Info and
/authmailboxrpc.Mailbox/MailboxInfo.

## tapcli Updates

## Code Health

## Breaking Changes

## Performance Improvements

## Deprecations

# Technical and Architectural Updates

## BIP/bLIP Spec Updates

## Testing

## Database

## Code Health

## Tooling and Documentation

# Contributors (Alphabetical Order)
Loading