api, userAddress, and the returned songId are available. api includes the session token and selected account headers.
Paginate the catalog
addSongToYourList is your UI callback. Results are newest first and use offset pagination, with no total count or cursor. New catalog entries can shift later pages; deduplicate IDs while browsing.
For the owner’s library, add creator: userAddress to the query and send the account header. The public list excludes private songs. Request a single song to get { song, stems, takes }.