From 5058b10eb425de07f18b4ac09222a2fa814c38fd Mon Sep 17 00:00:00 2001 From: Joe C Date: Wed, 15 Jan 2025 10:23:39 +0800 Subject: [PATCH] use new codama renderers (#24) --- clients/js/src/generated/errors/index.ts | 6 +- .../src/generated/errors/solanaFeatureGate.ts | 6 +- clients/js/src/generated/index.ts | 6 +- .../js/src/generated/instructions/index.ts | 6 +- .../instructions/revokePendingActivation.ts | 28 +- clients/js/src/generated/programs/index.ts | 6 +- .../generated/programs/solanaFeatureGate.ts | 6 +- clients/js/src/generated/shared/index.ts | 6 +- clients/rust/src/generated/errors/mod.rs | 6 +- .../generated/errors/solana_feature_gate.rs | 12 +- .../rust/src/generated/instructions/mod.rs | 6 +- .../instructions/revoke_pending_activation.rs | 13 +- clients/rust/src/generated/mod.rs | 6 +- clients/rust/src/generated/programs.rs | 6 +- package.json | 8 +- pnpm-lock.yaml | 340 +++++++++++------- scripts/generate-clients.mjs | 20 +- 17 files changed, 301 insertions(+), 186 deletions(-) diff --git a/clients/js/src/generated/errors/index.ts b/clients/js/src/generated/errors/index.ts index 5178e11..469ba84 100644 --- a/clients/js/src/generated/errors/index.ts +++ b/clients/js/src/generated/errors/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './solanaFeatureGate'; diff --git a/clients/js/src/generated/errors/solanaFeatureGate.ts b/clients/js/src/generated/errors/solanaFeatureGate.ts index 2bc1422..def1c91 100644 --- a/clients/js/src/generated/errors/solanaFeatureGate.ts +++ b/clients/js/src/generated/errors/solanaFeatureGate.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/index.ts b/clients/js/src/generated/index.ts index dad814c..a079960 100644 --- a/clients/js/src/generated/index.ts +++ b/clients/js/src/generated/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './errors'; diff --git a/clients/js/src/generated/instructions/index.ts b/clients/js/src/generated/instructions/index.ts index 5a68e83..053239e 100644 --- a/clients/js/src/generated/instructions/index.ts +++ b/clients/js/src/generated/instructions/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './revokePendingActivation'; diff --git a/clients/js/src/generated/instructions/revokePendingActivation.ts b/clients/js/src/generated/instructions/revokePendingActivation.ts index 995d328..724f1ba 100644 --- a/clients/js/src/generated/instructions/revokePendingActivation.ts +++ b/clients/js/src/generated/instructions/revokePendingActivation.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -30,6 +30,12 @@ import { import { SOLANA_FEATURE_GATE_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; +export const REVOKE_PENDING_ACTIVATION_DISCRIMINATOR = 0; + +export function getRevokePendingActivationDiscriminatorBytes() { + return getU8Encoder().encode(REVOKE_PENDING_ACTIVATION_DISCRIMINATOR); +} + export type RevokePendingActivationInstruction< TProgram extends string = typeof SOLANA_FEATURE_GATE_PROGRAM_ADDRESS, TAccountFeature extends string | IAccountMeta = string, @@ -63,7 +69,10 @@ export type RevokePendingActivationInstructionDataArgs = {}; export function getRevokePendingActivationInstructionDataEncoder(): Encoder { return transformEncoder( getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: 0 }) + (value) => ({ + ...value, + discriminator: REVOKE_PENDING_ACTIVATION_DISCRIMINATOR, + }) ); } @@ -98,20 +107,23 @@ export function getRevokePendingActivationInstruction< TAccountFeature extends string, TAccountIncinerator extends string, TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof SOLANA_FEATURE_GATE_PROGRAM_ADDRESS, >( input: RevokePendingActivationInput< TAccountFeature, TAccountIncinerator, TAccountSystemProgram - > + >, + config?: { programAddress?: TProgramAddress } ): RevokePendingActivationInstruction< - typeof SOLANA_FEATURE_GATE_PROGRAM_ADDRESS, + TProgramAddress, TAccountFeature, TAccountIncinerator, TAccountSystemProgram > { // Program address. - const programAddress = SOLANA_FEATURE_GATE_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? SOLANA_FEATURE_GATE_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -140,7 +152,7 @@ export function getRevokePendingActivationInstruction< programAddress, data: getRevokePendingActivationInstructionDataEncoder().encode({}), } as RevokePendingActivationInstruction< - typeof SOLANA_FEATURE_GATE_PROGRAM_ADDRESS, + TProgramAddress, TAccountFeature, TAccountIncinerator, TAccountSystemProgram diff --git a/clients/js/src/generated/programs/index.ts b/clients/js/src/generated/programs/index.ts index 5178e11..469ba84 100644 --- a/clients/js/src/generated/programs/index.ts +++ b/clients/js/src/generated/programs/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './solanaFeatureGate'; diff --git a/clients/js/src/generated/programs/solanaFeatureGate.ts b/clients/js/src/generated/programs/solanaFeatureGate.ts index 385467e..ea8f058 100644 --- a/clients/js/src/generated/programs/solanaFeatureGate.ts +++ b/clients/js/src/generated/programs/solanaFeatureGate.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/shared/index.ts b/clients/js/src/generated/shared/index.ts index 278bf59..01a7d93 100644 --- a/clients/js/src/generated/shared/index.ts +++ b/clients/js/src/generated/shared/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/rust/src/generated/errors/mod.rs b/clients/rust/src/generated/errors/mod.rs index 184fba5..28ec129 100644 --- a/clients/rust/src/generated/errors/mod.rs +++ b/clients/rust/src/generated/errors/mod.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! pub(crate) mod solana_feature_gate; diff --git a/clients/rust/src/generated/errors/solana_feature_gate.rs b/clients/rust/src/generated/errors/solana_feature_gate.rs index 1f6a4c6..e5e52dd 100644 --- a/clients/rust/src/generated/errors/solana_feature_gate.rs +++ b/clients/rust/src/generated/errors/solana_feature_gate.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! use {num_derive::FromPrimitive, thiserror::Error}; @@ -18,3 +18,9 @@ impl solana_program::program_error::PrintProgramError for SolanaFeatureGateError solana_program::msg!(&self.to_string()); } } + +impl solana_program::decode_error::DecodeError for SolanaFeatureGateError { + fn type_of() -> &'static str { + "SolanaFeatureGateError" + } +} diff --git a/clients/rust/src/generated/instructions/mod.rs b/clients/rust/src/generated/instructions/mod.rs index 00d19e2..7c9bb87 100644 --- a/clients/rust/src/generated/instructions/mod.rs +++ b/clients/rust/src/generated/instructions/mod.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! pub(crate) mod r#revoke_pending_activation; diff --git a/clients/rust/src/generated/instructions/revoke_pending_activation.rs b/clients/rust/src/generated/instructions/revoke_pending_activation.rs index 4dd475a..898bea8 100644 --- a/clients/rust/src/generated/instructions/revoke_pending_activation.rs +++ b/clients/rust/src/generated/instructions/revoke_pending_activation.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! use borsh::{BorshDeserialize, BorshSerialize}; @@ -51,7 +51,8 @@ impl RevokePendingActivation { } } -#[derive(BorshDeserialize, BorshSerialize)] +#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct RevokePendingActivationInstructionData { discriminator: u8, } @@ -107,7 +108,7 @@ impl RevokePendingActivationBuilder { self.system_program = Some(system_program); self } - /// Add an aditional account to the instruction. + /// Add an additional account to the instruction. #[inline(always)] pub fn add_remaining_account( &mut self, @@ -235,7 +236,7 @@ impl<'a, 'b> RevokePendingActivationCpi<'a, 'b> { accounts, data, }; - let mut account_infos = Vec::with_capacity(3 + 1 + remaining_accounts.len()); + let mut account_infos = Vec::with_capacity(4 + remaining_accounts.len()); account_infos.push(self.__program.clone()); account_infos.push(self.feature.clone()); account_infos.push(self.incinerator.clone()); diff --git a/clients/rust/src/generated/mod.rs b/clients/rust/src/generated/mod.rs index 8938b2b..cdff1c2 100644 --- a/clients/rust/src/generated/mod.rs +++ b/clients/rust/src/generated/mod.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! pub mod errors; pub mod instructions; diff --git a/clients/rust/src/generated/programs.rs b/clients/rust/src/generated/programs.rs index 888fd2e..253a9f8 100644 --- a/clients/rust/src/generated/programs.rs +++ b/clients/rust/src/generated/programs.rs @@ -1,8 +1,8 @@ -//! This code was AUTOGENERATED using the kinobi library. +//! This code was AUTOGENERATED using the codama library. //! Please DO NOT EDIT THIS FILE, instead use visitors -//! to add features, then rerun kinobi to update it. +//! to add features, then rerun codama to update it. //! -//! +//! use solana_program::{pubkey, pubkey::Pubkey}; diff --git a/package.json b/package.json index 05b59bb..17f7e2c 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,11 @@ }, "devDependencies": { "@iarna/toml": "^2.2.5", - "@kinobi-so/nodes-from-anchor": "^0.20.9", - "@kinobi-so/renderers-js": "^0.21.2", - "@kinobi-so/renderers-rust": "^0.21.0", + "@codama/nodes-from-anchor": "^1.1.0", + "@codama/renderers-js": "^1.1.1", + "@codama/renderers-rust": "^1.0.6", "@metaplex-foundation/shank-js": "^0.1.7", - "kinobi": "^0.21.0", + "codama": "^1.2.0", "typescript": "^5.5.2", "zx": "^7.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1ef89f..3d9aeb7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,24 +8,24 @@ importers: .: devDependencies: + '@codama/nodes-from-anchor': + specifier: ^1.1.0 + version: 1.1.0 + '@codama/renderers-js': + specifier: ^1.1.1 + version: 1.1.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) + '@codama/renderers-rust': + specifier: ^1.0.6 + version: 1.0.6(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) '@iarna/toml': specifier: ^2.2.5 version: 2.2.5 - '@kinobi-so/nodes-from-anchor': - specifier: ^0.20.9 - version: 0.20.9 - '@kinobi-so/renderers-js': - specifier: ^0.21.2 - version: 0.21.2(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) - '@kinobi-so/renderers-rust': - specifier: ^0.21.0 - version: 0.21.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) '@metaplex-foundation/shank-js': specifier: ^0.1.7 version: 0.1.7 - kinobi: - specifier: ^0.21.0 - version: 0.21.0 + codama: + specifier: ^1.2.0 + version: 1.2.0 typescript: specifier: ^5.5.2 version: 5.5.4 @@ -35,39 +35,39 @@ importers: packages: - '@iarna/toml@2.2.5': - resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} - - '@kinobi-so/errors@0.21.0': - resolution: {integrity: sha512-7dPK35L/Y01qzekhVHdKAu+lENmHhuwX39rIx3qNJpNPHKi1VCcorLuOJlfT2F9MPPUjv5pZliL5qQ5IsvtNMw==} + '@codama/errors@1.2.0': + resolution: {integrity: sha512-7cLTgu1UpDkvDIx+9WclYaQr4vuFxnRYlZ5GFhZ0vP3QPlhj2FORwDC+crUy+YzboNKL7tGg53CAOpF61HnEpg==} hasBin: true - '@kinobi-so/node-types@0.21.0': - resolution: {integrity: sha512-UmzjocmsLa1pZ/ExVklGRsWQZNoIvifKBuTEAcpdxlDhg6hmrMWoXwWvRrLI5o7v1WKvTucv7KuM+5GU9UhFDw==} + '@codama/node-types@1.2.0': + resolution: {integrity: sha512-r/gBY8vi2tsrThtT1uKXQvI2c7Zv3hJH/+a35JJS/pkkt2tsAgX45/9TQWMepiGECfak8OhiMmqb+Naf+qDg4w==} + + '@codama/nodes-from-anchor@1.1.0': + resolution: {integrity: sha512-cEe3tsQMZU8y3YJOi0HOSbsZcTiKP0AxC4XVMFmFJjJe8lKWZW6hghxKG9N4YyryujtZkSGvdpxk+rnmd12Lwg==} - '@kinobi-so/nodes-from-anchor@0.20.9': - resolution: {integrity: sha512-xNlwvJek6Hbfi45Unocwq/lT3rFXhmpZcAZmQJMgdIH8E4iAya9ZQ89j4neRQ+C1KVrK9qFJh0SaJvt9xnJQXA==} + '@codama/nodes@1.2.0': + resolution: {integrity: sha512-3wb449llwUOYpHlIxKAwNFpJpazOTrpC3fhoFd3l0gSVKq77qz1IbYq8M3mVxNLSnXv8bHNrW0BCenyzjO1e2g==} - '@kinobi-so/nodes@0.21.0': - resolution: {integrity: sha512-Z8STFjB3/f9LzK494l6qydkBMsFtnm96YreJjlAg9/DeKNtphimslSvFTF/9qHiGMfOQpOVhQqbWFXpt+PCZiQ==} + '@codama/renderers-core@1.0.2': + resolution: {integrity: sha512-feDqtNB0PIocgrDIPdG0mdv+l28VEA64gExg1NdR2aiydp0LxpBrU5gnPOqxiZ2et4ARtt9yGU959CYdzqh2Qg==} - '@kinobi-so/renderers-core@0.20.7': - resolution: {integrity: sha512-KJhU8+UMowO9dDkLhEodAkbRkgSxdfBWeY+DIgOCgXcakt0T140K7OREuaAo9fp12Owf+10SAEGx9AzTNySoHA==} + '@codama/renderers-js@1.1.1': + resolution: {integrity: sha512-lAsZkFswL7FI59wgzenVRgK2Hcw0u9bkMk+BMupoFQlOs29xZb3xihtL2CBfEsvzLbHdq/XdDSypiVfuD6A3Cg==} - '@kinobi-so/renderers-js@0.21.2': - resolution: {integrity: sha512-G576GAQ10ugmA63EZRlEbv892th37q9ow+AMzZD1vtypRCEJ7znakzySSDG3aeqaZujk2igKXFQTD+FHuY/xPg==} + '@codama/renderers-rust@1.0.6': + resolution: {integrity: sha512-7i4/t5Vq0iQAK2DCmtDHJxjoD2zNLpghanAYXTZWKVdYpBx/ynbH6DFTxUBqssTTRLRli4c4N4MpODmLOTHVuA==} - '@kinobi-so/renderers-rust@0.21.0': - resolution: {integrity: sha512-BLe1SW6XFBhjtZdCc7cuukMWrJTbhCafCCmXryLmjzF7jaiK9nyZZFinHxljSac4HCk2vDn22mHAwOjabaDQ2Q==} + '@codama/validators@1.2.0': + resolution: {integrity: sha512-/HV7aMgzm93vUqPsnWnDYUPx3hz6i1GxmY3CrW0Ivo0hoyR73Es4t48jYcIjYBb4bqQlO2eTfWuXUEAjwTsCAA==} - '@kinobi-so/validators@0.21.0': - resolution: {integrity: sha512-mpBqgqlto/Wdj6rlf1mqWkyw00rPJw98bkNItXq+ofCEtBsjaMq9lsevCE+IPmfJJYEPFGHGJW4Gb6m/cLmOqw==} + '@codama/visitors-core@1.2.0': + resolution: {integrity: sha512-sr8+xGx+QPAMedBY0wT5W0HAQJypBWNPGWKPImNg5t3Da1DC5oofrW3JHmqtSUHDdFbDXtagcEZ32DGqJFJ5hA==} - '@kinobi-so/visitors-core@0.21.0': - resolution: {integrity: sha512-m6C/cAy7q7ZAWhByQGo2YnBsbt0qS3Un0lyT4mmPGQt0QFXUDExFipjTvY/NnzZ5lQJ2grvnL04pqLx8V7eiuw==} + '@codama/visitors@1.2.0': + resolution: {integrity: sha512-3edQ1aCVdzYK6eNSUSCgs+P4SJ0UyrVpU7s1ykQog1El//ZkjGJNAAjyuCuA4EMuKxDW0sQa9RXkPfIJSxpa6g==} - '@kinobi-so/visitors@0.21.0': - resolution: {integrity: sha512-gigysLJCfVtNCFkdDMeHGB+1SOvoiQOPUVKxewzOq1wDYVioFmmf4aXfB1GCEslLlMvl63cTJrwvh8bDIZoaSA==} + '@iarna/toml@2.2.5': + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} '@metaplex-foundation/rustbin@0.3.5': resolution: {integrity: sha512-m0wkRBEQB/8krwMwKBvFugufZtYwMXiGHud2cTDAv+aGXK4M90y0Hx67/wpu+AqqoQfdV8VM9YezUOHKD+Z5kA==} @@ -75,9 +75,9 @@ packages: '@metaplex-foundation/shank-js@0.1.7': resolution: {integrity: sha512-tSAipn8Ho1UxlMC3jwJ5Opl+Y3lRm60VTkgRDfvzydb57lXW5G+K5MrZhEmhrFUuRYziV+e34CTo+ybpMp1Eqg==} - '@noble/hashes@1.4.0': - resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} - engines: {node: '>= 16'} + '@noble/hashes@1.7.0': + resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + engines: {node: ^14.21.3 || >=16} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -91,24 +91,28 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@solana/codecs-core@2.0.0-preview.4': - resolution: {integrity: sha512-A0VVuDDA5kNKZUinOqHxJQK32aKTucaVbvn31YenGzHX1gPqq+SOnFwgaEY6pq4XEopSmaK16w938ZQS8IvCnw==} + '@solana/codecs-core@2.0.0-rc.4': + resolution: {integrity: sha512-JIrTSps032mSE3wBxW3bXOqWfoy4CMy1CX/XeVCijyh5kLVxZTSDIdRTYdePdL1yzaOZF1Xysvt1DhOUgBdM+A==} + engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' - '@solana/codecs-numbers@2.0.0-preview.4': - resolution: {integrity: sha512-Q061rLtMadsO7uxpguT+Z7G4UHnjQ6moVIxAQxR58nLxDPCC7MB1Pk106/Z7NDhDLHTcd18uO6DZ7ajHZEn2XQ==} + '@solana/codecs-numbers@2.0.0-rc.4': + resolution: {integrity: sha512-ZJR7TaUO65+3Hzo3YOOUCS0wlzh17IW+j0MZC2LCk1R0woaypRpHKj4iSMYeQOZkMxsd9QT3WNvjFrPC2qA6Sw==} + engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5' - '@solana/codecs-strings@2.0.0-preview.4': - resolution: {integrity: sha512-YDbsQePRWm+xnrfS64losSGRg8Wb76cjK1K6qfR8LPmdwIC3787x9uW5/E4icl/k+9nwgbIRXZ65lpF+ucZUnw==} + '@solana/codecs-strings@2.0.0-rc.4': + resolution: {integrity: sha512-LGfK2RL0BKjYYUfzu2FG/gTgCsYOMz9FKVs2ntji6WneZygPxJTV5W98K3J8Rl0JewpCSCFQH3xjLSHBJUS0fA==} + engines: {node: '>=20.18.0'} peerDependencies: fastestsmallesttextencoderdecoder: ^1.0.22 typescript: '>=5' - '@solana/errors@2.0.0-preview.4': - resolution: {integrity: sha512-kadtlbRv2LCWr8A9V22On15Us7Nn8BvqNaOB4hXsTB3O0fU40D1ru2l+cReqLcRPij4znqlRzW9Xi0m6J5DIhA==} + '@solana/errors@2.0.0-rc.4': + resolution: {integrity: sha512-0PPaMyB81keEHG/1pnyEuiBVKctbXO641M2w3CIOrYT/wzjunfF0FTxsqq9wYJeYo0AyiefCKGgSPs6wiY2PpQ==} + engines: {node: '>=20.18.0'} hasBin: true peerDependencies: typescript: '>=5' @@ -145,14 +149,29 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} chalk@5.3.0: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@5.4.1: + resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + codama@1.2.0: + resolution: {integrity: sha512-cGcaArn/XhAo+hp3wPfFq6Gnirj+cjfQQheOyYBSeHSNQSpstcGKwoaQROPYJAYT32LNn9DdlNPowv7pXVwWcA==} + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} @@ -182,6 +201,10 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} @@ -189,10 +212,18 @@ packages: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + event-stream@3.3.4: resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} @@ -236,6 +267,14 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-intrinsic@1.2.7: + resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -247,6 +286,10 @@ packages: gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -261,6 +304,10 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -287,8 +334,8 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - json-stable-stringify@1.1.1: - resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==} + json-stable-stringify@1.2.1: + resolution: {integrity: sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA==} engines: {node: '>= 0.4'} jsonfile@6.1.0: @@ -297,12 +344,13 @@ packages: jsonify@0.0.1: resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} - kinobi@0.21.0: - resolution: {integrity: sha512-T71VNh4yS8uSvtNp1FEWhJGygW5/8O82SAlFRlPYsWiwqWH9X3eZwwUthBVH7dfazqs8GLia0rAMEmUP99iwLw==} - map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -350,8 +398,8 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} hasBin: true @@ -439,79 +487,79 @@ packages: snapshots: - '@iarna/toml@2.2.5': {} - - '@kinobi-so/errors@0.21.0': + '@codama/errors@1.2.0': dependencies: - '@kinobi-so/node-types': 0.21.0 - chalk: 5.3.0 + '@codama/node-types': 1.2.0 + chalk: 5.4.1 commander: 12.1.0 - '@kinobi-so/node-types@0.21.0': {} + '@codama/node-types@1.2.0': {} - '@kinobi-so/nodes-from-anchor@0.20.9': + '@codama/nodes-from-anchor@1.1.0': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/visitors': 0.21.0 - '@noble/hashes': 1.4.0 + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/visitors': 1.2.0 + '@noble/hashes': 1.7.0 - '@kinobi-so/nodes@0.21.0': + '@codama/nodes@1.2.0': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/node-types': 0.21.0 + '@codama/errors': 1.2.0 + '@codama/node-types': 1.2.0 - '@kinobi-so/renderers-core@0.20.7': + '@codama/renderers-core@1.0.2': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/visitors-core': 0.21.0 + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/visitors-core': 1.2.0 - '@kinobi-so/renderers-js@0.21.2(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': + '@codama/renderers-js@1.1.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/nodes-from-anchor': 0.20.9 - '@kinobi-so/renderers-core': 0.20.7 - '@kinobi-so/visitors-core': 0.21.0 - '@solana/codecs-strings': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/nodes-from-anchor': 1.1.0 + '@codama/renderers-core': 1.0.2 + '@codama/visitors-core': 1.2.0 + '@solana/codecs-strings': 2.0.0-rc.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) nunjucks: 3.2.4 - prettier: 3.3.3 + prettier: 3.4.2 transitivePeerDependencies: - chokidar - fastestsmallesttextencoderdecoder - typescript - '@kinobi-so/renderers-rust@0.21.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': + '@codama/renderers-rust@1.0.6(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/renderers-core': 0.20.7 - '@kinobi-so/visitors-core': 0.21.0 - '@solana/codecs-strings': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/renderers-core': 1.0.2 + '@codama/visitors-core': 1.2.0 + '@solana/codecs-strings': 2.0.0-rc.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4) nunjucks: 3.2.4 transitivePeerDependencies: - chokidar - fastestsmallesttextencoderdecoder - typescript - '@kinobi-so/validators@0.21.0': + '@codama/validators@1.2.0': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/visitors-core': 0.21.0 + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/visitors-core': 1.2.0 - '@kinobi-so/visitors-core@0.21.0': + '@codama/visitors-core@1.2.0': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - json-stable-stringify: 1.1.1 + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + json-stable-stringify: 1.2.1 - '@kinobi-so/visitors@0.21.0': + '@codama/visitors@1.2.0': dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/visitors-core': 0.21.0 + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/visitors-core': 1.2.0 + + '@iarna/toml@2.2.5': {} '@metaplex-foundation/rustbin@0.3.5': dependencies: @@ -530,7 +578,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@noble/hashes@1.4.0': {} + '@noble/hashes@1.7.0': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -544,26 +592,26 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@solana/codecs-core@2.0.0-preview.4(typescript@5.5.4)': + '@solana/codecs-core@2.0.0-rc.4(typescript@5.5.4)': dependencies: - '@solana/errors': 2.0.0-preview.4(typescript@5.5.4) + '@solana/errors': 2.0.0-rc.4(typescript@5.5.4) typescript: 5.5.4 - '@solana/codecs-numbers@2.0.0-preview.4(typescript@5.5.4)': + '@solana/codecs-numbers@2.0.0-rc.4(typescript@5.5.4)': dependencies: - '@solana/codecs-core': 2.0.0-preview.4(typescript@5.5.4) - '@solana/errors': 2.0.0-preview.4(typescript@5.5.4) + '@solana/codecs-core': 2.0.0-rc.4(typescript@5.5.4) + '@solana/errors': 2.0.0-rc.4(typescript@5.5.4) typescript: 5.5.4 - '@solana/codecs-strings@2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': + '@solana/codecs-strings@2.0.0-rc.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.4)': dependencies: - '@solana/codecs-core': 2.0.0-preview.4(typescript@5.5.4) - '@solana/codecs-numbers': 2.0.0-preview.4(typescript@5.5.4) - '@solana/errors': 2.0.0-preview.4(typescript@5.5.4) + '@solana/codecs-core': 2.0.0-rc.4(typescript@5.5.4) + '@solana/codecs-numbers': 2.0.0-rc.4(typescript@5.5.4) + '@solana/errors': 2.0.0-rc.4(typescript@5.5.4) fastestsmallesttextencoderdecoder: 1.0.22 typescript: 5.5.4 - '@solana/errors@2.0.0-preview.4(typescript@5.5.4)': + '@solana/errors@2.0.0-rc.4(typescript@5.5.4)': dependencies: chalk: 5.3.0 commander: 12.1.0 @@ -598,16 +646,34 @@ snapshots: dependencies: fill-range: 7.1.1 - call-bind@1.0.7: + call-bind-apply-helpers@1.0.1: dependencies: - es-define-property: 1.0.0 es-errors: 1.3.0 function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.0 get-intrinsic: 1.2.4 set-function-length: 1.2.2 + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.7 + chalk@5.3.0: {} + chalk@5.4.1: {} + + codama@1.2.0: + dependencies: + '@codama/errors': 1.2.0 + '@codama/nodes': 1.2.0 + '@codama/validators': 1.2.0 + '@codama/visitors': 1.2.0 + commander@12.1.0: {} commander@5.1.0: {} @@ -628,14 +694,26 @@ snapshots: dependencies: path-type: 4.0.0 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + duplexer@0.1.2: {} es-define-property@1.0.0: dependencies: get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} + es-errors@1.3.0: {} + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + event-stream@3.3.4: dependencies: duplexer: 0.1.2 @@ -693,6 +771,24 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-intrinsic@1.2.7: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -709,6 +805,8 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + gopd@1.2.0: {} + graceful-fs@4.2.11: {} has-property-descriptors@1.0.2: @@ -719,6 +817,8 @@ snapshots: has-symbols@1.0.3: {} + has-symbols@1.1.0: {} + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -737,9 +837,10 @@ snapshots: isexe@2.0.0: {} - json-stable-stringify@1.1.1: + json-stable-stringify@1.2.1: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 isarray: 2.0.5 jsonify: 0.0.1 object-keys: 1.1.1 @@ -752,15 +853,10 @@ snapshots: jsonify@0.0.1: {} - kinobi@0.21.0: - dependencies: - '@kinobi-so/errors': 0.21.0 - '@kinobi-so/nodes': 0.21.0 - '@kinobi-so/validators': 0.21.0 - '@kinobi-so/visitors': 0.21.0 - map-stream@0.1.0: {} + math-intrinsics@1.1.0: {} + merge2@1.4.1: {} micromatch@4.0.7: @@ -796,7 +892,7 @@ snapshots: picomatch@2.3.1: {} - prettier@3.3.3: {} + prettier@3.4.2: {} ps-tree@1.2.0: dependencies: diff --git a/scripts/generate-clients.mjs b/scripts/generate-clients.mjs index ed1be54..8584da1 100644 --- a/scripts/generate-clients.mjs +++ b/scripts/generate-clients.mjs @@ -1,25 +1,25 @@ #!/usr/bin/env zx import "zx/globals"; -import * as k from "kinobi"; -import { rootNodeFromAnchor } from "@kinobi-so/nodes-from-anchor"; -import { renderVisitor as renderJavaScriptVisitor } from "@kinobi-so/renderers-js"; -import { renderVisitor as renderRustVisitor } from "@kinobi-so/renderers-rust"; +import * as c from "codama"; +import { rootNodeFromAnchor } from "@codama/nodes-from-anchor"; +import { renderVisitor as renderJavaScriptVisitor } from "@codama/renderers-js"; +import { renderVisitor as renderRustVisitor } from "@codama/renderers-rust"; import { getAllProgramIdls, getToolchainArgument } from "./utils.mjs"; -// Instanciate Kinobi. +// Instanciate codama. const [idl, ...additionalIdls] = getAllProgramIdls().map(idl => rootNodeFromAnchor(require(idl))) -const kinobi = k.createFromRoot(idl, additionalIdls); +const codama = c.createFromRoot(idl, additionalIdls); // Update programs. -kinobi.update( - k.updateProgramsVisitor({ +codama.update( + c.updateProgramsVisitor({ "solanaFeatureGateProgram": { name: "solanaFeatureGate" }, }) ); // Render JavaScript. const jsClient = path.join(__dirname, "..", "clients", "js"); -kinobi.accept( +codama.accept( renderJavaScriptVisitor(path.join(jsClient, "src", "generated"), { prettier: require(path.join(jsClient, ".prettierrc.json")) }) @@ -27,7 +27,7 @@ kinobi.accept( // Render Rust. const rustClient = path.join(__dirname, "..", "clients", "rust"); -kinobi.accept( +codama.accept( renderRustVisitor(path.join(rustClient, "src", "generated"), { formatCode: true, crateFolder: rustClient,