Closed jbroudou closed 2 years ago
This would require parsing the canister's candid interface, this feature will be added in the near future
Forn now, you can provide return type to query_raw
in order to get corresponding return type.
e.g.
retType = Types.Vec(Types.Nat64);
res = agent.query_raw("rrkah-fqaaa-aaaaa-aaaaq-cai", "get_neuron_ids", encode([]), retType)
and got
[{'type': 'vec (nat64)', 'value': []}]
Candid parsing is WIP.
Candid parsing already supported on the main branch
Maybe I'm doing this wrong, but when calling a method that returns a list such as below, the response comes back as an unstructured list
results in
Is there a way to get this library to return a dictionary with indexed items corresponding to what I see here?
https://bmht6-iiaaa-aaaad-qabeq-cai.raw.ic0.app/principal/rrkah-fqaaa-aaaaa-aaaaq-cai