Closed austbot closed 2 years ago
Thanks for reporting.
shank generates a different IDL for maps, i.e. it'd be { hashMap: [ 'string', { defined: 'DataItem' }] }
.
The way that anchor seems to do it is not composable, i.e. there is no way to express what DataItem
is.
It's interesting that it does it entirely differently for Vec
s for instance.
My guess that the only way that this works is because no TypeScript is generated from this kind of IDL.
Therefore the solution here is not to make shank adapt it's IDL to the anchor way, but instead we'll have to make solita adapt this format to what shank does (as the latter composes and is more flexible). I'll add a step for solita to adapt that IDL before transforming it into TypeScript.
I think anchor simply doesnt support hashmaps, I think the way shank does it is actually better, I think we perhaps needf to convert anchor idls to chank idls and talk to armani to use our way
OK cool .. I'll add that step for now then :)
An IDL with this generated where
DataItem
is an enumGets
Instead of properly mapping to
Map...