Source to get .did file from any canister

I’m deploying some service outside of Dfinity canister. Any with JS agent and did file I can make few interesting thing with app outside of canister. For every canister I used icscan to get the did file but this morning I found that there is some canister like Openchat’s canister cannot get the did file from icscan.

So my question is what is mechanism to public the did file in icscan and is that any way to get the did file with these private canisters?

If canisters expose their .did file then the convention is to do it in the candid:service metadata section. You can fetch that section with dfx canister --ic metadata <canister id> candid:service

1 Like