Relatively new composite queries candid format is not supported in IC-PY
Is IC-PY still being maintained? Is there a way to get new composite query functionality added to the candid parsing?
Also interested in putting in a plug for https://github.com/rocklabs-io/ic-py/issues/63. If you use a variable to define a candid value and include it inline (meaning within parentheses in a function) then the candid parser fails.
Thanks.
Added the composite query parsing in #112
For #63 I dont really understand. Could you give me an example and the error occur?
A good example for #63 is:
authn_method_confirm: (IdentityNumber, confirmation_code: text) -> (variant {Ok; Err: AuthnMethodConfirmationError;});
See how "confirmation_code" is defined inline? This is from the Internet Identity canister: rdmx6-jaaaa-aaaaa-aaadq-cai.
If I delete "confirmation_code:" then it parses correctly, but can't handle what I'm calling inline naming/variable definitions.
#113 is relevant here as well. I tried to pull the candid for the II canister, but got an error that it didn't have the tmp_hack call anymore. So I copy/pasted the candid locally, but then got the #63 error. So I deleted the inline parameter names, and then I was finally able to parse the candid.
From the official Candid spec, I don't see such grammar to define func arguments inline. Seems the candid from II is manually documented. I suggest to modify the candid to match the grammar.
Interesting. Ok, I'll dig a bit more on this.
I cannot reproduce this locally. I tried the following did file
type Balances = vec record {
0: text;
1: nat64;
};
service : {
authn_method_confirm: (Balances, confirmation_code: text) -> (variant {Ok; Err: text});
}
didc parsed it correctly. Are you using the latest candid parser?