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
8 changes: 4 additions & 4 deletions clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"homepage": "https://github.com/solana-program/program-metadata#readme",
"license": "MIT",
"peerDependencies": {
"@solana/web3.js": "^2.0.0"
"@solana/kit": "^2.1.0"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"@solana-program/compute-budget": "^0.6.1",
"@solana-program/system": "^0.6.2",
"@solana-program/compute-budget": "^0.7.0",
"@solana-program/system": "^0.7.0",
"chalk": "^4.1.0",
"commander": "^13.0.0",
"pako": "^2.1.0",
Expand All @@ -59,7 +59,7 @@
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana/eslint-config-solana": "^3.0.3",
"@solana/web3.js": "^2.0.0",
"@solana/kit": "^2.1.0",
"@types/node": "^22",
"@types/pako": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^7.16.1",
Expand Down
603 changes: 302 additions & 301 deletions clients/js/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/js/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
RpcSubscriptions,
SolanaRpcApi,
SolanaRpcSubscriptionsApi,
} from '@solana/web3.js';
} from '@solana/kit';
import chalk from 'chalk';
import { Command, Option } from 'commander';
import { parse as parseYaml } from 'yaml';
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/createMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
GetMinimumBalanceForRentExemptionApi,
Lamports,
Rpc,
} from '@solana/web3.js';
} from '@solana/kit';
import {
getAllocateInstruction,
getInitializeInstruction,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/downloadMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parse as parseToml } from '@iarna/toml';
import { Address, GetAccountInfoApi, Rpc } from '@solana/web3.js';
import { Address, GetAccountInfoApi, Rpc } from '@solana/kit';
import { parse as parseYaml } from 'yaml';
import { fetchMetadataFromSeeds, Format, SeedArgs } from './generated';
import { unpackAndFetchData } from './packData';
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/accounts/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
type Option,
type OptionOrNullable,
type ReadonlyUint8Array,
} from '@solana/web3.js';
} from '@solana/kit';
import { MetadataSeeds, findMetadataPda } from '../pdas';
import {
AccountDiscriminator,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/accounts/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
type Option,
type OptionOrNullable,
type ReadonlyUint8Array,
} from '@solana/web3.js';
} from '@solana/kit';
import { MetadataSeeds, findMetadataPda } from '../pdas';
import {
AccountDiscriminator,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/allocate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';
import {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/close.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
type ReadonlyUint8Array,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { findCanonicalPda, findNonCanonicalPda } from '../pdas';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/setAuthority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/setData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
type ReadonlyUint8Array,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';
import {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/setImmutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/trim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/instructions/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
type ReadonlyUint8Array,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { PROGRAM_METADATA_PROGRAM_ADDRESS } from '../programs';
import { getAccountMetaFactory, type ResolvedAccount } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/pdas/canonical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getProgramDerivedAddress,
type Address,
type ProgramDerivedAddress,
} from '@solana/web3.js';
} from '@solana/kit';
import { getSeedEncoder, type SeedArgs } from '../types';

export type CanonicalSeeds = {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/pdas/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Address,
type OptionOrNullable,
type ProgramDerivedAddress,
} from '@solana/web3.js';
} from '@solana/kit';
import { getSeedEncoder, type SeedArgs } from '../types';

export type MetadataSeeds = {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/pdas/nonCanonical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getProgramDerivedAddress,
type Address,
type ProgramDerivedAddress,
} from '@solana/web3.js';
} from '@solana/kit';
import { getSeedEncoder, type SeedArgs } from '../types';

export type NonCanonicalSeeds = {
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/programs/programMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getU8Encoder,
type Address,
type ReadonlyUint8Array,
} from '@solana/web3.js';
} from '@solana/kit';
import {
type ParsedAllocateInstruction,
type ParsedCloseInstruction,
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import {
AccountRole,
isProgramDerivedAddress,
isTransactionSigner as web3JsIsTransactionSigner,
isTransactionSigner as kitIsTransactionSigner,
type Address,
type IAccountMeta,
type IAccountSignerMeta,
type ProgramDerivedAddress,
type TransactionSigner,
upgradeRoleToSigner,
} from '@solana/web3.js';
} from '@solana/kit';

/**
* Asserts that the given value is not null or undefined.
Expand Down Expand Up @@ -159,6 +159,6 @@ export function isTransactionSigner<TAddress extends string = string>(
!!value &&
typeof value === 'object' &&
'address' in value &&
web3JsIsTransactionSigner(value)
kitIsTransactionSigner(value)
);
}
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/accountDiscriminator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export enum AccountDiscriminator {
Empty,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/compression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export enum Compression {
None,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/dataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export enum DataSource {
Direct,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export enum Encoding {
None,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/externalData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
type Encoder,
type Option,
type OptionOrNullable,
} from '@solana/web3.js';
} from '@solana/kit';

export type ExternalData = {
address: Address;
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export enum Format {
None,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/generated/types/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';
} from '@solana/kit';

export type Seed = string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
TransactionMessageWithBlockhashLifetime,
TransactionMessageWithDurableNonceLifetime,
TransactionWithBlockhashLifetime,
} from '@solana/web3.js';
} from '@solana/kit';
import {
getTransactionMessageFromPlan,
MessageInstructionPlan,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/instructionPlans/instructionPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
appendTransactionMessageInstructions,
BaseTransactionMessage,
IInstruction,
} from '@solana/web3.js';
} from '@solana/kit';

export type InstructionPlan =
| SequentialInstructionPlan
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
Transaction,
TransactionMessageWithBlockhashLifetime,
TransactionSigner,
} from '@solana/web3.js';
} from '@solana/kit';
import {
ExtendInstruction,
findMetadataPda,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/packData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
ReadonlyUint8Array,
Rpc,
unwrapOption,
} from '@solana/web3.js';
} from '@solana/kit';
import { deflate, gzip, inflate, ungzip } from 'pako';
import {
Compression,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/updateMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Lamports,
Rpc,
TransactionSigner,
} from '@solana/web3.js';
} from '@solana/kit';
import {
fetchMetadata,
getAllocateInstruction,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
Transaction,
TransactionSigner,
unwrapOption,
} from '@solana/web3.js';
} from '@solana/kit';
import {
CompressionArgs,
DataSourceArgs,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
TransactionMessageWithBlockhashLifetime,
TransactionSigner,
unwrapOption,
} from '@solana/web3.js';
} from '@solana/kit';
import {
Compression,
DataSource,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/allocate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
none,
pipe,
some,
} from '@solana/web3.js';
} from '@solana/kit';
import test from 'ava';
import {
AccountDiscriminator,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/close.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
generateKeyPairSigner,
getUtf8Encoder,
pipe,
} from '@solana/web3.js';
} from '@solana/kit';
import test from 'ava';
import {
fetchMaybeMetadata,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/createMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { address, getUtf8Encoder, none, some } from '@solana/web3.js';
import { address, getUtf8Encoder, none, some } from '@solana/kit';
import test from 'ava';
import {
AccountDiscriminator,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/downloadMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { address } from '@solana/web3.js';
import { address } from '@solana/kit';
import test from 'ava';
import {
downloadAndParseMetadata,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/extend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
generateKeyPairSigner,
getUtf8Encoder,
pipe,
} from '@solana/web3.js';
} from '@solana/kit';
import test from 'ava';
import {
ACCOUNT_HEADER_LENGTH,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/initialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
none,
pipe,
some,
} from '@solana/web3.js';
} from '@solana/kit';
import test from 'ava';
import {
AccountDiscriminator,
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/loader-v3/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
type TransactionSigner,
type WritableAccount,
type WritableSignerAccount,
} from '@solana/web3.js';
} from '@solana/kit';
import { getAccountMetaFactory, type ResolvedAccount } from './shared';
import { LOADER_V3_PROGRAM_ADDRESS } from '../../src';

Expand Down
Loading
Loading