Closed kespinola closed 5 months ago
@lorisleiva here is the initial scaffolding based on the V00. I'm now going through writing specs and resolving the type violations caused by the updated IDL definition.
@lorisleiva getting somewhere now. List of considerations:
All specs passing but still needs work on type linking and pdas.
I've started setting up the PDAs but current kinibo node catalogue doesn't look to support references other field on an instruction.
Able to represent the const now but no node types for kind 'account' | 'arg'
export type IdlV01Pda = {
program?: IdlV01Seed;
seeds: IdlV01Seed[];
};
export type IdlV01Seed = IdlV01SeedAccount | IdlV01SeedArg | IdlV01SeedConst;
export type IdlV01SeedConst = {
kind: 'const';
value: number[];
};
export type IdlV01SeedArg = {
kind: 'arg';
path: string;
};
export type IdlV01SeedAccount = {
account?: string;
kind: 'account';
path: string;
};
@lorisleiva I think we are in a good spot now. Ready to test on a program and final review.
Latest commit: b880ad7925bd6cbf4060262634541c7eaa36156b
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@lorisleiva CR is in.
Thanks! There are a few final touches to fix but I can sort this out in a subsequent commit. 🍻
Goal
Kinobi is able to generate clients for protocols using the latest IDL schema of anchor.
Changes