Open bodily11 opened 4 months ago
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.
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?
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.