Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clients/js/src/generated/accounts/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/accounts/mint.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/accounts/multisig.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/accounts/token.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/errors/associatedToken.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/errors/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/errors/token2022.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
26 changes: 12 additions & 14 deletions clients/js/src/generated/instructions/amountToUiAmount.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -93,14 +93,15 @@ export type AmountToUiAmountInput<TAccountMint extends string = string> = {
amount: AmountToUiAmountInstructionDataArgs['amount'];
};

export function getAmountToUiAmountInstruction<TAccountMint extends string>(
input: AmountToUiAmountInput<TAccountMint>
): AmountToUiAmountInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TAccountMint
> {
export function getAmountToUiAmountInstruction<
TAccountMint extends string,
TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS,
>(
input: AmountToUiAmountInput<TAccountMint>,
config?: { programAddress?: TProgramAddress }
): AmountToUiAmountInstruction<TProgramAddress, TAccountMint> {
// Program address.
const programAddress = TOKEN_2022_PROGRAM_ADDRESS;
const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS;

// Original accounts.
const originalAccounts = {
Expand All @@ -121,10 +122,7 @@ export function getAmountToUiAmountInstruction<TAccountMint extends string>(
data: getAmountToUiAmountInstructionDataEncoder().encode(
args as AmountToUiAmountInstructionDataArgs
),
} as AmountToUiAmountInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TAccountMint
>;
} as AmountToUiAmountInstruction<TProgramAddress, TAccountMint>;

return instruction;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -154,18 +154,20 @@ export type ApplyConfidentialPendingBalanceInput<
export function getApplyConfidentialPendingBalanceInstruction<
TAccountToken extends string,
TAccountAuthority extends string,
TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS,
>(
input: ApplyConfidentialPendingBalanceInput<TAccountToken, TAccountAuthority>
input: ApplyConfidentialPendingBalanceInput<TAccountToken, TAccountAuthority>,
config?: { programAddress?: TProgramAddress }
): ApplyConfidentialPendingBalanceInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountToken,
(typeof input)['authority'] extends TransactionSigner<TAccountAuthority>
? ReadonlySignerAccount<TAccountAuthority> &
IAccountSignerMeta<TAccountAuthority>
: TAccountAuthority
> {
// Program address.
const programAddress = TOKEN_2022_PROGRAM_ADDRESS;
const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS;

// Original accounts.
const originalAccounts = {
Expand Down Expand Up @@ -201,7 +203,7 @@ export function getApplyConfidentialPendingBalanceInstruction<
args as ApplyConfidentialPendingBalanceInstructionDataArgs
),
} as ApplyConfidentialPendingBalanceInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountToken,
(typeof input)['authority'] extends TransactionSigner<TAccountAuthority>
? ReadonlySignerAccount<TAccountAuthority> &
Expand Down
16 changes: 9 additions & 7 deletions clients/js/src/generated/instructions/approve.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -119,18 +119,20 @@ export function getApproveInstruction<
TAccountSource extends string,
TAccountDelegate extends string,
TAccountOwner extends string,
TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS,
>(
input: ApproveInput<TAccountSource, TAccountDelegate, TAccountOwner>
input: ApproveInput<TAccountSource, TAccountDelegate, TAccountOwner>,
config?: { programAddress?: TProgramAddress }
): ApproveInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountSource,
TAccountDelegate,
(typeof input)['owner'] extends TransactionSigner<TAccountOwner>
? ReadonlySignerAccount<TAccountOwner> & IAccountSignerMeta<TAccountOwner>
: TAccountOwner
> {
// Program address.
const programAddress = TOKEN_2022_PROGRAM_ADDRESS;
const programAddress = config?.programAddress ?? TOKEN_2022_PROGRAM_ADDRESS;

// Original accounts.
const originalAccounts = {
Expand Down Expand Up @@ -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<TAccountOwner>
Expand Down
16 changes: 9 additions & 7 deletions clients/js/src/generated/instructions/approveChecked.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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 = {
Expand Down Expand Up @@ -191,7 +193,7 @@ export function getApproveCheckedInstruction<
args as ApproveCheckedInstructionDataArgs
),
} as ApproveCheckedInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountSource,
TAccountMint,
TAccountDelegate,
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 = {
Expand All @@ -164,7 +166,7 @@ export function getApproveConfidentialTransferAccountInstruction<
{}
),
} as ApproveConfidentialTransferAccountInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountToken,
TAccountMint,
TAccountAuthority
Expand Down
16 changes: 9 additions & 7 deletions clients/js/src/generated/instructions/burn.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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<TAccountAccount, TAccountMint, TAccountAuthority>
input: BurnInput<TAccountAccount, TAccountMint, TAccountAuthority>,
config?: { programAddress?: TProgramAddress }
): BurnInstruction<
typeof TOKEN_2022_PROGRAM_ADDRESS,
TProgramAddress,
TAccountAccount,
TAccountMint,
(typeof input)['authority'] extends TransactionSigner<TAccountAuthority>
Expand All @@ -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 = {
Expand Down Expand Up @@ -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<TAccountAuthority>
Expand Down
Loading