I am using the didc tool to generate the consumer intended Rust types using this command ./didc bind --target rs <canister_to_call_candid_file>.
For example:
The input candid file looks like this:
And this is what the generated output bindings look like:
The issue here is with the Service struct.
It has generated calls that use ic_cdk to make the calls internally.
- Are we supposed to be using
ic_cdkto be making calls into the IC from an off chain hosted app? I assumedic_cdkonly ran inside canisters - If not, then how are we supposed to be using these methods from the
ic_agentthat’s being used in the application? - The agent has query and update methods that look like this:
Agent in ic_agent - Rust
which accept canister IDs which I assume is what specifies which canister to call into in the network? So, then the above interface generated bydidcfor calling the methods are meaningless? - On a slightly orthogonal note, if the query/update method has the canister ID specified in the method parameters, what is the
with_effective_canister_IDmethod required for?
