فهرست منبع

Use `ReadonlyUint8Arrays` with `InstructionWithData` types (#714)

Loris Leiva 4 ماه پیش
والد
کامیت
855c094e0a
56فایلهای تغییر یافته به همراه158 افزوده شده و 104 حذف شده
  1. 6 0
      .changeset/flat-suns-admire.md
  2. 1 1
      packages/dynamic-parsers/src/parsers.ts
  3. 2 2
      packages/renderers-js/e2e/anchor/src/generated/instructions/createGuard.ts
  4. 2 2
      packages/renderers-js/e2e/anchor/src/generated/instructions/execute.ts
  5. 2 2
      packages/renderers-js/e2e/anchor/src/generated/instructions/initialize.ts
  6. 2 2
      packages/renderers-js/e2e/anchor/src/generated/instructions/updateGuard.ts
  7. 3 2
      packages/renderers-js/e2e/dummy/src/generated/instructions/instruction3.ts
  8. 3 2
      packages/renderers-js/e2e/dummy/src/generated/instructions/instruction4.ts
  9. 3 2
      packages/renderers-js/e2e/dummy/src/generated/instructions/instruction5.ts
  10. 3 2
      packages/renderers-js/e2e/memo/src/generated/instructions/addMemo.ts
  11. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/advanceNonceAccount.ts
  12. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/allocate.ts
  13. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/allocateWithSeed.ts
  14. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/assign.ts
  15. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/assignWithSeed.ts
  16. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/authorizeNonceAccount.ts
  17. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/createAccount.ts
  18. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/createAccountWithSeed.ts
  19. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/initializeNonceAccount.ts
  20. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/transferSol.ts
  21. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/transferSolWithSeed.ts
  22. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/upgradeNonceAccount.ts
  23. 3 2
      packages/renderers-js/e2e/system/src/generated/instructions/withdrawNonceAccount.ts
  24. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/amountToUiAmount.ts
  25. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/approve.ts
  26. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/approveChecked.ts
  27. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/burn.ts
  28. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/burnChecked.ts
  29. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/closeAccount.ts
  30. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/createAccount.ts
  31. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/createAssociatedToken.ts
  32. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts
  33. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/freezeAccount.ts
  34. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/getAccountDataSize.ts
  35. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount.ts
  36. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount2.ts
  37. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount3.ts
  38. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeImmutableOwner.ts
  39. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeMint.ts
  40. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeMint2.ts
  41. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeMultisig.ts
  42. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/initializeMultisig2.ts
  43. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/mintTo.ts
  44. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/mintToChecked.ts
  45. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts
  46. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/revoke.ts
  47. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/setAuthority.ts
  48. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/syncNative.ts
  49. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/thawAccount.ts
  50. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/transfer.ts
  51. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/transferChecked.ts
  52. 3 2
      packages/renderers-js/e2e/token/src/generated/instructions/uiAmountToAmount.ts
  53. 1 1
      packages/renderers-js/public/templates/fragments/instructionParseFunction.njk
  54. 1 1
      packages/renderers-js/public/templates/fragments/instructionType.njk
  55. 2 1
      packages/renderers-js/src/fragments/instructionParseFunction.ts
  56. 1 0
      packages/renderers-js/src/fragments/instructionType.ts

+ 6 - 0
.changeset/flat-suns-admire.md

@@ -0,0 +1,6 @@
+---
+'@codama/renderers-js': minor
+'@codama/dynamic-parsers': patch
+---
+
+Use `ReadonlyUint8Arrays` with `InstructionWithData` types

+ 1 - 1
packages/dynamic-parsers/src/parsers.ts

@@ -49,7 +49,7 @@ export function parseInstruction(
     root: RootNode,
     instruction: Instruction &
         InstructionWithAccounts<readonly (AccountLookupMeta | AccountMeta)[]> &
-        InstructionWithData<Uint8Array>,
+        InstructionWithData<ReadonlyUint8Array>,
 ): ParsedInstruction | undefined {
     const parsedData = parseInstructionData(root, instruction.data);
     if (!parsedData) return undefined;

+ 2 - 2
packages/renderers-js/e2e/anchor/src/generated/instructions/createGuard.ts

@@ -94,7 +94,7 @@ export type CreateGuardInstruction<
     | AccountMeta<string> = '11111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountGuard extends string
@@ -511,7 +511,7 @@ export function parseCreateGuardInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateGuardInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 8) {
     // TODO: Coded error.

+ 2 - 2
packages/renderers-js/e2e/anchor/src/generated/instructions/execute.ts

@@ -58,7 +58,7 @@ export type ExecuteInstruction<
     | AccountMeta<string> = 'Sysvar1nstructions1111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSourceAccount extends string
@@ -389,7 +389,7 @@ export function parseExecuteInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedExecuteInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 7) {
     // TODO: Coded error.

+ 2 - 2
packages/renderers-js/e2e/anchor/src/generated/instructions/initialize.ts

@@ -59,7 +59,7 @@ export type InitializeInstruction<
   TAccountPayer extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountExtraMetasAccount extends string
@@ -347,7 +347,7 @@ export function parseInitializeInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 6) {
     // TODO: Coded error.

+ 2 - 2
packages/renderers-js/e2e/anchor/src/generated/instructions/updateGuard.ts

@@ -83,7 +83,7 @@ export type UpdateGuardInstruction<
     | AccountMeta<string> = '11111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountGuard extends string
@@ -421,7 +421,7 @@ export function parseUpdateGuardInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedUpdateGuardInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 6) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/dummy/src/generated/instructions/instruction3.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { DUMMY_PROGRAM_ADDRESS } from '../programs';
 
@@ -34,7 +35,7 @@ export type Instruction3Instruction<
   TProgram extends string = typeof DUMMY_PROGRAM_ADDRESS,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<TRemainingAccounts>;
 
 export type Instruction3InstructionData = { discriminator: number };
@@ -88,7 +89,7 @@ export type ParsedInstruction3Instruction<
 };
 
 export function parseInstruction3Instruction<TProgram extends string>(
-  instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>
+  instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>
 ): ParsedInstruction3Instruction<TProgram> {
   return {
     programAddress: instruction.programAddress,

+ 3 - 2
packages/renderers-js/e2e/dummy/src/generated/instructions/instruction4.ts

@@ -20,6 +20,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { DUMMY_PROGRAM_ADDRESS } from '../programs';
 
@@ -27,7 +28,7 @@ export type Instruction4Instruction<
   TProgram extends string = typeof DUMMY_PROGRAM_ADDRESS,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<TRemainingAccounts>;
 
 export type Instruction4InstructionData = { myArgument: bigint };
@@ -86,7 +87,7 @@ export type ParsedInstruction4Instruction<
 };
 
 export function parseInstruction4Instruction<TProgram extends string>(
-  instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>
+  instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>
 ): ParsedInstruction4Instruction<TProgram> {
   return {
     programAddress: instruction.programAddress,

+ 3 - 2
packages/renderers-js/e2e/dummy/src/generated/instructions/instruction5.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { DUMMY_PROGRAM_ADDRESS } from '../programs';
 
@@ -28,7 +29,7 @@ export type Instruction5Instruction<
   TProgram extends string = typeof DUMMY_PROGRAM_ADDRESS,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<TRemainingAccounts>;
 
 export type Instruction5InstructionData = { myArgument: bigint };
@@ -90,7 +91,7 @@ export type ParsedInstruction5Instruction<
 };
 
 export function parseInstruction5Instruction<TProgram extends string>(
-  instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>
+  instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>
 ): ParsedInstruction5Instruction<TProgram> {
   return {
     programAddress: instruction.programAddress,

+ 3 - 2
packages/renderers-js/e2e/memo/src/generated/instructions/addMemo.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type TransactionSigner,
 } from '@solana/kit';
 import { MEMO_PROGRAM_ADDRESS } from '../programs';
@@ -29,7 +30,7 @@ export type AddMemoInstruction<
   TProgram extends string = typeof MEMO_PROGRAM_ADDRESS,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<TRemainingAccounts>;
 
 export type AddMemoInstructionData = { memo: string };
@@ -99,7 +100,7 @@ export type ParsedAddMemoInstruction<
 };
 
 export function parseAddMemoInstruction<TProgram extends string>(
-  instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>
+  instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>
 ): ParsedAddMemoInstruction<TProgram> {
   return {
     programAddress: instruction.programAddress,

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/advanceNonceAccount.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -45,7 +46,7 @@ export type AdvanceNonceAccountInstruction<
   TAccountNonceAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNonceAccount extends string
@@ -179,7 +180,7 @@ export function parseAdvanceNonceAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAdvanceNonceAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/allocate.ts

@@ -24,6 +24,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableSignerAccount,
 } from '@solana/kit';
@@ -41,7 +42,7 @@ export type AllocateInstruction<
   TAccountNewAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNewAccount extends string
@@ -139,7 +140,7 @@ export function parseAllocateInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAllocateInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/allocateWithSeed.ts

@@ -31,6 +31,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -49,7 +50,7 @@ export type AllocateWithSeedInstruction<
   TAccountBaseAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNewAccount extends string
@@ -188,7 +189,7 @@ export function parseAllocateWithSeedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAllocateWithSeedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/assign.ts

@@ -24,6 +24,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableSignerAccount,
 } from '@solana/kit';
@@ -41,7 +42,7 @@ export type AssignInstruction<
   TAccountAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -142,7 +143,7 @@ export function parseAssignInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAssignInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/assignWithSeed.ts

@@ -29,6 +29,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -47,7 +48,7 @@ export type AssignWithSeedInstruction<
   TAccountBaseAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -181,7 +182,7 @@ export function parseAssignWithSeedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAssignWithSeedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/authorizeNonceAccount.ts

@@ -25,6 +25,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -43,7 +44,7 @@ export type AuthorizeNonceAccountInstruction<
   TAccountNonceAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNonceAccount extends string
@@ -173,7 +174,7 @@ export function parseAuthorizeNonceAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAuthorizeNonceAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/createAccount.ts

@@ -30,6 +30,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type Lamports,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableSignerAccount,
 } from '@solana/kit';
@@ -52,7 +53,7 @@ export type CreateAccountInstruction<
   TAccountNewAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountPayer extends string
@@ -194,7 +195,7 @@ export function parseCreateAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/createAccountWithSeed.ts

@@ -31,6 +31,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
   type WritableSignerAccount,
@@ -51,7 +52,7 @@ export type CreateAccountWithSeedInstruction<
   TAccountBaseAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountPayer extends string
@@ -214,7 +215,7 @@ export function parseCreateAccountWithSeedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateAccountWithSeedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/initializeNonceAccount.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
@@ -46,7 +47,7 @@ export type InitializeNonceAccountInstruction<
     | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNonceAccount extends string
@@ -200,7 +201,7 @@ export function parseInitializeNonceAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeNonceAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/transferSol.ts

@@ -24,6 +24,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
   type WritableSignerAccount,
@@ -43,7 +44,7 @@ export type TransferSolInstruction<
   TAccountDestination extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -165,7 +166,7 @@ export function parseTransferSolInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedTransferSolInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/transferSolWithSeed.ts

@@ -31,6 +31,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -50,7 +51,7 @@ export type TransferSolWithSeedInstruction<
   TAccountDestination extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -202,7 +203,7 @@ export function parseTransferSolWithSeedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedTransferSolWithSeedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/upgradeNonceAccount.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { SYSTEM_PROGRAM_ADDRESS } from '../programs';
@@ -37,7 +38,7 @@ export type UpgradeNonceAccountInstruction<
   TAccountNonceAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNonceAccount extends string
@@ -127,7 +128,7 @@ export function parseUpgradeNonceAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedUpgradeNonceAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/system/src/generated/instructions/withdrawNonceAccount.ts

@@ -26,6 +26,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -51,7 +52,7 @@ export type WithdrawNonceAccountInstruction<
   TAccountNonceAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNonceAccount extends string
@@ -233,7 +234,7 @@ export function parseWithdrawNonceAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedWithdrawNonceAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 5) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/amountToUiAmount.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
 import { getAccountMetaFactory, type ResolvedAccount } from '../shared';
@@ -39,7 +40,7 @@ export type AmountToUiAmountInstruction<
   TAccountMint extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -145,7 +146,7 @@ export function parseAmountToUiAmountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedAmountToUiAmountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/approve.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type ApproveInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -203,7 +204,7 @@ export function parseApproveInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedApproveInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/approveChecked.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -47,7 +48,7 @@ export type ApproveCheckedInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -229,7 +230,7 @@ export function parseApproveCheckedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedApproveCheckedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 4) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/burn.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type BurnInstruction<
   TAccountAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -202,7 +203,7 @@ export function parseBurnInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedBurnInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/burnChecked.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type BurnCheckedInstruction<
   TAccountAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -212,7 +213,7 @@ export function parseBurnCheckedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedBurnCheckedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/closeAccount.ts

@@ -25,6 +25,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -44,7 +45,7 @@ export type CloseAccountInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -185,7 +186,7 @@ export function parseCloseAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCloseAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/createAccount.ts

@@ -30,6 +30,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type Lamports,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableSignerAccount,
 } from '@solana/kit';
@@ -52,7 +53,7 @@ export type CreateAccountInstruction<
   TAccountNewAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountPayer extends string
@@ -194,7 +195,7 @@ export function parseCreateAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/createAssociatedToken.ts

@@ -23,6 +23,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
   type WritableSignerAccount,
@@ -55,7 +56,7 @@ export type CreateAssociatedTokenInstruction<
     | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountPayer extends string
@@ -348,7 +349,7 @@ export function parseCreateAssociatedTokenInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateAssociatedTokenInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 6) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts

@@ -23,6 +23,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
   type WritableSignerAccount,
@@ -57,7 +58,7 @@ export type CreateAssociatedTokenIdempotentInstruction<
     | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountPayer extends string
@@ -352,7 +353,7 @@ export function parseCreateAssociatedTokenIdempotentInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedCreateAssociatedTokenIdempotentInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 6) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/freezeAccount.ts

@@ -25,6 +25,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -44,7 +45,7 @@ export type FreezeAccountInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -185,7 +186,7 @@ export function parseFreezeAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedFreezeAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/getAccountDataSize.ts

@@ -22,6 +22,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
 import { getAccountMetaFactory, type ResolvedAccount } from '../shared';
@@ -37,7 +38,7 @@ export type GetAccountDataSizeInstruction<
   TAccountMint extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -127,7 +128,7 @@ export function parseGetAccountDataSizeInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedGetAccountDataSizeInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount.ts

@@ -22,6 +22,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -43,7 +44,7 @@ export type InitializeAccountInstruction<
     | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -190,7 +191,7 @@ export function parseInitializeAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 4) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount2.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -44,7 +45,7 @@ export type InitializeAccount2Instruction<
     | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -192,7 +193,7 @@ export function parseInitializeAccount2Instruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeAccount2Instruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeAccount3.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -41,7 +42,7 @@ export type InitializeAccount3Instruction<
   TAccountMint extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -167,7 +168,7 @@ export function parseInitializeAccount3Instruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeAccount3Instruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeImmutableOwner.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -37,7 +38,7 @@ export type InitializeImmutableOwnerInstruction<
   TAccountAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -129,7 +130,7 @@ export function parseInitializeImmutableOwnerInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeImmutableOwnerInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeMint.ts

@@ -29,6 +29,7 @@ import {
   type Option,
   type OptionOrNullable,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -48,7 +49,7 @@ export type InitializeMintInstruction<
     | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -190,7 +191,7 @@ export function parseInitializeMintInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeMintInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeMint2.ts

@@ -28,6 +28,7 @@ import {
   type InstructionWithData,
   type Option,
   type OptionOrNullable,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -44,7 +45,7 @@ export type InitializeMint2Instruction<
   TAccountMint extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -168,7 +169,7 @@ export function parseInitializeMint2Instruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeMint2Instruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeMultisig.ts

@@ -23,6 +23,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -42,7 +43,7 @@ export type InitializeMultisigInstruction<
     | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMultisig extends string
@@ -185,7 +186,7 @@ export function parseInitializeMultisigInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeMultisigInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/initializeMultisig2.ts

@@ -22,6 +22,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -38,7 +39,7 @@ export type InitializeMultisig2Instruction<
   TAccountMultisig extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMultisig extends string
@@ -152,7 +153,7 @@ export function parseInitializeMultisig2Instruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedInitializeMultisig2Instruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/mintTo.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type MintToInstruction<
   TAccountMintAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -207,7 +208,7 @@ export function parseMintToInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedMintToInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/mintToChecked.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type MintToCheckedInstruction<
   TAccountMintAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -214,7 +215,7 @@ export function parseMintToCheckedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedMintToCheckedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts

@@ -23,6 +23,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
   type WritableSignerAccount,
@@ -60,7 +61,7 @@ export type RecoverNestedAssociatedTokenInstruction<
     | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountNestedAssociatedAccountAddress extends string
@@ -420,7 +421,7 @@ export function parseRecoverNestedAssociatedTokenInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedRecoverNestedAssociatedTokenInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 7) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/revoke.ts

@@ -25,6 +25,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -43,7 +44,7 @@ export type RevokeInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -171,7 +172,7 @@ export function parseRevokeInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedRevokeInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/setAuthority.ts

@@ -31,6 +31,7 @@ import {
   type OptionOrNullable,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -55,7 +56,7 @@ export type SetAuthorityInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountOwned extends string
@@ -206,7 +207,7 @@ export function parseSetAuthorityInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedSetAuthorityInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 2) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/syncNative.ts

@@ -21,6 +21,7 @@ import {
   type Instruction,
   type InstructionWithAccounts,
   type InstructionWithData,
+  type ReadonlyUint8Array,
   type WritableAccount,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
@@ -37,7 +38,7 @@ export type SyncNativeInstruction<
   TAccountAccount extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -124,7 +125,7 @@ export function parseSyncNativeInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedSyncNativeInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/thawAccount.ts

@@ -25,6 +25,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -44,7 +45,7 @@ export type ThawAccountInstruction<
   TAccountOwner extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountAccount extends string
@@ -185,7 +186,7 @@ export function parseThawAccountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedThawAccountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/transfer.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -46,7 +47,7 @@ export type TransferInstruction<
   TAccountAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -205,7 +206,7 @@ export function parseTransferInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedTransferInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 3) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/transferChecked.ts

@@ -27,6 +27,7 @@ import {
   type InstructionWithData,
   type ReadonlyAccount,
   type ReadonlySignerAccount,
+  type ReadonlyUint8Array,
   type TransactionSigner,
   type WritableAccount,
 } from '@solana/kit';
@@ -47,7 +48,7 @@ export type TransferCheckedInstruction<
   TAccountAuthority extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountSource extends string
@@ -231,7 +232,7 @@ export function parseTransferCheckedInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedTransferCheckedInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 4) {
     // TODO: Coded error.

+ 3 - 2
packages/renderers-js/e2e/token/src/generated/instructions/uiAmountToAmount.ts

@@ -24,6 +24,7 @@ import {
   type InstructionWithAccounts,
   type InstructionWithData,
   type ReadonlyAccount,
+  type ReadonlyUint8Array,
 } from '@solana/kit';
 import { TOKEN_PROGRAM_ADDRESS } from '../programs';
 import { getAccountMetaFactory, type ResolvedAccount } from '../shared';
@@ -39,7 +40,7 @@ export type UiAmountToAmountInstruction<
   TAccountMint extends string | AccountMeta<string> = string,
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram> &
-  InstructionWithData<Uint8Array> &
+  InstructionWithData<ReadonlyUint8Array> &
   InstructionWithAccounts<
     [
       TAccountMint extends string
@@ -145,7 +146,7 @@ export function parseUiAmountToAmountInstruction<
 >(
   instruction: Instruction<TProgram> &
     InstructionWithAccounts<TAccountMetas> &
-    InstructionWithData<Uint8Array>
+    InstructionWithData<ReadonlyUint8Array>
 ): ParsedUiAmountToAmountInstruction<TProgram, TAccountMetas> {
   if (instruction.accounts.length < 1) {
     // TODO: Coded error.

+ 1 - 1
packages/renderers-js/public/templates/fragments/instructionParseFunction.njk

@@ -33,7 +33,7 @@ export function {{ instructionParseFunction }}<
       & InstructionWithAccounts<TAccountMetas>
     {% endif %}
     {% if hasData %}
-      & InstructionWithData<Uint8Array>
+      & InstructionWithData<ReadonlyUint8Array>
     {% endif %}
 ): {{ instructionParsedType }}<TProgram {{ ', TAccountMetas' if hasAccounts }}> {
   {% if hasAccounts %}

+ 1 - 1
packages/renderers-js/public/templates/fragments/instructionType.njk

@@ -8,7 +8,7 @@ export type {{ instructionType }}<
   TRemainingAccounts extends readonly AccountMeta<string>[] = [],
 > = Instruction<TProgram>
   {% if hasData %}
-    & InstructionWithData<Uint8Array>
+    & InstructionWithData<ReadonlyUint8Array>
   {% endif %}
   {% if hasAccounts %}
     & InstructionWithAccounts<[{{ accountMetas }}, ...TRemainingAccounts]>

+ 2 - 1
packages/renderers-js/src/fragments/instructionParseFunction.ts

@@ -51,5 +51,6 @@ export function getInstructionParseFunctionFragment(
         .addImports('generatedPrograms', [programAddressConstant])
         .addImports('solanaInstructions', ['type Instruction'])
         .addImports('solanaInstructions', hasAccounts ? ['type InstructionWithAccounts', 'type AccountMeta'] : [])
-        .addImports('solanaInstructions', hasData ? ['type InstructionWithData'] : []);
+        .addImports('solanaInstructions', hasData ? ['type InstructionWithData'] : [])
+        .addImports('solanaCodecsCore', hasData ? ['type ReadonlyUint8Array'] : []);
 }

+ 1 - 0
packages/renderers-js/src/fragments/instructionType.ts

@@ -56,6 +56,7 @@ export function getInstructionTypeFragment(
     })
         .mergeImportsWith(accountTypeParamsFragment, accountMetasFragment)
         .addImports('generatedPrograms', [programAddressConstant])
+        .addImports('solanaCodecsCore', hasData ? ['type ReadonlyUint8Array'] : [])
         .addImports('solanaInstructions', [
             'type AccountMeta',
             'type Instruction',