瀏覽代碼

Upgrade to Kinobi 0.19 and Web3.js tp3

Loris Leiva 1 年之前
父節點
當前提交
d01d3ce1d4
共有 48 個文件被更改,包括 786 次插入894 次删除
  1. 6 0
      clients/js/.eslintrc.cjs
  2. 4 9
      clients/js/package.json
  3. 359 299
      clients/js/pnpm-lock.yaml
  4. 20 40
      clients/js/src/generated/accounts/nonce.ts
  5. 44 100
      clients/js/src/generated/errors/system.ts
  6. 0 1
      clients/js/src/generated/index.ts
  7. 11 12
      clients/js/src/generated/instructions/advanceNonceAccount.ts
  8. 11 12
      clients/js/src/generated/instructions/allocate.ts
  9. 19 20
      clients/js/src/generated/instructions/allocateWithSeed.ts
  10. 12 15
      clients/js/src/generated/instructions/assign.ts
  11. 18 19
      clients/js/src/generated/instructions/assignWithSeed.ts
  12. 12 15
      clients/js/src/generated/instructions/authorizeNonceAccount.ts
  13. 13 16
      clients/js/src/generated/instructions/createAccount.ts
  14. 20 21
      clients/js/src/generated/instructions/createAccountWithSeed.ts
  15. 10 14
      clients/js/src/generated/instructions/initializeNonceAccount.ts
  16. 12 13
      clients/js/src/generated/instructions/transferSol.ts
  17. 19 20
      clients/js/src/generated/instructions/transferSolWithSeed.ts
  18. 9 11
      clients/js/src/generated/instructions/upgradeNonceAccount.ts
  19. 13 14
      clients/js/src/generated/instructions/withdrawNonceAccount.ts
  20. 14 35
      clients/js/src/generated/programs/system.ts
  21. 6 16
      clients/js/src/generated/shared/index.ts
  22. 5 5
      clients/js/src/generated/types/nonceState.ts
  23. 5 5
      clients/js/src/generated/types/nonceVersion.ts
  24. 16 14
      clients/js/test/_setup.ts
  25. 2 2
      clients/js/test/advanceNonceAccount.test.ts
  26. 2 2
      clients/js/test/createAccount.test.ts
  27. 5 4
      clients/js/test/initializeNonceAccount.test.ts
  28. 2 2
      clients/js/test/transferSol.test.ts
  29. 17 17
      clients/js/tsconfig.json
  30. 5 3
      clients/rust/src/generated/instructions/advance_nonce_account.rs
  31. 5 3
      clients/rust/src/generated/instructions/allocate.rs
  32. 5 3
      clients/rust/src/generated/instructions/allocate_with_seed.rs
  33. 5 3
      clients/rust/src/generated/instructions/assign.rs
  34. 5 3
      clients/rust/src/generated/instructions/assign_with_seed.rs
  35. 5 3
      clients/rust/src/generated/instructions/authorize_nonce_account.rs
  36. 5 3
      clients/rust/src/generated/instructions/create_account.rs
  37. 5 3
      clients/rust/src/generated/instructions/create_account_with_seed.rs
  38. 5 3
      clients/rust/src/generated/instructions/initialize_nonce_account.rs
  39. 5 3
      clients/rust/src/generated/instructions/transfer_sol.rs
  40. 5 3
      clients/rust/src/generated/instructions/transfer_sol_with_seed.rs
  41. 5 3
      clients/rust/src/generated/instructions/upgrade_nonce_account.rs
  42. 5 3
      clients/rust/src/generated/instructions/withdraw_nonce_account.rs
  43. 4 1
      clients/rust/src/generated/types/nonce_state.rs
  44. 4 1
      clients/rust/src/generated/types/nonce_version.rs
  45. 1 2
      package.json
  46. 19 91
      pnpm-lock.yaml
  47. 4 4
      scripts/client/test-rust.mjs
  48. 3 3
      scripts/generate-clients.mjs

+ 6 - 0
clients/js/.eslintrc.cjs

@@ -1,5 +1,11 @@
 module.exports = {
   extends: ['@solana/eslint-config-solana'],
+  ignorePatterns: ['.eslintrc.cjs'],
+  parserOptions: {
+    project: 'tsconfig.json',
+    tsconfigRootDir: __dirname,
+    sourceType: 'module',
+  },
   rules: {
     '@typescript-eslint/ban-types': 'off',
     '@typescript-eslint/sort-type-constituents': 'off',

+ 4 - 9
clients/js/package.json

@@ -33,19 +33,14 @@
     "registry": "https://registry.npmjs.org"
   },
   "license": "MIT",
-  "dependencies": {
-    "@solana/accounts": "^2.0.0-preview",
-    "@solana/addresses": "^2.0.0-preview",
-    "@solana/codecs": "^2.0.0-preview",
-    "@solana/instructions": "^2.0.0-preview",
-    "@solana/programs": "^2.0.0-preview",
-    "@solana/signers": "^2.0.0-preview"
+  "peerDependencies": {
+    "@solana/web3.js": "tp3"
   },
   "devDependencies": {
     "@ava/typescript": "^4.1.0",
     "@solana/eslint-config-solana": "^3.0.0",
-    "@solana/web3.js": "^2.0.0-preview",
-    "@solana/webcrypto-ed25519-polyfill": "^2.0.0-preview",
+    "@solana/web3.js": "tp3",
+    "@solana/webcrypto-ed25519-polyfill": "tp3",
     "@typescript-eslint/eslint-plugin": "^7.3.1",
     "@typescript-eslint/parser": "^7.3.1",
     "ava": "^6.1.2",

File diff suppressed because it is too large
+ 359 - 299
clients/js/pnpm-lock.yaml


+ 20 - 40
clients/js/src/generated/accounts/nonce.ts

@@ -8,32 +8,28 @@
 
 import {
   Account,
+  Address,
+  Codec,
+  Decoder,
   EncodedAccount,
+  Encoder,
   FetchAccountConfig,
   FetchAccountsConfig,
   MaybeAccount,
   MaybeEncodedAccount,
   assertAccountExists,
   assertAccountsExist,
+  combineCodec,
   decodeAccount,
   fetchEncodedAccount,
   fetchEncodedAccounts,
-} from '@solana/accounts';
-import {
-  Address,
   getAddressDecoder,
   getAddressEncoder,
-} from '@solana/addresses';
-import {
-  Codec,
-  Decoder,
-  Encoder,
-  combineCodec,
   getStructDecoder,
   getStructEncoder,
   getU64Decoder,
   getU64Encoder,
-} from '@solana/codecs';
+} from '@solana/web3.js';
 import {
   NonceState,
   NonceStateArgs,
@@ -45,17 +41,7 @@ import {
   getNonceVersionEncoder,
 } from '../types';
 
-export type Nonce<TAddress extends string = string> = Account<
-  NonceAccountData,
-  TAddress
->;
-
-export type MaybeNonce<TAddress extends string = string> = MaybeAccount<
-  NonceAccountData,
-  TAddress
->;
-
-export type NonceAccountData = {
+export type Nonce = {
   version: NonceVersion;
   state: NonceState;
   authority: Address;
@@ -63,7 +49,7 @@ export type NonceAccountData = {
   lamportsPerSignature: bigint;
 };
 
-export type NonceAccountDataArgs = {
+export type NonceArgs = {
   version: NonceVersionArgs;
   state: NonceStateArgs;
   authority: Address;
@@ -71,7 +57,7 @@ export type NonceAccountDataArgs = {
   lamportsPerSignature: number | bigint;
 };
 
-export function getNonceAccountDataEncoder(): Encoder<NonceAccountDataArgs> {
+export function getNonceEncoder(): Encoder<NonceArgs> {
   return getStructEncoder([
     ['version', getNonceVersionEncoder()],
     ['state', getNonceStateEncoder()],
@@ -81,7 +67,7 @@ export function getNonceAccountDataEncoder(): Encoder<NonceAccountDataArgs> {
   ]);
 }
 
-export function getNonceAccountDataDecoder(): Decoder<NonceAccountData> {
+export function getNonceDecoder(): Decoder<Nonce> {
   return getStructDecoder([
     ['version', getNonceVersionDecoder()],
     ['state', getNonceStateDecoder()],
@@ -91,28 +77,22 @@ export function getNonceAccountDataDecoder(): Decoder<NonceAccountData> {
   ]);
 }
 
-export function getNonceAccountDataCodec(): Codec<
-  NonceAccountDataArgs,
-  NonceAccountData
-> {
-  return combineCodec(
-    getNonceAccountDataEncoder(),
-    getNonceAccountDataDecoder()
-  );
+export function getNonceCodec(): Codec<NonceArgs, Nonce> {
+  return combineCodec(getNonceEncoder(), getNonceDecoder());
 }
 
 export function decodeNonce<TAddress extends string = string>(
   encodedAccount: EncodedAccount<TAddress>
-): Nonce<TAddress>;
+): Account<Nonce, TAddress>;
 export function decodeNonce<TAddress extends string = string>(
   encodedAccount: MaybeEncodedAccount<TAddress>
-): MaybeNonce<TAddress>;
+): MaybeAccount<Nonce, TAddress>;
 export function decodeNonce<TAddress extends string = string>(
   encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>
-): Nonce<TAddress> | MaybeNonce<TAddress> {
+): Account<Nonce, TAddress> | MaybeAccount<Nonce, TAddress> {
   return decodeAccount(
     encodedAccount as MaybeEncodedAccount<TAddress>,
-    getNonceAccountDataDecoder()
+    getNonceDecoder()
   );
 }
 
@@ -120,7 +100,7 @@ export async function fetchNonce<TAddress extends string = string>(
   rpc: Parameters<typeof fetchEncodedAccount>[0],
   address: Address<TAddress>,
   config?: FetchAccountConfig
-): Promise<Nonce<TAddress>> {
+): Promise<Account<Nonce, TAddress>> {
   const maybeAccount = await fetchMaybeNonce(rpc, address, config);
   assertAccountExists(maybeAccount);
   return maybeAccount;
@@ -130,7 +110,7 @@ export async function fetchMaybeNonce<TAddress extends string = string>(
   rpc: Parameters<typeof fetchEncodedAccount>[0],
   address: Address<TAddress>,
   config?: FetchAccountConfig
-): Promise<MaybeNonce<TAddress>> {
+): Promise<MaybeAccount<Nonce, TAddress>> {
   const maybeAccount = await fetchEncodedAccount(rpc, address, config);
   return decodeNonce(maybeAccount);
 }
@@ -139,7 +119,7 @@ export async function fetchAllNonce(
   rpc: Parameters<typeof fetchEncodedAccounts>[0],
   addresses: Array<Address>,
   config?: FetchAccountsConfig
-): Promise<Nonce[]> {
+): Promise<Account<Nonce>[]> {
   const maybeAccounts = await fetchAllMaybeNonce(rpc, addresses, config);
   assertAccountsExist(maybeAccounts);
   return maybeAccounts;
@@ -149,7 +129,7 @@ export async function fetchAllMaybeNonce(
   rpc: Parameters<typeof fetchEncodedAccounts>[0],
   addresses: Array<Address>,
   config?: FetchAccountsConfig
-): Promise<MaybeNonce[]> {
+): Promise<MaybeAccount<Nonce>[]> {
   const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
   return maybeAccounts.map((maybeAccount) => decodeNonce(maybeAccount));
 }

+ 44 - 100
clients/js/src/generated/errors/system.ts

@@ -6,111 +6,55 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-export const enum SystemProgramErrorCode {
-  /** AccountAlreadyInUse: an account with the same address already exists */
-  ACCOUNT_ALREADY_IN_USE = 0x0, // 0
-  /** ResultWithNegativeLamports: account does not have enough SOL to perform the operation */
-  RESULT_WITH_NEGATIVE_LAMPORTS = 0x1, // 1
-  /** InvalidProgramId: cannot assign account to this program id */
-  INVALID_PROGRAM_ID = 0x2, // 2
-  /** InvalidAccountDataLength: cannot allocate account data of this length */
-  INVALID_ACCOUNT_DATA_LENGTH = 0x3, // 3
-  /** MaxSeedLengthExceeded: length of requested seed is too long */
-  MAX_SEED_LENGTH_EXCEEDED = 0x4, // 4
-  /** AddressWithSeedMismatch: provided address does not match addressed derived from seed */
-  ADDRESS_WITH_SEED_MISMATCH = 0x5, // 5
-  /** NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar */
-  NONCE_NO_RECENT_BLOCKHASHES = 0x6, // 6
-  /** NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes */
-  NONCE_BLOCKHASH_NOT_EXPIRED = 0x7, // 7
-  /** NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce */
-  NONCE_UNEXPECTED_BLOCKHASH_VALUE = 0x8, // 8
-}
-
-export class SystemProgramError extends Error {
-  override readonly name = 'SystemProgramError';
-
-  readonly code: SystemProgramErrorCode;
-
-  readonly cause: Error | undefined;
-
-  constructor(
-    code: SystemProgramErrorCode,
-    name: string,
-    message: string,
-    cause?: Error
-  ) {
-    super(`${name} (${code}): ${message}`);
-    this.code = code;
-    this.cause = cause;
-  }
-}
-
-let systemProgramErrorCodeMap:
-  | Record<SystemProgramErrorCode, [string, string]>
-  | undefined;
+/** AccountAlreadyInUse: an account with the same address already exists */
+export const SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE = 0x0; // 0
+/** ResultWithNegativeLamports: account does not have enough SOL to perform the operation */
+export const SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS = 0x1; // 1
+/** InvalidProgramId: cannot assign account to this program id */
+export const SYSTEM_ERROR__INVALID_PROGRAM_ID = 0x2; // 2
+/** InvalidAccountDataLength: cannot allocate account data of this length */
+export const SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH = 0x3; // 3
+/** MaxSeedLengthExceeded: length of requested seed is too long */
+export const SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED = 0x4; // 4
+/** AddressWithSeedMismatch: provided address does not match addressed derived from seed */
+export const SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH = 0x5; // 5
+/** NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar */
+export const SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES = 0x6; // 6
+/** NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes */
+export const SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED = 0x7; // 7
+/** NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce */
+export const SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE = 0x8; // 8
+
+export type SystemError =
+  | typeof SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE
+  | typeof SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH
+  | typeof SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH
+  | typeof SYSTEM_ERROR__INVALID_PROGRAM_ID
+  | typeof SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED
+  | typeof SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED
+  | typeof SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES
+  | typeof SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE
+  | typeof SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS;
+
+let systemErrorMessages: Record<SystemError, string> | undefined;
 if (__DEV__) {
-  systemProgramErrorCodeMap = {
-    [SystemProgramErrorCode.ACCOUNT_ALREADY_IN_USE]: [
-      'AccountAlreadyInUse',
-      `an account with the same address already exists`,
-    ],
-    [SystemProgramErrorCode.RESULT_WITH_NEGATIVE_LAMPORTS]: [
-      'ResultWithNegativeLamports',
-      `account does not have enough SOL to perform the operation`,
-    ],
-    [SystemProgramErrorCode.INVALID_PROGRAM_ID]: [
-      'InvalidProgramId',
-      `cannot assign account to this program id`,
-    ],
-    [SystemProgramErrorCode.INVALID_ACCOUNT_DATA_LENGTH]: [
-      'InvalidAccountDataLength',
-      `cannot allocate account data of this length`,
-    ],
-    [SystemProgramErrorCode.MAX_SEED_LENGTH_EXCEEDED]: [
-      'MaxSeedLengthExceeded',
-      `length of requested seed is too long`,
-    ],
-    [SystemProgramErrorCode.ADDRESS_WITH_SEED_MISMATCH]: [
-      'AddressWithSeedMismatch',
-      `provided address does not match addressed derived from seed`,
-    ],
-    [SystemProgramErrorCode.NONCE_NO_RECENT_BLOCKHASHES]: [
-      'NonceNoRecentBlockhashes',
-      `advancing stored nonce requires a populated RecentBlockhashes sysvar`,
-    ],
-    [SystemProgramErrorCode.NONCE_BLOCKHASH_NOT_EXPIRED]: [
-      'NonceBlockhashNotExpired',
-      `stored nonce is still in recent_blockhashes`,
-    ],
-    [SystemProgramErrorCode.NONCE_UNEXPECTED_BLOCKHASH_VALUE]: [
-      'NonceUnexpectedBlockhashValue',
-      `specified nonce does not match stored nonce`,
-    ],
+  systemErrorMessages = {
+    [SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE]: `an account with the same address already exists`,
+    [SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH]: `provided address does not match addressed derived from seed`,
+    [SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH]: `cannot allocate account data of this length`,
+    [SYSTEM_ERROR__INVALID_PROGRAM_ID]: `cannot assign account to this program id`,
+    [SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED]: `length of requested seed is too long`,
+    [SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED]: `stored nonce is still in recent_blockhashes`,
+    [SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES]: `advancing stored nonce requires a populated RecentBlockhashes sysvar`,
+    [SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE]: `specified nonce does not match stored nonce`,
+    [SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS]: `account does not have enough SOL to perform the operation`,
   };
 }
 
-export function getSystemProgramErrorFromCode(
-  code: SystemProgramErrorCode,
-  cause?: Error
-): SystemProgramError {
+export function getSystemErrorMessage(code: SystemError): string {
   if (__DEV__) {
-    return new SystemProgramError(
-      code,
-      ...(
-        systemProgramErrorCodeMap as Record<
-          SystemProgramErrorCode,
-          [string, string]
-        >
-      )[code],
-      cause
-    );
+    return (systemErrorMessages as Record<SystemError, string>)[code];
   }
 
-  return new SystemProgramError(
-    code,
-    'Unknown',
-    'Error message not available in production bundles. Compile with __DEV__ set to true to see more information.',
-    cause
-  );
+  return 'Error message not available in production bundles. Compile with `__DEV__` set to true to see more information.';
 }

+ 0 - 1
clients/js/src/generated/index.ts

@@ -10,5 +10,4 @@ export * from './accounts';
 export * from './errors';
 export * from './instructions';
 export * from './programs';
-export * from './shared';
 export * from './types';

+ 11 - 12
clients/js/src/generated/instructions/advanceNonceAccount.ts

@@ -6,28 +6,27 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
 import {
+  Address,
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlyAccount,
   ReadonlySignerAccount,
+  TransactionSigner,
   WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  combineCodec,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -62,7 +61,7 @@ export type AdvanceNonceAccountInstructionData = { discriminator: number };
 export type AdvanceNonceAccountInstructionDataArgs = {};
 
 export function getAdvanceNonceAccountInstructionDataEncoder(): Encoder<AdvanceNonceAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([['discriminator', getU32Encoder()]]),
     (value) => ({ ...value, discriminator: 4 })
   );

+ 11 - 12
clients/js/src/generated/instructions/allocate.ts

@@ -6,11 +6,18 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
 import {
+  Address,
   Codec,
   Decoder,
   Encoder,
+  IAccountMeta,
+  IAccountSignerMeta,
+  IInstruction,
+  IInstructionWithAccounts,
+  IInstructionWithData,
+  TransactionSigner,
+  WritableSignerAccount,
   combineCodec,
   getStructDecoder,
   getStructEncoder,
@@ -18,16 +25,8 @@ import {
   getU32Encoder,
   getU64Decoder,
   getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
-  IAccountMeta,
-  IInstruction,
-  IInstructionWithAccounts,
-  IInstructionWithData,
-  WritableSignerAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -52,7 +51,7 @@ export type AllocateInstructionData = { discriminator: number; space: bigint };
 export type AllocateInstructionDataArgs = { space: number | bigint };
 
 export function getAllocateInstructionDataEncoder(): Encoder<AllocateInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['space', getU64Encoder()],

+ 19 - 20
clients/js/src/generated/instructions/allocateWithSeed.ts

@@ -8,33 +8,32 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
+  IAccountMeta,
+  IAccountSignerMeta,
+  IInstruction,
+  IInstructionWithAccounts,
+  IInstructionWithData,
+  ReadonlySignerAccount,
+  TransactionSigner,
+  WritableAccount,
+  addDecoderSizePrefix,
+  addEncoderSizePrefix,
   combineCodec,
-  getStringDecoder,
-  getStringEncoder,
+  getAddressDecoder,
+  getAddressEncoder,
   getStructDecoder,
   getStructEncoder,
   getU32Decoder,
   getU32Encoder,
   getU64Decoder,
   getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
-  IAccountMeta,
-  IInstruction,
-  IInstructionWithAccounts,
-  IInstructionWithData,
-  ReadonlySignerAccount,
-  WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  getUtf8Decoder,
+  getUtf8Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -74,11 +73,11 @@ export type AllocateWithSeedInstructionDataArgs = {
 };
 
 export function getAllocateWithSeedInstructionDataEncoder(): Encoder<AllocateWithSeedInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['base', getAddressEncoder()],
-      ['seed', getStringEncoder()],
+      ['seed', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
       ['space', getU64Encoder()],
       ['programAddress', getAddressEncoder()],
     ]),
@@ -90,7 +89,7 @@ export function getAllocateWithSeedInstructionDataDecoder(): Decoder<AllocateWit
   return getStructDecoder([
     ['discriminator', getU32Decoder()],
     ['base', getAddressDecoder()],
-    ['seed', getStringDecoder()],
+    ['seed', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
     ['space', getU64Decoder()],
     ['programAddress', getAddressDecoder()],
   ]);

+ 12 - 15
clients/js/src/generated/instructions/assign.ts

@@ -8,28 +8,25 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
+  TransactionSigner,
   WritableSignerAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -57,7 +54,7 @@ export type AssignInstructionData = {
 export type AssignInstructionDataArgs = { programAddress: Address };
 
 export function getAssignInstructionDataEncoder(): Encoder<AssignInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['programAddress', getAddressEncoder()],

+ 18 - 19
clients/js/src/generated/instructions/assignWithSeed.ts

@@ -8,31 +8,30 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStringDecoder,
-  getStringEncoder,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlySignerAccount,
+  TransactionSigner,
   WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  addDecoderSizePrefix,
+  addEncoderSizePrefix,
+  combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  getUtf8Decoder,
+  getUtf8Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -70,11 +69,11 @@ export type AssignWithSeedInstructionDataArgs = {
 };
 
 export function getAssignWithSeedInstructionDataEncoder(): Encoder<AssignWithSeedInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['base', getAddressEncoder()],
-      ['seed', getStringEncoder()],
+      ['seed', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
       ['programAddress', getAddressEncoder()],
     ]),
     (value) => ({ ...value, discriminator: 10 })
@@ -85,7 +84,7 @@ export function getAssignWithSeedInstructionDataDecoder(): Decoder<AssignWithSee
   return getStructDecoder([
     ['discriminator', getU32Decoder()],
     ['base', getAddressDecoder()],
-    ['seed', getStringDecoder()],
+    ['seed', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
     ['programAddress', getAddressDecoder()],
   ]);
 }

+ 12 - 15
clients/js/src/generated/instructions/authorizeNonceAccount.ts

@@ -8,29 +8,26 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlySignerAccount,
+  TransactionSigner,
   WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -64,7 +61,7 @@ export type AuthorizeNonceAccountInstructionDataArgs = {
 };
 
 export function getAuthorizeNonceAccountInstructionDataEncoder(): Encoder<AuthorizeNonceAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['newNonceAuthority', getAddressEncoder()],

+ 13 - 16
clients/js/src/generated/instructions/createAccount.ts

@@ -6,33 +6,30 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { BASE_ACCOUNT_SIZE } from '@solana/accounts';
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
+  BASE_ACCOUNT_SIZE,
   Codec,
   Decoder,
   Encoder,
+  IAccountMeta,
+  IAccountSignerMeta,
+  IInstruction,
+  IInstructionWithAccounts,
+  IInstructionWithData,
+  TransactionSigner,
+  WritableSignerAccount,
   combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
   getStructDecoder,
   getStructEncoder,
   getU32Decoder,
   getU32Encoder,
   getU64Decoder,
   getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
-  IAccountMeta,
-  IInstruction,
-  IInstructionWithAccounts,
-  IInstructionWithData,
-  WritableSignerAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import {
   IInstructionWithByteDelta,
@@ -75,7 +72,7 @@ export type CreateAccountInstructionDataArgs = {
 };
 
 export function getCreateAccountInstructionDataEncoder(): Encoder<CreateAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['lamports', getU64Encoder()],

+ 20 - 21
clients/js/src/generated/instructions/createAccountWithSeed.ts

@@ -8,34 +8,33 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStringDecoder,
-  getStringEncoder,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  getU64Decoder,
-  getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlySignerAccount,
+  TransactionSigner,
   WritableAccount,
   WritableSignerAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  addDecoderSizePrefix,
+  addEncoderSizePrefix,
+  combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  getU64Decoder,
+  getU64Encoder,
+  getUtf8Decoder,
+  getUtf8Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -82,11 +81,11 @@ export type CreateAccountWithSeedInstructionDataArgs = {
 };
 
 export function getCreateAccountWithSeedInstructionDataEncoder(): Encoder<CreateAccountWithSeedInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['base', getAddressEncoder()],
-      ['seed', getStringEncoder()],
+      ['seed', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
       ['amount', getU64Encoder()],
       ['space', getU64Encoder()],
       ['programAddress', getAddressEncoder()],
@@ -99,7 +98,7 @@ export function getCreateAccountWithSeedInstructionDataDecoder(): Decoder<Create
   return getStructDecoder([
     ['discriminator', getU32Decoder()],
     ['base', getAddressDecoder()],
-    ['seed', getStringDecoder()],
+    ['seed', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
     ['amount', getU64Decoder()],
     ['space', getU64Decoder()],
     ['programAddress', getAddressDecoder()],

+ 10 - 14
clients/js/src/generated/instructions/initializeNonceAccount.ts

@@ -8,28 +8,24 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlyAccount,
   WritableAccount,
-} from '@solana/instructions';
+  combineCodec,
+  getAddressDecoder,
+  getAddressEncoder,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -70,7 +66,7 @@ export type InitializeNonceAccountInstructionDataArgs = {
 };
 
 export function getInitializeNonceAccountInstructionDataEncoder(): Encoder<InitializeNonceAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['nonceAuthority', getAddressEncoder()],

+ 12 - 13
clients/js/src/generated/instructions/transferSol.ts

@@ -6,11 +6,19 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
 import {
+  Address,
   Codec,
   Decoder,
   Encoder,
+  IAccountMeta,
+  IAccountSignerMeta,
+  IInstruction,
+  IInstructionWithAccounts,
+  IInstructionWithData,
+  TransactionSigner,
+  WritableAccount,
+  WritableSignerAccount,
   combineCodec,
   getStructDecoder,
   getStructEncoder,
@@ -18,17 +26,8 @@ import {
   getU32Encoder,
   getU64Decoder,
   getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
-  IAccountMeta,
-  IInstruction,
-  IInstructionWithAccounts,
-  IInstructionWithData,
-  WritableAccount,
-  WritableSignerAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -60,7 +59,7 @@ export type TransferSolInstructionData = {
 export type TransferSolInstructionDataArgs = { amount: number | bigint };
 
 export function getTransferSolInstructionDataEncoder(): Encoder<TransferSolInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['amount', getU64Encoder()],

+ 19 - 20
clients/js/src/generated/instructions/transferSolWithSeed.ts

@@ -8,33 +8,32 @@
 
 import {
   Address,
-  getAddressDecoder,
-  getAddressEncoder,
-} from '@solana/addresses';
-import {
   Codec,
   Decoder,
   Encoder,
+  IAccountMeta,
+  IAccountSignerMeta,
+  IInstruction,
+  IInstructionWithAccounts,
+  IInstructionWithData,
+  ReadonlySignerAccount,
+  TransactionSigner,
+  WritableAccount,
+  addDecoderSizePrefix,
+  addEncoderSizePrefix,
   combineCodec,
-  getStringDecoder,
-  getStringEncoder,
+  getAddressDecoder,
+  getAddressEncoder,
   getStructDecoder,
   getStructEncoder,
   getU32Decoder,
   getU32Encoder,
   getU64Decoder,
   getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
-  IAccountMeta,
-  IInstruction,
-  IInstructionWithAccounts,
-  IInstructionWithData,
-  ReadonlySignerAccount,
-  WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  getUtf8Decoder,
+  getUtf8Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -76,11 +75,11 @@ export type TransferSolWithSeedInstructionDataArgs = {
 };
 
 export function getTransferSolWithSeedInstructionDataEncoder(): Encoder<TransferSolWithSeedInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['amount', getU64Encoder()],
-      ['fromSeed', getStringEncoder()],
+      ['fromSeed', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],
       ['fromOwner', getAddressEncoder()],
     ]),
     (value) => ({ ...value, discriminator: 11 })
@@ -91,7 +90,7 @@ export function getTransferSolWithSeedInstructionDataDecoder(): Decoder<Transfer
   return getStructDecoder([
     ['discriminator', getU32Decoder()],
     ['amount', getU64Decoder()],
-    ['fromSeed', getStringDecoder()],
+    ['fromSeed', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],
     ['fromOwner', getAddressDecoder()],
   ]);
 }

+ 9 - 11
clients/js/src/generated/instructions/upgradeNonceAccount.ts

@@ -6,25 +6,23 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
 import {
+  Address,
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   WritableAccount,
-} from '@solana/instructions';
+  combineCodec,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -48,7 +46,7 @@ export type UpgradeNonceAccountInstructionData = { discriminator: number };
 export type UpgradeNonceAccountInstructionDataArgs = {};
 
 export function getUpgradeNonceAccountInstructionDataEncoder(): Encoder<UpgradeNonceAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([['discriminator', getU32Encoder()]]),
     (value) => ({ ...value, discriminator: 12 })
   );

+ 13 - 14
clients/js/src/generated/instructions/withdrawNonceAccount.ts

@@ -6,30 +6,29 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
 import {
+  Address,
   Codec,
   Decoder,
   Encoder,
-  combineCodec,
-  getStructDecoder,
-  getStructEncoder,
-  getU32Decoder,
-  getU32Encoder,
-  getU64Decoder,
-  getU64Encoder,
-  mapEncoder,
-} from '@solana/codecs';
-import {
   IAccountMeta,
+  IAccountSignerMeta,
   IInstruction,
   IInstructionWithAccounts,
   IInstructionWithData,
   ReadonlyAccount,
   ReadonlySignerAccount,
+  TransactionSigner,
   WritableAccount,
-} from '@solana/instructions';
-import { IAccountSignerMeta, TransactionSigner } from '@solana/signers';
+  combineCodec,
+  getStructDecoder,
+  getStructEncoder,
+  getU32Decoder,
+  getU32Encoder,
+  getU64Decoder,
+  getU64Encoder,
+  transformEncoder,
+} from '@solana/web3.js';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
 import { ResolvedAccount, getAccountMetaFactory } from '../shared';
 
@@ -79,7 +78,7 @@ export type WithdrawNonceAccountInstructionDataArgs = {
 };
 
 export function getWithdrawNonceAccountInstructionDataEncoder(): Encoder<WithdrawNonceAccountInstructionDataArgs> {
-  return mapEncoder(
+  return transformEncoder(
     getStructEncoder([
       ['discriminator', getU32Encoder()],
       ['withdrawAmount', getU64Encoder()],

+ 14 - 35
clients/js/src/generated/programs/system.ts

@@ -6,14 +6,7 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import { Address } from '@solana/addresses';
-import { getU32Encoder } from '@solana/codecs';
-import { Program, ProgramWithErrors } from '@solana/programs';
-import {
-  SystemProgramError,
-  SystemProgramErrorCode,
-  getSystemProgramErrorFromCode,
-} from '../errors';
+import { Address, containsBytes, getU32Encoder } from '@solana/web3.js';
 import {
   ParsedAdvanceNonceAccountInstruction,
   ParsedAllocateInstruction,
@@ -29,24 +22,10 @@ import {
   ParsedUpgradeNonceAccountInstruction,
   ParsedWithdrawNonceAccountInstruction,
 } from '../instructions';
-import { memcmp } from '../shared';
 
 export const SYSTEM_PROGRAM_ADDRESS =
   '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;
 
-export type SystemProgram = Program<'11111111111111111111111111111111'> &
-  ProgramWithErrors<SystemProgramErrorCode, SystemProgramError>;
-
-export function getSystemProgram(): SystemProgram {
-  return {
-    name: 'system',
-    address: SYSTEM_PROGRAM_ADDRESS,
-    getErrorFromCode(code: SystemProgramErrorCode, cause?: Error) {
-      return getSystemProgramErrorFromCode(code, cause);
-    },
-  };
-}
-
 export enum SystemAccount {
   Nonce,
 }
@@ -72,43 +51,43 @@ export function identifySystemInstruction(
 ): SystemInstruction {
   const data =
     instruction instanceof Uint8Array ? instruction : instruction.data;
-  if (memcmp(data, getU32Encoder().encode(0), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(0), 0)) {
     return SystemInstruction.CreateAccount;
   }
-  if (memcmp(data, getU32Encoder().encode(1), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(1), 0)) {
     return SystemInstruction.Assign;
   }
-  if (memcmp(data, getU32Encoder().encode(2), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(2), 0)) {
     return SystemInstruction.TransferSol;
   }
-  if (memcmp(data, getU32Encoder().encode(3), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(3), 0)) {
     return SystemInstruction.CreateAccountWithSeed;
   }
-  if (memcmp(data, getU32Encoder().encode(4), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(4), 0)) {
     return SystemInstruction.AdvanceNonceAccount;
   }
-  if (memcmp(data, getU32Encoder().encode(5), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(5), 0)) {
     return SystemInstruction.WithdrawNonceAccount;
   }
-  if (memcmp(data, getU32Encoder().encode(6), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(6), 0)) {
     return SystemInstruction.InitializeNonceAccount;
   }
-  if (memcmp(data, getU32Encoder().encode(7), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(7), 0)) {
     return SystemInstruction.AuthorizeNonceAccount;
   }
-  if (memcmp(data, getU32Encoder().encode(8), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(8), 0)) {
     return SystemInstruction.Allocate;
   }
-  if (memcmp(data, getU32Encoder().encode(9), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(9), 0)) {
     return SystemInstruction.AllocateWithSeed;
   }
-  if (memcmp(data, getU32Encoder().encode(10), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(10), 0)) {
     return SystemInstruction.AssignWithSeed;
   }
-  if (memcmp(data, getU32Encoder().encode(11), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(11), 0)) {
     return SystemInstruction.TransferSolWithSeed;
   }
-  if (memcmp(data, getU32Encoder().encode(12), 0)) {
+  if (containsBytes(data, getU32Encoder().encode(12), 0)) {
     return SystemInstruction.UpgradeNonceAccount;
   }
   throw new Error(

+ 6 - 16
clients/js/src/generated/shared/index.ts

@@ -6,21 +6,17 @@
  * @see https://github.com/metaplex-foundation/kinobi
  */
 
-import {
-  Address,
-  isProgramDerivedAddress,
-  ProgramDerivedAddress,
-} from '@solana/addresses';
 import {
   AccountRole,
+  Address,
   IAccountMeta,
-  upgradeRoleToSigner,
-} from '@solana/instructions';
-import {
   IAccountSignerMeta,
-  isTransactionSigner as web3JsIsTransactionSigner,
+  ProgramDerivedAddress,
   TransactionSigner,
-} from '@solana/signers';
+  isProgramDerivedAddress,
+  isTransactionSigner as web3JsIsTransactionSigner,
+  upgradeRoleToSigner,
+} from '@solana/web3.js';
 
 /**
  * Asserts that the given value is not null or undefined.
@@ -166,9 +162,3 @@ export function isTransactionSigner<TAddress extends string = string>(
     web3JsIsTransactionSigner(value)
   );
 }
-
-export function memcmp(data: Uint8Array, bytes: Uint8Array, offset: number) {
-  const slice = data.slice(offset, offset + bytes.length);
-  if (slice.length !== bytes.length) return false;
-  return bytes.every((b, i) => b === slice[i]);
-}

+ 5 - 5
clients/js/src/generated/types/nonceState.ts

@@ -11,11 +11,11 @@ import {
   Decoder,
   Encoder,
   combineCodec,
-  getScalarEnumDecoder,
-  getScalarEnumEncoder,
+  getEnumDecoder,
+  getEnumEncoder,
   getU32Decoder,
   getU32Encoder,
-} from '@solana/codecs';
+} from '@solana/web3.js';
 
 export enum NonceState {
   Uninitialized,
@@ -25,11 +25,11 @@ export enum NonceState {
 export type NonceStateArgs = NonceState;
 
 export function getNonceStateEncoder(): Encoder<NonceStateArgs> {
-  return getScalarEnumEncoder(NonceState, { size: getU32Encoder() });
+  return getEnumEncoder(NonceState, { size: getU32Encoder() });
 }
 
 export function getNonceStateDecoder(): Decoder<NonceState> {
-  return getScalarEnumDecoder(NonceState, { size: getU32Decoder() });
+  return getEnumDecoder(NonceState, { size: getU32Decoder() });
 }
 
 export function getNonceStateCodec(): Codec<NonceStateArgs, NonceState> {

+ 5 - 5
clients/js/src/generated/types/nonceVersion.ts

@@ -11,11 +11,11 @@ import {
   Decoder,
   Encoder,
   combineCodec,
-  getScalarEnumDecoder,
-  getScalarEnumEncoder,
+  getEnumDecoder,
+  getEnumEncoder,
   getU32Decoder,
   getU32Encoder,
-} from '@solana/codecs';
+} from '@solana/web3.js';
 
 export enum NonceVersion {
   Legacy,
@@ -25,11 +25,11 @@ export enum NonceVersion {
 export type NonceVersionArgs = NonceVersion;
 
 export function getNonceVersionEncoder(): Encoder<NonceVersionArgs> {
-  return getScalarEnumEncoder(NonceVersion, { size: getU32Encoder() });
+  return getEnumEncoder(NonceVersion, { size: getU32Encoder() });
 }
 
 export function getNonceVersionDecoder(): Decoder<NonceVersion> {
-  return getScalarEnumDecoder(NonceVersion, { size: getU32Decoder() });
+  return getEnumDecoder(NonceVersion, { size: getU32Decoder() });
 }
 
 export function getNonceVersionCodec(): Codec<NonceVersionArgs, NonceVersion> {

+ 16 - 14
clients/js/test/_setup.ts

@@ -1,26 +1,26 @@
 import {
   Address,
   Commitment,
-  CompilableTransaction,
-  ITransactionWithBlockhashLifetime,
+  CompilableTransactionMessage,
   Rpc,
   RpcSubscriptions,
   SolanaRpcApi,
   SolanaRpcSubscriptionsApi,
+  TransactionMessageWithBlockhashLifetime,
   TransactionSigner,
   airdropFactory,
-  appendTransactionInstruction,
+  appendTransactionMessageInstruction,
   createSolanaRpc,
   createSolanaRpcSubscriptions,
-  createTransaction,
+  createTransactionMessage,
   generateKeyPairSigner,
   getSignatureFromTransaction,
   lamports,
   pipe,
   sendAndConfirmTransactionFactory,
-  setTransactionFeePayerSigner,
-  setTransactionLifetimeUsingBlockhash,
-  signTransactionWithSigners,
+  setTransactionMessageFeePayerSigner,
+  setTransactionMessageLifetimeUsingBlockhash,
+  signTransactionMessageWithSigners,
 } from '@solana/web3.js';
 import {
   SYSTEM_PROGRAM_ADDRESS,
@@ -61,18 +61,20 @@ export const createDefaultTransaction = async (
     .getLatestBlockhash()
     .send();
   return pipe(
-    createTransaction({ version: 0 }),
-    (tx) => setTransactionFeePayerSigner(feePayer, tx),
-    (tx) => setTransactionLifetimeUsingBlockhash(latestBlockhash, tx)
+    createTransactionMessage({ version: 0 }),
+    (tx) => setTransactionMessageFeePayerSigner(feePayer, tx),
+    (tx) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx)
   );
 };
 
 export const signAndSendTransaction = async (
   client: Client,
-  transaction: CompilableTransaction & ITransactionWithBlockhashLifetime,
+  transactionMessage: CompilableTransactionMessage &
+    TransactionMessageWithBlockhashLifetime,
   commitment: Commitment = 'confirmed'
 ) => {
-  const signedTransaction = await signTransactionWithSigners(transaction);
+  const signedTransaction =
+    await signTransactionMessageWithSigners(transactionMessage);
   const signature = getSignatureFromTransaction(signedTransaction);
   await sendAndConfirmTransactionFactory(client)(signedTransaction, {
     commitment,
@@ -105,8 +107,8 @@ export const createNonceAccount = async (
   });
   await pipe(
     await createDefaultTransaction(client, payer),
-    (tx) => appendTransactionInstruction(createAccount, tx),
-    (tx) => appendTransactionInstruction(initializeNonceAccount, tx),
+    (tx) => appendTransactionMessageInstruction(createAccount, tx),
+    (tx) => appendTransactionMessageInstruction(initializeNonceAccount, tx),
     (tx) => signAndSendTransaction(client, tx)
   );
 };

+ 2 - 2
clients/js/test/advanceNonceAccount.test.ts

@@ -1,5 +1,5 @@
 import {
-  appendTransactionInstruction,
+  appendTransactionMessageInstruction,
   generateKeyPairSigner,
   pipe,
 } from '@solana/web3.js';
@@ -31,7 +31,7 @@ test('it advances the nonce account', async (t) => {
   });
   await pipe(
     await createDefaultTransaction(client, payer),
-    (tx) => appendTransactionInstruction(createAccount, tx),
+    (tx) => appendTransactionMessageInstruction(createAccount, tx),
     (tx) => signAndSendTransaction(client, tx)
   );
 

+ 2 - 2
clients/js/test/createAccount.test.ts

@@ -1,5 +1,5 @@
 import {
-  appendTransactionInstruction,
+  appendTransactionMessageInstruction,
   fetchEncodedAccount,
   generateKeyPairSigner,
   pipe,
@@ -36,7 +36,7 @@ test('it creates a new empty account', async (t) => {
   });
   await pipe(
     await createDefaultTransaction(client, payer),
-    (tx) => appendTransactionInstruction(createAccount, tx),
+    (tx) => appendTransactionMessageInstruction(createAccount, tx),
     (tx) => signAndSendTransaction(client, tx)
   );
 

+ 5 - 4
clients/js/test/initializeNonceAccount.test.ts

@@ -1,5 +1,6 @@
 import {
-  appendTransactionInstruction,
+  Account,
+  appendTransactionMessageInstruction,
   generateKeyPairSigner,
   pipe,
 } from '@solana/web3.js';
@@ -44,13 +45,13 @@ test('it creates and initialize a durable nonce account', async (t) => {
   });
   await pipe(
     await createDefaultTransaction(client, payer),
-    (tx) => appendTransactionInstruction(createAccount, tx),
-    (tx) => appendTransactionInstruction(initializeNonceAccount, tx),
+    (tx) => appendTransactionMessageInstruction(createAccount, tx),
+    (tx) => appendTransactionMessageInstruction(initializeNonceAccount, tx),
     (tx) => signAndSendTransaction(client, tx)
   );
 
   // Then we expect the nonce account to exist with the following data.
-  t.like(await fetchNonce(client.rpc, nonce.address), <Nonce>{
+  t.like(await fetchNonce(client.rpc, nonce.address), <Account<Nonce>>{
     address: nonce.address,
     data: {
       version: NonceVersion.Current,

+ 2 - 2
clients/js/test/transferSol.test.ts

@@ -1,7 +1,7 @@
 import {
   AccountRole,
   Address,
-  appendTransactionInstruction,
+  appendTransactionMessageInstruction,
   generateKeyPairSigner,
   lamports,
   pipe,
@@ -33,7 +33,7 @@ test('it transfers SOL from one account to another', async (t) => {
   });
   await pipe(
     await createDefaultTransaction(client, source),
-    (tx) => appendTransactionInstruction(transferSol, tx),
+    (tx) => appendTransactionMessageInstruction(transferSol, tx),
     (tx) => signAndSendTransaction(client, tx)
   );
 

+ 17 - 17
clients/js/tsconfig.json

@@ -1,23 +1,23 @@
 {
   "$schema": "https://json.schemastore.org/tsconfig",
   "compilerOptions": {
-      "composite": false,
-      "declaration": true,
-      "declarationMap": true,
-      "esModuleInterop": true,
-      "forceConsistentCasingInFileNames": true,
-      "inlineSources": false,
-      "isolatedModules": true,
-      "module": "ESNext",
-      "moduleResolution": "node",
-      "noFallthroughCasesInSwitch": true,
-      "noUnusedLocals": true,
-      "noUnusedParameters": true,
-      "outDir": "./dist",
-      "preserveWatchOutput": true,
-      "skipLibCheck": true,
-      "strict": true,
-      "target": "ESNext"
+    "composite": false,
+    "declaration": true,
+    "declarationMap": true,
+    "esModuleInterop": true,
+    "forceConsistentCasingInFileNames": true,
+    "inlineSources": false,
+    "isolatedModules": true,
+    "module": "ESNext",
+    "moduleResolution": "node",
+    "noFallthroughCasesInSwitch": true,
+    "noUnusedLocals": true,
+    "noUnusedParameters": true,
+    "outDir": "./dist",
+    "preserveWatchOutput": true,
+    "skipLibCheck": true,
+    "strict": true,
+    "target": "ESNext"
   },
   "exclude": ["node_modules"],
   "include": ["src", "test"]

+ 5 - 3
clients/rust/src/generated/instructions/advance_nonce_account.rs

@@ -53,12 +53,12 @@ impl AdvanceNonceAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AdvanceNonceAccountInstructionData {
+pub struct AdvanceNonceAccountInstructionData {
     discriminator: u32,
 }
 
 impl AdvanceNonceAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 4 }
     }
 }
@@ -70,7 +70,7 @@ impl AdvanceNonceAccountInstructionData {
 ///   0. `[writable]` nonce_account
 ///   1. `[optional]` recent_blockhashes_sysvar (default to `SysvarRecentB1ockHashes11111111111111111111`)
 ///   2. `[signer]` nonce_authority
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AdvanceNonceAccountBuilder {
     nonce_account: Option<solana_program::pubkey::Pubkey>,
     recent_blockhashes_sysvar: Option<solana_program::pubkey::Pubkey>,
@@ -255,6 +255,7 @@ impl<'a, 'b> AdvanceNonceAccountCpi<'a, 'b> {
 ///   0. `[writable]` nonce_account
 ///   1. `[]` recent_blockhashes_sysvar
 ///   2. `[signer]` nonce_authority
+#[derive(Clone, Debug)]
 pub struct AdvanceNonceAccountCpiBuilder<'a, 'b> {
     instruction: Box<AdvanceNonceAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -360,6 +361,7 @@ impl<'a, 'b> AdvanceNonceAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AdvanceNonceAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/allocate.rs

@@ -45,12 +45,12 @@ impl Allocate {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AllocateInstructionData {
+pub struct AllocateInstructionData {
     discriminator: u32,
 }
 
 impl AllocateInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 8 }
     }
 }
@@ -66,7 +66,7 @@ pub struct AllocateInstructionArgs {
 /// ### Accounts:
 ///
 ///   0. `[writable, signer]` new_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AllocateBuilder {
     new_account: Option<solana_program::pubkey::Pubkey>,
     space: Option<u64>,
@@ -219,6 +219,7 @@ impl<'a, 'b> AllocateCpi<'a, 'b> {
 /// ### Accounts:
 ///
 ///   0. `[writable, signer]` new_account
+#[derive(Clone, Debug)]
 pub struct AllocateCpiBuilder<'a, 'b> {
     instruction: Box<AllocateCpiBuilderInstruction<'a, 'b>>,
 }
@@ -306,6 +307,7 @@ impl<'a, 'b> AllocateCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AllocateCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/allocate_with_seed.rs

@@ -52,12 +52,12 @@ impl AllocateWithSeed {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AllocateWithSeedInstructionData {
+pub struct AllocateWithSeedInstructionData {
     discriminator: u32,
 }
 
 impl AllocateWithSeedInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 9 }
     }
 }
@@ -77,7 +77,7 @@ pub struct AllocateWithSeedInstructionArgs {
 ///
 ///   0. `[writable]` new_account
 ///   1. `[signer]` base_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AllocateWithSeedBuilder {
     new_account: Option<solana_program::pubkey::Pubkey>,
     base_account: Option<solana_program::pubkey::Pubkey>,
@@ -272,6 +272,7 @@ impl<'a, 'b> AllocateWithSeedCpi<'a, 'b> {
 ///
 ///   0. `[writable]` new_account
 ///   1. `[signer]` base_account
+#[derive(Clone, Debug)]
 pub struct AllocateWithSeedCpiBuilder<'a, 'b> {
     instruction: Box<AllocateWithSeedCpiBuilderInstruction<'a, 'b>>,
 }
@@ -398,6 +399,7 @@ impl<'a, 'b> AllocateWithSeedCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AllocateWithSeedCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     new_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/assign.rs

@@ -46,12 +46,12 @@ impl Assign {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AssignInstructionData {
+pub struct AssignInstructionData {
     discriminator: u32,
 }
 
 impl AssignInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 1 }
     }
 }
@@ -67,7 +67,7 @@ pub struct AssignInstructionArgs {
 /// ### Accounts:
 ///
 ///   0. `[writable, signer]` account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AssignBuilder {
     account: Option<solana_program::pubkey::Pubkey>,
     program_address: Option<Pubkey>,
@@ -223,6 +223,7 @@ impl<'a, 'b> AssignCpi<'a, 'b> {
 /// ### Accounts:
 ///
 ///   0. `[writable, signer]` account
+#[derive(Clone, Debug)]
 pub struct AssignCpiBuilder<'a, 'b> {
     instruction: Box<AssignCpiBuilderInstruction<'a, 'b>>,
 }
@@ -311,6 +312,7 @@ impl<'a, 'b> AssignCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AssignCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/assign_with_seed.rs

@@ -52,12 +52,12 @@ impl AssignWithSeed {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AssignWithSeedInstructionData {
+pub struct AssignWithSeedInstructionData {
     discriminator: u32,
 }
 
 impl AssignWithSeedInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 10 }
     }
 }
@@ -76,7 +76,7 @@ pub struct AssignWithSeedInstructionArgs {
 ///
 ///   0. `[writable]` account
 ///   1. `[signer]` base_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AssignWithSeedBuilder {
     account: Option<solana_program::pubkey::Pubkey>,
     base_account: Option<solana_program::pubkey::Pubkey>,
@@ -264,6 +264,7 @@ impl<'a, 'b> AssignWithSeedCpi<'a, 'b> {
 ///
 ///   0. `[writable]` account
 ///   1. `[signer]` base_account
+#[derive(Clone, Debug)]
 pub struct AssignWithSeedCpiBuilder<'a, 'b> {
     instruction: Box<AssignWithSeedCpiBuilderInstruction<'a, 'b>>,
 }
@@ -380,6 +381,7 @@ impl<'a, 'b> AssignWithSeedCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AssignWithSeedCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/authorize_nonce_account.rs

@@ -54,12 +54,12 @@ impl AuthorizeNonceAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct AuthorizeNonceAccountInstructionData {
+pub struct AuthorizeNonceAccountInstructionData {
     discriminator: u32,
 }
 
 impl AuthorizeNonceAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 7 }
     }
 }
@@ -76,7 +76,7 @@ pub struct AuthorizeNonceAccountInstructionArgs {
 ///
 ///   0. `[writable]` nonce_account
 ///   1. `[signer]` nonce_authority
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct AuthorizeNonceAccountBuilder {
     nonce_account: Option<solana_program::pubkey::Pubkey>,
     nonce_authority: Option<solana_program::pubkey::Pubkey>,
@@ -255,6 +255,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpi<'a, 'b> {
 ///
 ///   0. `[writable]` nonce_account
 ///   1. `[signer]` nonce_authority
+#[derive(Clone, Debug)]
 pub struct AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     instruction: Box<AuthorizeNonceAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -360,6 +361,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct AuthorizeNonceAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/create_account.rs

@@ -51,12 +51,12 @@ impl CreateAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct CreateAccountInstructionData {
+pub struct CreateAccountInstructionData {
     discriminator: u32,
 }
 
 impl CreateAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 0 }
     }
 }
@@ -75,7 +75,7 @@ pub struct CreateAccountInstructionArgs {
 ///
 ///   0. `[writable, signer]` payer
 ///   1. `[writable, signer]` new_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct CreateAccountBuilder {
     payer: Option<solana_program::pubkey::Pubkey>,
     new_account: Option<solana_program::pubkey::Pubkey>,
@@ -263,6 +263,7 @@ impl<'a, 'b> CreateAccountCpi<'a, 'b> {
 ///
 ///   0. `[writable, signer]` payer
 ///   1. `[writable, signer]` new_account
+#[derive(Clone, Debug)]
 pub struct CreateAccountCpiBuilder<'a, 'b> {
     instruction: Box<CreateAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -380,6 +381,7 @@ impl<'a, 'b> CreateAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct CreateAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/create_account_with_seed.rs

@@ -59,12 +59,12 @@ impl CreateAccountWithSeed {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct CreateAccountWithSeedInstructionData {
+pub struct CreateAccountWithSeedInstructionData {
     discriminator: u32,
 }
 
 impl CreateAccountWithSeedInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 3 }
     }
 }
@@ -86,7 +86,7 @@ pub struct CreateAccountWithSeedInstructionArgs {
 ///   0. `[writable, signer]` payer
 ///   1. `[writable]` new_account
 ///   2. `[signer]` base_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct CreateAccountWithSeedBuilder {
     payer: Option<solana_program::pubkey::Pubkey>,
     new_account: Option<solana_program::pubkey::Pubkey>,
@@ -308,6 +308,7 @@ impl<'a, 'b> CreateAccountWithSeedCpi<'a, 'b> {
 ///   0. `[writable, signer]` payer
 ///   1. `[writable]` new_account
 ///   2. `[signer]` base_account
+#[derive(Clone, Debug)]
 pub struct CreateAccountWithSeedCpiBuilder<'a, 'b> {
     instruction: Box<CreateAccountWithSeedCpiBuilderInstruction<'a, 'b>>,
 }
@@ -449,6 +450,7 @@ impl<'a, 'b> CreateAccountWithSeedCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct CreateAccountWithSeedCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     payer: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/initialize_nonce_account.rs

@@ -60,12 +60,12 @@ impl InitializeNonceAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct InitializeNonceAccountInstructionData {
+pub struct InitializeNonceAccountInstructionData {
     discriminator: u32,
 }
 
 impl InitializeNonceAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 6 }
     }
 }
@@ -83,7 +83,7 @@ pub struct InitializeNonceAccountInstructionArgs {
 ///   0. `[writable]` nonce_account
 ///   1. `[optional]` recent_blockhashes_sysvar (default to `SysvarRecentB1ockHashes11111111111111111111`)
 ///   2. `[optional]` rent_sysvar (default to `SysvarRent111111111111111111111111111111111`)
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct InitializeNonceAccountBuilder {
     nonce_account: Option<solana_program::pubkey::Pubkey>,
     recent_blockhashes_sysvar: Option<solana_program::pubkey::Pubkey>,
@@ -286,6 +286,7 @@ impl<'a, 'b> InitializeNonceAccountCpi<'a, 'b> {
 ///   0. `[writable]` nonce_account
 ///   1. `[]` recent_blockhashes_sysvar
 ///   2. `[]` rent_sysvar
+#[derive(Clone, Debug)]
 pub struct InitializeNonceAccountCpiBuilder<'a, 'b> {
     instruction: Box<InitializeNonceAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -405,6 +406,7 @@ impl<'a, 'b> InitializeNonceAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct InitializeNonceAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/transfer_sol.rs

@@ -51,12 +51,12 @@ impl TransferSol {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct TransferSolInstructionData {
+pub struct TransferSolInstructionData {
     discriminator: u32,
 }
 
 impl TransferSolInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 2 }
     }
 }
@@ -73,7 +73,7 @@ pub struct TransferSolInstructionArgs {
 ///
 ///   0. `[writable, signer]` source
 ///   1. `[writable]` destination
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct TransferSolBuilder {
     source: Option<solana_program::pubkey::Pubkey>,
     destination: Option<solana_program::pubkey::Pubkey>,
@@ -244,6 +244,7 @@ impl<'a, 'b> TransferSolCpi<'a, 'b> {
 ///
 ///   0. `[writable, signer]` source
 ///   1. `[writable]` destination
+#[derive(Clone, Debug)]
 pub struct TransferSolCpiBuilder<'a, 'b> {
     instruction: Box<TransferSolCpiBuilderInstruction<'a, 'b>>,
 }
@@ -342,6 +343,7 @@ impl<'a, 'b> TransferSolCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct TransferSolCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     source: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/transfer_sol_with_seed.rs

@@ -60,12 +60,12 @@ impl TransferSolWithSeed {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct TransferSolWithSeedInstructionData {
+pub struct TransferSolWithSeedInstructionData {
     discriminator: u32,
 }
 
 impl TransferSolWithSeedInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 11 }
     }
 }
@@ -85,7 +85,7 @@ pub struct TransferSolWithSeedInstructionArgs {
 ///   0. `[writable]` source
 ///   1. `[signer]` base_account
 ///   2. `[writable]` destination
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct TransferSolWithSeedBuilder {
     source: Option<solana_program::pubkey::Pubkey>,
     base_account: Option<solana_program::pubkey::Pubkey>,
@@ -290,6 +290,7 @@ impl<'a, 'b> TransferSolWithSeedCpi<'a, 'b> {
 ///   0. `[writable]` source
 ///   1. `[signer]` base_account
 ///   2. `[writable]` destination
+#[derive(Clone, Debug)]
 pub struct TransferSolWithSeedCpiBuilder<'a, 'b> {
     instruction: Box<TransferSolWithSeedCpiBuilderInstruction<'a, 'b>>,
 }
@@ -424,6 +425,7 @@ impl<'a, 'b> TransferSolWithSeedCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct TransferSolWithSeedCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     source: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/upgrade_nonce_account.rs

@@ -41,12 +41,12 @@ impl UpgradeNonceAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct UpgradeNonceAccountInstructionData {
+pub struct UpgradeNonceAccountInstructionData {
     discriminator: u32,
 }
 
 impl UpgradeNonceAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 12 }
     }
 }
@@ -56,7 +56,7 @@ impl UpgradeNonceAccountInstructionData {
 /// ### Accounts:
 ///
 ///   0. `[writable]` nonce_account
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct UpgradeNonceAccountBuilder {
     nonce_account: Option<solana_program::pubkey::Pubkey>,
     __remaining_accounts: Vec<solana_program::instruction::AccountMeta>,
@@ -196,6 +196,7 @@ impl<'a, 'b> UpgradeNonceAccountCpi<'a, 'b> {
 /// ### Accounts:
 ///
 ///   0. `[writable]` nonce_account
+#[derive(Clone, Debug)]
 pub struct UpgradeNonceAccountCpiBuilder<'a, 'b> {
     instruction: Box<UpgradeNonceAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -273,6 +274,7 @@ impl<'a, 'b> UpgradeNonceAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct UpgradeNonceAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 5 - 3
clients/rust/src/generated/instructions/withdraw_nonce_account.rs

@@ -71,12 +71,12 @@ impl WithdrawNonceAccount {
 }
 
 #[derive(BorshDeserialize, BorshSerialize)]
-struct WithdrawNonceAccountInstructionData {
+pub struct WithdrawNonceAccountInstructionData {
     discriminator: u32,
 }
 
 impl WithdrawNonceAccountInstructionData {
-    fn new() -> Self {
+    pub fn new() -> Self {
         Self { discriminator: 5 }
     }
 }
@@ -96,7 +96,7 @@ pub struct WithdrawNonceAccountInstructionArgs {
 ///   2. `[optional]` recent_blockhashes_sysvar (default to `SysvarRecentB1ockHashes11111111111111111111`)
 ///   3. `[optional]` rent_sysvar (default to `SysvarRent111111111111111111111111111111111`)
 ///   4. `[signer]` nonce_authority
-#[derive(Default)]
+#[derive(Clone, Debug, Default)]
 pub struct WithdrawNonceAccountBuilder {
     nonce_account: Option<solana_program::pubkey::Pubkey>,
     recipient_account: Option<solana_program::pubkey::Pubkey>,
@@ -343,6 +343,7 @@ impl<'a, 'b> WithdrawNonceAccountCpi<'a, 'b> {
 ///   2. `[]` recent_blockhashes_sysvar
 ///   3. `[]` rent_sysvar
 ///   4. `[signer]` nonce_authority
+#[derive(Clone, Debug)]
 pub struct WithdrawNonceAccountCpiBuilder<'a, 'b> {
     instruction: Box<WithdrawNonceAccountCpiBuilderInstruction<'a, 'b>>,
 }
@@ -490,6 +491,7 @@ impl<'a, 'b> WithdrawNonceAccountCpiBuilder<'a, 'b> {
     }
 }
 
+#[derive(Clone, Debug)]
 struct WithdrawNonceAccountCpiBuilderInstruction<'a, 'b> {
     __program: &'b solana_program::account_info::AccountInfo<'a>,
     nonce_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,

+ 4 - 1
clients/rust/src/generated/types/nonce_state.rs

@@ -7,8 +7,11 @@
 
 use borsh::BorshDeserialize;
 use borsh::BorshSerialize;
+use num_derive::FromPrimitive;
 
-#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)]
+#[derive(
+    BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash, FromPrimitive,
+)]
 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
 pub enum NonceState {
     Uninitialized,

+ 4 - 1
clients/rust/src/generated/types/nonce_version.rs

@@ -7,8 +7,11 @@
 
 use borsh::BorshDeserialize;
 use borsh::BorshSerialize;
+use num_derive::FromPrimitive;
 
-#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)]
+#[derive(
+    BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash, FromPrimitive,
+)]
 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
 pub enum NonceVersion {
     Legacy,

+ 1 - 2
package.json

@@ -11,8 +11,7 @@
   },
   "devDependencies": {
     "@iarna/toml": "^2.2.5",
-    "@metaplex-foundation/kinobi": "^0.18.0",
-    "@metaplex-foundation/shank-js": "^0.1.7",
+    "@metaplex-foundation/kinobi": "^0.19.0",
     "typescript": "^5.4.2",
     "zx": "^7.2.3"
   },

+ 19 - 91
pnpm-lock.yaml

@@ -9,11 +9,8 @@ devDependencies:
     specifier: ^2.2.5
     version: 2.2.5
   '@metaplex-foundation/kinobi':
-    specifier: ^0.18.0
-    version: 0.18.0(fastestsmallesttextencoderdecoder@1.0.22)
-  '@metaplex-foundation/shank-js':
-    specifier: ^0.1.7
-    version: 0.1.7
+    specifier: ^0.19.0
+    version: 0.19.0(fastestsmallesttextencoderdecoder@1.0.22)
   typescript:
     specifier: ^5.4.2
     version: 5.4.2
@@ -27,12 +24,12 @@ packages:
     resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==}
     dev: true
 
-  /@metaplex-foundation/kinobi@0.18.0(fastestsmallesttextencoderdecoder@1.0.22):
-    resolution: {integrity: sha512-iuCUnhCMtm8ixocat5XWAoLFOBOBHhrOS2dulSRUWoLXwtOX8Pnu0wEI0OINN/c/V41Q9kuYXxhlgWh63qg0Zg==}
+  /@metaplex-foundation/kinobi@0.19.0(fastestsmallesttextencoderdecoder@1.0.22):
+    resolution: {integrity: sha512-BbL/4V8ea18J9N89nx4hlvp9ZgLFUfPaV9ZQkxhaTT0ORTo+Ksf74ZgJPF35CMqS6x132OvLjWHN8I+LMAKLBQ==}
     dependencies:
       '@noble/hashes': 1.4.0
       '@prettier/sync': 0.5.1(prettier@3.2.5)
-      '@solana/codecs-strings': 2.0.0-preview.1(fastestsmallesttextencoderdecoder@1.0.22)
+      '@solana/codecs-strings': 2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22)
       chalk: 4.1.2
       json-stable-stringify: 1.1.1
       nunjucks: 3.2.4
@@ -42,27 +39,6 @@ packages:
       - fastestsmallesttextencoderdecoder
     dev: true
 
-  /@metaplex-foundation/rustbin@0.3.5:
-    resolution: {integrity: sha512-m0wkRBEQB/8krwMwKBvFugufZtYwMXiGHud2cTDAv+aGXK4M90y0Hx67/wpu+AqqoQfdV8VM9YezUOHKD+Z5kA==}
-    dependencies:
-      debug: 4.3.4
-      semver: 7.6.0
-      text-table: 0.2.0
-      toml: 3.0.0
-    transitivePeerDependencies:
-      - supports-color
-    dev: true
-
-  /@metaplex-foundation/shank-js@0.1.7:
-    resolution: {integrity: sha512-tSAipn8Ho1UxlMC3jwJ5Opl+Y3lRm60VTkgRDfvzydb57lXW5G+K5MrZhEmhrFUuRYziV+e34CTo+ybpMp1Eqg==}
-    dependencies:
-      '@metaplex-foundation/rustbin': 0.3.5
-      ansi-colors: 4.1.3
-      debug: 4.3.4
-    transitivePeerDependencies:
-      - supports-color
-    dev: true
-
   /@noble/hashes@1.4.0:
     resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==}
     engines: {node: '>= 16'}
@@ -98,32 +74,32 @@ packages:
       prettier: 3.2.5
     dev: true
 
-  /@solana/codecs-core@2.0.0-preview.1:
-    resolution: {integrity: sha512-0y3kgFSJAOApNGefEOgLRMiXOHVmcF29Xw3zmR4LDUABvytG3ecKMXGz5oLt3vdaU2CyN3tuUVeGmQjrd0U1kw==}
+  /@solana/codecs-core@2.0.0-preview.3:
+    resolution: {integrity: sha512-xQz6USSBs82lUNoVa/wwnm6wa2y2eWtGwPLUwF/NOGGpR+QH9EODijXvJ8wuC9llyqerqdC+5mrmx9C8VSMNYg==}
     dependencies:
-      '@solana/errors': 2.0.0-preview.1
+      '@solana/errors': 2.0.0-preview.3
     dev: true
 
-  /@solana/codecs-numbers@2.0.0-preview.1:
-    resolution: {integrity: sha512-NFA8itgcYUY3hkWMBpVRozd2poy1zfOvkIWZKx/D69oIMUtQTBpKrodRVBuhlBkAv12vDNkFljqVySpcMZMl7A==}
+  /@solana/codecs-numbers@2.0.0-preview.3:
+    resolution: {integrity: sha512-cjsHexVAj4GveDtG0+WjW121TKMbWN7AkOvGlf1qauOJgzJvX3V7KXHWuEg8wGGfRiLiXKEgh7KieQiB17EI3Q==}
     dependencies:
-      '@solana/codecs-core': 2.0.0-preview.1
-      '@solana/errors': 2.0.0-preview.1
+      '@solana/codecs-core': 2.0.0-preview.3
+      '@solana/errors': 2.0.0-preview.3
     dev: true
 
-  /@solana/codecs-strings@2.0.0-preview.1(fastestsmallesttextencoderdecoder@1.0.22):
-    resolution: {integrity: sha512-kBAxE9ZD5/c8j9CkPxqc55dbo7R50Re3k94SXR+k13DZCCs37Fyn0/mAkw/S95fofbi/zsi4jSfmsT5vCZD75A==}
+  /@solana/codecs-strings@2.0.0-preview.3(fastestsmallesttextencoderdecoder@1.0.22):
+    resolution: {integrity: sha512-CUij3XgdoqbrEYncyy+kHCIXRHjqkcjiyJhf4hWVjMXM5nu2jreehhBiLFHFjlFw2U3vp1gig5QNxji8SjpQzw==}
     peerDependencies:
       fastestsmallesttextencoderdecoder: ^1.0.22
     dependencies:
-      '@solana/codecs-core': 2.0.0-preview.1
-      '@solana/codecs-numbers': 2.0.0-preview.1
-      '@solana/errors': 2.0.0-preview.1
+      '@solana/codecs-core': 2.0.0-preview.3
+      '@solana/codecs-numbers': 2.0.0-preview.3
+      '@solana/errors': 2.0.0-preview.3
       fastestsmallesttextencoderdecoder: 1.0.22
     dev: true
 
-  /@solana/errors@2.0.0-preview.1:
-    resolution: {integrity: sha512-mnBWfLVwMH4hxwb4sWZ7G7djQCMsyymjysvUPDiF89LueTBm1hfdxUv8Cy1uUCGsJ3jO3scdPwB4noOgr0rG/g==}
+  /@solana/errors@2.0.0-preview.3:
+    resolution: {integrity: sha512-IZAUMcKaV3Hn0QTfzlGmVsDaH1mVUq0uURJi+tm8K3n37cKrvXyS2GQsHtIMRaLdOVp1IbTtIc5YF3+qATlpyw==}
     hasBin: true
     dependencies:
       chalk: 5.3.0
@@ -165,11 +141,6 @@ packages:
     resolution: {integrity: sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==}
     dev: true
 
-  /ansi-colors@4.1.3:
-    resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
-    engines: {node: '>=6'}
-    dev: true
-
   /ansi-styles@4.3.0:
     resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
     engines: {node: '>=8'}
@@ -238,18 +209,6 @@ packages:
     engines: {node: '>= 12'}
     dev: true
 
-  /debug@4.3.4:
-    resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
-    engines: {node: '>=6.0'}
-    peerDependencies:
-      supports-color: '*'
-    peerDependenciesMeta:
-      supports-color:
-        optional: true
-    dependencies:
-      ms: 2.1.2
-    dev: true
-
   /define-data-property@1.1.4:
     resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
     engines: {node: '>= 0.4'}
@@ -478,13 +437,6 @@ packages:
     resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==}
     dev: true
 
-  /lru-cache@6.0.0:
-    resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
-    engines: {node: '>=10'}
-    dependencies:
-      yallist: 4.0.0
-    dev: true
-
   /make-synchronized@0.2.8:
     resolution: {integrity: sha512-jtXnKYCxjmGaXiZhXbDbGPbh4YyTvIIbOgcQjtAboc4RSm9k3nyhTFvFQB0cfs7QFKuZXKe2D2RvOkv1c+vpxg==}
     dev: true
@@ -510,10 +462,6 @@ packages:
     resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
     dev: true
 
-  /ms@2.1.2:
-    resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
-    dev: true
-
   /node-domexception@1.0.0:
     resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
     engines: {node: '>=10.5.0'}
@@ -593,14 +541,6 @@ packages:
       queue-microtask: 1.2.3
     dev: true
 
-  /semver@7.6.0:
-    resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
-    engines: {node: '>=10'}
-    hasBin: true
-    dependencies:
-      lru-cache: 6.0.0
-    dev: true
-
   /set-function-length@1.2.1:
     resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==}
     engines: {node: '>= 0.4'}
@@ -637,10 +577,6 @@ packages:
       has-flag: 4.0.0
     dev: true
 
-  /text-table@0.2.0:
-    resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
-    dev: true
-
   /through@2.3.8:
     resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
     dev: true
@@ -652,10 +588,6 @@ packages:
       is-number: 7.0.0
     dev: true
 
-  /toml@3.0.0:
-    resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==}
-    dev: true
-
   /typescript@5.4.2:
     resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==}
     engines: {node: '>=14.17'}
@@ -689,10 +621,6 @@ packages:
       isexe: 2.0.0
     dev: true
 
-  /yallist@4.0.0:
-    resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
-    dev: true
-
   /yaml@2.4.1:
     resolution: {integrity: sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==}
     engines: {node: '>= 14'}

+ 4 - 4
scripts/client/test-rust.mjs

@@ -1,13 +1,13 @@
 #!/usr/bin/env zx
-import 'zx/globals';
-import { workingDirectory } from '../utils.mjs';
+import "zx/globals";
+import { workingDirectory } from "../utils.mjs";
 
 // Start the local validator if it's not already running.
 await $`pnpm validator:restart`;
 
 // Run the tests.
-cd(path.join(workingDirectory, 'clients', 'rust'));
-const hasSolfmt = await which('solfmt', { nothrow: true });
+cd(path.join(workingDirectory, "clients", "rust"));
+const hasSolfmt = await which("solfmt", { nothrow: true });
 if (hasSolfmt) {
   await $`cargo test-sbf ${argv._} 2>&1 | solfmt`;
 } else {

+ 3 - 3
scripts/generate-clients.mjs

@@ -4,9 +4,9 @@ import * as k from "@metaplex-foundation/kinobi";
 import { workingDirectory } from "./utils.mjs";
 
 // Instanciate Kinobi.
-const kinobi = k.createFromIdls([
-  path.join(workingDirectory, "program", "idl.json"),
-]);
+const kinobi = k.createFromIdl(
+  path.join(workingDirectory, "program", "idl.json")
+);
 
 // Update instructions.
 kinobi.update(

Some files were not shown because too many files changed in this diff