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/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
},
"homepage": "https://github.com/solana-program/token#readme",
"peerDependencies": {
"@solana/kit": "^3.0"
"@solana/kit": "^4.0"
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana-program/system": "^0.8.0",
"@solana-program/system": "^0.9.0",
"@solana/eslint-config-solana": "^3.0.3",
"@solana/kit": "^3.0",
"@solana/kit": "^4.0",
"@types/node": "^24",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
Expand Down
618 changes: 309 additions & 309 deletions clients/js/pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/mint.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/multisig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/token.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/errors/associatedToken.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/errors/token.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
16 changes: 6 additions & 10 deletions clients/js/src/generated/instructions/amountToUiAmount.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -117,15 +117,13 @@ export function getAmountToUiAmountInstruction<
const args = { ...input };

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [getAccountMeta(accounts.mint)],
programAddress,
data: getAmountToUiAmountInstructionDataEncoder().encode(
args as AmountToUiAmountInstructionDataArgs
),
} as AmountToUiAmountInstruction<TProgramAddress, TAccountMint>;

return instruction;
programAddress,
} as AmountToUiAmountInstruction<TProgramAddress, TAccountMint>);
}

export type ParsedAmountToUiAmountInstruction<
Expand Down Expand Up @@ -160,9 +158,7 @@ export function parseAmountToUiAmountInstruction<
};
return {
programAddress: instruction.programAddress,
accounts: {
mint: getNextAccount(),
},
accounts: { mint: getNextAccount() },
data: getAmountToUiAmountInstructionDataDecoder().decode(instruction.data),
};
}
12 changes: 5 additions & 7 deletions clients/js/src/generated/instructions/approve.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -159,27 +159,25 @@ export function getApproveInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [
getAccountMeta(accounts.source),
getAccountMeta(accounts.delegate),
getAccountMeta(accounts.owner),
...remainingAccounts,
],
programAddress,
data: getApproveInstructionDataEncoder().encode(
args as ApproveInstructionDataArgs
),
programAddress,
} as ApproveInstruction<
TProgramAddress,
TAccountSource,
TAccountDelegate,
(typeof input)['owner'] extends TransactionSigner<TAccountOwner>
? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner>
: TAccountOwner
>;

return instruction;
>);
}

export type ParsedApproveInstruction<
Expand Down
12 changes: 5 additions & 7 deletions clients/js/src/generated/instructions/approveChecked.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -181,18 +181,18 @@ export function getApproveCheckedInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [
getAccountMeta(accounts.source),
getAccountMeta(accounts.mint),
getAccountMeta(accounts.delegate),
getAccountMeta(accounts.owner),
...remainingAccounts,
],
programAddress,
data: getApproveCheckedInstructionDataEncoder().encode(
args as ApproveCheckedInstructionDataArgs
),
programAddress,
} as ApproveCheckedInstruction<
TProgramAddress,
TAccountSource,
Expand All @@ -201,9 +201,7 @@ export function getApproveCheckedInstruction<
(typeof input)['owner'] extends TransactionSigner<TAccountOwner>
? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner>
: TAccountOwner
>;

return instruction;
>);
}

export type ParsedApproveCheckedInstruction<
Expand Down
12 changes: 5 additions & 7 deletions clients/js/src/generated/instructions/burn.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -157,17 +157,17 @@ export function getBurnInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [
getAccountMeta(accounts.account),
getAccountMeta(accounts.mint),
getAccountMeta(accounts.authority),
...remainingAccounts,
],
programAddress,
data: getBurnInstructionDataEncoder().encode(
args as BurnInstructionDataArgs
),
programAddress,
} as BurnInstruction<
TProgramAddress,
TAccountAccount,
Expand All @@ -176,9 +176,7 @@ export function getBurnInstruction<
? ReadonlySignerAccount<TAccountAuthority> &
AccountSignerMeta<TAccountAuthority>
: TAccountAuthority
>;

return instruction;
>);
}

export type ParsedBurnInstruction<
Expand Down
12 changes: 5 additions & 7 deletions clients/js/src/generated/instructions/burnChecked.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -167,17 +167,17 @@ export function getBurnCheckedInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [
getAccountMeta(accounts.account),
getAccountMeta(accounts.mint),
getAccountMeta(accounts.authority),
...remainingAccounts,
],
programAddress,
data: getBurnCheckedInstructionDataEncoder().encode(
args as BurnCheckedInstructionDataArgs
),
programAddress,
} as BurnCheckedInstruction<
TProgramAddress,
TAccountAccount,
Expand All @@ -186,9 +186,7 @@ export function getBurnCheckedInstruction<
? ReadonlySignerAccount<TAccountAuthority> &
AccountSignerMeta<TAccountAuthority>
: TAccountAuthority
>;

return instruction;
>);
}

export type ParsedBurnCheckedInstruction<
Expand Down
12 changes: 5 additions & 7 deletions clients/js/src/generated/instructions/closeAccount.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -143,25 +143,23 @@ export function getCloseAccountInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const instruction = {
return Object.freeze({
accounts: [
getAccountMeta(accounts.account),
getAccountMeta(accounts.destination),
getAccountMeta(accounts.owner),
...remainingAccounts,
],
programAddress,
data: getCloseAccountInstructionDataEncoder().encode({}),
programAddress,
} as CloseAccountInstruction<
TProgramAddress,
TAccountAccount,
TAccountDestination,
(typeof input)['owner'] extends TransactionSigner<TAccountOwner>
? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner>
: TAccountOwner
>;

return instruction;
>);
}

export type ParsedCloseAccountInstruction<
Expand Down
Loading