In Motoko, is it possible, having a shared method to extract method name and canister prinicipal?
Maybe I don’t exactly understand what you are doing, but you should be able to query the candid in the system metadata for all modern canisters.
As far as the canister I’d, if it is a class you can set it equal to “this”.
It should be a library API that does this without retrieving and analyzing (a heavy operation) metadata. If it is missing, it should be added.
Should I file a feature request?