I figured it out
I guess the api docs haven’t been updated with the canvas? i have no idea
but u can get the canvas selection like so
const canvasView = this.app.workspace.getActiveViewOfType(ItemView);
if (canvasView?.getViewType() !== 'canvas') return;
const canvas = (canvasView as any).canvas;
const selection: any = Array.from(canvas.selection);
which will give you an array of all the selected nodes, with their corresponding id’s.