From 11a1c1d79a517af1f761fde72887b3419ed7fc58 Mon Sep 17 00:00:00 2001 From: Loris Leiva Date: Thu, 10 Oct 2024 11:48:39 +0100 Subject: [PATCH] Use Codama v1.0.0 See https://github.com/codama-idl/codama/pull/234 --- clients/js/src/generated/accounts/index.ts | 6 +- clients/js/src/generated/accounts/mint.ts | 6 +- clients/js/src/generated/accounts/multisig.ts | 6 +- clients/js/src/generated/accounts/token.ts | 6 +- .../src/generated/errors/associatedToken.ts | 6 +- clients/js/src/generated/errors/index.ts | 6 +- clients/js/src/generated/errors/token2022.ts | 6 +- clients/js/src/generated/index.ts | 6 +- .../instructions/amountToUiAmount.ts | 26 ++- .../applyConfidentialPendingBalance.ts | 16 +- .../js/src/generated/instructions/approve.ts | 16 +- .../generated/instructions/approveChecked.ts | 16 +- .../approveConfidentialTransferAccount.ts | 16 +- clients/js/src/generated/instructions/burn.ts | 16 +- .../src/generated/instructions/burnChecked.ts | 16 +- .../generated/instructions/closeAccount.ts | 16 +- .../instructions/confidentialDeposit.ts | 16 +- .../instructions/confidentialTransfer.ts | 16 +- .../confidentialTransferWithFee.ts | 16 +- .../instructions/confidentialWithdraw.ts | 16 +- .../configureConfidentialTransferAccount.ts | 16 +- .../instructions/createAssociatedToken.ts | 28 +-- .../createAssociatedTokenIdempotent.ts | 28 +-- .../disableConfidentialCredits.ts | 16 +- .../instructions/disableMemoTransfers.ts | 16 +- .../disableNonConfidentialCredits.ts | 16 +- .../emptyConfidentialTransferAccount.ts | 16 +- .../instructions/enableConfidentialCredits.ts | 16 +- .../instructions/enableMemoTransfers.ts | 16 +- .../enableNonConfidentialCredits.ts | 16 +- .../generated/instructions/freezeAccount.ts | 16 +- .../instructions/getAccountDataSize.ts | 26 ++- .../harvestWithheldTokensToMint.ts | 22 +-- .../js/src/generated/instructions/index.ts | 6 +- .../instructions/initializeAccount.ts | 16 +- .../instructions/initializeAccount2.ts | 16 +- .../instructions/initializeAccount3.ts | 16 +- .../initializeConfidentialTransferMint.ts | 16 +- .../initializeDefaultAccountState.ts | 22 +-- .../instructions/initializeImmutableOwner.ts | 22 +-- .../generated/instructions/initializeMint.ts | 24 +-- .../generated/instructions/initializeMint2.ts | 23 +-- .../initializeMintCloseAuthority.ts | 22 +-- .../instructions/initializeMultisig.ts | 16 +- .../instructions/initializeMultisig2.ts | 22 +-- .../initializeTransferFeeConfig.ts | 22 +-- .../js/src/generated/instructions/mintTo.ts | 16 +- .../generated/instructions/mintToChecked.ts | 16 +- .../src/generated/instructions/reallocate.ts | 16 +- .../recoverNestedAssociatedToken.ts | 28 +-- .../js/src/generated/instructions/revoke.ts | 16 +- .../generated/instructions/setAuthority.ts | 16 +- .../generated/instructions/setTransferFee.ts | 16 +- .../src/generated/instructions/syncNative.ts | 23 +-- .../src/generated/instructions/thawAccount.ts | 16 +- .../js/src/generated/instructions/transfer.ts | 16 +- .../generated/instructions/transferChecked.ts | 16 +- .../instructions/transferCheckedWithFee.ts | 16 +- .../instructions/uiAmountToAmount.ts | 26 ++- .../updateConfidentialTransferMint.ts | 16 +- .../instructions/updateDefaultAccountState.ts | 16 +- .../withdrawWithheldTokensFromAccounts.ts | 16 +- .../withdrawWithheldTokensFromMint.ts | 16 +- .../js/src/generated/pdas/associatedToken.ts | 6 +- clients/js/src/generated/pdas/index.ts | 6 +- .../src/generated/programs/associatedToken.ts | 6 +- clients/js/src/generated/programs/index.ts | 6 +- .../js/src/generated/programs/token2022.ts | 6 +- clients/js/src/generated/shared/index.ts | 6 +- .../js/src/generated/types/accountState.ts | 6 +- .../js/src/generated/types/authorityType.ts | 6 +- .../src/generated/types/decryptableBalance.ts | 6 +- .../src/generated/types/encryptedBalance.ts | 6 +- clients/js/src/generated/types/extension.ts | 6 +- .../js/src/generated/types/extensionType.ts | 6 +- clients/js/src/generated/types/index.ts | 6 +- clients/js/src/generated/types/transferFee.ts | 6 +- package.json | 6 +- pnpm-lock.yaml | 170 +++++++++--------- program/idl.json | 4 +- scripts/generate-clients.mjs | 14 +- 81 files changed, 691 insertions(+), 629 deletions(-) diff --git a/clients/js/src/generated/accounts/index.ts b/clients/js/src/generated/accounts/index.ts index 4fc1a10..22eaa0c 100644 --- a/clients/js/src/generated/accounts/index.ts +++ b/clients/js/src/generated/accounts/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './mint'; diff --git a/clients/js/src/generated/accounts/mint.ts b/clients/js/src/generated/accounts/mint.ts index 8001bd5..b492d05 100644 --- a/clients/js/src/generated/accounts/mint.ts +++ b/clients/js/src/generated/accounts/mint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/accounts/multisig.ts b/clients/js/src/generated/accounts/multisig.ts index 733c905..066bf91 100644 --- a/clients/js/src/generated/accounts/multisig.ts +++ b/clients/js/src/generated/accounts/multisig.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/accounts/token.ts b/clients/js/src/generated/accounts/token.ts index 771a035..0fd4c96 100644 --- a/clients/js/src/generated/accounts/token.ts +++ b/clients/js/src/generated/accounts/token.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/errors/associatedToken.ts b/clients/js/src/generated/errors/associatedToken.ts index 9c00376..c651725 100644 --- a/clients/js/src/generated/errors/associatedToken.ts +++ b/clients/js/src/generated/errors/associatedToken.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/errors/index.ts b/clients/js/src/generated/errors/index.ts index 0f5401d..a18d0d1 100644 --- a/clients/js/src/generated/errors/index.ts +++ b/clients/js/src/generated/errors/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './associatedToken'; diff --git a/clients/js/src/generated/errors/token2022.ts b/clients/js/src/generated/errors/token2022.ts index b749420..24d0333 100644 --- a/clients/js/src/generated/errors/token2022.ts +++ b/clients/js/src/generated/errors/token2022.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/index.ts b/clients/js/src/generated/index.ts index a640c1f..1f8edf1 100644 --- a/clients/js/src/generated/index.ts +++ b/clients/js/src/generated/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './accounts'; diff --git a/clients/js/src/generated/instructions/amountToUiAmount.ts b/clients/js/src/generated/instructions/amountToUiAmount.ts index 62e3ddb..0cb258d 100644 --- a/clients/js/src/generated/instructions/amountToUiAmount.ts +++ b/clients/js/src/generated/instructions/amountToUiAmount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -93,14 +93,15 @@ export type AmountToUiAmountInput = { amount: AmountToUiAmountInstructionDataArgs['amount']; }; -export function getAmountToUiAmountInstruction( - input: AmountToUiAmountInput -): AmountToUiAmountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { +export function getAmountToUiAmountInstruction< + TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, +>( + input: AmountToUiAmountInput, + config?: { programAddress?: TProgramAddress } +): AmountToUiAmountInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -121,10 +122,7 @@ export function getAmountToUiAmountInstruction( data: getAmountToUiAmountInstructionDataEncoder().encode( args as AmountToUiAmountInstructionDataArgs ), - } as AmountToUiAmountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as AmountToUiAmountInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/applyConfidentialPendingBalance.ts b/clients/js/src/generated/instructions/applyConfidentialPendingBalance.ts index bf7c823..a08184c 100644 --- a/clients/js/src/generated/instructions/applyConfidentialPendingBalance.ts +++ b/clients/js/src/generated/instructions/applyConfidentialPendingBalance.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -154,10 +154,12 @@ export type ApplyConfidentialPendingBalanceInput< export function getApplyConfidentialPendingBalanceInstruction< TAccountToken extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: ApplyConfidentialPendingBalanceInput + input: ApplyConfidentialPendingBalanceInput, + config?: { programAddress?: TProgramAddress } ): ApplyConfidentialPendingBalanceInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -165,7 +167,7 @@ export function getApplyConfidentialPendingBalanceInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -201,7 +203,7 @@ export function getApplyConfidentialPendingBalanceInstruction< args as ApplyConfidentialPendingBalanceInstructionDataArgs ), } as ApplyConfidentialPendingBalanceInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/approve.ts b/clients/js/src/generated/instructions/approve.ts index 9fd45c1..2c1d60d 100644 --- a/clients/js/src/generated/instructions/approve.ts +++ b/clients/js/src/generated/instructions/approve.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -119,10 +119,12 @@ export function getApproveInstruction< TAccountSource extends string, TAccountDelegate extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: ApproveInput + input: ApproveInput, + config?: { programAddress?: TProgramAddress } ): ApproveInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountDelegate, (typeof input)['owner'] extends TransactionSigner @@ -130,7 +132,7 @@ export function getApproveInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -168,7 +170,7 @@ export function getApproveInstruction< args as ApproveInstructionDataArgs ), } as ApproveInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountDelegate, (typeof input)['owner'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/approveChecked.ts b/clients/js/src/generated/instructions/approveChecked.ts index cda96db..236e929 100644 --- a/clients/js/src/generated/instructions/approveChecked.ts +++ b/clients/js/src/generated/instructions/approveChecked.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -134,15 +134,17 @@ export function getApproveCheckedInstruction< TAccountMint extends string, TAccountDelegate extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ApproveCheckedInput< TAccountSource, TAccountMint, TAccountDelegate, TAccountOwner - > + >, + config?: { programAddress?: TProgramAddress } ): ApproveCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDelegate, @@ -151,7 +153,7 @@ export function getApproveCheckedInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -191,7 +193,7 @@ export function getApproveCheckedInstruction< args as ApproveCheckedInstructionDataArgs ), } as ApproveCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDelegate, diff --git a/clients/js/src/generated/instructions/approveConfidentialTransferAccount.ts b/clients/js/src/generated/instructions/approveConfidentialTransferAccount.ts index f31c186..6854598 100644 --- a/clients/js/src/generated/instructions/approveConfidentialTransferAccount.ts +++ b/clients/js/src/generated/instructions/approveConfidentialTransferAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -126,20 +126,22 @@ export function getApproveConfidentialTransferAccountInstruction< TAccountToken extends string, TAccountMint extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ApproveConfidentialTransferAccountInput< TAccountToken, TAccountMint, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ApproveConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -164,7 +166,7 @@ export function getApproveConfidentialTransferAccountInstruction< {} ), } as ApproveConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountAuthority diff --git a/clients/js/src/generated/instructions/burn.ts b/clients/js/src/generated/instructions/burn.ts index a200aac..410925e 100644 --- a/clients/js/src/generated/instructions/burn.ts +++ b/clients/js/src/generated/instructions/burn.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -116,10 +116,12 @@ export function getBurnInstruction< TAccountAccount extends string, TAccountMint extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: BurnInput + input: BurnInput, + config?: { programAddress?: TProgramAddress } ): BurnInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['authority'] extends TransactionSigner @@ -128,7 +130,7 @@ export function getBurnInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -166,7 +168,7 @@ export function getBurnInstruction< args as BurnInstructionDataArgs ), } as BurnInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['authority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/burnChecked.ts b/clients/js/src/generated/instructions/burnChecked.ts index 7df1528..9519af6 100644 --- a/clients/js/src/generated/instructions/burnChecked.ts +++ b/clients/js/src/generated/instructions/burnChecked.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -126,10 +126,12 @@ export function getBurnCheckedInstruction< TAccountAccount extends string, TAccountMint extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: BurnCheckedInput + input: BurnCheckedInput, + config?: { programAddress?: TProgramAddress } ): BurnCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['authority'] extends TransactionSigner @@ -138,7 +140,7 @@ export function getBurnCheckedInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -176,7 +178,7 @@ export function getBurnCheckedInstruction< args as BurnCheckedInstructionDataArgs ), } as BurnCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['authority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/closeAccount.ts b/clients/js/src/generated/instructions/closeAccount.ts index 46ba9b8..c260017 100644 --- a/clients/js/src/generated/instructions/closeAccount.ts +++ b/clients/js/src/generated/instructions/closeAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -103,10 +103,12 @@ export function getCloseAccountInstruction< TAccountAccount extends string, TAccountDestination extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: CloseAccountInput + input: CloseAccountInput, + config?: { programAddress?: TProgramAddress } ): CloseAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountDestination, (typeof input)['owner'] extends TransactionSigner @@ -114,7 +116,7 @@ export function getCloseAccountInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -150,7 +152,7 @@ export function getCloseAccountInstruction< programAddress, data: getCloseAccountInstructionDataEncoder().encode({}), } as CloseAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountDestination, (typeof input)['owner'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/confidentialDeposit.ts b/clients/js/src/generated/instructions/confidentialDeposit.ts index b183b29..ec59396 100644 --- a/clients/js/src/generated/instructions/confidentialDeposit.ts +++ b/clients/js/src/generated/instructions/confidentialDeposit.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -142,14 +142,16 @@ export function getConfidentialDepositInstruction< TAccountToken extends string, TAccountMint extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ConfidentialDepositInput< TAccountToken, TAccountMint, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ConfidentialDepositInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, (typeof input)['authority'] extends TransactionSigner @@ -158,7 +160,7 @@ export function getConfidentialDepositInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -196,7 +198,7 @@ export function getConfidentialDepositInstruction< args as ConfidentialDepositInstructionDataArgs ), } as ConfidentialDepositInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, (typeof input)['authority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/confidentialTransfer.ts b/clients/js/src/generated/instructions/confidentialTransfer.ts index 6edc7eb..57a1a97 100644 --- a/clients/js/src/generated/instructions/confidentialTransfer.ts +++ b/clients/js/src/generated/instructions/confidentialTransfer.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -236,6 +236,7 @@ export function getConfidentialTransferInstruction< TAccountCiphertextValidityRecord extends string, TAccountRangeRecord extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ConfidentialTransferInput< TAccountSourceToken, @@ -246,9 +247,10 @@ export function getConfidentialTransferInstruction< TAccountCiphertextValidityRecord, TAccountRangeRecord, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ConfidentialTransferInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSourceToken, TAccountMint, TAccountDestinationToken, @@ -262,7 +264,7 @@ export function getConfidentialTransferInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -319,7 +321,7 @@ export function getConfidentialTransferInstruction< args as ConfidentialTransferInstructionDataArgs ), } as ConfidentialTransferInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSourceToken, TAccountMint, TAccountDestinationToken, diff --git a/clients/js/src/generated/instructions/confidentialTransferWithFee.ts b/clients/js/src/generated/instructions/confidentialTransferWithFee.ts index e2e2cf0..d8ef2bc 100644 --- a/clients/js/src/generated/instructions/confidentialTransferWithFee.ts +++ b/clients/js/src/generated/instructions/confidentialTransferWithFee.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -300,6 +300,7 @@ export function getConfidentialTransferWithFeeInstruction< TAccountFeeCiphertextValidityRecord extends string, TAccountRangeRecord extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ConfidentialTransferWithFeeInput< TAccountSourceToken, @@ -312,9 +313,10 @@ export function getConfidentialTransferWithFeeInstruction< TAccountFeeCiphertextValidityRecord, TAccountRangeRecord, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ConfidentialTransferWithFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSourceToken, TAccountMint, TAccountDestinationToken, @@ -330,7 +332,7 @@ export function getConfidentialTransferWithFeeInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -394,7 +396,7 @@ export function getConfidentialTransferWithFeeInstruction< args as ConfidentialTransferWithFeeInstructionDataArgs ), } as ConfidentialTransferWithFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSourceToken, TAccountMint, TAccountDestinationToken, diff --git a/clients/js/src/generated/instructions/confidentialWithdraw.ts b/clients/js/src/generated/instructions/confidentialWithdraw.ts index f69b059..c7a8914 100644 --- a/clients/js/src/generated/instructions/confidentialWithdraw.ts +++ b/clients/js/src/generated/instructions/confidentialWithdraw.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -217,6 +217,7 @@ export function getConfidentialWithdrawInstruction< TAccountEqualityRecord extends string, TAccountRangeRecord extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ConfidentialWithdrawInput< TAccountToken, @@ -225,9 +226,10 @@ export function getConfidentialWithdrawInstruction< TAccountEqualityRecord, TAccountRangeRecord, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ConfidentialWithdrawInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountInstructionsSysvar, @@ -239,7 +241,7 @@ export function getConfidentialWithdrawInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -286,7 +288,7 @@ export function getConfidentialWithdrawInstruction< args as ConfidentialWithdrawInstructionDataArgs ), } as ConfidentialWithdrawInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountInstructionsSysvar, diff --git a/clients/js/src/generated/instructions/configureConfidentialTransferAccount.ts b/clients/js/src/generated/instructions/configureConfidentialTransferAccount.ts index 6fd8e64..dadeb0b 100644 --- a/clients/js/src/generated/instructions/configureConfidentialTransferAccount.ts +++ b/clients/js/src/generated/instructions/configureConfidentialTransferAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -198,6 +198,7 @@ export function getConfigureConfidentialTransferAccountInstruction< TAccountInstructionsSysvarOrContextState extends string, TAccountRecord extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ConfigureConfidentialTransferAccountInput< TAccountToken, @@ -205,9 +206,10 @@ export function getConfigureConfidentialTransferAccountInstruction< TAccountInstructionsSysvarOrContextState, TAccountRecord, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): ConfigureConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountInstructionsSysvarOrContextState, @@ -218,7 +220,7 @@ export function getConfigureConfidentialTransferAccountInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -269,7 +271,7 @@ export function getConfigureConfidentialTransferAccountInstruction< args as ConfigureConfidentialTransferAccountInstructionDataArgs ), } as ConfigureConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountMint, TAccountInstructionsSysvarOrContextState, diff --git a/clients/js/src/generated/instructions/createAssociatedToken.ts b/clients/js/src/generated/instructions/createAssociatedToken.ts index bb14991..d9bf75f 100644 --- a/clients/js/src/generated/instructions/createAssociatedToken.ts +++ b/clients/js/src/generated/instructions/createAssociatedToken.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -136,6 +136,7 @@ export async function getCreateAssociatedTokenInstructionAsync< TAccountMint extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: CreateAssociatedTokenAsyncInput< TAccountPayer, @@ -144,10 +145,11 @@ export async function getCreateAssociatedTokenInstructionAsync< TAccountMint, TAccountSystemProgram, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): Promise< CreateAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -157,7 +159,8 @@ export async function getCreateAssociatedTokenInstructionAsync< > > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -203,7 +206,7 @@ export async function getCreateAssociatedTokenInstructionAsync< programAddress, data: getCreateAssociatedTokenInstructionDataEncoder().encode({}), } as CreateAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -244,6 +247,7 @@ export function getCreateAssociatedTokenInstruction< TAccountMint extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: CreateAssociatedTokenInput< TAccountPayer, @@ -252,9 +256,10 @@ export function getCreateAssociatedTokenInstruction< TAccountMint, TAccountSystemProgram, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): CreateAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -263,7 +268,8 @@ export function getCreateAssociatedTokenInstruction< TAccountTokenProgram > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -302,7 +308,7 @@ export function getCreateAssociatedTokenInstruction< programAddress, data: getCreateAssociatedTokenInstructionDataEncoder().encode({}), } as CreateAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, diff --git a/clients/js/src/generated/instructions/createAssociatedTokenIdempotent.ts b/clients/js/src/generated/instructions/createAssociatedTokenIdempotent.ts index b102a74..72241a3 100644 --- a/clients/js/src/generated/instructions/createAssociatedTokenIdempotent.ts +++ b/clients/js/src/generated/instructions/createAssociatedTokenIdempotent.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -140,6 +140,7 @@ export async function getCreateAssociatedTokenIdempotentInstructionAsync< TAccountMint extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: CreateAssociatedTokenIdempotentAsyncInput< TAccountPayer, @@ -148,10 +149,11 @@ export async function getCreateAssociatedTokenIdempotentInstructionAsync< TAccountMint, TAccountSystemProgram, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): Promise< CreateAssociatedTokenIdempotentInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -161,7 +163,8 @@ export async function getCreateAssociatedTokenIdempotentInstructionAsync< > > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -207,7 +210,7 @@ export async function getCreateAssociatedTokenIdempotentInstructionAsync< programAddress, data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}), } as CreateAssociatedTokenIdempotentInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -248,6 +251,7 @@ export function getCreateAssociatedTokenIdempotentInstruction< TAccountMint extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: CreateAssociatedTokenIdempotentInput< TAccountPayer, @@ -256,9 +260,10 @@ export function getCreateAssociatedTokenIdempotentInstruction< TAccountMint, TAccountSystemProgram, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): CreateAssociatedTokenIdempotentInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, @@ -267,7 +272,8 @@ export function getCreateAssociatedTokenIdempotentInstruction< TAccountTokenProgram > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -306,7 +312,7 @@ export function getCreateAssociatedTokenIdempotentInstruction< programAddress, data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}), } as CreateAssociatedTokenIdempotentInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountPayer, TAccountAta, TAccountOwner, diff --git a/clients/js/src/generated/instructions/disableConfidentialCredits.ts b/clients/js/src/generated/instructions/disableConfidentialCredits.ts index 03d59e5..f094a26 100644 --- a/clients/js/src/generated/instructions/disableConfidentialCredits.ts +++ b/clients/js/src/generated/instructions/disableConfidentialCredits.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,10 +117,12 @@ export type DisableConfidentialCreditsInput< export function getDisableConfidentialCreditsInstruction< TAccountToken extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: DisableConfidentialCreditsInput + input: DisableConfidentialCreditsInput, + config?: { programAddress?: TProgramAddress } ): DisableConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -128,7 +130,7 @@ export function getDisableConfidentialCreditsInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -162,7 +164,7 @@ export function getDisableConfidentialCreditsInstruction< programAddress, data: getDisableConfidentialCreditsInstructionDataEncoder().encode({}), } as DisableConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/disableMemoTransfers.ts b/clients/js/src/generated/instructions/disableMemoTransfers.ts index 99701a4..f3402e6 100644 --- a/clients/js/src/generated/instructions/disableMemoTransfers.ts +++ b/clients/js/src/generated/instructions/disableMemoTransfers.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,17 +117,19 @@ export type DisableMemoTransfersInput< export function getDisableMemoTransfersInstruction< TAccountToken extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: DisableMemoTransfersInput + input: DisableMemoTransfersInput, + config?: { programAddress?: TProgramAddress } ): DisableMemoTransfersInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -161,7 +163,7 @@ export function getDisableMemoTransfersInstruction< programAddress, data: getDisableMemoTransfersInstructionDataEncoder().encode({}), } as DisableMemoTransfersInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta diff --git a/clients/js/src/generated/instructions/disableNonConfidentialCredits.ts b/clients/js/src/generated/instructions/disableNonConfidentialCredits.ts index f1e3a81..3eab46c 100644 --- a/clients/js/src/generated/instructions/disableNonConfidentialCredits.ts +++ b/clients/js/src/generated/instructions/disableNonConfidentialCredits.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,10 +117,12 @@ export type DisableNonConfidentialCreditsInput< export function getDisableNonConfidentialCreditsInstruction< TAccountToken extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: DisableNonConfidentialCreditsInput + input: DisableNonConfidentialCreditsInput, + config?: { programAddress?: TProgramAddress } ): DisableNonConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -128,7 +130,7 @@ export function getDisableNonConfidentialCreditsInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -162,7 +164,7 @@ export function getDisableNonConfidentialCreditsInstruction< programAddress, data: getDisableNonConfidentialCreditsInstructionDataEncoder().encode({}), } as DisableNonConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/emptyConfidentialTransferAccount.ts b/clients/js/src/generated/instructions/emptyConfidentialTransferAccount.ts index eab946d..ab7fe9c 100644 --- a/clients/js/src/generated/instructions/emptyConfidentialTransferAccount.ts +++ b/clients/js/src/generated/instructions/emptyConfidentialTransferAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -160,15 +160,17 @@ export function getEmptyConfidentialTransferAccountInstruction< TAccountInstructionsSysvarOrContextState extends string, TAccountRecord extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: EmptyConfidentialTransferAccountInput< TAccountToken, TAccountInstructionsSysvarOrContextState, TAccountRecord, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): EmptyConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountInstructionsSysvarOrContextState, TAccountRecord, @@ -178,7 +180,7 @@ export function getEmptyConfidentialTransferAccountInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -227,7 +229,7 @@ export function getEmptyConfidentialTransferAccountInstruction< args as EmptyConfidentialTransferAccountInstructionDataArgs ), } as EmptyConfidentialTransferAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountInstructionsSysvarOrContextState, TAccountRecord, diff --git a/clients/js/src/generated/instructions/enableConfidentialCredits.ts b/clients/js/src/generated/instructions/enableConfidentialCredits.ts index d9d8372..7e8bce8 100644 --- a/clients/js/src/generated/instructions/enableConfidentialCredits.ts +++ b/clients/js/src/generated/instructions/enableConfidentialCredits.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,10 +117,12 @@ export type EnableConfidentialCreditsInput< export function getEnableConfidentialCreditsInstruction< TAccountToken extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: EnableConfidentialCreditsInput + input: EnableConfidentialCreditsInput, + config?: { programAddress?: TProgramAddress } ): EnableConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -128,7 +130,7 @@ export function getEnableConfidentialCreditsInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -162,7 +164,7 @@ export function getEnableConfidentialCreditsInstruction< programAddress, data: getEnableConfidentialCreditsInstructionDataEncoder().encode({}), } as EnableConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/enableMemoTransfers.ts b/clients/js/src/generated/instructions/enableMemoTransfers.ts index 3d8037a..0d45389 100644 --- a/clients/js/src/generated/instructions/enableMemoTransfers.ts +++ b/clients/js/src/generated/instructions/enableMemoTransfers.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,17 +117,19 @@ export type EnableMemoTransfersInput< export function getEnableMemoTransfersInstruction< TAccountToken extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: EnableMemoTransfersInput + input: EnableMemoTransfersInput, + config?: { programAddress?: TProgramAddress } ): EnableMemoTransfersInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -161,7 +163,7 @@ export function getEnableMemoTransfersInstruction< programAddress, data: getEnableMemoTransfersInstructionDataEncoder().encode({}), } as EnableMemoTransfersInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta diff --git a/clients/js/src/generated/instructions/enableNonConfidentialCredits.ts b/clients/js/src/generated/instructions/enableNonConfidentialCredits.ts index b6e7866..9784017 100644 --- a/clients/js/src/generated/instructions/enableNonConfidentialCredits.ts +++ b/clients/js/src/generated/instructions/enableNonConfidentialCredits.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,10 +117,12 @@ export type EnableNonConfidentialCreditsInput< export function getEnableNonConfidentialCreditsInstruction< TAccountToken extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: EnableNonConfidentialCreditsInput + input: EnableNonConfidentialCreditsInput, + config?: { programAddress?: TProgramAddress } ): EnableNonConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -128,7 +130,7 @@ export function getEnableNonConfidentialCreditsInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -162,7 +164,7 @@ export function getEnableNonConfidentialCreditsInstruction< programAddress, data: getEnableNonConfidentialCreditsInstructionDataEncoder().encode({}), } as EnableNonConfidentialCreditsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, (typeof input)['authority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/freezeAccount.ts b/clients/js/src/generated/instructions/freezeAccount.ts index 145dc77..7b8fbd8 100644 --- a/clients/js/src/generated/instructions/freezeAccount.ts +++ b/clients/js/src/generated/instructions/freezeAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -103,10 +103,12 @@ export function getFreezeAccountInstruction< TAccountAccount extends string, TAccountMint extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: FreezeAccountInput + input: FreezeAccountInput, + config?: { programAddress?: TProgramAddress } ): FreezeAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['owner'] extends TransactionSigner @@ -114,7 +116,7 @@ export function getFreezeAccountInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -150,7 +152,7 @@ export function getFreezeAccountInstruction< programAddress, data: getFreezeAccountInstructionDataEncoder().encode({}), } as FreezeAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['owner'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/getAccountDataSize.ts b/clients/js/src/generated/instructions/getAccountDataSize.ts index 5dd8b13..c5bed45 100644 --- a/clients/js/src/generated/instructions/getAccountDataSize.ts +++ b/clients/js/src/generated/instructions/getAccountDataSize.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -80,14 +80,15 @@ export type GetAccountDataSizeInput = { mint: Address; }; -export function getGetAccountDataSizeInstruction( - input: GetAccountDataSizeInput -): GetAccountDataSizeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { +export function getGetAccountDataSizeInstruction< + TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, +>( + input: GetAccountDataSizeInput, + config?: { programAddress?: TProgramAddress } +): GetAccountDataSizeInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -103,10 +104,7 @@ export function getGetAccountDataSizeInstruction( accounts: [getAccountMeta(accounts.mint)], programAddress, data: getGetAccountDataSizeInstructionDataEncoder().encode({}), - } as GetAccountDataSizeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as GetAccountDataSizeInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/harvestWithheldTokensToMint.ts b/clients/js/src/generated/instructions/harvestWithheldTokensToMint.ts index 6894898..e7c2efb 100644 --- a/clients/js/src/generated/instructions/harvestWithheldTokensToMint.ts +++ b/clients/js/src/generated/instructions/harvestWithheldTokensToMint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -105,14 +105,13 @@ export type HarvestWithheldTokensToMintInput< export function getHarvestWithheldTokensToMintInstruction< TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: HarvestWithheldTokensToMintInput -): HarvestWithheldTokensToMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { + input: HarvestWithheldTokensToMintInput, + config?: { programAddress?: TProgramAddress } +): HarvestWithheldTokensToMintInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -137,10 +136,7 @@ export function getHarvestWithheldTokensToMintInstruction< accounts: [getAccountMeta(accounts.mint), ...remainingAccounts], programAddress, data: getHarvestWithheldTokensToMintInstructionDataEncoder().encode({}), - } as HarvestWithheldTokensToMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as HarvestWithheldTokensToMintInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/index.ts b/clients/js/src/generated/instructions/index.ts index 6c82264..18cf032 100644 --- a/clients/js/src/generated/instructions/index.ts +++ b/clients/js/src/generated/instructions/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './amountToUiAmount'; diff --git a/clients/js/src/generated/instructions/initializeAccount.ts b/clients/js/src/generated/instructions/initializeAccount.ts index 9ec7e2d..fcf3dbd 100644 --- a/clients/js/src/generated/instructions/initializeAccount.ts +++ b/clients/js/src/generated/instructions/initializeAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -108,22 +108,24 @@ export function getInitializeAccountInstruction< TAccountMint extends string, TAccountOwner extends string, TAccountRent extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: InitializeAccountInput< TAccountAccount, TAccountMint, TAccountOwner, TAccountRent - > + >, + config?: { programAddress?: TProgramAddress } ): InitializeAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, TAccountOwner, TAccountRent > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -154,7 +156,7 @@ export function getInitializeAccountInstruction< programAddress, data: getInitializeAccountInstructionDataEncoder().encode({}), } as InitializeAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, TAccountOwner, diff --git a/clients/js/src/generated/instructions/initializeAccount2.ts b/clients/js/src/generated/instructions/initializeAccount2.ts index bcd0773..838e4a6 100644 --- a/clients/js/src/generated/instructions/initializeAccount2.ts +++ b/clients/js/src/generated/instructions/initializeAccount2.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -116,16 +116,18 @@ export function getInitializeAccount2Instruction< TAccountAccount extends string, TAccountMint extends string, TAccountRent extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeAccount2Input + input: InitializeAccount2Input, + config?: { programAddress?: TProgramAddress } ): InitializeAccount2Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, TAccountRent > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -159,7 +161,7 @@ export function getInitializeAccount2Instruction< args as InitializeAccount2InstructionDataArgs ), } as InitializeAccount2Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, TAccountRent diff --git a/clients/js/src/generated/instructions/initializeAccount3.ts b/clients/js/src/generated/instructions/initializeAccount3.ts index f4c7cae..b408738 100644 --- a/clients/js/src/generated/instructions/initializeAccount3.ts +++ b/clients/js/src/generated/instructions/initializeAccount3.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -106,15 +106,17 @@ export type InitializeAccount3Input< export function getInitializeAccount3Instruction< TAccountAccount extends string, TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeAccount3Input + input: InitializeAccount3Input, + config?: { programAddress?: TProgramAddress } ): InitializeAccount3Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -137,7 +139,7 @@ export function getInitializeAccount3Instruction< args as InitializeAccount3InstructionDataArgs ), } as InitializeAccount3Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint >; diff --git a/clients/js/src/generated/instructions/initializeConfidentialTransferMint.ts b/clients/js/src/generated/instructions/initializeConfidentialTransferMint.ts index d53d97b..f5dd2bd 100644 --- a/clients/js/src/generated/instructions/initializeConfidentialTransferMint.ts +++ b/clients/js/src/generated/instructions/initializeConfidentialTransferMint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -171,14 +171,16 @@ export type InitializeConfidentialTransferMintInput< export function getInitializeConfidentialTransferMintInstruction< TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeConfidentialTransferMintInput + input: InitializeConfidentialTransferMintInput, + config?: { programAddress?: TProgramAddress } ): InitializeConfidentialTransferMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -200,7 +202,7 @@ export function getInitializeConfidentialTransferMintInstruction< args as InitializeConfidentialTransferMintInstructionDataArgs ), } as InitializeConfidentialTransferMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint >; diff --git a/clients/js/src/generated/instructions/initializeDefaultAccountState.ts b/clients/js/src/generated/instructions/initializeDefaultAccountState.ts index f4dadb8..94620f2 100644 --- a/clients/js/src/generated/instructions/initializeDefaultAccountState.ts +++ b/clients/js/src/generated/instructions/initializeDefaultAccountState.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -117,14 +117,13 @@ export type InitializeDefaultAccountStateInput< export function getInitializeDefaultAccountStateInstruction< TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeDefaultAccountStateInput -): InitializeDefaultAccountStateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { + input: InitializeDefaultAccountStateInput, + config?: { programAddress?: TProgramAddress } +): InitializeDefaultAccountStateInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -145,10 +144,7 @@ export function getInitializeDefaultAccountStateInstruction< data: getInitializeDefaultAccountStateInstructionDataEncoder().encode( args as InitializeDefaultAccountStateInstructionDataArgs ), - } as InitializeDefaultAccountStateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as InitializeDefaultAccountStateInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeImmutableOwner.ts b/clients/js/src/generated/instructions/initializeImmutableOwner.ts index 3e6991c..fc33e01 100644 --- a/clients/js/src/generated/instructions/initializeImmutableOwner.ts +++ b/clients/js/src/generated/instructions/initializeImmutableOwner.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -84,14 +84,13 @@ export type InitializeImmutableOwnerInput< export function getInitializeImmutableOwnerInstruction< TAccountAccount extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeImmutableOwnerInput -): InitializeImmutableOwnerInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountAccount -> { + input: InitializeImmutableOwnerInput, + config?: { programAddress?: TProgramAddress } +): InitializeImmutableOwnerInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -107,10 +106,7 @@ export function getInitializeImmutableOwnerInstruction< accounts: [getAccountMeta(accounts.account)], programAddress, data: getInitializeImmutableOwnerInstructionDataEncoder().encode({}), - } as InitializeImmutableOwnerInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountAccount - >; + } as InitializeImmutableOwnerInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeMint.ts b/clients/js/src/generated/instructions/initializeMint.ts index 1b27ec5..ab71c0e 100644 --- a/clients/js/src/generated/instructions/initializeMint.ts +++ b/clients/js/src/generated/instructions/initializeMint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -131,15 +131,13 @@ export type InitializeMintInput< export function getInitializeMintInstruction< TAccountMint extends string, TAccountRent extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeMintInput -): InitializeMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint, - TAccountRent -> { + input: InitializeMintInput, + config?: { programAddress?: TProgramAddress } +): InitializeMintInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -167,11 +165,7 @@ export function getInitializeMintInstruction< data: getInitializeMintInstructionDataEncoder().encode( args as InitializeMintInstructionDataArgs ), - } as InitializeMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint, - TAccountRent - >; + } as InitializeMintInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeMint2.ts b/clients/js/src/generated/instructions/initializeMint2.ts index d982a72..41916a0 100644 --- a/clients/js/src/generated/instructions/initializeMint2.ts +++ b/clients/js/src/generated/instructions/initializeMint2.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -116,11 +116,15 @@ export type InitializeMint2Input = { freezeAuthority?: InitializeMint2InstructionDataArgs['freezeAuthority']; }; -export function getInitializeMint2Instruction( - input: InitializeMint2Input -): InitializeMint2Instruction { +export function getInitializeMint2Instruction< + TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, +>( + input: InitializeMint2Input, + config?: { programAddress?: TProgramAddress } +): InitializeMint2Instruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -141,10 +145,7 @@ export function getInitializeMint2Instruction( data: getInitializeMint2InstructionDataEncoder().encode( args as InitializeMint2InstructionDataArgs ), - } as InitializeMint2Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as InitializeMint2Instruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeMintCloseAuthority.ts b/clients/js/src/generated/instructions/initializeMintCloseAuthority.ts index 3cddb2c..110050d 100644 --- a/clients/js/src/generated/instructions/initializeMintCloseAuthority.ts +++ b/clients/js/src/generated/instructions/initializeMintCloseAuthority.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -104,14 +104,13 @@ export type InitializeMintCloseAuthorityInput< export function getInitializeMintCloseAuthorityInstruction< TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeMintCloseAuthorityInput -): InitializeMintCloseAuthorityInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { + input: InitializeMintCloseAuthorityInput, + config?: { programAddress?: TProgramAddress } +): InitializeMintCloseAuthorityInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -132,10 +131,7 @@ export function getInitializeMintCloseAuthorityInstruction< data: getInitializeMintCloseAuthorityInstructionDataEncoder().encode( args as InitializeMintCloseAuthorityInstructionDataArgs ), - } as InitializeMintCloseAuthorityInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as InitializeMintCloseAuthorityInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeMultisig.ts b/clients/js/src/generated/instructions/initializeMultisig.ts index 6fac79a..7526f38 100644 --- a/clients/js/src/generated/instructions/initializeMultisig.ts +++ b/clients/js/src/generated/instructions/initializeMultisig.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -108,15 +108,17 @@ export type InitializeMultisigInput< export function getInitializeMultisigInstruction< TAccountMultisig extends string, TAccountRent extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeMultisigInput + input: InitializeMultisigInput, + config?: { programAddress?: TProgramAddress } ): InitializeMultisigInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMultisig, TAccountRent > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -155,7 +157,7 @@ export function getInitializeMultisigInstruction< args as InitializeMultisigInstructionDataArgs ), } as InitializeMultisigInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMultisig, TAccountRent >; diff --git a/clients/js/src/generated/instructions/initializeMultisig2.ts b/clients/js/src/generated/instructions/initializeMultisig2.ts index 2acfe1a..1e1cc32 100644 --- a/clients/js/src/generated/instructions/initializeMultisig2.ts +++ b/clients/js/src/generated/instructions/initializeMultisig2.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -96,14 +96,13 @@ export type InitializeMultisig2Input = export function getInitializeMultisig2Instruction< TAccountMultisig extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeMultisig2Input -): InitializeMultisig2Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMultisig -> { + input: InitializeMultisig2Input, + config?: { programAddress?: TProgramAddress } +): InitializeMultisig2Instruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -130,10 +129,7 @@ export function getInitializeMultisig2Instruction< data: getInitializeMultisig2InstructionDataEncoder().encode( args as InitializeMultisig2InstructionDataArgs ), - } as InitializeMultisig2Instruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMultisig - >; + } as InitializeMultisig2Instruction; return instruction; } diff --git a/clients/js/src/generated/instructions/initializeTransferFeeConfig.ts b/clients/js/src/generated/instructions/initializeTransferFeeConfig.ts index fe9cafb..419f049 100644 --- a/clients/js/src/generated/instructions/initializeTransferFeeConfig.ts +++ b/clients/js/src/generated/instructions/initializeTransferFeeConfig.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -142,14 +142,13 @@ export type InitializeTransferFeeConfigInput< export function getInitializeTransferFeeConfigInstruction< TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: InitializeTransferFeeConfigInput -): InitializeTransferFeeConfigInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { + input: InitializeTransferFeeConfigInput, + config?: { programAddress?: TProgramAddress } +): InitializeTransferFeeConfigInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -170,10 +169,7 @@ export function getInitializeTransferFeeConfigInstruction< data: getInitializeTransferFeeConfigInstructionDataEncoder().encode( args as InitializeTransferFeeConfigInstructionDataArgs ), - } as InitializeTransferFeeConfigInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as InitializeTransferFeeConfigInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/mintTo.ts b/clients/js/src/generated/instructions/mintTo.ts index 779b5b6..b227c1c 100644 --- a/clients/js/src/generated/instructions/mintTo.ts +++ b/clients/js/src/generated/instructions/mintTo.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -121,10 +121,12 @@ export function getMintToInstruction< TAccountMint extends string, TAccountToken extends string, TAccountMintAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: MintToInput + input: MintToInput, + config?: { programAddress?: TProgramAddress } ): MintToInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountToken, (typeof input)['mintAuthority'] extends TransactionSigner @@ -133,7 +135,7 @@ export function getMintToInstruction< : TAccountMintAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -171,7 +173,7 @@ export function getMintToInstruction< args as MintToInstructionDataArgs ), } as MintToInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountToken, (typeof input)['mintAuthority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/mintToChecked.ts b/clients/js/src/generated/instructions/mintToChecked.ts index 10869da..01ec423 100644 --- a/clients/js/src/generated/instructions/mintToChecked.ts +++ b/clients/js/src/generated/instructions/mintToChecked.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -128,10 +128,12 @@ export function getMintToCheckedInstruction< TAccountMint extends string, TAccountToken extends string, TAccountMintAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: MintToCheckedInput + input: MintToCheckedInput, + config?: { programAddress?: TProgramAddress } ): MintToCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountToken, (typeof input)['mintAuthority'] extends TransactionSigner @@ -140,7 +142,7 @@ export function getMintToCheckedInstruction< : TAccountMintAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -178,7 +180,7 @@ export function getMintToCheckedInstruction< args as MintToCheckedInstructionDataArgs ), } as MintToCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountToken, (typeof input)['mintAuthority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/reallocate.ts b/clients/js/src/generated/instructions/reallocate.ts index c724d97..bb32492 100644 --- a/clients/js/src/generated/instructions/reallocate.ts +++ b/clients/js/src/generated/instructions/reallocate.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -143,15 +143,17 @@ export function getReallocateInstruction< TAccountPayer extends string, TAccountSystemProgram extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: ReallocateInput< TAccountToken, TAccountPayer, TAccountSystemProgram, TAccountOwner - > + >, + config?: { programAddress?: TProgramAddress } ): ReallocateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountPayer, TAccountSystemProgram, @@ -160,7 +162,7 @@ export function getReallocateInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -206,7 +208,7 @@ export function getReallocateInstruction< args as ReallocateInstructionDataArgs ), } as ReallocateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountToken, TAccountPayer, TAccountSystemProgram, diff --git a/clients/js/src/generated/instructions/recoverNestedAssociatedToken.ts b/clients/js/src/generated/instructions/recoverNestedAssociatedToken.ts index 33c601a..e97c0b3 100644 --- a/clients/js/src/generated/instructions/recoverNestedAssociatedToken.ts +++ b/clients/js/src/generated/instructions/recoverNestedAssociatedToken.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -152,6 +152,7 @@ export async function getRecoverNestedAssociatedTokenInstructionAsync< TAccountOwnerTokenMintAddress extends string, TAccountWalletAddress extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: RecoverNestedAssociatedTokenAsyncInput< TAccountNestedAssociatedAccountAddress, @@ -161,10 +162,11 @@ export async function getRecoverNestedAssociatedTokenInstructionAsync< TAccountOwnerTokenMintAddress, TAccountWalletAddress, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): Promise< RecoverNestedAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountNestedAssociatedAccountAddress, TAccountNestedTokenMintAddress, TAccountDestinationAssociatedAccountAddress, @@ -175,7 +177,8 @@ export async function getRecoverNestedAssociatedTokenInstructionAsync< > > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -252,7 +255,7 @@ export async function getRecoverNestedAssociatedTokenInstructionAsync< programAddress, data: getRecoverNestedAssociatedTokenInstructionDataEncoder().encode({}), } as RecoverNestedAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountNestedAssociatedAccountAddress, TAccountNestedTokenMintAddress, TAccountDestinationAssociatedAccountAddress, @@ -298,6 +301,7 @@ export function getRecoverNestedAssociatedTokenInstruction< TAccountOwnerTokenMintAddress extends string, TAccountWalletAddress extends string, TAccountTokenProgram extends string, + TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, >( input: RecoverNestedAssociatedTokenInput< TAccountNestedAssociatedAccountAddress, @@ -307,9 +311,10 @@ export function getRecoverNestedAssociatedTokenInstruction< TAccountOwnerTokenMintAddress, TAccountWalletAddress, TAccountTokenProgram - > + >, + config?: { programAddress?: TProgramAddress } ): RecoverNestedAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountNestedAssociatedAccountAddress, TAccountNestedTokenMintAddress, TAccountDestinationAssociatedAccountAddress, @@ -319,7 +324,8 @@ export function getRecoverNestedAssociatedTokenInstruction< TAccountTokenProgram > { // Program address. - const programAddress = ASSOCIATED_TOKEN_PROGRAM_ADDRESS; + const programAddress = + config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -371,7 +377,7 @@ export function getRecoverNestedAssociatedTokenInstruction< programAddress, data: getRecoverNestedAssociatedTokenInstructionDataEncoder().encode({}), } as RecoverNestedAssociatedTokenInstruction< - typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS, + TProgramAddress, TAccountNestedAssociatedAccountAddress, TAccountNestedTokenMintAddress, TAccountDestinationAssociatedAccountAddress, diff --git a/clients/js/src/generated/instructions/revoke.ts b/clients/js/src/generated/instructions/revoke.ts index 71524be..f5f21db 100644 --- a/clients/js/src/generated/instructions/revoke.ts +++ b/clients/js/src/generated/instructions/revoke.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -95,17 +95,19 @@ export type RevokeInput< export function getRevokeInstruction< TAccountSource extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: RevokeInput + input: RevokeInput, + config?: { programAddress?: TProgramAddress } ): RevokeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -139,7 +141,7 @@ export function getRevokeInstruction< programAddress, data: getRevokeInstructionDataEncoder().encode({}), } as RevokeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta diff --git a/clients/js/src/generated/instructions/setAuthority.ts b/clients/js/src/generated/instructions/setAuthority.ts index edb424f..9620579 100644 --- a/clients/js/src/generated/instructions/setAuthority.ts +++ b/clients/js/src/generated/instructions/setAuthority.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -128,17 +128,19 @@ export type SetAuthorityInput< export function getSetAuthorityInstruction< TAccountOwned extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: SetAuthorityInput + input: SetAuthorityInput, + config?: { programAddress?: TProgramAddress } ): SetAuthorityInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountOwned, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -174,7 +176,7 @@ export function getSetAuthorityInstruction< args as SetAuthorityInstructionDataArgs ), } as SetAuthorityInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountOwned, (typeof input)['owner'] extends TransactionSigner ? ReadonlySignerAccount & IAccountSignerMeta diff --git a/clients/js/src/generated/instructions/setTransferFee.ts b/clients/js/src/generated/instructions/setTransferFee.ts index e1c35f5..89f6c2d 100644 --- a/clients/js/src/generated/instructions/setTransferFee.ts +++ b/clients/js/src/generated/instructions/setTransferFee.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -137,10 +137,12 @@ export type SetTransferFeeInput< export function getSetTransferFeeInstruction< TAccountMint extends string, TAccountTransferFeeConfigAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: SetTransferFeeInput + input: SetTransferFeeInput, + config?: { programAddress?: TProgramAddress } ): SetTransferFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, (typeof input)['transferFeeConfigAuthority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -148,7 +150,7 @@ export function getSetTransferFeeInstruction< : TAccountTransferFeeConfigAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -187,7 +189,7 @@ export function getSetTransferFeeInstruction< args as SetTransferFeeInstructionDataArgs ), } as SetTransferFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, (typeof input)['transferFeeConfigAuthority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/syncNative.ts b/clients/js/src/generated/instructions/syncNative.ts index 85f2bb6..7fc1af3 100644 --- a/clients/js/src/generated/instructions/syncNative.ts +++ b/clients/js/src/generated/instructions/syncNative.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -77,11 +77,15 @@ export type SyncNativeInput = { account: Address; }; -export function getSyncNativeInstruction( - input: SyncNativeInput -): SyncNativeInstruction { +export function getSyncNativeInstruction< + TAccountAccount extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, +>( + input: SyncNativeInput, + config?: { programAddress?: TProgramAddress } +): SyncNativeInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -97,10 +101,7 @@ export function getSyncNativeInstruction( accounts: [getAccountMeta(accounts.account)], programAddress, data: getSyncNativeInstructionDataEncoder().encode({}), - } as SyncNativeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountAccount - >; + } as SyncNativeInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/thawAccount.ts b/clients/js/src/generated/instructions/thawAccount.ts index a692637..7cfa199 100644 --- a/clients/js/src/generated/instructions/thawAccount.ts +++ b/clients/js/src/generated/instructions/thawAccount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -103,10 +103,12 @@ export function getThawAccountInstruction< TAccountAccount extends string, TAccountMint extends string, TAccountOwner extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: ThawAccountInput + input: ThawAccountInput, + config?: { programAddress?: TProgramAddress } ): ThawAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['owner'] extends TransactionSigner @@ -114,7 +116,7 @@ export function getThawAccountInstruction< : TAccountOwner > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -150,7 +152,7 @@ export function getThawAccountInstruction< programAddress, data: getThawAccountInstructionDataEncoder().encode({}), } as ThawAccountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountAccount, TAccountMint, (typeof input)['owner'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/transfer.ts b/clients/js/src/generated/instructions/transfer.ts index c1bc36c..7c52748 100644 --- a/clients/js/src/generated/instructions/transfer.ts +++ b/clients/js/src/generated/instructions/transfer.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -119,10 +119,12 @@ export function getTransferInstruction< TAccountSource extends string, TAccountDestination extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: TransferInput + input: TransferInput, + config?: { programAddress?: TProgramAddress } ): TransferInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountDestination, (typeof input)['authority'] extends TransactionSigner @@ -131,7 +133,7 @@ export function getTransferInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -169,7 +171,7 @@ export function getTransferInstruction< args as TransferInstructionDataArgs ), } as TransferInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountDestination, (typeof input)['authority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/transferChecked.ts b/clients/js/src/generated/instructions/transferChecked.ts index fb7b51b..5e0abe7 100644 --- a/clients/js/src/generated/instructions/transferChecked.ts +++ b/clients/js/src/generated/instructions/transferChecked.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -134,15 +134,17 @@ export function getTransferCheckedInstruction< TAccountMint extends string, TAccountDestination extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: TransferCheckedInput< TAccountSource, TAccountMint, TAccountDestination, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): TransferCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDestination, @@ -152,7 +154,7 @@ export function getTransferCheckedInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -192,7 +194,7 @@ export function getTransferCheckedInstruction< args as TransferCheckedInstructionDataArgs ), } as TransferCheckedInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDestination, diff --git a/clients/js/src/generated/instructions/transferCheckedWithFee.ts b/clients/js/src/generated/instructions/transferCheckedWithFee.ts index 6e67fd7..0e3d2a5 100644 --- a/clients/js/src/generated/instructions/transferCheckedWithFee.ts +++ b/clients/js/src/generated/instructions/transferCheckedWithFee.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -165,15 +165,17 @@ export function getTransferCheckedWithFeeInstruction< TAccountMint extends string, TAccountDestination extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: TransferCheckedWithFeeInput< TAccountSource, TAccountMint, TAccountDestination, TAccountAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): TransferCheckedWithFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDestination, @@ -183,7 +185,7 @@ export function getTransferCheckedWithFeeInstruction< : TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -223,7 +225,7 @@ export function getTransferCheckedWithFeeInstruction< args as TransferCheckedWithFeeInstructionDataArgs ), } as TransferCheckedWithFeeInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountSource, TAccountMint, TAccountDestination, diff --git a/clients/js/src/generated/instructions/uiAmountToAmount.ts b/clients/js/src/generated/instructions/uiAmountToAmount.ts index 035ddc0..761aa4a 100644 --- a/clients/js/src/generated/instructions/uiAmountToAmount.ts +++ b/clients/js/src/generated/instructions/uiAmountToAmount.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -93,14 +93,15 @@ export type UiAmountToAmountInput = { uiAmount: UiAmountToAmountInstructionDataArgs['uiAmount']; }; -export function getUiAmountToAmountInstruction( - input: UiAmountToAmountInput -): UiAmountToAmountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint -> { +export function getUiAmountToAmountInstruction< + TAccountMint extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, +>( + input: UiAmountToAmountInput, + config?: { programAddress?: TProgramAddress } +): UiAmountToAmountInstruction { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -121,10 +122,7 @@ export function getUiAmountToAmountInstruction( data: getUiAmountToAmountInstructionDataEncoder().encode( args as UiAmountToAmountInstructionDataArgs ), - } as UiAmountToAmountInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, - TAccountMint - >; + } as UiAmountToAmountInstruction; return instruction; } diff --git a/clients/js/src/generated/instructions/updateConfidentialTransferMint.ts b/clients/js/src/generated/instructions/updateConfidentialTransferMint.ts index e97ce99..f6503ca 100644 --- a/clients/js/src/generated/instructions/updateConfidentialTransferMint.ts +++ b/clients/js/src/generated/instructions/updateConfidentialTransferMint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -156,15 +156,17 @@ export type UpdateConfidentialTransferMintInput< export function getUpdateConfidentialTransferMintInstruction< TAccountMint extends string, TAccountAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: UpdateConfidentialTransferMintInput + input: UpdateConfidentialTransferMintInput, + config?: { programAddress?: TProgramAddress } ): UpdateConfidentialTransferMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -190,7 +192,7 @@ export function getUpdateConfidentialTransferMintInstruction< args as UpdateConfidentialTransferMintInstructionDataArgs ), } as UpdateConfidentialTransferMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountAuthority >; diff --git a/clients/js/src/generated/instructions/updateDefaultAccountState.ts b/clients/js/src/generated/instructions/updateDefaultAccountState.ts index ea10f6d..30482da 100644 --- a/clients/js/src/generated/instructions/updateDefaultAccountState.ts +++ b/clients/js/src/generated/instructions/updateDefaultAccountState.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -133,10 +133,12 @@ export type UpdateDefaultAccountStateInput< export function getUpdateDefaultAccountStateInstruction< TAccountMint extends string, TAccountFreezeAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( - input: UpdateDefaultAccountStateInput + input: UpdateDefaultAccountStateInput, + config?: { programAddress?: TProgramAddress } ): UpdateDefaultAccountStateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, (typeof input)['freezeAuthority'] extends TransactionSigner ? ReadonlySignerAccount & @@ -144,7 +146,7 @@ export function getUpdateDefaultAccountStateInstruction< : TAccountFreezeAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -183,7 +185,7 @@ export function getUpdateDefaultAccountStateInstruction< args as UpdateDefaultAccountStateInstructionDataArgs ), } as UpdateDefaultAccountStateInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, (typeof input)['freezeAuthority'] extends TransactionSigner ? ReadonlySignerAccount & diff --git a/clients/js/src/generated/instructions/withdrawWithheldTokensFromAccounts.ts b/clients/js/src/generated/instructions/withdrawWithheldTokensFromAccounts.ts index ddeaa73..6f52a64 100644 --- a/clients/js/src/generated/instructions/withdrawWithheldTokensFromAccounts.ts +++ b/clients/js/src/generated/instructions/withdrawWithheldTokensFromAccounts.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -143,14 +143,16 @@ export function getWithdrawWithheldTokensFromAccountsInstruction< TAccountMint extends string, TAccountFeeReceiver extends string, TAccountWithdrawWithheldAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: WithdrawWithheldTokensFromAccountsInput< TAccountMint, TAccountFeeReceiver, TAccountWithdrawWithheldAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): WithdrawWithheldTokensFromAccountsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner @@ -159,7 +161,7 @@ export function getWithdrawWithheldTokensFromAccountsInstruction< : TAccountWithdrawWithheldAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -201,7 +203,7 @@ export function getWithdrawWithheldTokensFromAccountsInstruction< args as WithdrawWithheldTokensFromAccountsInstructionDataArgs ), } as WithdrawWithheldTokensFromAccountsInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner diff --git a/clients/js/src/generated/instructions/withdrawWithheldTokensFromMint.ts b/clients/js/src/generated/instructions/withdrawWithheldTokensFromMint.ts index 9b4e733..d5c6655 100644 --- a/clients/js/src/generated/instructions/withdrawWithheldTokensFromMint.ts +++ b/clients/js/src/generated/instructions/withdrawWithheldTokensFromMint.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { @@ -134,14 +134,16 @@ export function getWithdrawWithheldTokensFromMintInstruction< TAccountMint extends string, TAccountFeeReceiver extends string, TAccountWithdrawWithheldAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS, >( input: WithdrawWithheldTokensFromMintInput< TAccountMint, TAccountFeeReceiver, TAccountWithdrawWithheldAuthority - > + >, + config?: { programAddress?: TProgramAddress } ): WithdrawWithheldTokensFromMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner @@ -150,7 +152,7 @@ export function getWithdrawWithheldTokensFromMintInstruction< : TAccountWithdrawWithheldAuthority > { // Program address. - const programAddress = TOKEN_2022_PROGRAM_ADDRESS; + const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS; // Original accounts. const originalAccounts = { @@ -189,7 +191,7 @@ export function getWithdrawWithheldTokensFromMintInstruction< programAddress, data: getWithdrawWithheldTokensFromMintInstructionDataEncoder().encode({}), } as WithdrawWithheldTokensFromMintInstruction< - typeof TOKEN_2022_PROGRAM_ADDRESS, + TProgramAddress, TAccountMint, TAccountFeeReceiver, (typeof input)['withdrawWithheldAuthority'] extends TransactionSigner diff --git a/clients/js/src/generated/pdas/associatedToken.ts b/clients/js/src/generated/pdas/associatedToken.ts index c77e267..f9704a9 100644 --- a/clients/js/src/generated/pdas/associatedToken.ts +++ b/clients/js/src/generated/pdas/associatedToken.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/pdas/index.ts b/clients/js/src/generated/pdas/index.ts index 0208f7a..6cd1010 100644 --- a/clients/js/src/generated/pdas/index.ts +++ b/clients/js/src/generated/pdas/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './associatedToken'; diff --git a/clients/js/src/generated/programs/associatedToken.ts b/clients/js/src/generated/programs/associatedToken.ts index c3d3847..b5efc1c 100644 --- a/clients/js/src/generated/programs/associatedToken.ts +++ b/clients/js/src/generated/programs/associatedToken.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/programs/index.ts b/clients/js/src/generated/programs/index.ts index 0f5401d..a18d0d1 100644 --- a/clients/js/src/generated/programs/index.ts +++ b/clients/js/src/generated/programs/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './associatedToken'; diff --git a/clients/js/src/generated/programs/token2022.ts b/clients/js/src/generated/programs/token2022.ts index 1982c9e..698ca67 100644 --- a/clients/js/src/generated/programs/token2022.ts +++ b/clients/js/src/generated/programs/token2022.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/shared/index.ts b/clients/js/src/generated/shared/index.ts index 278bf59..01a7d93 100644 --- a/clients/js/src/generated/shared/index.ts +++ b/clients/js/src/generated/shared/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/accountState.ts b/clients/js/src/generated/types/accountState.ts index 51f8401..d113ca4 100644 --- a/clients/js/src/generated/types/accountState.ts +++ b/clients/js/src/generated/types/accountState.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/authorityType.ts b/clients/js/src/generated/types/authorityType.ts index 5baedc9..826ae17 100644 --- a/clients/js/src/generated/types/authorityType.ts +++ b/clients/js/src/generated/types/authorityType.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/decryptableBalance.ts b/clients/js/src/generated/types/decryptableBalance.ts index f10da08..9d3c9fd 100644 --- a/clients/js/src/generated/types/decryptableBalance.ts +++ b/clients/js/src/generated/types/decryptableBalance.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/encryptedBalance.ts b/clients/js/src/generated/types/encryptedBalance.ts index f942a53..c042b6b 100644 --- a/clients/js/src/generated/types/encryptedBalance.ts +++ b/clients/js/src/generated/types/encryptedBalance.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/extension.ts b/clients/js/src/generated/types/extension.ts index aa5d557..fce0607 100644 --- a/clients/js/src/generated/types/extension.ts +++ b/clients/js/src/generated/types/extension.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/extensionType.ts b/clients/js/src/generated/types/extensionType.ts index 7b2d70f..cce1d07 100644 --- a/clients/js/src/generated/types/extensionType.ts +++ b/clients/js/src/generated/types/extensionType.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/clients/js/src/generated/types/index.ts b/clients/js/src/generated/types/index.ts index c94c807..3328acc 100644 --- a/clients/js/src/generated/types/index.ts +++ b/clients/js/src/generated/types/index.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ export * from './accountState'; diff --git a/clients/js/src/generated/types/transferFee.ts b/clients/js/src/generated/types/transferFee.ts index d49b497..9fde9f8 100644 --- a/clients/js/src/generated/types/transferFee.ts +++ b/clients/js/src/generated/types/transferFee.ts @@ -1,9 +1,9 @@ /** - * This code was AUTOGENERATED using the kinobi library. + * This code was AUTOGENERATED using the codama library. * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun kinobi to update it. + * to add features, then rerun codama to update it. * - * @see https://github.com/kinobi-so/kinobi + * @see https://github.com/codama-idl/codama */ import { diff --git a/package.json b/package.json index 009ee60..abdfaaf 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ }, "devDependencies": { "@iarna/toml": "^2.2.5", - "@kinobi-so/renderers-js": "^0.21.8", - "@kinobi-so/renderers-rust": "^0.21.6", - "kinobi": "^0.21.4", + "@codama/renderers-js": "^1.0.0", + "@codama/renderers-rust": "^1.0.0", + "codama": "^1.0.0", "typescript": "^5.5.2", "zx": "^7.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4d1658..8fc402b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,18 +8,18 @@ importers: .: devDependencies: + '@codama/renderers-js': + specifier: ^1.0.0 + version: 1.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) + '@codama/renderers-rust': + specifier: ^1.0.0 + version: 1.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) '@iarna/toml': specifier: ^2.2.5 version: 2.2.5 - '@kinobi-so/renderers-js': - specifier: ^0.21.8 - version: 0.21.8(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) - '@kinobi-so/renderers-rust': - specifier: ^0.21.6 - version: 0.21.6(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) - kinobi: - specifier: ^0.21.4 - version: 0.21.4 + codama: + specifier: ^1.0.0 + version: 1.0.0 typescript: specifier: ^5.5.2 version: 5.5.3 @@ -29,43 +29,43 @@ importers: packages: - '@iarna/toml@2.2.5': - resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} - - '@kinobi-so/errors@0.21.4': - resolution: {integrity: sha512-Ffu/l5SGGLbSf451on+hHLWKGm8fpoWocCh6+RTftNSe/OHKnz9K0f2esX7ny83Vckpf77sVub1JXwOMW/hW/w==} + '@codama/errors@1.0.0': + resolution: {integrity: sha512-XSdkNbCNJukhKO5TFJ5cFP7TfddxZwqHV7N/XyMbZ0meVPN1ymT94/d/9b8R+bvKuflj/SXImv527tGZWz6pGA==} hasBin: true - '@kinobi-so/node-types@0.21.4': - resolution: {integrity: sha512-/6En6kVU21/skBlKbN6EzD5saDFzFoezDYoonbWurtXJcelTIuqz3D1WwR3iNOXvWco64cqpHG6mM7zdF5WsHA==} + '@codama/node-types@1.0.0': + resolution: {integrity: sha512-UAc+0jprwHFOqtAPqqA//PkrnlUzuqs+N5E36bHhLV0m5qWMlqrfmPg/ffBwMYFJsLFWsRsisALrqPy7ARkUow==} + + '@codama/nodes-from-anchor@1.0.0': + resolution: {integrity: sha512-urqFOV5K1oKBptgIFFLCPWrUsEeZsonml12ieP26ozX12aglGlN0tsxNsCvxJulRIjUxuONbH6xzv7uKt0xSYQ==} - '@kinobi-so/nodes-from-anchor@0.21.2': - resolution: {integrity: sha512-c7lDg9MH4LKod5PwNC4Lvsugx3Dj6bqgw5kQFLUYDdIWVRdR2Z8JGK/LhPXceiDvw2bLnjy2Mmroz8zh2/0cuA==} + '@codama/nodes@1.0.0': + resolution: {integrity: sha512-btcnjDaOpEFvVq3uVzlQK4G2OxxyK3P9HkXw423GZaqYQzeSr1pDdTKjyVyg+QO578CGqIMySVlJ2UAdHVMytw==} - '@kinobi-so/nodes@0.21.4': - resolution: {integrity: sha512-QQbmSsOcfL2GhCMkHP33XihzUDS12jAKMvhNyTzhdpI1QPS40wvMwYfA8UXFtc5B/4aKhneEGUok7QgF4IZXkg==} + '@codama/renderers-core@1.0.0': + resolution: {integrity: sha512-WYvOylIzcR0WOc7GlUvGi5ym8IwmslwyV8zfj7FR646bMqaROirFJc+naGEbZ1lMykOyxcackTKL0eDB7954Qw==} - '@kinobi-so/renderers-core@0.21.2': - resolution: {integrity: sha512-czVR9dfKWwZ5YQB1N83+whsh9g1zCS8rMJZ0t/T3Vd7P0uuKOOGL9ej/WMQZ7qQhCLTDJDEn5Lqf2JInArzqLg==} + '@codama/renderers-js@1.0.0': + resolution: {integrity: sha512-wi9eqrtLbTM49ELqKqxIgbTaf7xKMWT+HIqj6GN373G0OJnSKwUJPIXAGLO+RCls5DGjDuOE5svuThU0zBkfzA==} - '@kinobi-so/renderers-js@0.21.8': - resolution: {integrity: sha512-YYyi5ADxwdC0nbIAH9xHtEFbHW6RJiA9w7i+gtSnX6olpp4g+e0ITOuuV3GmeUlRdflbf3hMMbCNWWl+y7uiOg==} + '@codama/renderers-rust@1.0.0': + resolution: {integrity: sha512-2z+XN6KCTQFDfE30OQcRo2LW4+9dnYlqs8rSUhKO2YsRiCnOoMu/zrNSqLtjL84T2PAwReRq+vBifcE0zaOuRw==} - '@kinobi-so/renderers-rust@0.21.6': - resolution: {integrity: sha512-AIJVE/3KsKNBbzuzpgV5npC7IyeEX9SjIf6LFuKXEfUcyLTVjAmosn+MBCDCtY7bTC2CD1U+Bfjt9/8a+uO4mA==} + '@codama/validators@1.0.0': + resolution: {integrity: sha512-jSfU5IrcGTvcqsJSBSzD3Ochig+hKKg2NKsT/vUfQ4jAw2cQrVUP5f4dMXyX779JYfHLHCwZnBYvgEdgi9gBZQ==} - '@kinobi-so/validators@0.21.4': - resolution: {integrity: sha512-1bCi035dtbL1x1L8b/faNbYQ5Qb9He9dYdCgThQoxJL/v9a7L8F/9D4DGlKxZxEP1xBAflzbVx21QR6ESVpdMA==} + '@codama/visitors-core@1.0.0': + resolution: {integrity: sha512-tDIfURVPf7ZokCFLOpKL6Au0ORiza1sPT4zmRSEjCC7iZp0Vb5K5FrdtUL13Wb+6jNM191e5GUFOmULRoavWug==} - '@kinobi-so/visitors-core@0.21.4': - resolution: {integrity: sha512-xRosguRjUydFX/kdDf56FwW2OQ0dVJQaipG2aceKXGwx8bYorIS7fAWvIOXmLmZbtxKdtggxDW4oSw0DUtWeKQ==} + '@codama/visitors@1.0.0': + resolution: {integrity: sha512-JncE6wRJLxt0imlj+loGH6dLPEMK7ozlv9YjWgCQgUYUI7is66OFwhWP5SFO0iEFlVjtOzZLXVQwoe9LSDz8Gg==} - '@kinobi-so/visitors@0.21.4': - resolution: {integrity: sha512-bebFAvRncmnY0Hy448XRb65a+2LkHJ4acnJyJi9dvJqWgJl6zbhX6Lj0NBYluzSwB28317DMynn+V7PSqOKBbQ==} + '@iarna/toml@2.2.5': + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} - '@noble/hashes@1.4.0': - resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} - engines: {node: '>= 16'} + '@noble/hashes@1.5.0': + resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} + engines: {node: ^14.21.3 || >=16} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -137,6 +137,9 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + codama@1.0.0: + resolution: {integrity: sha512-ttJ9n2THpqTD8fP8reec+Y2j4ZTBuonDJk8SiKuS6enZBXd67JF3b+GFKM2S5a0xtxN5Evof5aBlY3JyC+jujQ==} + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} @@ -272,9 +275,6 @@ packages: jsonify@0.0.1: resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} - kinobi@0.21.4: - resolution: {integrity: sha512-JPN41QCeZT+OB+XqaqAHaqNesybHCm+Qxw4tRKBOfRmPnaV3od9x0kuedvmut8pyv6mm2r2T3bJHNeA9yyOmtA==} - map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} @@ -400,41 +400,39 @@ packages: snapshots: - '@iarna/toml@2.2.5': {} - - '@kinobi-so/errors@0.21.4': + '@codama/errors@1.0.0': dependencies: - '@kinobi-so/node-types': 0.21.4 + '@codama/node-types': 1.0.0 chalk: 5.3.0 commander: 12.1.0 - '@kinobi-so/node-types@0.21.4': {} + '@codama/node-types@1.0.0': {} - '@kinobi-so/nodes-from-anchor@0.21.2': + '@codama/nodes-from-anchor@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/visitors': 0.21.4 - '@noble/hashes': 1.4.0 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/visitors': 1.0.0 + '@noble/hashes': 1.5.0 - '@kinobi-so/nodes@0.21.4': + '@codama/nodes@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/node-types': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/node-types': 1.0.0 - '@kinobi-so/renderers-core@0.21.2': + '@codama/renderers-core@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/visitors-core': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/visitors-core': 1.0.0 - '@kinobi-so/renderers-js@0.21.8(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3)': + '@codama/renderers-js@1.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3)': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/nodes-from-anchor': 0.21.2 - '@kinobi-so/renderers-core': 0.21.2 - '@kinobi-so/visitors-core': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/nodes-from-anchor': 1.0.0 + '@codama/renderers-core': 1.0.0 + '@codama/visitors-core': 1.0.0 '@solana/codecs-strings': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) nunjucks: 3.2.4 prettier: 3.3.3 @@ -443,12 +441,12 @@ snapshots: - fastestsmallesttextencoderdecoder - typescript - '@kinobi-so/renderers-rust@0.21.6(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3)': + '@codama/renderers-rust@1.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3)': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/renderers-core': 0.21.2 - '@kinobi-so/visitors-core': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/renderers-core': 1.0.0 + '@codama/visitors-core': 1.0.0 '@solana/codecs-strings': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.5.3) nunjucks: 3.2.4 transitivePeerDependencies: @@ -456,25 +454,27 @@ snapshots: - fastestsmallesttextencoderdecoder - typescript - '@kinobi-so/validators@0.21.4': + '@codama/validators@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/visitors-core': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/visitors-core': 1.0.0 - '@kinobi-so/visitors-core@0.21.4': + '@codama/visitors-core@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 json-stable-stringify: 1.1.1 - '@kinobi-so/visitors@0.21.4': + '@codama/visitors@1.0.0': dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/visitors-core': 0.21.4 + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/visitors-core': 1.0.0 + + '@iarna/toml@2.2.5': {} - '@noble/hashes@1.4.0': {} + '@noble/hashes@1.5.0': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -550,6 +550,13 @@ snapshots: chalk@5.3.0: {} + codama@1.0.0: + dependencies: + '@codama/errors': 1.0.0 + '@codama/nodes': 1.0.0 + '@codama/validators': 1.0.0 + '@codama/visitors': 1.0.0 + commander@12.1.0: {} commander@5.1.0: {} @@ -690,13 +697,6 @@ snapshots: jsonify@0.0.1: {} - kinobi@0.21.4: - dependencies: - '@kinobi-so/errors': 0.21.4 - '@kinobi-so/nodes': 0.21.4 - '@kinobi-so/validators': 0.21.4 - '@kinobi-so/visitors': 0.21.4 - map-stream@0.1.0: {} merge2@1.4.1: {} diff --git a/program/idl.json b/program/idl.json index 69c352b..e05bfe3 100644 --- a/program/idl.json +++ b/program/idl.json @@ -1,7 +1,7 @@ { "kind": "rootNode", - "standard": "kinobi", - "version": "0.20.1", + "standard": "codama", + "version": "1.0.0", "program": { "kind": "programNode", "name": "token-2022", diff --git a/scripts/generate-clients.mjs b/scripts/generate-clients.mjs index 80bb37b..da6e849 100644 --- a/scripts/generate-clients.mjs +++ b/scripts/generate-clients.mjs @@ -1,18 +1,18 @@ #!/usr/bin/env zx import 'zx/globals'; -import { createFromRoot } from 'kinobi'; -import { renderVisitor as renderJavaScriptVisitor } from '@kinobi-so/renderers-js'; -// import { renderVisitor as renderRustVisitor } from "@kinobi-so/renderers-rust"; +import { createFromRoot } from 'codama'; +import { renderVisitor as renderJavaScriptVisitor } from '@codama/renderers-js'; +// import { renderVisitor as renderRustVisitor } from "@codama/renderers-rust"; import { workingDirectory } from './utils.mjs'; -// Instanciate Kinobi. -const kinobi = createFromRoot( +// Instanciate Codama. +const codama = createFromRoot( require(path.join(workingDirectory, 'program', 'idl.json')) ); // Render JavaScript. const jsClient = path.join(__dirname, '..', 'clients', 'js'); -kinobi.accept( +codama.accept( renderJavaScriptVisitor(path.join(jsClient, 'src', 'generated'), { prettier: require(path.join(jsClient, '.prettierrc.json')), }) @@ -20,7 +20,7 @@ kinobi.accept( // Render Rust. // const rustClient = path.join(__dirname, "..", "clients", "rust"); -// kinobi.accept( +// codama.accept( // renderRustVisitor(path.join(rustClient, "src", "generated"), { // formatCode: true, // crateFolder: rustClient,