New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add fetchCandid() function to @dfinity/agent #630
Conversation
I think this is more intuitive than CanisterStatus, so it's a good idea! One suggestion - since edit - pinging @rvanasa |
Sounds good; updated to use the same anonymous HttpAgent logic from both Candid UI and Motoko Playground. I also added |
We've avoided the concept of |
Description
This PR adds a function to abstract away the implementation details for retrieving the current Candid interface based on canister metadata and the hidden
__get_candid_interface_tmp_hack
method (for canisters without this metadata).At the moment, several projects (notably the IC Dashboard and Candid UI) directly call the
_tmp_hack
method. ThisfetchCandid()
function can be used as a replacement in both of these web applications.Example usage:
How Has This Been Tested?
agent/src/fetch_candid.test.ts
Checklist: