Docs for the Lua API are at https://powdertoy.co.uk/Wiki/W/Powder_Toy_Lua_API.html
If you want better documentation, well, you'll have to use the source code itself, I think. I think you're looking for https://github.com/The-Powder-Toy/The-Powder-Toy/tree/master/src/lua, in that case.