Thanks for the library! PipeWire proves to be incredibly hard to work with for something simple like programmatically changing the volume of the current sink, so your library is a savior (assuming I'll end up at the goal, of course - I just started experimenting).
Couldn't install the library with luarocks, had to compile manually.
Callbacks for both ctx:connect and ctx:get_sinks now receive something extra as the first argument, which at least in my case is always nil. So I had to change the code from the README to this (note the underscores):
ctx:connect(nil, function(_, state)
if state == 4 then
print("Connection is ready")
ctx:get_sinks(function(_, sinks)
ppretty.dump(sinks)
loop:quit()
end)
end
end)